import numpy as np
import itertools


def func(comb, ngList):
    _res = [False for ng in ngList if ng[0] in comb and ng[1] in comb]
    if len(_res) == 0:
        return True
    else:
        return False


n = int(input())
x = np.zeros((n, 2))
for i in range(n):
    _tmp = input()
    x[i, 0], x[i, 1] = [float(f) for f in _tmp.split(" ")]

counter = n
ngList = []
for i, j in itertools.combinations(np.arange(n), 2):
    res = x[i, 0] * x[j, 0] + x[i, 1] * x[j, 1]
    if res == 0:
        ngList.append([i, j])

for m in range(2, n + 1):
    res = [func(comb, ngList) for comb in itertools.combinations(np.arange(n), m)]

    counter += sum(res)

print(counter % 1000000007)