#include <iostream>
#include <vector>
#include <cmath>
#include <complex>

using namespace std;

int main()
{
    int n; cin>>n;
    vector<complex<double> > z(n);
    for(int i=0;i<n;i++)
    {
        int x,y;
        cin>>x>>y;

        complex<double> z1(x,y);

        z.push_back(z1);
    }
    int br=0;
    for(int i=0;i<n;i++)
        for(int j=i+1;j<n;j++)
        {
        complex<double> z2 = z[i] * z[j];
         if(abs(z2.real())<1e-9)
         {
             br++;
             br=br%(1000000000+7);
         }
        }

    cout<<br;
    return 0;
}