def solution(sizes):
answer = 0
c = []
flag = 0
for i in range(len(sizes)):
for j in range(2):
c.append(sizes[i][j])
lll = len(c)-1
c.sort()
for i in range(len(sizes)):
if
for j in range(2):
if sizes[i][0] == c[lll]:
if sizes[i][1] == c[lll // 2]:
flag = 1
if sizes[i][1] > c[lll // 2]:
flag = sizes[i][1]
if flag==1:
answer = c[lll]*c[lll//2+1]
elif flag > 1:
answer = flag*c[lll]
else:
answer = c[lll] * c[lll//2]
return answer
l = [[30,30], [60,60], [40,40], [60,50]]
print(solution(l))
###############
# arr = []
# def search(a,b):
# if arr[a+dx[dir]][b+dy[dir]] == arr[a][b]:
# cnt+=1
#
# for i in range(19):
# v = list(map(int, input().split()))
# arr.append(v)
#
# for i in range(19):
# for j in range(19):
# if arr[i][j] != 0:
# search(i,j)
# arr = []
# cnt = 0
# dx = [1 ,0 ,1, -1]
# dy = [0, 1, 1, 1]
# def search(x,y,num,dir):
# global arr
# global cnt
# cnt += 1
# if x+dx[dir]>-1 and x+dx[dir]<19 and y+dy[dir]<19 and arr[x+dx[dir]][y+dy[dir]] == num:
# search(x+dx[dir], y+dy[dir], num, dir)
# for i in range(19):
# v = list(map(int,input().split()))
# arr.append(v)for i in range(19):
# for j in range(19):
# if arr[i][j]!=0:
# cnt = 0
# for k in range(4):
# if i-dx[k]>-1 and j-dy[k] and i+dx[k]<19 and j+dy[k]<19 and arr[i][j]!=arr[i-dx[k]][j-dy[k]] and arr[i][j] == arr[i+dx[k]][j+dy[k]]:
# search(i,j,arr[i][j],k)
# if cnt == 5:
# print(arr[i][j])
# print(i+1,j+1)
# exit()
# cnt = 0
# print(0)