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 xy.sort() xy=convex_hull(xy)[:-1] n=len(xy) assert len(xy)>=4 xy=xy+xy 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) def get(L,R): l=L r=R while l+2