import math
import fractions
#fractions.gcd(x,y)
def lcm(a,b): return a*b//fractions.gcd(a,b)

n=int(input())
w={}
for i in range(n):
    a,b=map(int,input().split())
    x=fractions.gcd(abs(a),abs(b))
    #if x==1:
    #    print(a,b)
    #else:
    #    print(a//x,b//x)
    if (a//x,b//x) in w:
        w[(a//x,b//x)]+=1
    else:
        w[(a//x,b//x)]=1
#print(w)
print(0)
