#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
const double PI = 3.14159265358979323846;
int main() {
  int N;
  cin >> N;
  pair<long long, long long> iwa[N];
  for (long long i = 0; i < N; i++) cin >> iwa[i].first >> iwa[i].second;
  long long count = 0;
  for (int bit = 0; bit < (1 << N); bit++) {
    for (int i = 0; i <= N - 2; i++) {
      for (int j = i + 1; j <= N - 1; j++) {
        if (bit & (1 << i) && bit & (1 << j)) {
          if (iwa[i].first * iwa[j].first + iwa[i].second * iwa[j].second !=
              0) {
            count++;
            count %= 1000000007;
          }
        }
      }
    }
  }
  cout << count << endl;
}
