N = int(input())
A = [map(int,input().split()) for i in range(N)]

n = 0
m = 0
ans = 0
#一匹目の魚のステータス
stats = A[n]
statss = A[m]
#美味しさ、香り高さ
stats[0]
stats[1]

for i in range(N + 1):
  n = i
  for g in range(N):
    m = g
    if stats[0]*statss[0] + stats[1]*statss[1] == 0:
      ans += 1
print(n*(n-1) - ans)
    