from itertools import combinations
n = int(input())
s = []
p = 0
for _ in range(n):
	i, j = map(int, input().split())
	s.append([i, j])

hate = []
for i in range(len(s)):
	for j in range(i+1, n):
		if s[i][0]*s[j][0] + s[i][1]*s[j][1] == 0:
			hate.append([i, j])

def comb(li):
	count = 0
	for l in li:
		if len(l) == 1:
			count += 1
		else:
			flag = 0
			for pr in list(combinations(l, 2)):
				if list(pr) in hate:
					flag = 1
					break
			if flag == 0:
				count += 1
	return count

for i in range(1, n+1):
	l = list(combinations(range(0, n), i))
	p += comb(l)
print(p % 1000000007)