def comp(a,b):
    if a[1]*b[1]+a[0]*b[0] != 0:
        return(True)
    else:
        return(False)

n = int(input())
l = []
for _ in range(n):
    l.append(list(map(int,input().split())))

ans = 0                
s = 0
while s < n:
    d = 0
    for i in l[s+1:]:
        if comp(l[0],i) == True:
            d += 1
        else:
            continue
        
    ans+=(2**d)
    s += 1
print(ans)
            
    
    
    