import sys
input = sys.stdin.readline
import itertools
N = int(input())
ab = [list(map(int, input().split())) for n in range(N)]

comb2 = list(itertools.combinations(range(N), 2))
badcomb = list()

for c in comb2:
  i = c[0]
  j = c[1]
  if ab[i][0]*ab[j][0]+ab[i][1]*ab[j][1] == 0:
    badcomb.append(c)
  

count = N + len(comb2) -len(badcomb)
for n in range(3, N+1):
  combn = list(itertools.combinations(range(N), n))
  prevc = count
  count += len(combn)
  for c in combn:
    for bc in badcomb:
      if set(bc) <= set(c):
        count -= 1
        break
  if count == prevc:
    break

r = count % 1000000007
print(r)