n=int(input()) xy=[] for _ in range(n): x,y=map(int,input().split()) xy.append((x,y)) def cross3(a, b, c): return (b[0]-a[0])*(c[1]-a[1]) - (b[1]-a[1])*(c[0]-a[0]) # ps = [(x, y), ...]: ソートされた座標list def convex_hull(ps): qs = [] N = len(ps) for p in ps: # 一直線上で高々2点にする場合は ">=" にする while len(qs) > 1 and cross3(qs[-1], qs[-2], p) >= 0: qs.pop() qs.append(p) t = len(qs) for i in range(N-2, -1, -1): p = ps[i] while len(qs) > t and cross3(qs[-1], qs[-2], p) > 0: qs.pop() qs.append(p) return qs def calc(L,R,mid): x1,y1=xy[L] x2,y2=xy[R] x3,y3=xy[mid] dx1=x3-x1 dy1=y3-y1 dx2=x2-x1 dy2=y2-y1 return abs(dy1*dx2-dx1*dy2) xy.sort() convex=convex_hull(xy)[:-1] assert len(convex)>=3 if len(convex)==3: xy=convex+xy n=len(xy) ans=0 for i in range(3): p=i q=(i+1)%3 r=(i+2)%3 for j in range(3,n): if xy[j] not in [xy[p],xy[q],xy[r]]: ans=max(ans,-calc(p,q,j)-calc(q,r,j)) print(ans) exit() n=len(convex) xy=convex+convex memo=[[-10**9]*n for i in range(n)] for L in range(n): tmp=L+1 for R in range(L,L+n): if tmp+1!=R and calc(L,R,tmp)