#include <bits/stdc++.h>
using namespace std;
int value[200000][2];
int queue[200000];
int main() {
  int n;
  cin >> n;
  long long result = n;
  int pairs = 0;
  int flag = 1;
  int num = 0;
  for (int i = 0; i < n; ++i) {
    cin >> value[i][0] >> value[i][1];
  }
  for (int i = 2; i <= n; ++i) {
    for (int j = 0; j < n - i + 1; ++j) {
      num = 0;
      for (int k = j; k < n; ++k) {
        flag = 1;
        for (int m = j; m <= k; ++m) {
          if (queue[m] =
                  1 &&
                  value[k][0] * value[m][0] + value[k][1] * value[m][1] == 0) {
            flag = 0;
            break;
          }
        }
        if (flag == 1) {
          queue[k] = 1;
          num++;
        }
        if (num == i || k == n - 1) {
          for (int l = j; l < n; ++l) {
            queue[l] = 0;
          }
          if (num == i) {
            result++;
            break;
          }
        }
      }
    }
  }
  cout << result % 1000000007 << endl;
  return 0;
}
