from bisect import * from math import * import sys sys.setrecursionlimit(10 ** 6) int1 = lambda x: int(x) - 1 p2D = lambda x: print(*x, sep="\n") def MI(): return map(int, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] def main(): n=int(input()) xy=[LI() for _ in range(n)] rad=[atan2(y,x) for x,y in xy] #print(rad) rad.sort() #rad+=[r+2*pi for r in rad] #print(rad) ans=0 for i in range(n-2): r0=rad[i] if r0>pi:break L=bisect_right(rad,r0+pi) for j in range(i+1,n-1): r1=rad[j] if r0+pi<=r1:break R=bisect_left(rad,r1+pi) #print(i,j,r0,r1,L,R) ans+=R-L print(ans) main()