from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline N = int(input()) XY = [tuple(map(int,input().split())) for _ in range(N)] mod = 10**9 + 7 S = 0 for i in range(N-2): xi,yi = XY[i] xy = [] for j in range(i+1,N): xj,yj = XY[j] xt,yt = xj-xi,yj-yi xy.append((math.atan2(yt,xt),xt,yt)) xy.sort() SY = list(accumulate([0]+ [x for _,x,_ in xy])) SX = list(accumulate([0]+ [x for _,_,x in xy])) n = len(xy) for j in range(n-1): _,xj,yj = xy[j] is_ok = lambda X: (xj*X[2] - yj*X[1])>=0 y = n-1 x = j if is_ok(xy[y]): S = (S + xj*(SX[y+1] - SX[j]) - yj*(SY[y+1] - SY[j]) )%mod continue while y-x>1: mid = (y+x)//2 if is_ok(xy[mid]): x = mid else: y = mid S = (S + xj*(SX[x+1] - SX[j]) - yj*(SY[x+1] - SY[j]) )%mod print(S)