n = int(input())
l=[list(map(int, input().split())) for _ in range(n)]
cnt=0
for i in range(n-1):
    for j in range(i+1, n):
        if l[i][0]*l[j][0]+l[i][1]*l[j][1] == 0:
            cnt+=1

print((2**n-1-2**(n-2))%1000000007)