After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectangle to be parallel to them. Of course, the area of the rectangle must be positive. Wilbur had all four vertices of the planned pool written on a paper, until his friend came along and erased some of the vertices.

Now Wilbur is wondering, if the remaining n vertices of the initial rectangle give enough information to restore the area of the planned swimming pool.


-----Input-----

The first line of the input contains a single integer n (1 ≤ n ≤ 4) — the number of vertices that were not erased by Wilbur's friend.

Each of the following n lines contains two integers x_{i} and y_{i} ( - 1000 ≤ x_{i}, y_{i} ≤ 1000) —the coordinates of the i-th vertex that remains. Vertices are given in an arbitrary order.

It's guaranteed that these points are distinct vertices of some rectangle, that has positive area and which sides are parallel to the coordinate axes.


-----Output-----

Print the area of the initial rectangle if it could be uniquely determined by the points remaining. Otherwise, print  - 1. 


-----Examples-----
Input
2
0 0
1 1

Output
1

Input
1
1 1

Output
-1



-----Note-----

In the first sample, two opposite corners of the initial rectangle are given, and that gives enough information to say that the rectangle is actually a unit square.

In the second sample there is only one vertex left and this is definitely not enough to uniquely define the area.

Difficulty: EASY

Solutions:
(sx, sy) = (set(), set())
for i in range(int(input())):
	(x, y) = map(int, input().split())
	sx.add(x)
	sy.add(y)
if min(len(sx), len(sy)) == 1:
	print(-1)
else:
	(sx, sy) = (list(sx), list(sy))
	print(abs(sx[0] - sx[1]) * abs(sy[0] - sy[1]))


n = int(input())
coordinates = [tuple(map(int, input().split())) for i in range(n)]
if n == 4:
	coordinates.sort()
	s = int(((coordinates[0][1] - coordinates[1][1]) ** 2 + (coordinates[0][0] - coordinates[1][0]) ** 2) ** 0.5 * ((coordinates[1][1] - coordinates[3][1]) ** 2 + (coordinates[1][0] - coordinates[3][0]) ** 2) ** 0.5)
elif n == 3:
	if coordinates[0][0] == coordinates[1][0] and coordinates[0][1] == coordinates[2][1] or (coordinates[0][1] == coordinates[1][1] and coordinates[0][0] == coordinates[2][0]):
		coordinates = [coordinates[1], coordinates[0], coordinates[2]]
	elif coordinates[2][0] == coordinates[1][0] and coordinates[2][1] == coordinates[0][1] or (coordinates[2][1] == coordinates[1][1] and coordinates[2][0] == coordinates[0][0]):
		coordinates = [coordinates[0], coordinates[2], coordinates[1]]
	s = int(((coordinates[0][1] - coordinates[1][1]) ** 2 + (coordinates[0][0] - coordinates[1][0]) ** 2) ** 0.5 * ((coordinates[1][1] - coordinates[2][1]) ** 2 + (coordinates[1][0] - coordinates[2][0]) ** 2) ** 0.5)
elif n == 2 and coordinates[0][0] != coordinates[1][0] and (coordinates[0][1] != coordinates[1][1]):
	s = abs((coordinates[0][0] - coordinates[1][0]) * (coordinates[0][1] - coordinates[1][1]))
else:
	s = -1
print(s)


a = int(input())
if a in [3, 4]:
	b = []
	for i in range(a):
		b.append(input().split())
	for i in b:
		for j in range(2):
			i[j] = int(i[j])
	ys = []
	for i in b:
		ys.append(i[1])
	xs = []
	for i in b:
		xs.append(i[0])
	xs.sort()
	ys.sort()
	print((xs[-1] - xs[0]) * (ys[-1] - ys[0]))
elif a == 2:
	b = input().split()
	c = input().split()
	if b[0] != c[0] and b[1] != c[1]:
		print(abs(int(b[0]) - int(c[0])) * abs(int(b[1]) - int(c[1])))
	else:
		print('-1')
else:
	print('-1')


g = int(input())
lst = []
for i in range(g):
	h = list(map(int, input().split()))
	lst.append(h)
if g == 3:
	if lst[0][0] != lst[1][0] and lst[0][1] != lst[1][1]:
		print(abs(lst[0][0] - lst[1][0]) * abs(lst[0][1] - lst[1][1]))
	elif lst[1][0] != lst[2][0] and lst[1][1] != lst[2][1]:
		print(abs(lst[1][0] - lst[2][0]) * abs(lst[2][1] - lst[1][1]))
	elif lst[0][0] != lst[2][0] and lst[0][1] != lst[2][1]:
		print(abs(lst[0][0] - lst[2][0]) * abs(lst[0][1] - lst[2][1]))
elif g == 4:
	if lst[0][0] != lst[1][0] and lst[0][1] != lst[1][1]:
		print(abs(lst[0][0] - lst[1][0]) * abs(lst[0][1] - lst[1][1]))
	elif lst[1][0] != lst[2][0] and lst[1][1] != lst[2][1]:
		print(abs(lst[1][0] - lst[2][0]) * abs(lst[2][1] - lst[1][1]))
	elif lst[0][0] != lst[2][0] and lst[0][1] != lst[2][1]:
		print(abs(lst[0][0] - lst[2][0]) * abs(lst[0][1] - lst[2][1]))
	else:
		for i in range(4):
			if lst[0][0] not in lst[i] and lst[0][1] not in lst[i]:
				print(abs(lst[0][0] - lst[i][0]) * abs(lst[0][1] - lst[i][1]))
				break
elif g == 2:
	if lst[0][0] != lst[1][0] and lst[0][1] != lst[1][1]:
		print(abs(lst[0][0] - lst[1][0]) * abs(lst[0][1] - lst[1][1]))
	else:
		print(-1)
elif g == 1:
	print(-1)


n = int(input())
M = [list(map(int, input().split())) for i in range(n)]
a = -1
for i in range(n):
	for j in range(n):
		if M[i][0] != M[j][0] and M[i][1] != M[j][1]:
			a = [M[i][0], M[i][1]]
			b = [M[j][0], M[j][1]]
if a == -1:
	print(-1)
else:
	c = [a[0], b[1]]
	d = [b[0], a[1]]
	q1 = ((c[0] - a[0]) ** 2 + (c[1] - a[1]) ** 2) ** 0.5
	q2 = ((c[0] - b[0]) ** 2 + (c[1] - b[1]) ** 2) ** 0.5
	print(round(q1 * q2))


n = int(input())
x = [-1] * n
y = [-1] * n
for i in range(n):
	(x[i], y[i]) = map(int, input().split())
if len(set(x)) != 2 or len(set(y)) != 2:
	print(-1)
	exit()
print((max(x) - min(x)) * (max(y) - min(y)))


import sys
import math
import itertools
import collections

def getdict(n):
	d = {}
	if type(n) is list or type(n) is str:
		for i in n:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
	else:
		for i in range(n):
			t = ii()
			if t in d:
				d[t] += 1
			else:
				d[t] = 1
	return d

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def wr(arr):
	return ' '.join(map(str, arr))

def revn(n):
	return int(str(n)[::-1])

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True
n = ii()
rect = []
for i in range(n):
	rect.append(list(map(int, input().split())))
ans = 0
if n == 1:
	ans = -1
elif n == 2:
	if rect[0][0] == rect[1][0] or rect[0][1] == rect[1][1]:
		ans = -1
	else:
		ans = abs(rect[0][0] - rect[1][0]) * abs(rect[0][1] - rect[1][1])
elif n == 3:
	t = rect[0]
	ans = max(abs(t[0] - rect[2][0]) * abs(t[1] - rect[2][1]), abs(t[0] - rect[1][0]) * abs(t[1] - rect[1][1]), abs(rect[2][0] - rect[1][0]) * abs(rect[2][1] - rect[1][1]))
else:
	t = rect[0]
	for i in range(1, n):
		if t[0] != rect[i][0] and t[1] != rect[i][1]:
			ans = abs(t[0] - rect[i][0]) * abs(t[1] - rect[i][1])
			break
print(ans)


n = int(input())
s = []
for i in range(n):
	a = list(map(int, input().split()))
	s.append(a)
if n < 2:
	print(-1)
else:
	fir = [s[0][0]]
	sec = [s[0][1]]
	for j in range(1, n):
		if not s[j][0] == fir[len(fir) - 2]:
			fir.append(s[j][0])
		if not s[j][1] == sec[len(sec) - 2]:
			sec.append(s[j][1])
	if len(fir) > 1 and len(sec) > 1:
		print(abs(fir[1] - fir[0]) * abs(sec[1] - sec[0]))
	else:
		print(-1)


import sys

def check_point(c, d):
	if c[0] != d[0] and c[1] != d[1]:
		return True
	else:
		return False

def square(c, d):
	return abs(c[0] - d[0]) * abs(c[1] - d[1])
n = int(input())
a = []
q = 0
h = 0
for x in range(n):
	a.append(list(map(int, input().split())))
if n == 2:
	if check_point(a[0], a[1]):
		print(square(a[0], a[1]))
	else:
		print(-1)
elif n == 3:
	if check_point(a[0], a[1]):
		print(square(a[0], a[1]))
	elif check_point(a[0], a[2]):
		print(square(a[0], a[2]))
	elif check_point(a[2], a[1]):
		print(square(a[1], a[2]))
	else:
		print(-1)
elif n == 4:
	if check_point(a[0], a[1]) and check_point(a[2], a[3]):
		print(square(a[0], a[1]))
	elif check_point(a[1], a[2]) and check_point(a[0], a[3]):
		print(square(a[1], a[2]))
	elif check_point(a[0], a[2]) and check_point(a[1], a[3]):
		print(square(a[0], a[2]))
else:
	print(-1)


n = int(input())
x = []
y = []
for i in range(n):
	(x1, y1) = map(int, input().split())
	x.append(x1)
	y.append(y1)
if n == 1:
	print('-1')
elif n == 2:
	if x[0] == x[1] or y[0] == y[1]:
		print('-1')
	else:
		print(abs(x[0] - x[1]) * abs(y[0] - y[1]))
else:
	print((max(x) - min(x)) * (max(y) - min(y)))


def f(a, b):
	return abs((a[0] - b[0]) * (a[1] - b[1]))
n = int(input())
x = [list(map(int, input().split())) for i in range(n)]
y = 0
for i in range(n):
	for j in range(i + 1, n):
		if not y:
			y = f(x[i], x[j])
print(y or -1)


n = int(input())
(a, b) = ([], [])
for i in range(n):
	(x, y) = map(int, input().split())
	a.append(x)
	b.append(y)
check = (max(a) - min(a)) * (max(b) - min(b))
if check == 0:
	print(-1)
else:
	print(check)


import itertools as it
import functools
import operator
import collections
import math
import sys

def solve(pairs, n):
	if n <= 1:
		return -1
	elif n == 2:
		(a, b) = pairs[0]
		(c, d) = pairs[1]
		if a == c or b == d:
			return -1
		else:
			return abs(a - c) * abs(b - d)
	elif n >= 3:
		xmin = min((x for (x, _) in pairs))
		xmax = max((x for (x, _) in pairs))
		ymin = min((y for (_, y) in pairs))
		ymax = max((y for (_, y) in pairs))
		return (xmax - xmin) * (ymax - ymin)

def main():
	n = int(input())
	pairs = [tuple((int(_c) for _c in input().strip().split())) for _ in range(n)]
	assert len(pairs[0]) == 2
	result = solve(pairs, n)
	print(result)
main()


n = int(input())
if n == 1:
	print(-1)
	exit()
if n == 2:
	(x1, y1) = map(int, input().split())
	(x2, y2) = map(int, input().split())
	if x1 == x2 or y1 == y2:
		print(-1)
		exit()
	print(abs(y1 - y2) * abs(x1 - x2))
if n >= 3:
	a = []
	for i in range(n):
		a.append(list(map(int, input().split())))
	for i in range(n):
		for j in range(n):
			if i != j:
				if a[i][0] != a[j][0] and a[i][1] != a[j][1]:
					(x1, y1) = (a[i][0], a[i][1])
					(x2, y2) = (a[j][0], a[j][1])
					print(abs(y1 - y2) * abs(x1 - x2))
					exit()


import math
n = int(input())
if n <= 1:
	print(-1)
	exit()
else:
	xy = []
	for i in range(n):
		tmp = tuple(map(int, input().split()))
		xy.append(tmp)
	if n == 4:
		print((max(xy[0][0], xy[1][0], xy[2][0], xy[3][0]) - min(xy[0][0], xy[1][0], xy[2][0], xy[3][0])) * (max(xy[0][1], xy[1][1], xy[2][1], xy[3][1]) - min(xy[0][1], xy[1][1], xy[2][1], xy[3][1])))
	if n == 3:
		print((max(xy[0][0], xy[1][0], xy[2][0]) - min(xy[0][0], xy[1][0], xy[2][0])) * (max(xy[0][1], xy[1][1], xy[2][1]) - min(xy[0][1], xy[1][1], xy[2][1])))
	if n == 2:
		if xy[1][0] == xy[0][0] or xy[1][1] == xy[0][1]:
			print(-1)
		else:
			print(abs((xy[1][0] - xy[0][0]) * (xy[1][1] - xy[0][1])))


d_y = {}
d_x = {}
l_c = list()
l_c = list()
n = int(input())
for _ in range(n):
	(x, y) = map(int, input().split())
	d_x[x] = 1
	d_y[y] = 1
	l_c.append([x, y])
if len(d_x) + len(d_y) < 4:
	print(-1)
	quit()
t_x = 0
t_y = 0
i = 1
for k_x in d_x:
	t_x += (-1 if i == 0 else 1) * k_x
	i = 0
i = 1
for k_y in d_y:
	t_y += (-1 if i == 0 else 1) * k_y
	i = 0
print(abs(t_x) * abs(t_y))


n = int(input())
lst_x = []
lst_y = []
output = -1
for _ in range(n):
	(x, y) = map(int, input().split())
	if x not in lst_x:
		lst_x.append(x)
	if y not in lst_y:
		lst_y.append(y)
	if len(lst_x) == len(lst_y) == 2:
		output = abs(lst_x[0] - lst_x[1]) * abs(lst_y[0] - lst_y[1])
print(output)


n = int(input())
l = []
if n == 0:
	print('-1')
else:
	for i in range(n):
		(x, y) = map(int, input().split())
		l += [[x, y]]
if n == 1:
	print('-1')
else:
	c = 0
	for i in range(n - 1):
		j = i + 1
		while j < n:
			if l[j][0] != l[i][0] and l[j][1] != l[i][1]:
				result = (l[i][0] - l[j][0]) * (l[i][1] - l[j][1])
				c = 1
				break
			j += 1
		if c:
			if result < 0:
				print(-result)
			else:
				print(result)
			break
	if not c:
		print('-1')


n = int(input())
if n == 1:
	(x, y) = map(int, input().split())
	print(-1)
elif n == 4:
	(x1, y1) = map(int, input().split())
	(x2, y2) = map(int, input().split())
	(x3, y3) = map(int, input().split())
	(x4, y4) = map(int, input().split())
	h = w = 0
	if x1 == x2:
		h = abs(y2 - y1)
		w = abs(x3 - x1)
	elif x1 == x3:
		h = abs(y3 - y1)
		w = abs(x2 - x1)
	else:
		h = abs(y4 - y1)
		w = abs(x3 - x1)
	print(h * w)
elif n == 2:
	(x1, y1) = map(int, input().split())
	(x2, y2) = map(int, input().split())
	if x1 == x2 or y1 == y2:
		print(-1)
	else:
		print(abs((x1 - x2) * (y1 - y2)))
elif n == 3:
	(x1, y1) = map(int, input().split())
	(x2, y2) = map(int, input().split())
	(x3, y3) = map(int, input().split())
	if x1 == x2:
		print(abs((y2 - y1) * (x3 - x1)))
	elif x1 == x3:
		print(abs((y3 - y1) * (x2 - x1)))
	else:
		print(abs((y2 - y3) * (x2 - x1)))


n = int(input())
X = []
Y = []
A = []
for i in range(n):
	(x, y) = map(int, input().split())
	X.append(x)
	Y.append(y)
	A.append([x, y])
if n == 1:
	print(-1)
elif n == 2:
	if min(Y) == max(Y) or min(X) == max(X):
		print(-1)
	else:
		S = abs(X[0] - X[1]) * abs(Y[0] - Y[1])
		print(S)
elif n > 2:
	S = abs(max(X) - min(X)) * abs(max(Y) - min(Y))
	print(S)


class CodeforcesTask596ASolution:

	def __init__(self):
		self.result = ''
		self.n = 0
		self.points = []

	def read_input(self):
		self.n = int(input())
		for x in range(self.n):
			self.points.append([int(y) for y in input().split(' ')])

	def process_task(self):
		if self.n < 2:
			self.result = '-1'
		elif self.n == 2:
			if self.points[0][0] != self.points[1][0] and self.points[0][1] != self.points[1][1]:
				self.result = str(abs(self.points[0][0] - self.points[1][0]) * abs(self.points[1][1] - self.points[0][1]))
			else:
				self.result = '-1'
		else:
			xs = [x[0] for x in self.points]
			ys = [x[1] for x in self.points]
			xs.sort()
			ys.sort()
			self.result = str(abs(xs[0] - xs[-1]) * abs(ys[0] - ys[-1]))

	def get_result(self):
		return self.result
Solution = CodeforcesTask596ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


n = int(input())
p = []
for i in range(n):
	(x, y) = map(int, input().split())
	p.append((x, y))
if n == 1:
	print(-1)
elif n == 2:
	(x, y, a, b) = p[0] + p[1]
	print(abs(x - a) * abs(y - b) if x != a and y != b else -1)
elif n in (3, 4):
	(x, y, a, b, c, d) = p[0] + p[1] + p[2]
	print(abs(x - a) * abs(y - b) if x != a and y != b else abs(x - c) * abs(y - d) if x != c and y != d else abs(a - c) * abs(b - d))


n = int(input())
lst = []
for i in range(n):
	(a, b) = list(map(int, input().split()))
	lst.append([a, b])
if n == 1:
	print(-1)
elif n == 2 and lst[0][0] != lst[1][0] and (lst[0][1] != lst[1][1]):
	print(abs(lst[0][0] - lst[1][0]) * abs(lst[0][1] - lst[1][1]))
elif n == 2:
	print(-1)
elif n == 3 or n == 4:
	if lst[0][0] != lst[1][0] and lst[0][1] != lst[1][1]:
		print(abs(lst[0][0] - lst[1][0]) * abs(lst[0][1] - lst[1][1]))
	elif lst[1][0] != lst[2][0] and lst[1][1] != lst[2][1]:
		print(abs(lst[1][0] - lst[2][0]) * abs(lst[1][1] - lst[2][1]))
	else:
		print(abs(lst[0][0] - lst[2][0]) * abs(lst[0][1] - lst[2][1]))


N = int(input())
if N == 1:
	(x0, y0) = list(map(int, input().split()))
	print(-1)
elif N == 2:
	(x0, y0) = list(map(int, input().split()))
	(x1, y1) = list(map(int, input().split()))
	if x0 == x1 or y0 == y1:
		print(-1)
	else:
		print(abs(x0 - x1) * abs(y0 - y1))
elif N == 3:
	(x0, y0) = list(map(int, input().split()))
	(x1, y1) = list(map(int, input().split()))
	(x2, y2) = list(map(int, input().split()))
	c0 = abs(x0 - x1) * abs(y0 - y1)
	c1 = abs(x1 - x2) * abs(y1 - y2)
	c2 = abs(x2 - x0) * abs(y2 - y0)
	print(max(c0, c1, c2))
else:
	(x0, y0) = list(map(int, input().split()))
	(x1, y1) = list(map(int, input().split()))
	(x2, y2) = list(map(int, input().split()))
	(x3, y3) = list(map(int, input().split()))
	c0 = abs(x0 - x1) * abs(y0 - y1)
	c1 = abs(x1 - x2) * abs(y1 - y2)
	c2 = abs(x2 - x0) * abs(y2 - y0)
	print(max(c0, c1, c2))


n = int(input())
X = []
Y = []
for i in range(n):
	(x, y) = map(int, input().split())
	X.append(x)
	Y.append(y)
dx = max(X) - min(X)
dy = max(Y) - min(Y)
ans = dx * dy
if ans > 0:
	print(ans)
else:
	print(-1)


n = int(input())
s = []
if n == 1:
	s.append(input())
	print(-1)
else:
	for k in range(0, n):
		s.append(input().split())
	xmax = -1100
	xmin = 1100
	for k in range(0, n):
		if int(s[k][0]) > xmax:
			xmax = int(s[k][0])
		if int(s[k][0]) < xmin:
			xmin = int(s[k][0])
	x = xmax - xmin
	ymax = -1110
	ymin = 1100
	for k in range(0, n):
		if int(s[k][1]) > ymax:
			ymax = int(s[k][1])
		if int(s[k][1]) < ymin:
			ymin = int(s[k][1])
	y = ymax - ymin
	if x != 0 and y != 0:
		print(x * y)
	else:
		print(-1)


import math
from decimal import *
import sys
from fractions import Fraction
n = int(input())
x = []
y = []
for i in range(0, n):
	inp = list(map(int, input().split()))
	x.append(inp[0])
	y.append(inp[1])
if n == 1:
	print(-1)
if n == 2:
	if y[0] == y[1] or x[0] == x[1]:
		print(-1)
	else:
		print(abs(x[0] - x[1]) * abs(y[0] - y[1]))
if n >= 3:
	ans = 0
	for a in range(0, n):
		for i in range(0, n):
			if abs(x[a] - x[i]) * abs(y[a] - y[i]) != 0:
				ans = abs(x[a] - x[i]) * abs(y[a] - y[i])
	print(ans)


n = int(input())
coords = []
for i in range(n):
	coords.append([int(i) for i in input().split()])
if n == 1:
	print(-1)
elif n == 2:
	if coords[0][0] != coords[1][0] and coords[0][1] != coords[1][1]:
		print(abs((coords[0][0] - coords[1][0]) * (coords[0][1] - coords[1][1])))
	else:
		print(-1)
else:
	r = 0
	for coord1 in coords:
		for coord2 in coords:
			if coord1[0] != coord2[0] and coord1[1] != coord2[1]:
				print(abs((coord1[0] - coord2[0]) * (coord1[1] - coord2[1])))
				r = 1
				break
		if r == 1:
			break


a = int(input())
b = set()
c = set()
for i in range(a):
	(x, y) = map(int, input().split())
	b.add(x)
	c.add(y)
if len(b) == 2 and len(c) == 2:
	(x1, x2) = b
	(y1, y2) = c
	print(abs((x1 - x2) * (y1 - y2)))
else:
	print(-1)


n = int(input())
x = [0] * 4
y = [0] * 4
for i in range(n):
	(x[i], y[i]) = map(int, input().split())
if n == 1:
	print('-1')
elif n == 2:
	if x[0] == x[1] or y[0] == y[1]:
		print('-1')
	else:
		print(abs((x[0] - x[1]) * (y[0] - y[1])))
elif n == 3:
	if x[0] != x[1] and y[0] != y[1]:
		print(abs((x[0] - x[1]) * (y[0] - y[1])))
	elif x[0] != x[2] and y[0] != y[2]:
		print(abs((x[0] - x[2]) * (y[0] - y[2])))
	elif x[2] != x[1] and y[2] != y[1]:
		print(abs((x[2] - x[1]) * (y[2] - y[1])))
elif x[0] != x[1] and y[0] != y[1]:
	print(abs((x[0] - x[1]) * (y[0] - y[1])))
elif x[0] != x[2] and y[0] != y[2]:
	print(abs((x[0] - x[2]) * (y[0] - y[2])))
elif x[0] != x[3] and y[0] != y[3]:
	print(abs((x[0] - x[3]) * (y[0] - y[3])))


n = int(input())
if n == 1:
	print(-1)
elif n == 2:
	(x1, y1) = list(map(int, input().split()))
	(x2, y2) = list(map(int, input().split()))
	if x1 != x2 and y1 != y2:
		print(abs(x1 - x2) * abs(y1 - y2))
	else:
		print(-1)
elif n == 3:
	(x1, y1) = list(map(int, input().split()))
	(x2, y2) = list(map(int, input().split()))
	(x3, y3) = list(map(int, input().split()))
	if x1 != x2 and y1 != y2:
		print(abs(x1 - x2) * abs(y1 - y2))
	elif x1 != x3 and y1 != y3:
		print(abs(x1 - x3) * abs(y1 - y3))
	else:
		print(abs(x2 - x3) * abs(y2 - y3))
else:
	(x1, y1) = list(map(int, input().split()))
	(x2, y2) = list(map(int, input().split()))
	(x3, y3) = list(map(int, input().split()))
	(x4, y4) = list(map(int, input().split()))
	if x1 != x2 and y1 != y2:
		print(abs(x1 - x2) * abs(y1 - y2))
	elif x1 != x3 and y1 != y3:
		print(abs(x1 - x3) * abs(y1 - y3))
	else:
		print(abs(x2 - x3) * abs(y2 - y3))


t = int(input())
a = list()
for _ in range(t):
	a.append(list(map(int, input().split())))
a.sort()
if t == 1:
	print('-1')
elif t == 2:
	if a[1][1] == a[0][1] or a[0][0] == a[1][0]:
		print('-1')
	else:
		print(abs(a[1][0] - a[0][0]) * abs(a[1][1] - a[0][1]))
elif t == 3:
	if a[0][0] == a[1][0]:
		print((a[2][0] - a[0][0]) * (a[1][1] - a[0][1]))
	else:
		print((a[1][0] - a[0][0]) * (a[2][1] - a[1][1]))
else:
	print((a[3][0] - a[0][0]) * (a[3][1] - a[0][1]))


n = int(input())
a = []
for _ in range(n):
	(x, y) = map(int, input().split())
	a.append((x, y))
for i in range(n):
	for j in range(n):
		if a[i][0] != a[j][0] and a[i][1] != a[j][1]:
			print(abs(a[i][0] - a[j][0]) * abs(a[i][1] - a[j][1]))
			exit()
print(-1)


n = int(input())
if n == 1:
	(x1, y1) = map(int, input().split())
	print(-1)
elif n == 2:
	(x1, y1) = map(int, input().split())
	(x2, y2) = map(int, input().split())
	if (max(x2, x1) - min(x1, x2)) * (max(y1, y2) - min(y1, y2)) > 0:
		print((max(x2, x1) - min(x1, x2)) * (max(y1, y2) - min(y1, y2)))
	else:
		print(-1)
elif n == 3:
	(x1, y1) = map(int, input().split())
	(x2, y2) = map(int, input().split())
	(x3, y3) = map(int, input().split())
	if (max(x3, x2, x1) - min(x1, x2, x3)) * (max(y1, y2, y3) - min(y1, y2, y3)) > 0:
		print((max(x2, x1, x3) - min(x1, x2, x3)) * (max(y1, y2, y3) - min(y1, y2, y3)))
	else:
		print(-1)
elif n == 4:
	(x1, y1) = map(int, input().split())
	(x2, y2) = map(int, input().split())
	(x3, y3) = map(int, input().split())
	(x4, y4) = map(int, input().split())
	if (max(x3, x2, x1, x4) - min(x1, x2, x3, x4)) * (max(y1, y2, y3, y4) - min(y1, y2, y3, y4)) > 0:
		print((max(x2, x1, x3, x4) - min(x1, x2, x3, x4)) * (max(y1, y2, y3, y4) - min(y1, y2, y3, y4)))
	else:
		print(-1)


n = int(input())
if n == 1 or n == 0:
	print(-1)
elif n == 2:
	(x1, y1) = [int(x) for x in input().split()]
	(x2, y2) = [int(x) for x in input().split()]
	if x1 == x2 or y1 == y2:
		print(-1)
	else:
		print(abs((x1 - x2) * (y1 - y2)))
elif n == 3:
	(x1, y1) = [int(x) for x in input().split()]
	(x2, y2) = [int(x) for x in input().split()]
	(x3, y3) = [int(x) for x in input().split()]
	print(abs((max(x1, max(x2, x3)) - min(x1, min(x2, x3))) * (max(y1, max(y2, y3)) - min(y1, min(y2, y3)))))
else:
	(x1, y1) = [int(x) for x in input().split()]
	(x2, y2) = [int(x) for x in input().split()]
	(x3, y3) = [int(x) for x in input().split()]
	(x4, y4) = [int(x) for x in input().split()]
	print(abs((max(x1, max(x2, x3)) - min(x1, min(x2, x3))) * (max(y1, max(y2, y3)) - min(y1, min(y2, y3)))))


def Respuesta(X, Y):
	X1 = list(set(X))
	Y1 = list(set(Y))
	if len(X1) == 2 and len(Y1) == 2:
		return abs((Y1[1] - Y1[0]) * (X1[1] - X1[0]))
	else:
		return -1
n = int(input())
X = []
Y = []
for i in range(0, n):
	L = input()
	L = L.split()
	X.append(int(L[0]))
	Y.append(int(L[1]))
if n == 1:
	print(-1)
else:
	print(Respuesta(X, Y))


n = int(input())
if n == 1:
	print(-1)
	exit()
x = [0] * n
y = [0] * n
for i in range(n):
	(x[i], y[i]) = map(int, input().split())
if n == 2:
	if x[0] == x[1] or y[0] == y[1]:
		print(-1)
	else:
		print(abs(x[0] - x[1]) * abs(y[0] - y[1]))
else:
	for i in range(n):
		for j in range(n):
			if x[i] != x[j] and y[i] != y[j]:
				print(abs(x[i] - x[j]) * abs(y[i] - y[j]))
				exit()


n = int(input())
R = lambda : map(int, input().split())
xs = set()
ys = set()
for _ in range(n):
	(x, y) = R()
	xs.add(x)
	ys.add(y)
if len(xs) == len(ys) == 2:
	y = max(ys) - min(ys)
	x = max(xs) - min(xs)
	print(y * x)
else:
	print(-1)


n = int(input())
sx = set()
sy = set()
for i in range(n):
	(x, y) = map(int, input().split())
	sx.add(x)
	sy.add(y)
if len(sx) != 2 or len(sy) != 2:
	print(-1)
else:
	print((max(sx) - min(sx)) * (max(sy) - min(sy)))


import math as mt
import sys, string, bisect
input = sys.stdin.readline
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())

def dist(x, y, c, d):
	return mt.sqrt((x - c) ** 2 + (y - d) ** 2)

def circle(x1, y1, x2, y2, r1, r2):
	distSq = ((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)) ** 0.5
	if distSq + r2 <= r1:
		return True
	else:
		return False
n = I()
if n == 1:
	(c, d) = M()
	print(-1)
elif n == 2:
	(a, b) = M()
	(c, d) = M()
	x = abs(a - c) * abs(b - d)
	if x:
		print(x)
	else:
		print(-1)
else:
	sx = set([])
	sy = set([])
	for i in range(n):
		(a, b) = M()
		sx.add(a)
		sy.add(b)
	sx = list(sx)
	sy = list(sy)
	print(abs(sx[0] - sx[1]) * abs(sy[0] - sy[1]))


n = int(input())
lines = list()
for i in range(n):
	line = str(input()).split()
	line = [int(it) for it in line]
	lines.append(line)
if n == 1 or (n == 2 and (lines[0][0] == lines[1][0] or lines[0][1] == lines[1][1])):
	print(-1)
elif n == 2:
	print(abs((lines[1][0] - lines[0][0]) * (lines[1][1] - lines[0][1])))
else:
	zones = list()
	if lines[1][0] == lines[0][0] or lines[1][1] == lines[0][1]:
		zones.append(abs(lines[1][0] - lines[0][0]) + abs(lines[1][1] - lines[0][1]))
	if lines[1][0] == lines[2][0] or lines[1][1] == lines[2][1]:
		zones.append(abs(lines[1][0] - lines[2][0]) + abs(lines[1][1] - lines[2][1]))
	if lines[0][0] == lines[2][0] or lines[0][1] == lines[2][1]:
		zones.append(abs(lines[0][0] - lines[2][0]) + abs(lines[0][1] - lines[2][1]))
	print(zones[0] * zones[1])


n = int(input())
xset = set()
yset = set()
for i in range(n):
	(x, y) = map(int, input().split())
	xset.add(x)
	yset.add(y)
if len(xset) == 2 and len(yset) == 2:
	xset = list(xset)
	yset = list(yset)
	print(abs(xset[0] - xset[1]) * abs(yset[0] - yset[1]))
else:
	print(-1)


n = int(input())
read = lambda : map(int, input().split())
(x1, y1) = read()
x2 = x1
y2 = y1
for _ in range(n - 1):
	(x, y) = read()
	x1 = min(x1, x)
	x2 = max(x2, x)
	y1 = min(y1, y)
	y2 = max(y2, y)
if x1 == x2 or y1 == y2:
	print(-1)
else:
	print((x2 - x1) * (y2 - y1))


n = int(input())
l = []
for i in range(n):
	(l1, l2) = input().split()
	l.append([int(l1), int(l2)])
if n <= 1:
	print(-1)
elif n == 2:
	if l[0][0] == l[1][0] or l[0][1] == l[1][1]:
		print(-1)
	else:
		print(abs(l[0][0] - l[1][0]) * abs(l[0][1] - l[1][1]))
else:
	print(abs(l[0][0] * (l[1][1] - l[2][1]) + l[1][0] * (l[2][1] - l[0][1]) + l[2][0] * (l[0][1] - l[1][1])))


n = int(input())
mx = []
my = []
for i in range(n):
	(x, y) = map(int, input().split())
	mx.append(x)
	my.append(y)
t = (max(mx) - min(mx)) * (max(my) - min(my))
if t != 0:
	print(t)
else:
	print(-1)


from sys import stdin
n = int(stdin.readline().strip())
s = []
for i in range(n):
	(a, b) = map(int, stdin.readline().strip().split())
	s.append([a, b])
ans = -1
for i in range(n):
	for j in range(i + 1, n):
		if s[i][0] != s[j][0] and s[i][1] != s[j][1]:
			ans = abs(s[i][0] - s[j][0]) * abs(s[i][1] - s[j][1])
print(ans)


import sys
n = int(input())
a = []
for i in range(n):
	a.append(list(map(int, input().split())))
if n <= 1:
	print(-1)
	sys.exit()
for i in range(n):
	for o in range(i + 1, n):
		if a[i][0] != a[o][0] and a[i][1] != a[o][1]:
			print(abs(a[i][0] - a[o][0]) * abs(a[i][1] - a[o][1]))
			sys.exit()
print(-1)


n = int(input())
a = {}
b = {}
for i in range(n):
	(t1, t2) = map(int, input().split())
	a[t1] = t1
	b[t2] = t2
if len(a) < 2 or len(b) < 2:
	print(-1)
else:
	r1 = 0
	flag = 0
	for i in a:
		if flag == 1:
			r1 -= i
		else:
			r1 += i
			flag = 1
	r2 = 0
	flag = 0
	for i in b:
		if flag == 1:
			r2 -= i
		else:
			r2 += i
			flag = 1
	r = r1 * r2
	if r < 0:
		r *= -1
	print(r)


import sys

def solve(n, vs):
	if n <= 1:
		return -1
	xs = set()
	ys = set()
	for v in vs:
		xs.add(v[0])
		ys.add(v[1])
	if len(xs) < 2 or len(ys) < 2:
		return -1
	else:
		xs = list(xs)
		ys = list(ys)
		dx = abs(xs[0] - xs[1])
		dy = abs(ys[0] - ys[1])
		return dx * dy
inputs = []
for line in sys.stdin:
	inputs.append(line.strip())
n = int(inputs[0])
vs = []
for i in range(n):
	(x, y) = map(int, inputs[i + 1].split())
	vs.append((x, y))
r = solve(n, vs)
sys.stdout.write('{}\n'.format(r))


n = int(input())

def calc(a, n):
	for i in range(n):
		for j in range(i, n):
			if a[i][0] != a[j][0] and a[i][1] != a[j][1]:
				return abs(a[i][0] - a[j][0]) * abs(a[i][1] - a[j][1])
	return -1
if n == 1:
	print(-1)
else:
	a = []
	for i in range(n):
		a.append(list(map(int, input().split())))
	print(calc(a, n))


n = int(input())
if n > 2:
	a = []
	for i in range(n):
		(x, y) = map(int, input().split())
		a.append([x, y])
	for j in range(n - 1):
		for k in range(j + 1, n):
			if a[j][0] != a[k][0] and a[j][1] != a[k][1]:
				print(abs(a[j][0] - a[k][0]) * abs(a[j][1] - a[k][1]))
				exit()
if n == 2:
	(x1, y1) = map(int, input().split())
	(x2, y2) = map(int, input().split())
	if x1 == x2 or y1 == y2:
		print(-1)
	else:
		print(abs(x1 - x2) * abs(y1 - y2))
else:
	(x, y) = map(int, input().split())
	print(-1)


n = int(input())
(min_x, min_y, max_x, max_y) = (1001, 1001, -1001, -1001)
for _ in range(n):
	(x, y) = map(int, input().split())
	min_x = min(min_x, x)
	max_x = max(max_x, x)
	min_y = min(min_y, y)
	max_y = max(max_y, y)
if min_x != max_x and min_y != max_y:
	print((max_x - min_x) * (max_y - min_y))
else:
	print(-1)


n = int(input())
V = []
for i in range(n):
	V.append([int(x) for x in input().split(' ')])

def oppositePts(p1, p2):
	dx = abs(p1[0] - p2[0])
	dy = abs(p1[1] - p2[1])
	return dx * dy

def findOpposites(V):
	for i in range(len(V)):
		for j in range(i + 1, len(V)):
			if V[i][0] != V[j][0] and V[i][1] != V[j][1]:
				return (V[i], V[j])
	raise Exception('xx')

def solve(V):
	if len(V) <= 1:
		return -1
	if len(V) == 2:
		if V[0][0] == V[1][0] or V[0][1] == V[1][1]:
			return -1
		return oppositePts(V[0], V[1])
	(p1, p2) = findOpposites(V)
	return oppositePts(p1, p2)
print(solve(V))


(x, y) = ([], [])
for i in range(int(input())):
	(a, b) = map(int, input().split())
	x.append(a)
	y.append(b)
ans = (max(x) - min(x)) * (max(y) - min(y))
print(ans if ans else -1)


3
n = int(input())
arr = [tuple(map(int, input().split())) for i in range(n)]
arr.sort()
mna = 1791
mxa = -1791
mnb = 1791
mxb = -1791
for i in range(n):
	mna = min(mna, arr[i][0])
	mnb = min(mnb, arr[i][1])
	mxa = max(mxa, arr[i][0])
	mxb = max(mxb, arr[i][1])
if mna == mxa or mnb == mxb:
	print(-1)
else:
	print((mxa - mna) * (mxb - mnb))


__author__ = 'MoonBall'
li = [list(map(int, input().split())) for i in range(int(input()))]
(sx, sy) = (set((i[0] for i in li)), set((i[1] for i in li)))
print((max(sx) - min(sx)) * (max(sy) - min(sy)) or -1)


read = lambda : map(int, input().split())
n = int(input())
maxx = maxy = -1001
minx = miny = 1001
for i in range(n):
	(x, y) = read()
	maxx = max(maxx, x)
	minx = min(minx, x)
	maxy = max(maxy, y)
	miny = min(miny, y)
S = (maxx - minx) * (maxy - miny)
print(S or -1)


import math

def preprocess(inp):
	outp = []
	for i in inp:
		temp = i.split()
		temp = [int(t) for t in temp]
		outp.append(temp)
	return outp

def area_with_two_points(coordinates):
	if coordinates[0][0] == coordinates[1][0] or coordinates[0][1] == coordinates[1][1]:
		return -1
	length = coordinates[1][0] - coordinates[0][0]
	width = coordinates[1][1] - coordinates[0][1]
	area = length * width
	return abs(area)

def check_pythagorean_theorem(coordinates):
	ab = (coordinates[1][0] - coordinates[0][0]) ** 2 + (coordinates[1][1] - coordinates[0][1]) ** 2
	ac = (coordinates[2][0] - coordinates[0][0]) ** 2 + (coordinates[2][1] - coordinates[0][1]) ** 2
	bc = (coordinates[1][0] - coordinates[2][0]) ** 2 + (coordinates[1][1] - coordinates[2][1]) ** 2
	if ac + bc == ab:
		return int(abs(math.sqrt(ac * bc)))
	elif ab + ac == bc:
		return int(abs(math.sqrt(ab * ac)))
	elif ab + bc == ac:
		return int(abs(math.sqrt(ab * bc)))
	return -1
n = input()
n = int(n)
coordinates = []
for i in range(n):
	temp = input()
	coordinates.append(temp)
coordinates = preprocess(coordinates)
if n == 1:
	print(-1)
elif n == 2:
	print(area_with_two_points(coordinates))
elif n == 3:
	print(check_pythagorean_theorem(coordinates))
else:
	temp = [coordinates[0]]
	for i in range(1, 4):
		if coordinates[i][0] != coordinates[0][0] and coordinates[i][1] != coordinates[0][1]:
			temp.append(coordinates[i])
			print(area_with_two_points(temp))


mas = list(map(int, input().split()))
okey = False
t = mas[0]
lst = []
for i in range(t):
	mas = list(map(int, input().split()))
	xi = mas[0]
	yi = mas[1]
	lst = lst + [[xi, yi]]
for i in range(t):
	for j in range(t):
		a = abs(lst[i][0] - lst[j][0])
		b = abs(lst[i][1] - lst[j][1])
		if a != 0 and b != 0:
			okey = True
			res = a * b
if okey:
	print(res)
else:
	print(-1)


n = int(input())
points = [[int(x) for x in input().split()] for _ in range(n)]
if n <= 1:
	print(-1)
	exit()
dx = [1000000000.0, -1000000000.0]
dy = [1000000000.0, -1000000000.0]
for (x, y) in points:
	dx[0] = min(dx[0], x)
	dx[1] = max(dx[1], x)
	dy[0] = min(dy[0], y)
	dy[1] = max(dy[1], y)
area = (dx[1] - dx[0]) * (dy[1] - dy[0])
if area:
	print(area)
else:
	print(-1)


n = int(input())
s = []
for _ in range(n):
	s.append(list(map(int, input().split())))
if n == 1:
	print(-1)
elif n == 2:
	a = s[0]
	b = s[1]
	if a[0] != b[0] and a[1] != b[1]:
		a1 = a[0] - b[0]
		b1 = a[1] - b[1]
		print(abs(a1 * b1))
	else:
		print(-1)
else:
	s.sort(key=lambda x: x[0])
	a = s[0]
	b = s[1]
	c = s[2]
	s1 = a[0] - b[0] if a[0] != b[0] else a[1] - b[1]
	s2 = b[0] - c[0] if b[0] != c[0] else b[1] - c[1]
	print(abs(s1 * s2))


from sys import stdin

def main():
	case = stdin.readline()
	case = stdin.readline().strip()
	cases = []
	while len(case) != 0:
		cases.append(tuple([int(c) for c in case.split()]))
		case = stdin.readline().strip()
	area = -1
	(i, j, terminado) = (0, 0, False)
	while i < len(cases) and (not terminado):
		j = i + 1
		while j < len(cases) and (not terminado):
			if cases[i][0] != cases[j][0] and cases[i][1] != cases[j][1]:
				terminado = True
				area = (cases[i][0] - cases[j][0]) * (cases[i][1] - cases[j][1])
				area = area if area >= 0 else -area
			j += 1
		i += 1
	print(area)
main()


n = int(input())
data = []
for i in range(n):
	data.append([int(i) for i in input().split()])
x = []
y = []
for i in range(n):
	x.append(data[i][0])
	y.append(data[i][1])
x = set(x)
y = set(y)
if len(x) < 2 or len(y) < 2:
	print(-1)
else:
	print((max(x) - min(x)) * (max(y) - min(y)))


i = int(input())
la = []
lb = []
for x in range(i):
	(a, b) = map(int, input().split())
	la.append(a)
	lb.append(b)
if len(set(la)) > 1 and len(set(lb)) > 1:
	print(abs((min(la) - max(la)) * (min(lb) - max(lb))))
else:
	print(-1)


n = int(input())
if n < 2:
	print(-1)
else:
	x = set()
	y = set()
	for i in range(n):
		a = tuple(map(int, input().split()))
		x.add(a[0])
		y.add(a[1])
	if len(y) > 1 and len(x) > 1:
		print((max(y) - min(y)) * (max(x) - min(x)))
	else:
		print(-1)


n = int(input())
to = []
if n == 1:
	print(-1)
elif n == 2:
	for x in range(2):
		(l, k) = input().split()
		to.append(int(l))
		to.append(int(k))
	if to[0] != to[2] and to[1] != to[3]:
		print(abs(to[0] - to[2]) * abs(to[1] - to[3]))
	else:
		print(-1)
elif n == 3:
	for x in range(3):
		(l, k) = input().split()
		to.append(int(l))
		to.append(int(k))
	if to[0] != to[2] and to[1] != to[3]:
		print(abs(to[0] - to[2]) * abs(to[1] - to[3]))
	elif to[0] != to[4] and to[1] != to[5]:
		print(abs(to[0] - to[4]) * abs(to[1] - to[5]))
	else:
		print(abs(to[2] - to[4]) * abs(to[3] - to[5]))
else:
	for x in range(4):
		(l, k) = input().split()
		to.append(int(l))
		to.append(int(k))
	if to[0] != to[2] and to[1] != to[3]:
		print(abs(to[0] - to[2]) * abs(to[1] - to[3]))
	elif to[0] != to[4] and to[1] != to[5]:
		print(abs(to[0] - to[4]) * abs(to[1] - to[5]))
	else:
		print(abs(to[0] - to[6]) * abs(to[1] - to[7]))


n = int(input())
s = []
for i in range(n):
	(a, b) = map(int, input().split())
	s.append([a, b])
if n == 1:
	print(-1)
elif n == 2:
	if s[0][1] != s[1][1] and s[0][0] != s[1][0]:
		x1 = min(s[0][0], s[1][0])
		y1 = min(s[0][1], s[1][1])
		x2 = max(s[0][0], s[1][0])
		y2 = max(s[0][1], s[1][1])
		print((x2 - x1) * (y2 - y1))
	else:
		print(-1)
elif n == 3:
	x1 = min(s[0][0], s[1][0], s[2][0])
	y1 = min(s[0][1], s[1][1], s[2][1])
	x2 = max(s[0][0], s[1][0], s[2][0])
	y2 = max(s[0][1], s[1][1], s[2][1])
	print((x2 - x1) * (y2 - y1))
else:
	x1 = min(s[0][0], s[1][0], s[2][0], s[3][0])
	y1 = min(s[0][1], s[1][1], s[2][1], s[3][1])
	x2 = max(s[0][0], s[1][0], s[2][0], s[3][0])
	y2 = max(s[0][1], s[1][1], s[2][1], s[3][1])
	print((x2 - x1) * (y2 - y1))


import sys
n = int(input())
x = []
y = []
weight = height = 0
for i in range(n):
	(xx, yy) = map(int, input().split())
	x.append(xx)
	y.append(yy)
if n == 1:
	print('-1')
elif n == 2:
	if x[0] == x[1] or y[0] == y[1]:
		print('-1')
	else:
		print(abs((x[0] - x[1]) * (y[0] - y[1])))
else:
	if x[0] == x[1]:
		weight = abs(x[2] - x[1])
	else:
		weight = abs(x[1] - x[0])
	if y[0] == y[1]:
		height = abs(y[2] - y[1])
	else:
		height = abs(y[1] - y[0])
	print(weight * height)


n = int(input())
if n == 1:
	print(-1)
elif n == 2:
	(x1, y1) = list(map(int, input().split()))
	(x2, y2) = list(map(int, input().split()))
	if x1 == x2 or y1 == y2:
		print(-1)
	else:
		print(abs(x2 - x1) * abs(y2 - y1))
else:
	(x1, y1) = list(map(int, input().split()))
	(x2, y2) = list(map(int, input().split()))
	(x3, y3) = list(map(int, input().split()))
	if x1 == x2 or y1 == y2:
		if x1 == x3 or y1 == y3:
			print(abs(x3 - x2) * abs(y3 - y2))
		else:
			print(abs(x3 - x1) * abs(y3 - y1))
	else:
		print(abs(x2 - x1) * abs(y2 - y1))


n = int(input())
x = set()
y = set()
for i in range(n):
	a = input().split()
	x.add(int(a[0]))
	y.add(int(a[1]))
b = (max(y) - min(y)) * (max(x) - min(x))
if b:
	print(b)
else:
	print(-1)


n = int(input())
points = []
for i in range(n):
	points.append([int(a) for a in input().split(' ')])
length = len(points)
if length == 1:
	print(-1)
else:
	w = 0
	h = 0
	for i in range(length):
		for j in range(i + 1, length):
			lw = abs(points[i][0] - points[j][0])
			lh = abs(points[i][1] - points[j][1])
			if lw:
				w = lw
			if lh:
				h = lh
			if w and h:
				break
		if w and h:
			break
	s = w * h
	print(s if s else -1)


n = int(input())
a = [[0] * 2 for i in range(n)]
for i in range(n):
	(a[i][0], a[i][1]) = map(int, input().split())
if n < 2:
	print(-1)
elif n == 2:
	if a[0][0] == a[1][0] or a[0][1] == a[1][1]:
		print(-1)
	else:
		print(abs(a[0][0] - a[1][0]) * abs(a[0][1] - a[1][1]))
elif a[0][0] == a[1][0] or a[0][1] == a[1][1]:
	if a[0][0] == a[2][0] or a[0][1] == a[2][1]:
		print(abs(a[2][0] - a[1][0]) * abs(a[2][1] - a[1][1]))
	else:
		print(abs(a[2][0] - a[0][0]) * abs(a[2][1] - a[0][1]))
else:
	print(abs(a[0][0] - a[1][0]) * abs(a[0][1] - a[1][1]))


def area():
	for i in range(len(val)):
		for j in range(1, len(val)):
			tmp = abs(val[i][0] - val[j][0]) * abs(val[i][1] - val[j][1])
			if tmp != 0:
				return tmp
	return -1
n = int(input())
val = [list(map(int, input().split())) for _ in range(n)]
print(area())


def basseyn(lst1, lst2):
	result = -1
	for i in range(len(lst1)):
		for j in range(i, len(lst1)):
			if lst1[i] != lst1[j] and lst2[i] != lst2[j]:
				result = abs(lst1[i] - lst1[j]) * abs(lst2[i] - lst2[j])
	return result
n = int(input())
X = list()
Y = list()
for i in range(n):
	(x, y) = [int(i) for i in input().split()]
	X.append(x)
	Y.append(y)
print(basseyn(X, Y))


def main():
	l = []
	for _ in range(int(input())):
		(x1, y1) = map(int, input().split())
		for (x2, y2) in l:
			s = (x1 - x2) * (y1 - y2)
			if s:
				print(abs(s))
				return
		l.append((x1, y1))
	print(-1)
main()


n = int(input())
if n < 2:
	print(-1)
	quit()
a = [[]] * n
for i in range(n):
	a[i] = list(map(int, input().split()))
res = -1
for i in a:
	for j in a:
		if i[0] != j[0] and i[1] != j[1]:
			res = abs(i[0] - j[0]) * abs(i[1] - j[1])
print(res)


(l, r) = ([], 0)
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	for (c, d) in l:
		r = max(r, abs((a - c) * (b - d)))
	l.append((a, b))
print(r if r else -1)


def arr_2d(n):
	return [[int(x) for x in input().split()] for i in range(n)]

def euclidean(x1, x2, y1, y2):
	return sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)

def get_col(arr, i):
	return [row[i] for row in arr]
from math import *
from operator import *
n = int(input())
a = arr_2d(n)
if n == 1:
	print(-1)
elif n == 2 and (a[0][0] == a[1][0] or a[0][1] == a[1][1]):
	print(-1)
else:
	a = [list(set(get_col(a, 0))), list(set(get_col(a, 1)))]
	print(abs(a[0][0] - a[0][1]) * abs(a[1][1] - a[1][0]))


n = int(input())
a = [[0 for i in range(2)] for j in range(n)]
for i in range(n):
	(x, y) = [int(t) for t in input().split()]
	a[i][0] = x
	a[i][1] = y
if n == 1:
	print(-1)
elif n == 2:
	if a[0][0] == a[1][0] or a[0][1] == a[1][1]:
		print(-1)
	else:
		print(abs(a[0][0] - a[1][0]) * abs(a[0][1] - a[1][1]))
else:
	one = abs(a[0][0] - a[1][0]) * abs(a[0][1] - a[1][1])
	two = abs(a[0][0] - a[2][0]) * abs(a[0][1] - a[2][1])
	three = abs(a[1][0] - a[2][0]) * abs(a[1][1] - a[2][1])
	print(max(one, two, three))


n = int(input())
x = []
y = []
area = 0
for i in range(n):
	li = list(map(int, input().strip().split(' ')))
	x.append(li[0])
	y.append(li[1])
result = (max(x) - min(x)) * (max(y) - min(y))
print(result if result > 0 else -1)


n = int(input())
ip1 = []
ip2 = []
for i in range(n):
	(a, b) = map(int, input().split())
	ip1.append(a)
	ip2.append(b)
if n <= 1:
	print(-1)
elif n >= 3:
	ip1 = sorted(ip1)
	ip2 = sorted(ip2)
	print(abs(ip1[-1] - ip1[0]) * abs(ip2[-1] - ip2[0]))
else:
	(a, b) = (ip1[0], ip2[0])
	(c, d) = (ip1[1], ip2[1])
	if a == c or b == d:
		print(-1)
	else:
		print(abs(c - a) * abs(d - b))


n = int(input())
points = list()
for i in range(n):
	points.append(list(map(int, input().split())))
points.sort()
if n <= 1:
	print(-1)
elif n == 2:
	if points[0][0] != points[1][0] and points[0][1] != points[1][1]:
		print(abs((points[0][0] - points[1][0]) * (points[0][1] - points[1][1])))
	else:
		print(-1)
elif n == 3:
	l1 = (points[0][0] - points[1][0]) ** 2 + (points[0][1] - points[1][1]) ** 2
	l2 = (points[0][0] - points[2][0]) ** 2 + (points[0][1] - points[2][1]) ** 2
	l3 = (points[2][0] - points[1][0]) ** 2 + (points[2][1] - points[1][1]) ** 2
	ls = [l1, l2, l3]
	ls.sort()
	if ls[0] + ls[1] == ls[2]:
		print(abs(int(ls[0] ** 0.5 * ls[1] ** 0.5)))
	else:
		print(-1)
elif n == 4:
	if points[0][0] == points[1][0] and points[2][0] == points[3][0] and (points[0][1] == points[2][1]) and (points[1][1] == points[3][1]):
		print(abs((points[0][1] - points[1][1]) * (points[0][0] - points[2][0])))
	else:
		print(-1)


import math

def get_n():
	return int(input())

def get_int_vector():
	return [int(x) for x in input().split()]

def list2string(list):
	result = []
	for i in list:
		result.append(str(i))
	return ':'.join(result)

def string2vector(string):
	return [int(x) for x in string.split(':')]
n = get_n()
points = []
for _ in range(n):
	points.append(get_int_vector())
points.sort(key=lambda x: x[1])
points.sort(key=lambda x: x[0])
if n == 1:
	print(-1)
	exit(0)
if n == 2 and (points[0][0] == points[1][0] or points[0][1] == points[1][1]):
	print(-1)
	exit(0)
if n == 3:
	(a, b) = (0, 0)
	if points[0][0] != points[1][0]:
		a = abs(points[1][0] - points[0][0])
	else:
		a = abs(points[2][0] - points[0][0])
	if points[0][1] != points[1][1]:
		b = abs(points[1][1] - points[0][1])
	else:
		b = abs(points[2][1] - points[0][1])
	print(a * b)
elif n == 2:
	print(abs(points[0][0] - points[1][0]) * abs(points[0][1] - points[1][1]))
else:
	print(abs(points[0][1] - points[1][1]) * abs(points[0][0] - points[3][0]))


n = int(input())
data = []
for i in range(n):
	line = input()
	line = line.split(' ')
	data.append((int(line[0]), int(line[1])))
if n == 1:
	print(-1)
	quit()
if n == 2:
	if data[1][0] == data[0][0] or data[1][1] == data[0][1]:
		print(-1)
		quit()
	print(abs((data[1][0] - data[0][0]) * (data[1][1] - data[0][1])))
	quit()
if n > 2:
	area = -1
	for i in range(n):
		for j in range(i, n):
			this_area = abs((data[i][0] - data[j][0]) * (data[i][1] - data[j][1]))
			if this_area != 0:
				if this_area == area or area == -1:
					area = this_area
				else:
					print(-1)
					quit()
	print(area)


n = int(input())
if n == 1:
	print(-1)
elif n == 2:
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == c or b == d:
		print(-1)
	else:
		print(abs(a - c) * abs(b - d))
else:
	X = []
	Y = []
	for i in range(n):
		(x, y) = map(int, input().split())
		if x not in X:
			X.append(x)
		if y not in Y:
			Y.append(y)
	print(abs(X[0] - X[1]) * abs(Y[0] - Y[1]))


n = int(input())
maxX = maxY = -1001
minX = minY = 1001
for i in range(n):
	(x, y) = map(int, input().split())
	maxX = max(maxX, x)
	minX = min(minX, x)
	maxY = max(maxY, y)
	minY = min(minY, y)
s = (maxX - minX) * (maxY - minY)
print(s if s > 0 else -1)


__author__ = 'sandeepmellacheruvu'
N = int(input())
l = []
for n in range(N):
	(x, y) = map(int, input().split())
	l.append((x, y))
if N == 1:
	print(-1)
elif N == 2:
	(x1, y1) = l[0]
	(x2, y2) = l[1]
	if x1 == x2 or y1 == y2:
		print(-1)
	else:
		s1 = abs(y2 - y1)
		s2 = abs(x2 - x1)
		print(s1 * s2)
else:
	s1 = -1
	s2 = -1
	for i in range(N):
		for j in range(i + 1, N):
			ele1 = l[i]
			ele2 = l[j]
			(x1, y1) = ele1
			(x2, y2) = ele2
			if x1 == x2:
				s1 = abs(y2 - y1)
			elif y1 == y2:
				s2 = abs(x2 - x1)
	if s1 == -1 or s2 == -1:
		print(-1)
	else:
		print(s1 * s2)


n = int(input())
a = []
S = 0
for i in range(n):
	a.append(tuple(map(int, input().split())))
for i in range(n):
	for j in range(n):
		S = max(S, abs((a[i][0] - a[j][0]) * (a[i][1] - a[j][1])))
if S == 0:
	print(-1)
else:
	print(S)


n = int(input())
r = []
for j in range(n):
	(q, w) = (int(i) for i in input().split())
	r.append([q, w])

def sq(a, b):
	return abs((a[1] - b[1]) * (a[0] - b[0]))
if n == 1:
	print('-1')
elif n == 2:
	if r[0][0] != r[1][0] and r[0][1] != r[1][1]:
		print(sq(r[1], r[0]))
	else:
		print('-1')
elif n == 3 or n == 4:
	print(max(sq(r[1], r[0]), sq(r[2], r[1]), sq(r[2], r[0])))


I = lambda : map(int, input().split())
(X, Y) = (set(), set())
for _ in range(int(input())):
	(x, y) = I()
	X.add(x)
	Y.add(y)
S = (max(X) - min(X)) * (max(Y) - min(Y))
print(S if S else -1)


from collections import namedtuple
n = int(input())
Point = namedtuple('Point', 'x y')
pts = [Point(*map(int, input().split())) for _ in range(n)]
if n == 1:
	print(-1)
elif n == 2:
	if pts[0].x == pts[1].x or pts[0].y == pts[1].y:
		print(-1)
	else:
		print(abs((pts[1].x - pts[0].x) * (pts[0].y - pts[1].y)))
else:
	diffs_x = set()
	diffs_y = set()
	for i in range(n - 1):
		for j in range(i + 1, n):
			diffs_x.add(abs(pts[i].x - pts[j].x))
			diffs_y.add(abs(pts[i].y - pts[j].y))
	diffs_x -= set([0])
	diffs_y -= set([0])
	print(diffs_x.pop() * diffs_y.pop())


n = int(input())
v = [[int(x) for x in input().split()] for i in range(n)]
if n == 1:
	print(-1)
else:
	s = sorted(list({abs(k[0] - l[0]) * abs(k[1] - l[1]) for k in v for l in v}))
	print(s[-1]) if len(s) > 1 else print(-1)


n = int(input())
a = []
for i in range(n):
	a.append(tuple(map(int, input().split())))
(x1, y1, x2, y2) = (float('inf'), float('inf'), float('inf'), float('inf'))
for i in a:
	if x1 == float('inf'):
		x1 = i[0]
	elif x2 == float('inf') and x1 != i[0]:
		x2 = i[0]
	if y1 == float('inf'):
		y1 = i[1]
	elif y2 == float('inf') and y1 != i[1]:
		y2 = i[1]
if y2 == float('inf') or x2 == float('inf'):
	print('-1')
else:
	print(abs(x1 - x2) * abs(y1 - y2))


n = int(input())
p = [0] * n
for i in range(n):
	p[i] = tuple(map(int, input().split()))
if n == 4:
	for i in range(1, 4):
		if p[0][0] != p[i][0] and p[0][1] != p[i][1]:
			res = abs(p[0][0] - p[i][0]) * abs(p[0][1] - p[i][1])
elif n == 3:
	for i in range(1, 3):
		if p[0][0] != p[i][0] and p[0][1] != p[i][1]:
			res = abs(p[0][0] - p[i][0]) * abs(p[0][1] - p[i][1])
	for i in [0, 2]:
		if p[1][0] != p[i][0] and p[1][1] != p[i][1]:
			res = abs(p[1][0] - p[i][0]) * abs(p[1][1] - p[i][1])
elif n == 2:
	if p[0][0] != p[1][0] and p[0][1] != p[1][1]:
		res = abs(p[0][0] - p[1][0]) * abs(p[0][1] - p[1][1])
	else:
		res = -1
else:
	res = -1
print(res)


def solve():
	N = int(input())
	X = [0] * N
	Y = [0] * N
	for i in range(N):
		(X[i], Y[i]) = map(int, input().split())
	xs = list(set(X))
	ys = list(set(Y))
	if len(xs) == 1 or len(ys) == 1:
		print(-1)
		return
	print(abs(xs[1] - xs[0]) * abs(ys[1] - ys[0]))
solve()


v = int(input())

def pl3(v):
	point = []
	for i in range(v):
		point.append(input().split())
	for k in point:
		for j in point:
			if k[0] != j[0] and k[1] != j[1]:
				return abs((int(k[0]) - int(j[0])) * (int(k[1]) - int(j[1])))
				break
	return -1
if v == 1:
	print('-1')
else:
	print(pl3(v))


n = int(input())
if n == 1:
	print(-1)
elif n == 2:
	(x, y) = map(int, input().split())
	(x2, y2) = map(int, input().split())
	if x2 == x or y2 == y:
		print(-1)
	else:
		print(abs((x2 - x) * (y2 - y)))
else:
	(x, y) = (list(), list())
	for _ in range(n):
		(a, b) = map(int, input().split())
		x.append(a)
		y.append(b)
	print((max(x) - min(x)) * (max(y) - min(y)))


import math
alph = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
a = []
for i in range(n):
	(x, y) = map(int, input().split())
	a.append([x, y])
if n == 1:
	print(-1)
else:
	S = 0
	for i in range(n - 1):
		for j in range(i + 1, n):
			(x1, y1, x2, y2) = (a[i][0], a[i][1], a[j][0], a[j][1])
			if x1 != x2 and y1 != y2:
				S = abs(x1 - x2) * abs(y1 - y2)
	if S != 0:
		print(S)
	else:
		print(-1)


n = int(input())
pos = []
for i in range(n):
	(x, y) = input().split()
	pos.append([int(x), int(y)])
if n == 1:
	print('-1')
if n == 2:
	if pos[0][0] == pos[1][0] or pos[0][1] == pos[1][1]:
		print('-1')
	else:
		print(abs(pos[0][0] - pos[1][0]) * abs(pos[0][1] - pos[1][1]))
if n == 3:
	judge = 0
	for i in range(3):
		if pos[i][0] == pos[i - 1][0]:
			if pos[i - 2][1] == pos[i][1] or pos[i - 2][1] == pos[i - 1][1]:
				judge = 1
				break
	if judge == 1:
		s = []
		for i in range(3):
			S = abs(pos[i][0] - pos[i - 1][0]) * abs(pos[i][1] - pos[i - 1][1])
			s.append(S)
		if max(s) != 0:
			print(max(s))
		else:
			print('-1')
	if judge == 0:
		print('-1')
if n == 4:
	judge = 0
	s = []
	for i in range(4):
		for j in range(4):
			S = abs(pos[i][0] - pos[j][0]) * abs(pos[i][1] - pos[j][1])
			s.append(S)
	print(max(s))


from math import sin, pi, sqrt
n = int(input())
liste = []
for _ in range(n):
	(x, y) = list(map(int, input().split(' ')))
	liste.append((x, y))
liste.sort(key=lambda element: (element[0], element[1]))
if n < 2 or (n == 2 and (liste[0][0] == liste[1][0] or liste[0][1] == liste[1][1])):
	print(-1)
else:
	if n == 2:
		area = (liste[1][1] - liste[0][1]) * (liste[1][0] - liste[0][0])
	elif n == 3:
		if liste[2][1] == liste[0][1]:
			area = (liste[1][1] - liste[0][1]) * (liste[2][0] - liste[0][0])
		else:
			area = (liste[2][1] - liste[0][1]) * (liste[2][0] - liste[0][0])
	else:
		area = (liste[3][1] - liste[0][1]) * (liste[3][0] - liste[0][0])
	print(abs(area))


n = int(input())
points = [tuple(map(int, input().split())) for i in range(n)]
for (i, a) in enumerate(points):
	for j in range(i + 1, n):
		b = points[j]
		if a[0] != b[0] and a[1] != b[1]:
			print(abs((a[0] - b[0]) * (a[1] - b[1])))
			import sys
			sys.exit()
print(-1)


n = int(input())
x = []
for i in range(n):
	(a, b) = map(int, input().split())
	x.append([a, b])
if n == 1:
	print(-1)
elif n == 2 and (x[0][0] == x[1][0] or x[0][1] == x[1][1]):
	print(-1)
else:
	if n == 2:
		x.append([x[0][0], x[1][1]])
		x.append([x[1][0], x[0][1]])
	elif n == 3:
		if x[0][0] != x[1][0] and x[0][1] != x[1][1]:
			if [x[0][0], x[1][1]] not in x:
				x.append([x[0][0], x[1][1]])
			else:
				x.append([x[1][0], x[0][1]])
		elif x[0][0] != x[2][0] and x[0][1] != x[2][1]:
			if [x[0][0], x[2][1]] not in x:
				x.append([x[0][0], x[2][1]])
			else:
				x.append([x[2][0], x[0][1]])
		elif [x[1][0], x[2][1]] not in x:
			x.append([x[1][0], x[2][1]])
		else:
			x.append([x[2][0], x[1][1]])
	x.sort(key=lambda i: i[0])
	print(abs(x[0][0] - x[2][0]) * abs(x[0][1] - x[1][1]))


n = int(input().split()[0])
points = []
for i in range(n):
	pt = []
	line = input().split()
	pt.append(int(line[0]))
	pt.append(int(line[1]))
	points.append(pt)
res = -1
for vec in points:
	for vec2 in points:
		if vec[0] != vec2[0] and vec[1] != vec2[1]:
			res = abs(vec[0] - vec2[0]) * abs(vec[1] - vec2[1])
print(res)


n = int(input())
x = []
y = []
for i in range(n):
	(xi, yi) = map(int, input().split())
	x.append(xi)
	y.append(yi)
if n == 1:
	print(-1)
if n >= 2:
	s = (max(x) - min(x)) * (max(y) - min(y))
	if s == 0:
		s = -1
	print(s)


def mp():
	return map(int, input().split())

def lt():
	return list(map(int, input().split()))

def pt(x):
	print(x)

def ip():
	return input()

def it():
	return int(input())

def sl(x):
	return [t for t in x]

def spl(x):
	return x.split()

def aj(liste, item):
	liste.append(item)

def bin(x):
	return '{0:b}'.format(x)
n = it()
P = []
for i in range(n):
	(a, b) = mp()
	P.append((a, b))
P.sort(key=lambda x: x[0])
if len(P) == 1:
	print(-1)
elif len(P) == 4:
	print(abs(P[0][1] - P[1][1]) * abs(P[2][0] - P[1][0]))
elif len(P) == 3:
	if P[0][0] == P[1][0]:
		print(abs(P[0][1] - P[1][1]) * abs(P[2][0] - P[1][0]))
	else:
		print(abs(P[1][1] - P[2][1]) * abs(P[1][0] - P[0][0]))
elif P[0][0] != P[1][0] and P[0][1] != P[1][1]:
	print(abs(P[1][0] - P[0][0]) * abs(P[1][1] - P[0][1]))
else:
	print(-1)


n = int(input())
xfound = []
yfound = []
for i in range(n):
	(x0, y0) = map(int, input().split())
	if x0 not in xfound:
		xfound.append(x0)
	if y0 not in yfound:
		yfound.append(y0)
print(abs((xfound[0] - xfound[1]) * (yfound[0] - yfound[1])) if len(xfound) == 2 and len(yfound) == 2 else -1)


n = int(input())
a = [[int(i) for i in input().split()] for j in range(n)]
for i in range(n):
	for j in range(i + 1, n):
		if a[i][0] != a[j][0] and a[i][1] != a[j][1]:
			print(abs(a[i][0] - a[j][0]) * abs(a[i][1] - a[j][1]))
			exit(0)
print(-1)


import itertools

def main():
	n = int(input())
	a = []
	for i in range(n):
		a.append(tuple(map(int, input().split())))
	for (a, b) in itertools.combinations(a, 2):
		if a[0] != b[0] and a[1] != b[1]:
			print(abs((a[0] - b[0]) * (a[1] - b[1])))
			break
	else:
		print(-1)
try:
	while True:
		main()
except EOFError:
	pass


import sys
n = int(input())
xi = []
yi = []
w = h = 0
for i in range(n):
	(x, y) = map(int, input().split())
	xi.append(x)
	yi.append(y)
if n == 1:
	print('-1')
elif n == 2:
	if xi[0] == xi[1] or yi[0] == yi[1]:
		print('-1')
	else:
		print(abs((xi[0] - xi[1]) * (yi[0] - yi[1])))
else:
	if xi[0] == xi[1]:
		w = abs(xi[0] - xi[2])
	else:
		w = abs(xi[0] - xi[1])
	if yi[0] == yi[1]:
		h = abs(yi[0] - yi[2])
	else:
		h = abs(yi[0] - yi[1])
	print(w * h)


import sys
n = int(input())
arr = []
c = 0
if n == 1:
	print(-1)
	sys.exit()
for i in range(n):
	(x, y) = map(int, input().split())
	arr.append((x, y))
for i in range(n):
	for j in range(i + 1):
		if arr[i][0] != arr[j][0] and arr[i][1] != arr[j][1]:
			print(abs(arr[i][0] - arr[j][0]) * abs(abs(arr[i][1] - arr[j][1])))
			c = 1
			sys.exit()
print(-1)


n = int(input())
x = []
y = []
while n > 0:
	n -= 1
	s = input()
	a = [int(i) for i in s.split(' ')]
	x.append(a[0])
	y.append(a[1])
(kx, ky, xx, yy) = (0, 0, -2000, -2000)
(dx, dy) = (0, 0)
for i in x:
	if xx != i and kx < 2:
		kx += 1
		if xx != -2000:
			dx = abs(xx - i)
		xx = i
for i in y:
	if yy != i and ky < 2:
		ky += 1
		if yy != -2000:
			dy = abs(yy - i)
		yy = i
if kx == 2 and ky == 2:
	SS = dx * dy
	print(SS)
else:
	print(-1)


def find_distinct_coordinate(coordinates):
	for (i, coordinate) in enumerate(coordinates):
		for c2 in coordinates[i + 1:]:
			if coordinate[0] != c2[0] and coordinate[1] != c2[1]:
				return [coordinate, c2]
	return None

def swimming_pool():
	num_of_coordinates = int(input())
	coordinates = []
	for i in range(num_of_coordinates):
		coordinates.append([int(x) for x in input().split(' ')])
	if num_of_coordinates == 1:
		return -1
	distinct = find_distinct_coordinate(coordinates)
	if not distinct:
		return -1
	(x1, y1) = (distinct[0][0], distinct[0][1])
	(x2, y2) = (distinct[1][0], distinct[1][1])
	Xd = abs(x1 - x2)
	Yd = abs(y1 - y2)
	area = Xd * Yd
	return area if area else -1
print(swimming_pool())


x = []
y = []
I = lambda : list(map(int, input().split()))
for _ in '0' * I()[0]:
	s = I()
	x += [s[0]]
	y += [s[1]]
t = (max(x) - min(x)) * (max(y) - min(y))
print([t, -1][not t])


n = int(input())
a = []
for i in range(n):
	b = list(map(int, input().split()))
	a.append(b)
for i in range(n):
	for j in range(n):
		if a[i][0] != a[j][0] and a[i][1] != a[j][1]:
			print(abs(a[i][0] - a[j][0]) * abs(a[i][1] - a[j][1]))
			exit()
print('-1')


n = int(input())
v = []
for i in range(n):
	v.append([int(i) for i in input().split()])
v.sort()
if n == 1:
	print(-1)
elif n == 2:
	if v[0][1] == v[1][1] or v[1][0] == v[0][0]:
		print(-1)
	else:
		print(abs(v[0][0] - v[1][0]) * abs(v[0][1] - v[1][1]))
elif n == 3:
	if v[0][0] == v[1][0] != v[2][0]:
		if v[0][1] == v[2][1] != v[1][1]:
			print(abs(v[0][0] - v[2][0]) * abs(v[2][1] - v[1][1]))
		elif v[1][1] == v[2][1] != v[0][1]:
			print(abs(v[0][0] - v[2][0]) * abs(v[2][1] - v[0][1]))
		else:
			print(-1)
	elif v[1][0] == v[2][0] != v[0][0]:
		if v[1][1] == v[0][1] != v[2][1]:
			print(abs(v[0][0] - v[2][0]) * abs(v[2][1] - v[1][1]))
		elif v[2][1] == v[0][1] != v[1][1]:
			print(abs(v[0][0] - v[2][0]) * abs(v[2][1] - v[1][1]))
		else:
			print(-1)
	else:
		print(-1)
elif v[0][0] == v[1][0] != v[2][0] and v[2][0] == v[3][0] and (v[0][1] == v[2][1]) and (v[1][1] == v[3][1] != v[2][1]):
	print(abs(v[3][1] - v[2][1]) * abs(v[3][0] - v[1][0]))
else:
	print(-1)


def dlina(x, y, x1, y1):
	a = x - x1
	b = y - y1
	return (a ** 2 + b ** 2) ** 0.5
n = int(input())
(x2, y2) = (0, 0)
if n == 1:
	(x, y) = map(int, input().split())
	print(-1)
elif n == 2:
	(x, y) = map(int, input().split())
	(x1, y1) = map(int, input().split())
	if x == x1 or y == y1:
		print(-1)
	else:
		(x2, y2) = (x1, y)
		h = dlina(x2, y2, x1, y1)
		a = dlina(x2, y2, x, y)
		print(int(h * a))
elif n == 3:
	(x, y) = map(int, input().split())
	(x1, y1) = map(int, input().split())
	(x2, y2) = map(int, input().split())
	h = dlina(min(x, x1, x2), min(y, y1, y2), max(x, x1, x2), min(y, y1, y2))
	a = dlina(min(x, x1, x2), min(y, y1, y2), min(x, x1, x2), max(y, y1, y2))
	print(int(a * h))
elif n == 4:
	k = 0
	(x, y) = map(int, input().split())
	(x1, y1) = map(int, input().split())
	(x2, y2) = map(int, input().split())
	(x3, y3) = map(int, input().split())
	(xp, yp) = (min(x, x1, x2, x3), min(y, y1, y2, y3))
	(xp1, yp1) = (max(x, x1, x2, x3), max(y, y1, y2, y3))
	(x2, y2) = (xp1, yp)
	h = dlina(x2, y2, xp1, yp1)
	a = dlina(x2, y2, xp, yp)
	print(int(h * a))


def main():
	n = int(input())
	p = [[int(__) for __ in input().split()] for _ in range(n)]
	if n == 1:
		return -1
	ans = -1
	for i in range(n):
		for j in range(n):
			if p[i][0] != p[j][0] and p[i][1] != p[j][1]:
				ans = abs((p[i][0] - p[j][0]) * (p[i][1] - p[j][1]))
	return ans
print(main())


n = int(input())
(x, y) = ([], [])
for i in range(n):
	(_x, _y) = map(int, input().split())
	x.append(_x)
	y.append(_y)
x = sorted(set(x))
y = sorted(set(y))
if len(x) == 2 and len(y) == 2:
	print((x[1] - x[0]) * (y[1] - y[0]))
else:
	print(-1)


n = int(input())
if n == 1:
	a = str(input())
	print(-1)
elif n == 2:
	a = str(input())
	b = str(input())
	a = a.split(' ')
	b = b.split(' ')
	i = 0
	for i in range(2):
		a[i] = int(a[i])
		b[i] = int(b[i])
	if a[1] == b[1] or a[0] == b[0]:
		print(-1)
	else:
		print(abs((a[1] - b[1]) * (a[0] - b[0])))
elif n == 3:
	a = str(input())
	b = str(input())
	c = str(input())
	a = a.split(' ')
	b = b.split(' ')
	c = c.split(' ')
	for i in range(2):
		a[i] = int(a[i])
		b[i] = int(b[i])
		c[i] = int(c[i])
	if a[1] != b[1] and a[0] != b[0]:
		print(abs((a[1] - b[1]) * (a[0] - b[0])))
	elif a[1] != c[1] and a[0] != c[0]:
		print(abs((a[1] - c[1]) * (a[0] - c[0])))
	else:
		print(abs((c[1] - b[1]) * (c[0] - b[0])))
elif n == 4:
	a = str(input())
	b = str(input())
	c = str(input())
	d = str(input())
	a = a.split(' ')
	b = b.split(' ')
	c = c.split(' ')
	d = d.split(' ')
	for i in range(2):
		a[i] = int(a[i])
		b[i] = int(b[i])
		c[i] = int(c[i])
		d[i] = int(d[i])
	if a[1] != b[1] and a[0] != b[0]:
		print(abs((a[1] - b[1]) * (a[0] - b[0])))
	elif a[1] != c[1] and a[0] != c[0]:
		print(abs((a[1] - c[1]) * (a[0] - c[0])))
	elif a[1] != d[1] and a[0] != d[0]:
		print(abs((a[1] - d[1]) * (a[0] - d[0])))
	elif b[1] != c[1] and b[0] != c[0]:
		print(abs((b[1] - c[1]) * (b[0] - c[0])))
	elif b[1] != d[1] and b[0] != d[0]:
		print(abs((d[1] - b[1]) * (d[0] - b[0])))
	elif c[1] != d[1] and c[0] != d[0]:
		print(abs((d[1] - c[1]) * (d[0] - c[0])))


n = int(input())
a = [tuple(map(int, input().split())) for i in range(n)]
xmin = 100000
xmax = -100000
ymin = 100000
ymax = -100000
for b in a:
	xmin = min(xmin, b[0])
	xmax = max(xmax, b[0])
	ymin = min(ymin, b[1])
	ymax = max(ymax, b[1])
r = (xmax - xmin) * (ymax - ymin)
if r == 0:
	print(-1)
else:
	print(r)


import sys
input_file = sys.stdin
input_file.readline()
x_coords = set()
y_coords = set()
for line in input_file.readlines():
	(x, y) = map(int, line.rstrip().split())
	x_coords.add(x)
	y_coords.add(y)
if len(x_coords) == 2 and len(y_coords) == 2:
	print(abs(x_coords.pop() - x_coords.pop()) * abs(y_coords.pop() - y_coords.pop()))
else:
	print(-1)


import time
n = int(input())
x = []
y = []
for i in range(n):
	(X, Y) = (int(i) for i in input().split())
	x.append(X)
	y.append(Y)
start = time.time()
x = list(set(x))
y = list(set(y))
if len(x) < 2 or len(y) < 2:
	print(-1)
else:
	ans = (x[1] - x[0]) * (y[1] - y[0])
	if ans < 0:
		ans = -ans
	print(ans)
finish = time.time()


def judgeTwoPoints(pa, pb):
	if pa[0] != pb[0] and pa[1] != pb[1]:
		return abs(pa[0] - pb[0]) * abs(pa[1] - pb[1])
	else:
		return -1

def solve(pts, n):
	if n == 1:
		return -1
	pts.sort()
	if n == 2:
		return judgeTwoPoints(pts[0], pts[1])
	if n == 3:
		resa = judgeTwoPoints(pts[0], pts[1])
		resb = judgeTwoPoints(pts[1], pts[2])
		resc = judgeTwoPoints(pts[0], pts[2])
		return max(resa, resb, resc)
	return judgeTwoPoints(pts[1], pts[2])
n = int(input())
pts = []
for _ in range(n):
	pts.append(tuple([int(x) for x in input().split()]))
print(solve(pts, n))


import sys

def check_points(a, b):
	if a[0] != b[0] and a[1] != b[1]:
		return True
	else:
		return False

def squre(a, b):
	if a[0] > b[0]:
		side_a = a[0] - b[0]
	else:
		side_a = b[0] - a[0]
	if a[1] > b[1]:
		side_b = a[1] - b[1]
	else:
		side_b = b[1] - a[1]
	return side_a * side_b
n = int(input())
a = []
q = 0
h = 0
for x in range(n):
	a.append(list(map(int, input().split())))
if n == 1:
	print(-1)
elif n == 2:
	if check_points(a[0], a[1]):
		print(squre(a[0], a[1]))
	else:
		print(-1)
elif n == 3:
	if check_points(a[0], a[1]):
		print(squre(a[0], a[1]))
	elif check_points(a[0], a[2]):
		print(squre(a[0], a[2]))
	elif check_points(a[1], a[2]):
		print(squre(a[1], a[2]))
	else:
		print(-1)
elif n == 4:
	if check_points(a[0], a[1]) and check_points(a[2], a[3]):
		print(squre(a[0], a[1]))
	elif check_points(a[0], a[2]) and check_points(a[1], a[3]):
		print(squre(a[0], a[2]))
	elif check_points(a[0], a[3]) and check_points(a[1], a[2]):
		print(squre(a[0], a[3]))
	else:
		print(-1)
else:
	print(-1)


n = int(input())
l = [list(map(int, input().split())) for _ in range(n)]
x = set()
y = set()
for (xx, yy) in l:
	x |= {xx}
	y |= {yy}
x = list(x)
y = list(y)
if len(x) == 1 or len(y) == 1:
	print(-1)
else:
	print(abs(x[0] - x[1]) * abs(y[0] - y[1]))


n = int(input())
p = []
for i in range(n):
	(x, y) = map(int, input().split())
	p.append([x, y])
if n == 1:
	print(-1)
elif n == 2:
	if p[0][0] != p[1][0] and p[0][1] != p[1][1]:
		print(abs(p[0][0] - p[1][0]) * abs(p[0][1] - p[1][1]))
	else:
		print(-1)
else:
	x1 = p[0][0]
	x2 = 0
	for i in range(1, n):
		if x1 != p[i][0]:
			x2 = p[i][0]
			break
	y1 = p[0][1]
	y2 = 0
	for i in range(1, n):
		if y1 != p[i][1]:
			y2 = p[i][1]
			break
	print(abs(x2 - x1) * abs(y2 - y1))


n = int(input())
if n == 1:
	print(-1)
	quit()
if n == 2:
	(a, b) = [int(x) for x in input().split()]
	(c, d) = [int(x) for x in input().split()]
	if a != c and b != d:
		print(abs(a - c) * abs(b - d))
		quit()
	else:
		print(-1)
		quit()
if n == 3:
	(a, b) = [int(x) for x in input().split()]
	(c, d) = [int(x) for x in input().split()]
	(e, f) = [int(x) for x in input().split()]
	k = [abs(a - c), abs(a - e)]
	l = [abs(b - d), abs(b - f)]
	print(max(k) * max(l))
	quit()
(a, b) = [int(x) for x in input().split()]
(c, d) = [int(x) for x in input().split()]
(e, f) = [int(x) for x in input().split()]
(g, h) = [int(x) for x in input().split()]
k = [abs(a - c), abs(a - e)]
l = [abs(b - d), abs(b - f)]
print(max(k) * max(l))


n = int(input())
vertice = []
for i in range(n):
	v = list(map(int, input().split()))
	vertice.append(v)
ans = []
if n >= 2:
	area = abs(vertice[0][0] - vertice[1][0]) * abs(vertice[0][1] - vertice[1][1])
	ans.append(area)
if n >= 3:
	area = abs(vertice[0][0] - vertice[2][0]) * abs(vertice[0][1] - vertice[2][1])
	ans.append(area)
	area = abs(vertice[1][0] - vertice[2][0]) * abs(vertice[1][1] - vertice[2][1])
	ans.append(area)
if n >= 4:
	area = abs(vertice[0][0] - vertice[3][0]) * abs(vertice[0][1] - vertice[3][1])
	ans.append(area)
	area = abs(vertice[1][0] - vertice[3][0]) * abs(vertice[1][1] - vertice[3][1])
	ans.append(area)
	area = abs(vertice[2][0] - vertice[3][0]) * abs(vertice[2][1] - vertice[3][1])
	ans.append(area)
ans.append(0)
ans.sort(reverse=True)
if ans[0] > 0:
	print(ans[0])
else:
	print(-1)


import unittest
import sys

class Pool:

	def __init__(self, test_inputs=None):
		it = iter(test_inputs.split('\n')) if test_inputs else None

		def uinput():
			return next(it) if it else sys.stdin.readline().rstrip()
		[self.n] = map(int, uinput().split())
		(l, s) = (self.n, 2)
		inp = ' '.join((uinput() for i in range(l))).split()
		self.numm = [[int(inp[i]) for i in range(j, l * s, s)] for j in range(s)]
		(self.numa, self.numb) = self.numm

	def calculate(self):
		result = 0
		m = min(3, len(self.numa))
		for i in range(m):
			for j in range(i + 1, m):
				result += abs((self.numa[i] - self.numa[j]) * (self.numb[i] - self.numb[j]))
		if result == 0:
			result = -1
		return str(result)

class unitTests(unittest.TestCase):

	def test_single_test(self):
		test = '2\n0 0\n1 1'
		d = Pool(test)
		self.assertEqual(d.n, 2)
		self.assertEqual(d.numa, [0, 1])
		self.assertEqual(d.numb, [0, 1])
		self.assertEqual(Pool(test).calculate(), '1')
		test = '1\n1 1'
		self.assertEqual(Pool(test).calculate(), '-1')
		test = '4\n2 2\n3 3\n2 3\n3 2'
		self.assertEqual(Pool(test).calculate(), '1')
		test = '2\n100 100\n0 0'
		self.assertEqual(Pool(test).calculate(), '10000')

	def time_limit_test(self, nmax):
		import random
		import timeit
		test = str(nmax) + ' ' + str(nmax) + '\n'
		numnums = [str(i) + ' ' + str(i + 1) for i in range(nmax)]
		test += '\n'.join(numnums) + '\n'
		nums = [random.randint(1, 10000) for i in range(nmax)]
		test += ' '.join(map(str, nums)) + '\n'
		start = timeit.default_timer()
		d = Pool(test)
		calc = timeit.default_timer()
		d.calculate()
		stop = timeit.default_timer()
		print('\nTimelimit Test: ' + '{0:.3f}s (init {1:.3f}s calc {2:.3f}s)'.format(stop - start, calc - start, stop - calc))
sys.setrecursionlimit(100000)
if sys.argv[-1] == '-ut':
	unittest.main(argv=[' '])
sys.stdout.write(Pool().calculate())


n = int(input())
a = []
flag = 0
for i in range(n):
	x = list(map(int, input().split()))
	a.append(x)
if n == 1:
	print(-1)
elif n == 2:
	if a[0][0] == a[1][0] or a[0][1] == a[1][1]:
		print(-1)
	else:
		print(abs(a[0][0] - a[1][0]) * abs(a[0][1] - a[1][1]))
else:
	for j in range(n - 1):
		for k in range(j + 1, n):
			if abs(a[j][0] - a[k][0]) * abs(a[j][1] - a[k][1]) != 0:
				print(abs(a[j][0] - a[k][0]) * abs(a[j][1] - a[k][1]))
				flag = 1
				break
		if flag == 1:
			break


n = int(input())
res = -1
if n > 1:
	if n > 2:
		a = list(input().split(' '))
		(x1, y1) = (int(a[0]), int(a[1]))
		a = list(input().split(' '))
		(x2, y2) = (int(a[0]), int(a[1]))
		a = list(input().split(' '))
		(x3, y3) = (int(a[0]), int(a[1]))
		if n == 4:
			a = list(input().split(' '))
			(x4, y4) = (int(a[0]), int(a[1]))
		if x1 != x2 and y1 != y2:
			res = abs(x1 - x2) * abs(y1 - y2)
		elif x1 != x3 and y1 != y3:
			res = abs(x1 - x3) * abs(y1 - y3)
		elif x2 != x3 and y2 != y3:
			res = abs(x2 - x3) * abs(y2 - y3)
		elif n == 4:
			res = abs(x1 - x4) * abs(y1 - y4)
	else:
		a = list(input().split(' '))
		(x1, y1) = (int(a[0]), int(a[1]))
		a = list(input().split(' '))
		(x2, y2) = (int(a[0]), int(a[1]))
		if x1 != x2 and y1 != y2:
			res = abs(x1 - x2) * abs(y1 - y2)
print(res)


class test3:

	def demo(self, input_list):
		if len(input_list) == 1:
			print(-1)
		elif len(input_list) == 2:
			a = input_list[0]
			b = input_list[1]
			size = (b[0] - a[0]) * (b[1] - a[1])
			if size == 0:
				print(-1)
			else:
				print(abs(size))
		else:
			a = input_list[0]
			b = input_list[1]
			c = input_list[2]
			size = []
			size.append((b[0] - a[0]) * (b[1] - a[1]))
			size.append((c[0] - a[0]) * (c[1] - a[1]))
			size.append((c[0] - b[0]) * (c[1] - b[1]))
			for i in size:
				if i != 0:
					print(abs(i))
					break

def test():
	test_lists = [[[0, 0], [1, 1]], [[1, 1], [0, 0]], [[1, 1]], [[0, 0], [1, 1], [1, 0]], [[0, 0], [1, 0]], [[0, 0], [2, 0], [2, 2], [0, 2]]]
	for line in test_lists:
		print(line)
		test3().demo(line)

def main():
	input_list1 = input().strip().split()
	num = int(input_list1[0])
	input_list = []
	for i in range(num):
		input_list.append(list(map(int, input().strip().split())))
	test3().demo(input_list)
main()


n = int(input())
a = [[] for i in range(n)]
for i in range(n):
	(x, y) = map(int, input().split())
	a[i].append(x)
	a[i].append(y)
if n == 1:
	print(-1)
elif n == 2:
	if a[1][1] != a[0][1] and a[1][0] != a[0][0]:
		print(abs((a[0][0] - a[1][0]) * (a[0][1] - a[1][1])))
	else:
		print(-1)
else:
	print(max(abs(a[0][0] - a[1][0]), abs(a[0][0] - a[2][0])) * max(abs(a[0][1] - a[1][1]), abs(a[0][1] - a[2][1])))


n = int(input())
a = set()
b = set()
for i in range(0, n):
	(x, y) = map(int, input().split())
	a.add(x)
	b.add(y)
if n < 2:
	print(-1)
elif len(a) != 2 or len(b) != 2:
	print(-1)
else:
	p = a.pop()
	q = a.pop()
	r = b.pop()
	s = b.pop()
	c = p - q
	d = r - s
	print(abs(d * c))


N = int(input())
if N < 2:
	print(-1)
elif N == 2:
	a = tuple(map(int, input().split()))
	b = tuple(map(int, input().split()))
	if a[0] != b[0] and a[1] != b[1]:
		print(abs(b[0] - a[0]) * abs(b[1] - a[1]))
	else:
		print(-1)
elif N == 3:
	a = tuple(map(int, input().split()))
	b = tuple(map(int, input().split()))
	c = tuple(map(int, input().split()))
	print(abs((max(a[0], b[0], c[0]) - min(a[0], b[0], c[0])) * (max(a[1], b[1], c[1]) - min(a[1], b[1], c[1]))))
else:
	a = tuple(map(int, input().split()))
	b = tuple(map(int, input().split()))
	c = tuple(map(int, input().split()))
	d = tuple(map(int, input().split()))
	print(abs((max(a[0], b[0], c[0]) - min(a[0], b[0], c[0])) * (max(a[1], b[1], c[1]) - min(a[1], b[1], c[1]))))


read = lambda : map(int, input().split())
n = int(input())
a = [tuple(read()) for i in range(n)]
if n == 4:
	a.sort()
	S = abs(a[3][0] - a[0][0]) * abs(a[3][1] - a[0][1])
elif n == 3:
	a.sort()
	s1 = abs(a[2][0] - a[0][0])
	a.sort(key=lambda x: x[1])
	s2 = abs(a[2][1] - a[0][1])
	S = s1 * s2
elif n == 2:
	if a[0][0] != a[1][0] and a[0][1] != a[1][1]:
		S = abs(a[1][0] - a[0][0]) * abs(a[0][1] - a[1][1])
	else:
		S = -1
else:
	S = -1
print(S)


from sys import stdin
from collections import defaultdict
from operator import itemgetter

def main():
	print('{}'.format(run()))

def run():
	n = int(stdin.readline())
	if n == 1:
		return -1
	else:
		points = [list(map(int, stdin.readline().split())) for _ in range(n)]
		for p1 in points:
			for p2 in points:
				if p1 == p2:
					continue
				if p1[0] == p2[0] or p1[1] == p2[1]:
					continue
				return abs(p1[0] - p2[0]) * abs(p1[1] - p2[1])
		return -1
main()


__author__ = 'suvasish'

def make_positive(num):
	return num * -1

def chek_positive(num):
	if num >= 1:
		return num
	else:
		return make_positive(num)
vertices = []
x_axis = []
y_axis = []
n = int(input())
if n == 1:
	z = input()
	print(-1)
	exit(0)
for r in range(0, n):
	vertices.append(list(map(int, input().split(' '))))
	for itm in vertices:
		x_val = itm[0]
		if x_val not in x_axis:
			x_axis.append(x_val)
		y_val = itm[1]
		if y_val not in y_axis:
			y_axis.append(y_val)
if len(x_axis) == 1 or len(y_axis) == 1:
	print(-1)
	exit(0)
x_axis.sort()
y_axis.sort()
length = x_axis[-1] - x_axis[0]
width = y_axis[-1] - y_axis[0]
print(chek_positive(length * width))


n = int(input())
if n < 2:
	print(-1)
elif n == 2:
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == c or b == d:
		print(-1)
	else:
		print(abs(a - c) * abs(b - d))
elif n > 2:
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	(e, f) = map(int, input().split())
	(x, y) = (0, 0)
	if a == c:
		x = abs(b - d)
		if b == f:
			y = abs(a - e)
		else:
			y = abs(c - e)
	else:
		x = abs(a - c)
		if e == a:
			y = abs(b - f)
		else:
			y = abs(d - f)
	print(x * y)


def wrap():
	inp = input()
	n = int(inp)
	ver = list()
	for i in range(n):
		inp = input().split(' ')
		ver.append([int(inp[0]), int(inp[1])])
	for i in range(len(ver)):
		for j in range(i + 1, len(ver)):
			if ver[i][0] != ver[j][0] and ver[i][1] != ver[j][1]:
				print(abs(ver[i][0] - ver[j][0]) * abs(ver[i][1] - ver[j][1]))
				return
	else:
		print(-1)
		return
wrap()


import sys
n = int(input())
if n == 1:
	print(-1)
	sys.exit()
if n == 2:
	(x_1, y_1) = map(int, input().split())
	(x_2, y_2) = map(int, input().split())
	if x_1 == x_2 or y_1 == y_2:
		print(-1)
		sys.exit()
	else:
		print((max(x_1, x_2) - min(x_1, x_2)) * (max(y_1, y_2) - min(y_1, y_2)))
		sys.exit()
if n == 3:
	(x_1, y_1) = map(int, input().split())
	(x_2, y_2) = map(int, input().split())
	(x_3, y_3) = map(int, input().split())
if n == 4:
	(x_1, y_1) = map(int, input().split())
	(x_2, y_2) = map(int, input().split())
	(x_3, y_3) = map(int, input().split())
	(x_4, y_4) = map(int, input().split())
if x_1 != x_2 and y_1 != y_2:
	print((max(x_1, x_2) - min(x_1, x_2)) * (max(y_1, y_2) - min(y_1, y_2)))
	sys.exit()
elif x_1 != x_3 and y_1 != y_3:
	print((max(x_1, x_3) - min(x_1, x_3)) * (max(y_1, y_3) - min(y_1, y_3)))
	sys.exit()
else:
	print((max(x_2, x_3) - min(x_2, x_3)) * (max(y_2, y_3) - min(y_2, y_3)))
	sys.exit()


def calc(point):
	return abs(max([p[0] for p in point]) - min([p[0] for p in point])) * abs(max([p[1] for p in point]) - min([p[1] for p in point]))

def main():
	n = int(input())
	point = []
	for i in range(n):
		point.append([int(i) for i in input().split(' ')])
	if n >= 3:
		print(calc(point))
		return
	if n == 1:
		print(-1)
		return
	if n == 2:
		a = point[0]
		b = point[1]
		if a[0] == b[0] or a[1] == b[1]:
			print(-1)
			return
		print(calc(point))
main()


from sys import stdin
ax = []
ay = []
n = int(stdin.readline())
for i in range(0, n):
	(x, y) = map(int, stdin.readline().split())
	ax.append(x)
	ay.append(y)
if n == 1:
	print(-1)
elif n == 2:
	if ax[0] != ax[1] and ay[0] != ay[1]:
		print(abs(ax[0] - ax[1]) * abs(ay[0] - ay[1]))
	else:
		print(-1)
else:
	print((max(ax) - min(ax)) * (max(ay) - min(ay)))


n = int(input())
xs = list()
ys = list()
for x in range(n):
	x = input().split()
	xs.append(int(x[0]))
	ys.append(int(x[1]))
if n == 1:
	print(-1)
else:
	l = (max(xs) - min(xs)) * (max(ys) - min(ys))
	if l == 0:
		print(-1)
	else:
		print(l)


n = int(input())
mas = []
if n > 1 and n < 5:
	for i in range(n):
		mas.append(input().split(' '))
	for i in range(len(mas)):
		for j in range(2):
			mas[i][j] = int(mas[i][j])
	s = []
	mas1 = []
	for i in sorted(mas):
		mas1.append(i)
	if abs(mas1[0][0] - mas1[-1][0]) * abs(mas1[0][1] - mas1[-1][1]) != 0:
		print(abs(mas1[0][0] - mas1[-1][0]) * abs(mas1[0][1] - mas1[-1][1]))
	elif n == 3 and abs(mas1[0][0] - mas1[-1][0]) * abs(mas1[0][1] - mas1[-1][1]) == 0:
		print(abs(mas1[0][0] - mas1[-1][0]) * abs(mas1[0][1] - mas1[-2][1]))
	else:
		print(-1)
else:
	print(-1)


n = int(input())
(xpos, ypos) = ([], [])
for x in range(n):
	string = input()
	numbers = string.split()
	xpos.append(int(numbers[0]))
	ypos.append(int(numbers[1]))
a = -1
if n > 1:
	x = xpos[0]
	b = 1
	while xpos[b] == x:
		b += 1
		if b == n:
			break
	if b != n:
		m = abs(x - xpos[b])
		y = ypos[0]
		b = 1
		while ypos[b] == y:
			b += 1
			if b == n:
				break
		if b != n:
			n = abs(y - ypos[b])
			a = m * n
print(a)


n = int(input())
x = n * [0]
y = n * [0]
for i in range(n):
	(x[i], y[i]) = [int(i) for i in input().split()]
if n == 1:
	print(-1)
elif n == 2:
	if x[0] == x[1] or y[0] == y[1]:
		print(-1)
	else:
		print(abs((x[0] - x[1]) * (y[0] - y[1])))
elif n == 3 or n == 4:
	x.sort()
	y.sort()
	print(abs((max(x) - min(x)) * (max(y) - min(y))))


n = int(input())
inf = 1 << 30
x1 = inf
y1 = inf
x2 = -inf
y2 = -inf
for i in range(n):
	(x, y) = map(int, input().split(' '))
	x2 = max(x2, x)
	y2 = max(y2, y)
	x1 = min(x1, x)
	y1 = min(y1, y)
if n == 1 or (n == 2 and (x1 == x2 or y1 == y2)):
	print('-1')
else:
	print(abs(x1 - x2) * abs(y1 - y2))


def check(a, b):
	return a[0] != b[0] and a[1] != b[1]

def S(a, b):
	return abs(a[0] - b[0]) * abs(a[1] - b[1])
n = int(input())
points = list((tuple(map(int, input().split())) for i in range(n)))
if n == 1:
	print(-1)
elif n == 2:
	print(S(points[0], points[1])) if check(points[0], points[1]) else print(-1)
else:
	for i in range(n):
		for j in range(i + 1, n):
			if check(points[i], points[j]):
				print(S(points[i], points[j]))
				exit()
	print(-1)


def area(vs):
	w = max((x1 - x2 for (x1, _) in vs for (x2, _) in vs))
	h = max((y1 - y2 for (_, y1) in vs for (_, y2) in vs))
	return w * h or None

def pair(x, y):
	return (x, y)
n = int(input())
vs = [pair(*map(int, input().split())) for _ in range(n)]
a = area(vs)
print(-1 if a is None else a)


pl = [list(map(int, input().split())) for i in range(int(input()))]
(sx, sy) = (set((p[0] for p in pl)), set((p[1] for p in pl)))
print((max(sx) - min(sx)) * (max(sy) - min(sy)) or -1)