#include <bits/stdc++.h>

using namespace std;

double zaokruzi(double x)
{
    x = (int)(x * 100 + .5);
    x = (double)x / 100;
    return x;
}
bool sadrziNulu(int x1, int y1, int x2, int y2)
{
    if((x1 == 0 && y1 == 0) || (x2 == 0 && y2 == 0))
        return true;
    else if(y1 == 0 && y2 == 0 && x1 == -x2)
        return true;
    else if(x1 == -x2 && y1 == -y2)
        return true;
    else
        return false;
}
bool xSadrziNulu(int x1, int y1, int x2, int y2)
{
    if(x1 == 0 && x2 == 0 && y1 == -y2)
        return true;
    else
        return false;
}
bool uTrouglu(int x1, int y1, int x2, int y2, int x3, int y3)
{
    double pABC, pTAC, pTBC, pTBA;
    double AB, AC, BC, TA, TB, TC;
    double sABC, sTAC, sTBC, sTBA;
    AB = zaokruzi(sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));
    AC = zaokruzi(sqrt((x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3)));
    BC = zaokruzi(sqrt((x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2)));
    TA = zaokruzi(sqrt(x1 * x1 + y1 * y1));
    TB = zaokruzi(sqrt(x2 * x2 + y2 * y2));
    TC = zaokruzi(sqrt(x3 * x3 + y3 * y3));
    sABC = (AB + BC + AC) / 2;
    sTAC = (TA + TC + AC) / 2;
    sTBC = (TB + TC + BC) / 2;
    sTBA = (TA + TB + AB) / 2;
    pABC = zaokruzi(sqrt(sABC * (sABC - AB) * (sABC - BC) * (sABC - AC)));
    pTAC = zaokruzi(sqrt(sTAC * (sTAC - AC) * (sTAC - TC) * (sTAC - TA)));
    pTBC = zaokruzi(sqrt(sTBC * (sTBC - BC) * (sTBC - TC) * (sTBC - TB)));
    pTBA = zaokruzi(sqrt(sTBA * (sTBA - AB) * (sTBA - TA) * (sTBA - TB)));
    if(pTAC + pTBA + pTBC == pABC)
        return true;
    else
        return false;
}

int main()
{
    int N, uk = 0;
    cin >> N;
    vector<tuple<int, int>> koord;
    int x, y, k, n;
    int x1, x2, x3, y1, y2, y3;
    for(int i = 0; i < N; i++)
    {
        cin >> x >> y;
        koord.push_back(make_tuple(x, y));
        if(x == 0 && y == 0)
            uk++;
    }
    koord.push_back(koord[0]);
    for(int i = 0; i < N; i++)
    {
        for(int j = i + 1; j < N; j++)
        {

            y1 = get<1>(koord[i]);
            y2 = get<1>(koord[j]);
            x1 = get<0>(koord[i]);
            x2 = get<0>(koord[j]);
            if(x1 == x2)
            {
                if(xSadrziNulu(x1, y1, x2, y2))
                    uk++;
            }
            else
            {
                k = (y1 - y1) / (x1 - x2);
                n = y1 - k * x1;
                if(n == 0 && sadrziNulu(x1, y1, x2, y2))
                    uk++;
            }

        }
    }
    x1 = get<0>(koord[0]);
    y1 = get<1>(koord[0]);
    x2 = get<0>(koord[1]);
    y2 = get<1>(koord[1]);
    x3 = get<0>(koord[2]);
    y3 = get<1>(koord[2]);
    if(uTrouglu(x1, y1, x2, y2, x3, y3))
        uk++;
    int br = uk % 1000000007;
    cout << br;
    return 0;
    //1000000007 1e+9 + 7
}