import itertools
import numpy as np 

exit_list = []
feature_fish = []
count=0
N = int(input())
num_fish = np.arange(N)
for i in range(N):
    A, B = (int(x) for x in input().split())
    feature_fish.append([A, B])

num_fish_seq = list(itertools.combinations(num_fish,2))
for i in range(len(num_fish_seq)):
    x = feature_fish[num_fish_seq[i][0]]
    y = feature_fish[num_fish_seq[i][1]]
    hontei = x[0]*y[0] + x[1]*y[1]
    if hontei != 0:
        count += 1
    else:
        exit_list.append(num_fish_seq[i])

for i in range(2, N):
    demo = list(itertools.combinations(num_fish, i+1))
    for k in range(len(demo)):
        check = 0
        for i in range(len(exit_list)):
            if not(set(exit_list[i]) <= set(demo[k])):
                check += 1
                if check == len(exit_list):
                    count += 1

result = count + len(num_fish)
answer = result % 1000000007
print(answer)
