#!/usr/bin/ python3.8 import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines import numpy as np N = int(readline()) XY = np.array(read().split(), np.int64) X = XY[::2] Y = XY[1::2] g = np.abs(np.gcd(X, Y)) Xd = X // g Yd = Y // g key = (Xd << 32) + Yd total = N * (N - 1) * (N - 2) // 6 ng0 = 0 ng1 = 0 ng2 = 0 ng3 = 0 for x, y, k in zip(X, Y, key): n = np.count_nonzero(X * y - Y * x > 0) same = np.count_nonzero(key == k) opp = np.count_nonzero(key == -k) ng0 += n * (n - 1) // 2 ng1 += (same - 1) * n ng2 += opp * (N - same - opp) ng3 += (same - 1) * opp ng = ng0 + (ng1 + ng2 + ng3) // 2 print(total - ng)