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()) rad = [] rxy = [] for _ in range(n): x, y = MI() rxy.append((atan2(y, x), x, y)) rxy.sort() rad = [r for r, x, y in rxy] # print(rxy) # print(rad) ans = 0 for i, (r0, x0, y0) in enumerate(rxy[:-2]): if r0 >= 0: break r0p = atan2(-y0, -x0) L = bisect_right(rad, r0p) for r1, x1, y1 in rxy[i + 1:]: if r0 == r1: continue if r1 >= r0p: break r1p = atan2(-y1, -x1) R = bisect_left(rad, r1p) if r1p < 0: R = n ans += R - L # print(i, r0, x0, y0, atan2(-y0, -x0), L) # print(r1, x1, y1, atan2(-y1, -x1), R) print(ans) main()