peterverebics/CodeNet_Python_118 huggingface dataset:
a,b,c,d = map(int,input().split())
x = a*c
if b*d > x:
  x = b*d
if a*d > x:
    x = a*d
if b*c > x:
    x = b*c
print(x)
a,b,c,d=map(int,input().split())
ans=[a*c,a*d,b*c,b*d]
print(max(ans))
a,b,c,d = map(int,input().split())

if(a > 0 and b > 0):
    if(c <= 0 and d <= 0):
        print(a * d)
        exit()
if(c > 0 and d > 0):
    if(a <= 0 and b <= 0):
        print(c * b)
        exit()

print(max(a * c, b * d))
# -*- coding: utf-8 -*-
# 整数の入力
lis = list(map(int,input().split()))
lists = []
inc = 0
# スペース区切りの整数の入力
for i in range(2):
    for j in range(2):
        lists.append(lis[i]*lis[j+2])
        inc += 1

    
# 出力
print("{}".format(max(lists)))
from sys import stdin
inp = lambda : stdin.readline().strip()

a,b,c,d = [int(x) for x in inp().split()]

print(max(a*c,b*d,a*d,b*c))
list1 = input()
list2 = list1.split()
a = int(list2[0])
b = int(list2[1])
c = int(list2[2])
d = int(list2[3])

#x = [i for i in range(a,b+1)]
#y = [j for j in range(c,d+1)]

x_min = a
x_max = b
y_min = c
y_max = d

answer_list = [x_max*y_max, x_max*y_min, x_min*y_max, x_min*y_min]

print(max(answer_list))
a,b,c,d=map(int,input().split())
temp=[]
temp.append(a*c)
temp.append(a*d)
temp.append(b*c)
temp.append(b*d)
print(max(temp))
a, b, c, d = map(int, input().split())
ans = [a*c, a*d, b*c, b*d]
print(max(ans))
a, b, c, d = map(int, input().split())

n = [a*c, a*d, b*c, b*d]
print(max(n))
a,b,c,d = [int(_n) for _n in input().split()]
print(max([a*c, a*d, b*c, b*d]))
x = list(map(int, input().split()))
print(max(x[0]*x[2], x[0]*x[3], x[1]*x[2], x[1]*x[3]))
def main():
    a,b,c,d = map(int, input().split())
    print(max([a*c, a*d, b*c, b*d]))


if __name__ == '__main__':
    main()
a, b, c, d = map(int, input().split())

m = -999999999999999999

ac = a * c
if ac >= m:
  m = ac

ad = a * d
if ad >= m:
  m = ad

bc = b * c
if bc >= m:
  m = bc

bd = b * d
if bd >= m:
  m = bd

print(m)
a, b , c ,d = map(int, input().split())

print(max(a*c,b*d,a*d,b*c))
a, b, c, d = list(map(int, input().split()))
print(max(a * c, b * d, b * c, a * d))
a,b,c,d = map(int,input().split())
print(max(max(a*c,b*d),max(a*d,b*c)))
a, b, c, d = map(int, input().split())
ac = a * c
ad = a * d
bc = b * c
bd = b * d
l = [ac, ad, bc, bd]
print(max(l))
nums = input().split(' ')
a = int(nums[0])
b = int(nums[1])
c = int(nums[2])
d = int(nums[3])

multi = []
multi.append(a * c)
multi.append(a * d)
multi.append(b * c)
multi.append(b * d)

ans = - 10 ** 18
for i in range(4):
    if multi[i] > ans:
        ans = multi[i]

print(ans)
a,b,c,d=map(int,input().split())
ans=max(a*c,a*d)
ans=max(ans,b*c)
ans=max(ans,b*d)

print(ans)
def main():
    a, b, c, d = tuple([int(_x) for _x in input().split()])
    print(max(a*c, a*d, b*c, b*d))


main()
a,b,c,d=map(int, input().split())

ans = max(a*c,a*d,b*c,b*d)

print(ans)
import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")

a, b, c, d = map(int, input().split())

print(max(a*c, a*d, b*c, b*d))
a,b,c,d = map(int,input().split())
print(max([a*c,a*d,b*c,b*d]))
a,b,c,d=map(int,input().split())
x1=a*c
x2=a*d
x3=b*c
x4=b*d
lst=[]
lst.append(x2)
lst.append(x3)
lst.append(x4)
lst.append(x1)
lst.sort()
print(lst[-1])
a,b,c,d = map(int,input().split())
ans=[]
for X in [a,b]:
  for Y in [c,d]:
    ans.append(X*Y)
print(max(ans))
a,b,c,d=map(int,input().split())



x1=a*d
x2=a*c
x3=b*c
x4=b*d

print(max(x1,x2,x3,x4))
a, b, c, d = map(int, input().split())


ans = max(a * c, a * d, b * c, b * d)
print(ans)
a, b, c, d = map(int, input().split())
print(max(a*c, a*d, b*c, b*d ))
a,b,c,d = map(int,input().split())

print(max(a*d,a*c,b*c,b*d))
a,b,c,d=map(int, input().split())

l=[a*c, a*d, b*c, d*b]
print(max(l))
a,b,c,d = map(int,input().split())

ans = max(a*c,a*d,b*c,b*d)

print(ans)
a,b,c,d = map(int,input().split())
if a>=0 and c>=0:
    print(b*d)
elif a>=0 and c<0<=d:
    print(b*d)
elif a>=0 and d<0:
    print(a*d)
elif a<0<=b and c>=0:
    print(b*d)
elif a<0<=b and c<0<=d:
    print(max(b*d,a*c))
elif a<0<=b and d<0:
    print(a*c)
elif b<0 and c>=0:
    print(b*c)
elif b<0 and c<0<=d:
    print(a*c)
elif b<0 and d<0:
    print(a*c)
a, b, c, d = map(int, input().split())

lst = [a * c, a * d, b * c, b * d]

print(max(lst))
[a, b, c, d] = [int(inp) for inp in input().split()]
print(max([a * c, b * d, a * d, b * c]))
n = input()

a, b, c, d = n.split(" ")
a = int(a)
b = int(b)
c = int(c)
d = int(d)

ac = a*c
ad = a*d
bc = b*c
bd = b*d

print(max([ac, ad, bc, bd]))
a,b,c,d = map(int,input().split())
lsx = [a,b]
lsy = [c,d]
ans = -10**20
for x in lsx:
    for y in lsy:
        ans = max(ans,x*y)
print(ans)
a,b,c,d = list(map(int,input().split()))

print(max(a*c,a*d,b*c,b*d))
a, b, c, d = map(int, input().split())
ans = max(a * c, b * c, a * d, b * d)
print(ans)
a, b, c, d = map(int, input().split())
print(max(a*d, a*c, b*c, b*d))
a,b,c,d = map(int, input().split())

ac = a*c
ad = a*d
bc = b*c
bd = b*d

print(max(ac,ad,bc,bd))
a, b, c, d = map(int, input().split())

result = a*c
result = max(result, a*d)
result = max(result, b*c)
result = max(result, b*d)
print(result)
a, b, c, d = map(int, input().split())
print(max(a*c,a*d,b*c,b*d))
def func(a,b,c,d):
  result = a * c
  if a * d > result:
    result = a * d
  if b * c > result:
    result = b * c
  if b * d > result:
    result = b * d
  return result

if __name__ == "__main__":
  inputStr = input().split()
  a = int(inputStr[0])
  b = int(inputStr[1])
  c = int(inputStr[2])
  d = int(inputStr[3])
  print(func(a,b,c,d))
#!/usr/bin/env python

def f(a: int, b: int, c: int, d: int) -> int:
    """
    >>> f(-2, -1, -2, -1)
    4
    >>> f(-2, -1, 1, 2)
    -1
    >>> f(1, 2, 1, 2)
    4
    >>> f(1, 2, -2, -1)
    -1
    """
    return max(a * c, a * d, b * c, b * d)


if __name__ == '__main__':
    a, b, c, d = map(lambda x: int(x), input().split())
    print(f(a, b, c, d))
line = input().rstrip().split(" ")
a = int(line[0])
b = int(line[1])
c = int(line[2])
d = int(line[3])

if b>= 0 and d >= 0:
    print(max(b * d, a * c))
elif b <= 0 and d >= 0:
    print(max(b * c, a * c))
elif b >= 0 and d <= 0:
    print(max(a * d, a * c))
else:
    print(a * c)
def resolve():
    a, b, c, d = map(int, input().split())
    print(max(a * c, b * d, a * d, b * c))

resolve()
from math import gcd

from math import factorial as f

from math import ceil, floor, sqrt
import math

import bisect
import re
import heapq

from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

yes = "Yes"
no = "No"


def main():
    a,b,c,d = mi()
    ans = -100000000000000000000
    ans = max(a*c,ans)
    ans = max(b*c,ans)
    ans = max(a*d,ans)
    ans = max(b*d,ans)
    print(ans)




main()
nums = list(map(int, input().split()))
a, b, c, d = nums
result = a*c

if a*d > result:
  result = a*d
if b*c > result:
  result = b*c
if b*d > result:
  result = b*d

print(result)
a,b,c,d = map(int,input().split())
ans = [a*c, a*d, b*c, b*d]
print(max(ans))
a,b,c,d = map(int, input().split())

A=a*c
B=a*d
C=b*c
D=b*d

print(max(A,B,C,D))
import itertools

a,b,c,d = map(int,input().split())

x = [a, b]
y = [c, d]

ans = []

prod = itertools.product(x,y)
for i in prod:
    ans.append(i[0]*i[1])

print(max(ans))
a,b,c,d = map(int, input().split())
result =  [a*c,a*d,b*c,b*d]
print(max(result))
i = input().split(" ")
a = int(i[0])
b = int(i[1])
c = int(i[2])
d = int(i[3])

negneg = a * c
negpos = a * d
posneg = b * c
pospos = b * d

print(max([negneg,negpos,posneg,pospos]))
import sys

sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

a, b, c, d = map(int, input().split())

ans = max(a * c, a * d, b * c, b * d)
print(ans)
a, b, c, d = map(int, input().split())
ans = -float('inf')
for x in (a, b):
    for y in (c, d):
        ans = max(ans, x * y)
print(ans)
a,b,c,d = map(int,input().split())
ans = 0
x = a*c
y = a*d
z = b*c
w = b*d
print(max(x,y,z,w))
a,b,c,d = map(int,input().split())
print(max(a*c,max(a*d,max(b*c,b*d))))
a,b,c,d=map(int,input().split())
xy=[a*c,a*d,b*c,b*d]
print(max(xy))
a,b,c,d = map(int, input().split())

print(max(a*c,b*d,b*c,a*d))
A = list(map(int, input().split()))
print(max(A[0]*A[2], A[0]*A[3], A[1]*A[2], A[1]*A[3]))
a = list(map(int,input().split()))

result =[]
result.append(a[0] * a[2])
result.append(a[0] * a[3])
result.append(a[1] * a[2])
result.append(a[1] * a[3])
print(max(result))
# -*- coding: utf-8 -*-
import math

numList = []
result = []

user2 = list(map(int, input().split()))


numList.append(user2[0] * user2[2] )
numList.append(user2[0] * user2[3]) 
numList.append(user2[1] * user2[2]  )
numList.append (user2[1] * user2[3])

numList.sort()

print(numList[3])
a,b,c,d = map(int,input().split())
a1 = []
e = [a,b]
f = [c,d]
for i in e:
    for j in f:
        a1.append(i*j)
print(max(a1))
a,b,c,d = map(int,input().split())

l = [a*c, a*d, b*c, b*d]

print(max(l))
a,b,c,d=map(int,input().split())
big=-99999999999999999999999999999999999999999
if a*c>a*d:
    big=a*c
else:
    big=a*d

if b*c>big:
    big=b*c
if b*d>big:
    big=b*d

print(big)
a,b,c,d = map(int, input().split())

s1 = a*c
s2 = a*d
s3 = b*c
s4 = b*d

score = [s1,s2,s3,s4]
max_score = max(score)
if a<=0<=b and c<=0<=d and max_score<0:
    print(0)
else:
  print(max_score)
a, b, c, d = map(int, input().split())
l = [a*c, a*d, b*c, b*d]
print(max(l))
# -*- coding: utf-8 -*-
a, b, c, d = map(int, input().split())
print(max(a*c, a*d, b*c, b*d))
A = list(map(int,input().split()))
ans = max(A[0]*A[2],A[0]*A[3],A[1]*A[2],A[1]*A[3])
print(ans)
n = input()
m = n.split(" ")
 
x_min = int(m[0])
x_max = int(m[1])
y_min = int(m[2])
y_max = int(m[3])
 
a = x_min * y_min
b = x_min * y_max
c = x_max * y_min
d = x_max * y_max
 
if a >= b and a >= c and a >= d:
    print(a)
 
elif b >= a and b >= c and b >= d:
    print(b)
 
elif c >= a and c >= b and c >= d:
    print(c)
 
elif d >= a and d >= b and d >= c:
    print(d)
a, b, c, d = map(int, input().split())
ans = max(a * c, a * d, b * c, b * d)
print(ans)
a,b,c,d=map(int, input().split())
maximum_list=(a*c,a*d,b*c,b*d)
print(max(maximum_list))
a,b,c,d = map(int, input().split())

seki = []
seki.append(a*c)
seki.append(a*d)
seki.append(b*c)
seki.append(b*d)
seki = sorted(seki)
print(seki[-1])
from math import trunc
import sys
import copy
from collections import deque
import collections
import itertools
stdin = sys.stdin
import math

mod = 10**9+7

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

a = na()

ans = []

ans.append(a[0]*a[2])
ans.append(a[0]*a[3])
ans.append(a[1]*a[2])
ans.append(a[1]*a[3])

print(max(ans))
a,b,c,d=map(int,input().split())
result=[a*c,a*d,b*c,b*d]
print(max(result))
[a,b,c,d] = list(map(int,input().split()))

dam=[]
dam.append(a*c)
dam.append(a*d)
dam.append(b*c)
dam.append(b*d)
print(max(dam))
a,b,c,d = map(int,input().split())
print(max(a*c, a*d, b*c, b*d))
a, b, c, d = map(int, input().split())

ans = -1e18
ans = max(ans, a*c)
ans = max(ans, a*d)
ans = max(ans, b*c)
ans = max(ans, b*d)
print(ans)
a,b,c,d=[int(i) for i in raw_input().split()]
print max(a*c,a*d,b*c,b*d)
a, b, c, d = map(int, input().split())

ans = [a*c, a*d, b*c, b*d]

print(max(ans))
a,b,c,d = map(int,input().split())
ans = max(a*c,a*d,b*c,b*d)
print(ans)
a,b,c,d = map(int, input().split())
max_list = [a*c,a*d,b*c,b*d]
max_list = sorted(max_list, reverse=True)
print(max_list[0])
dd=input("").split(" ")
a=int(dd[0])
b=int(dd[1])
c=int(dd[2])
d=int(dd[3])
s=max(a*c,b*c,a*d,b*d)
print(s)
import numpy as np
a, b, c, d = map(int, input().split())

hoge = []
hoge.append(a*c)
hoge.append(a*d)
hoge.append(b*c)
hoge.append(b*d)

if max(hoge) < 0:
  if np.sign(a) != np.sign(b) or np.sign(c) != np.sign(d):
    print(0)
  else:
    print(max(hoge))
else:
  print(max(hoge))
def main():
    a, b, c, d = map(int, input().split())

    print(max(a * c, a * d, b * c, b * d))


if __name__ == "__main__":
    main()
a, b, c, d = map(int, input().split())
print(max(a*c, b*c, b*d, a*d))
def cal(a,b,c,d):
    list = []
    list.append(a*c)
    list.append(b*c)
    list.append(a*d)
    list.append(b*d)
    new_list = sorted(list, reverse=True)
    print(new_list[0])

a,b,c,d = map(int, input().split())
cal(a,b,c,d)
a,b,c,d=[int(s) for s in input().split()]
ls=[a*c,a*d,b*c,b*d]
print(max(ls))
# B
a, b, c, d = map(int,input().split())
kot = []
kot.append(a * c)
kot.append(a * d)
kot.append(b * c)
kot.append(b * d)
kot = sorted(kot,reverse=True)
print(kot[0])
a, b, c, d = list(map(int, input().split()))
R=max([b*d, a*d, a*c, b*c])
print(R)
import numpy as np

a, b, c, d= map(int, input().split())

xy1=a*c
xy2=a*d
xy3=b*c
xy4=b*d

xymax=max([xy1,xy2,xy3,xy4])
print (xymax)
a, b, c, d = map(int,input().split())

print(max(a*c, a*d, b*c, b*d))
a, b, c, d = map(int, input().split())

list = []
list.append(a*c)
list.append(a*d)
list.append(b*c)
list.append(b*d)
print(max(list))
a,b,c,d=map(int,input().split())

print(max(a*c,a*d,b*c,b*d))
import sys

input = sys.stdin.readline


arr = list(map(int, input().split()))
ans = []
ans.append(arr[0]*arr[2])
ans.append(arr[0]*arr[3])
ans.append(arr[1]*arr[2])
ans.append(arr[1]*arr[3])


print(max(ans))
a, b, c, d = map(int, input().split())
if a * c < a * d:
  temp1 = a * d
else:
  temp1 = a * c
if b * c < b * d:
  temp2 = b * d
else:
  temp2 = b * c
if temp1 < temp2:
  print(temp2)
else:
  print(temp1)
X = list(map(int, input().split()))

print(max(X[1]*X[2], X[3]*X[0], X[0]*X[2],X[1]*X[3]))
a,b,c,d= list(map(int, input().split()))
print(max([b*d,a*c,a*d,b*c]))
a,b,c,d=map(int,input().split())
ans=max(a,b)*max(c,d)
ans3=min(a,b)*max(c,d)
ans4=max(a,b)*min(c,d)
ans2=min(a,b)*min(c,d)
print(max(ans,ans2,ans3,ans4))
a,b,c,d = map(int, input().split())
ans = max(a*c, a*d, b*c, b*d)

print(ans)
a,b,c,d = map(int, input().split())

L = [a*c,a*d,b*c,b*d]

L.sort(reverse = True)
print(L[0])
a,b,c,d = map(int, input().split())

print(max(a*c, a*d, b*c, b*d))
from collections import defaultdict
from collections import deque
from collections import Counter
import math
import itertools

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()

a,b,c,d = readInts()

ans = max(a*c,a*d,b*c,b*d)

print(ans)
a, b , c, d = map(int, input().split())

print(max(a * c, a * d, b * c, b * d))
a,b,c,d = map(int,input().split())

ans = [a*c,a*d,b*c,b*d]

print(max(ans))
a, b, c, d = map(int, input().split())

res = a * c
for x, y in [[a, d], [b, c], [b, d]]:
    if x * y > res:
        res = x * y

print(res)
a,b,c,d=map(int,input().split(" "))
print(max(a*c,b*c,a*d,b*d))
a,b,c,d = map(int, input().split())
l = [a*c,a*d,b*c,b*d]
Ans=max(l)
print(Ans)
a,b,c,d=map(int, input().split())
v1=a*c
v2=b*d
v3=a*d
v4=b*c
s=[v1,v2,v3,v4]
s.sort()
print(s[3])
a, b, c, d = map(int,input().split())
if a*b <= 0 or c*d <= 0:
  A = max(a*c,a*d,b*c,b*d,0)
else:
  A = max(a*c,a*d,b*c,b*d)
print(A)
a = list(map(int, input().split()))
print(max(
  a[0] * a[2], a[0] * a[3], a[1] * a[2], a[1] * a[3]
))
a, b, c, d = map(int, input().split())
print(max(a*c,
         a*d,
         b*c,
         b*d))
a, b, c, d=map(int, input().split(" "))

print(max(a*c, a*d, b*c, b*d))
a,b,c,d = map(int, input().split())

if a >= 0 and c >= 0 :
  print(b*d)
elif b <= 0 and d <= 0:
  print(a*c)
elif a>=0 and c <= 0:
  print(max(a*d,b*d))
elif a<=0 and c >= 0:
  print(max(c*b, b*d))
else:
  print(max(a*d,b*d,c*b,a*c))
def main():
    a, b, c, d = (int(i) for i in input().split())
    print(max(a*c, b*d, a*d, b*c))


if __name__ == '__main__':
    main()
array = list(map(int, input().strip().split()))
l = len(array)
list = []
if(l==4):
	ac=array[0]*array[2]
	ad=array[0]*array[3]
	bc=array[1]*array[2]
	bd=array[1]*array[3]

	list.append(ac)
	list.append(ad)
	list.append(bc)
	list.append(bd)

	print(max(list))

else:
  print("")
l = list(map(int, input().split()))

M = -(10 ** 20)

for i in range(2):
    for j in range(2, 4):
        m = l[i] * l[j]
        if M < m:
            M = m

print(M)
a, b, c, d = [int(x) for x in input().split()]
print(max(a*c, a*d, b*c, b*d))
#akash mandal: jalpaiguri government engineering college
import sys,math

def ii(): return int(input())
def mii(): return map(int,input().split())
def lmii(): return list(mii())


def main():
    a,b,c,d=mii()
    if a>b:
        a,b=b,a
    if c>d:
        c,d=d,c
    print(max(a*c,b*d,a*d,b*c))
if __name__=="__main__":
    main()
li=list(map(int,input().split()))
ans=[]
a=li[0]*li[2]
b=li[0]*li[3]
c=li[1]*li[2]
d=li[1]*li[3]
ans.append(a)
ans.append(b)
ans.append(c)
ans.append(d)

print(max(ans))
a,b,c,d=map(int, input().split())
print(max([a*c, a*d, b*c, b*d]))
a, b, c, d = map(int, input().split())
ans_list = [a * c, b * c, b * d, a * d]
print(max(ans_list))
a,b,c,d = list(map(int, input().split()))
print(max(a * c, a * d, b * c, b * d))
a,b,c,d=list(map(int,input().split()))

e=[a*c,a*d,b*c,b*d]

print(max(e))
# -*- coding: utf-8 -*-
from sys import stdin
input = stdin.readline


def main():
    a, b, c, d = list(map(int,input().split()))
    print(max([a*c, a*d, b*c, b*d]))

if __name__ == "__main__":
    main()
a,b,c,d=map(int,input().split())
print(max(a*c, a*d, b*c, b*d))
def ii(): return int(input())


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


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


a, b, c, d = mi()

print(max(a * c, b*c, a*d, b*d))
import math as mt
import sys, string
from collections import Counter, defaultdict
input = sys.stdin.readline

# input functions
I = lambda : int(input())
M = lambda : map(int, input().split())
ARR = lambda: list(map(int, input().split()))

a, b, c, d = M()
print(max(a*c, a*d, b*c, b*d))
a, b, c, d = map(int, input().split())
print(max([a*c,a*d,b*c,b*d]))
a,b,c,d = map(int, input().split())

ans = [a*c, a*d, b*c, b*d]
print(max(ans))
from sys import stdin

def main():

    input = stdin.readline

    a,b,c,d = map(int,input().split())


    ans = max(a*c,a*d,b*c,b*d)

    print(ans)


if __name__ == "__main__":
    main()
a, b, c, d = map(int, input().split())
ac = a * c
ad = a * d
bc = b * c
bd = b * d
print(max(ac, ad, bc, bd))
a,b,c,d=map(int,input().split())
print(max(b*d,a*c,a*d,b*c))
from sys import stdin, setrecursionlimit
#input = stdin.buffer.readline
setrecursionlimit(10 ** 7)

from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
from collections import deque, defaultdict, Counter
from itertools import combinations, permutations, combinations_with_replacement
from itertools import accumulate
from math import ceil, sqrt, pi, radians, sin, cos

MOD = 10 ** 9 + 7
INF = 10 ** 18

a, b, c, d = map(int, input().split())
#A = list(map(int, input().split()))
#A = [int(input()) for _ in range(N)]
#ABC = [list(map(int, input().split())) for _ in range(N)]
#S = input()
#S = [input() for _ in range(N)]

print(max(a * c, a * d, b * c, b * d))
l =  list(map(int, input().split()))
r = []
for i in range(0, 2, 1):
  for j in range(2, 4, 1):
    r.append(l[i] * l[j])

print(max(r))
a, b, c, d = map(int, input().split())

ans = max(a * c, a * d, b * c, b * d)
print(ans)
a,b,c,d = map(int, input().split(' '))
print(max(a*c,a*d,b*c,b*d))
a,b,c,d=map(int, input().split())

if b<=0 and d<=0:
    print(a*c)
elif a>=0 and c>=0:
    print(b*d)
elif b<=0 and c>=0:
    print(b*c)
elif a>=0 and d<=0:
    print(a*d)
else:
    if b*d>a*c:
        print(b*d)
    else:
        print(a*c)
a,b,c,d=map(int, input().split(" "))
print(max(a*c, a*d, b*c, b*d))
#-*-coding:utf-8-*-

import sys

def main():
    a,b,c,d = map(int,input().split())
    print(max(a*c,a*d,b*c,b*d))
    
if __name__ == "__main__":
    main()
a, b, c, d = map(int, input().split())
print(max(a*c, b*d, a*d, b*c))
a,b,c,d = map(int, input().split())


if(b*d>=a*c and b*d>=b*c and b*d>=a*d):
    print(b*d)
elif(a*c>=b*d and a*c>=a*d and a*c>=b*c):
    print(a*c)
elif(a*d>=a*c and a*d>=b*c and a*d>=b*d):
    print(a*d)
elif(b*c>=a*c and b*c>=b*d and b*c>=a*d):
    print(b*c)
a,b,c,d=list(map(int,input().split()))
x=[a*c,a*d,b*c,b*d]
print(max(x))
r=input().split()
a=int(r[0])
b=int(r[1])
c=int(r[2])
d=int(r[3])
x=b*d
y=a*c
z=a*d
w=b*c
print(max(x,y,z,w))
a, b, c, d = map(int, input().split())
t = []
t.append(a*c)
t.append(a*d)
t.append(b*c)
t.append(b*d)

print(max(t))
a, b, c, d = map(int, input().split())
anslist = []

anslist.append(a*c)
anslist.append(a*d)
anslist.append(b*c)
anslist.append(b*d)

print(max(anslist))
#: Author - Soumya Saurav
import sys,io,os,time
from collections import defaultdict
from collections import Counter
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"

input = sys.stdin.readline

########################################


a,b,c,d = map(int , input().split())
print(max([a*c,b*c,a*d,b*d]))







'''
# Wrap solution for more recursion depth
#submit as python3
import collections,sys,threading
sys.setrecursionlimit(10**9)
threading.stack_size(10**8)



threading.Thread(target=solve).start()
'''
a, b, c, d = map(int, input().split())
list = [a*c, a*d, b*c, b*d]
print(max(list))
LI = lambda: list(map(int, input().split()))

a, b, c, d = LI()


def main():
    ans = a * c
    ans = max(ans, a * d)
    ans = max(ans, b * c)
    ans = max(ans, b * d)
    print(ans)


if __name__ == "__main__":
    main()
# x = int(input())
a, b, c, d = map(int, input().split())

print(max(a * c, a * d, b * c, b * d))
a,b,c,d = map(int,input().split(' '))
lst = [a*c,a*d,b*c,b*d]
print(max(lst))
a,b,c,d = map(int, input().split())
ans = max(a*c, b*c, b*d, a*d)
print(ans)
il = [int(k) for k in input().split()]
a = il[0]
b = il[1]
c = il[2]
d = il[3]

print(max([a*c, a*d, b*c, b*d]))
(a, b, c, d) = map(int, input().split())
print(max(b * d, a * c, a * d, b * c))
a,b,c,d=map(int,input().split())
x=a*c
if x<a*d:
  x=a*d
if x<b*c:
  x=b*c
if x<b*d:
  x=b*d
print(x)
a,b,c,d = map(int, input().split())

if b <= 0 and d > 0:
    if c >= 0:
        print(b * c)
    else:
        print(a * c)
elif b > 0 and d <= 0:
    if a >= 0:
        print(a * d)
    else:
        print(a * c)
elif b <= 0 and d <= 0:
    print(a * c)
elif b == 0 or d == 0:
    print(0)
else:
    if c < 0 and a < 0:
        print(max(a * c,b * d))
    else:
        print(b * d)
a,b,c,d=map(int,input().split())


x2=a*c
x3=a*d
x4=b*c
x5=b*d

ans=max(x2,x3,x4,x5)

print(ans)
x = list(map(int, input().split()))
l1 = x[:2]
l2 = x[2:]
final = []
for i in range(2):
    for j in range(2):
        final.append(l1[i]*l2[j])
print(max(final))
a,b,c,d = map(int,input().split())
res1 = a*c
res2 = a*d
res3 = b*c
res4 = b*d

x =[]
y =[]
z =[]
l =[]

x.append(res1)
y.append(res2)
z.append(res3)
l.append(res4)

res0 = x+y+z+l

m = max(res0)

print(m)
a, b, c, d = map(int, input().split())
if b <= 0 and c >= 0:
    print(b*c)
elif a >= 0 and d <= 0:
    print(a*d)
else:
    print(max(a*c, b*d))
def main():
    a,b,c,d=map(int,input().split())
    res_list=[a*c,a*d,b*c,b*d]
    print(max(res_list))
if __name__=="__main__":
    main()
a, b, c, d = map(int, input().split())
print(max(
    a*c,
    a*d,
    b*c,
    b*d
))
a,b,c,d=map(int,input().split())
ans=a*c
ans=max(ans,a*d)
ans=max(ans,b*c)
ans=max(ans,b*d)
print(ans)
a,b,c,d=map(int,input().split())
print(max(a*c,max(a*d,max(b*c,b*d))))
def main():
    a, b, c, d = map(int, input().split())
    return max(a * c, a * d, b * c, b * d)

if __name__ == '__main__':
    print(main())
a,b,c,d = map(int,input().split())
aa = []
aa.append(a*c)
aa.append(a*d)
aa.append(b*c)
aa.append(b*d)
print(max(aa))
a,b,c,d = map(int, input().split())
li = []
i = 0
ac = a*c
ad = a*d
bc = b*c
bd = b*d

print(max(ac,ad,bc,bd))
a,b,c,d = [int(hoge) for hoge in input().split()]
if a==b==0 or c==d==0:
    print(0)
else:
    print(max([a*c,a*d,b*c,b*d]))
a, b, c, d = map(int, input().split())

max_x_y = max([a*c, a*d, b*c, b*d])
print(max_x_y)
a, b, c, d = map(int, input().split())
result = max(a*c, a*d, b*c, b*d)
print(result)
a,b,c,d = [int(i) for i in input().split()]

print(max(a*c,a*d,b*c,b*d))
a, b, c, d = map(int, input().split())
ans = -float("inf")
for x in [a, b]:
    for y in [c, d]:
        tmp = x*y
        ans = max(ans, tmp)
print(ans)