import sys,random,bisect from collections import deque,defaultdict from heapq import heapify,heappop,heappush from itertools import permutations from math import log,gcd input = lambda :sys.stdin.readline().rstrip() mi = lambda :map(int,input().split()) li = lambda :list(mi()) local = False N = int(input()) if not local: xy = [tuple(mi()) for i in range(N)] else: xy = [(random.randint(-100,100),random.randint(-100,100)) for i in range(N)] xy.sort() 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 totu = convex_hull(xy) totu.pop() n = len(totu) def f(i,a,b): i %= n x,y = totu[i] return a*y-b*x res = 0 for x,y in xy: l,m,r = 0,n,2*n while r-l >= 3: nl = (l+m)//2 nr = (m+r+1)//2 if f(nl,x,y) < f(m,x,y): l,m,r = l,nl,m elif f(m,x,y) > f(nr,x,y): l,m,r = m,nr,r else: l,m,r = nl,m,nr res = max(res,abs(f(m,x,y))) l,m,r = 0,n,2*n while r-l >= 3: nl = (l+m)//2 nr = (m+r+1)//2 if -f(nl,x,y) < -f(m,x,y): l,m,r = l,nl,m elif -f(m,x,y) > -f(nr,x,y): l,m,r = m,nr,r else: l,m,r = nl,m,nr res = max(res,abs(f(m,x,y))) print(res) if local: check = 0 for x,y in xy: for p,q in xy: check = max(check,abs(x*q-y*p)) print(check)