n=int(input())
kaori=[tuple(map(int,input().split())) for _ in range(n)]
ee=10e-8

kaori=[tuple(tup[0]/(tup[1]+ee),-tup[1]/(tup[0]+ee)) for tup in kaori]

cout=0

for i in range(n-1):
  for j in range(i+1,n):
    if kaori[i][0]==kaori[j][1]:
      pass
    else:cout+=1
      
      
print(cout%1000000007)