peterverebics/CodeNet_Python_118 huggingface dataset:
inp = list(map(int,input().split()))
ans = []
for i in range(4):
  for j in range(i+1,4):
    ans.append(inp[i] * inp[j])
    
print(max(ans))
a,b,c,d=map(int,input().split())
if (b<=0 and d<=0) or (b<=0 and c<=0):
  print(a*c)
elif a<=0 and b>0 and c<=0 and d>0:
    print(max(a*c,b*d))
elif b<=0:
  print(b*c)
elif d<=0:
  print(d*a)
else:
  print(b*d)
a,b,c,d=map(int,input().split())
print(max(a*b,b*c,b*d,a*c))
a,b,c,d = map(int, input().split())

if a >= 0 and d <= 0:
    print(a*d)
elif a <= 0 and c <= 0:
    print(a*c)
else:
    print(b*d)
nums = [int(e) for e in input().split()]
a=nums[0]
b=nums[1]
c=nums[2]
d=nums[3]
i = 0
j = 0
max = a*c
if not a < 0 and c < 0:
    for i in range(a, b+1, 1):
        for j in range(c, d+1, 1):
            if max < i * j:
                max = i * j

print(max)
x = input().split()
a = int(x[1])
b = int(x[3])
print(a*b)
a,b,c,d=map(int,input().split())
 
ans=max(a*c,b*d,a*d,b*c)
if ((0<=b and 0>=a) or (0<=d and 0>=b)):
  print(max(0,ans))
else:
  print(ans)
a, b, c, d = map(int, input().split())

ans = -1000000
tmp = 0
tmp = a*c
if ans < tmp:
    ans = tmp
tmp = a*d
if ans < tmp:
    ans = tmp
tmp = b*d
if ans < tmp:
    ans = tmp

tmp = b*c
if ans < tmp:
    ans = tmp
print(ans)
a, b, c, d = map(int, input().split())

x = a*c

if a*c < a*d:
    x=a*d
elif a*d < b*c:
    x=b*c
elif b*c < b*d:
    x=b*d

print(x)
a,b,c,d=map(int,input().split())
if a<0 and b<0 and c>=0 and d>=0:
  print(b*c)
elif a<0 and b<0 and c<0 and d>=0:
  print(a*c)
elif a<0 and b>=0 and c<0 and d<0:
  print(a*c)
elif a<0 and b<0 and c<0 and d<0:
  print(a*c)
elif a<0 and b>=0 and c<0 and d>=0 and abs(a*c)>=abs(b*d):
  print(a*c)
else:
  print(b*d)
a,b,c,d=list(map(int,input().split()))
if a>=0 and c>=0:
    print(b*d)
elif c>=0 and d<=0:
    print(a*d)
elif b<=0 and c>=0:
    print(b*c)
else:
    print(a*c)
# coding: utf-8
# Your code here!

input_line = input().split(" ")
a = int(input_line[0])
b = int(input_line[1])
c = int(input_line[2])
d = int(input_line[3])

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

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

minx = min(a, b)
miny = min(c, d)
maxx = max(a, b)
maxy = max(c, d)

if maxx >= 0 and maxy >= 0 or minx < 0 and miny < 0:
    print(max(miny * minx, maxx * maxy))
elif maxx > 0:
    print(minx * maxy)
else:
    print(maxy * minx)
i = list(map(int, input().split()))


p = [ abs(i[0]), abs(i[1]) ]
q = [ abs(i[2]), abs(i[3]) ]

print(max(p)*max(q))
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 d <= 0:
  print(a*d)
elif b <= 0 and c >= 0:
  print(c*b)
a = list(map(int, input().split()))

tmp = 0
if(len(a) != 4):
    exit()
if(a[0] > a[1]):
    tmp = a[1]
    a[1] = a[0]
    a[0] = tmp

if(a[2] > a[3]):
    tmp = a[3]
    a[3] = a[2]
    a[2] = tmp
a_len = a[1]
b_len = a[3]

if(a[0] < 0 and a[2] < 0):
    max = a[0] * a[2]
else:
    max = a_len * b_len
print(max)
a,b,c,d=list(map(int,input().split()))
charo=[a*c,a*d,b*c,b*d]
print(max)
a, b, c, d = map(int, input().split())

if b <= 0 and d <= 0:
  print(a * b)
elif b <= 0 and d > 0:
  print(b * c)
elif b > 0 and d <= 0:
  print(a * d)
else:
  print(b * d)
templist = input().split()
a = int(templist[0])
b = int(templist[1])
c = int(templist[2])
d = int(templist[3])
flg1 = 0
flg2 = 0

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

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

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

f=1
g=1 
ans=1
if b<0:
    f=0
if d<0:
    g=0
if f+g==0:
    ans=a*c
elif f==0:
    ans=b*c
elif g==0:
    ans=a*d
else:
    ans=b*d
print(ans)
a,b,c,d = map(int,input().split())

if a < 0 and b < 0 :
    print(b*c)
elif a < 0 and b == 0:
    if c <= 0:
        print(a*c)
    else :
        print(b*c)
elif a < 0 and b > 0 :
    if a * c < b * d :
        print(b*d)
    else :
        print(a*c)
elif a==0 and b >0:
    if d <= 0:
        print(0)
    else :
        print(b*d)
else :
    print(b*d)
# B 
z = list(map(int, input().split(" ")))
maxnum = z[0]*z[2]
if z[0]*z[1] < 0 or z[2]*z[3] < 0:
    maxnum = 0
for i in range(2):
    for j in range(2):
        x = z[i]
        y = z[j+2]
        prod = x*y
    if maxnum < prod:
        maxnum = prod
print(maxnum)
a, b, c, d = map(int, input().split())
if b<0 and c<0:
    print(a*c)
elif b<0 and d==0:
    print(b*c)
elif b<0 and c>0:
     print(b*c)
elif b==0 and d<0:
    print(a*d)
elif b==0 and d==0:
    print(a*c)
elif b==0 and c>0:
     print(b*c)
elif a>0 and d<0:
    print(a*d)
elif a>0 and d==0:
    print(a*d)
elif a>0 and d>0:
    print(b*d)
a, b, c, d = map(int, input().split())
x = [a, b]
y = [c, d]

ans = 0
for i in x:
    for j in y:
        ans = max(ans, i*j)

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

n = [[a,b],[c,d]]

result = -(10**9)
for i in range(2):
    for j in range(2):
        ans = n[0][i]*n[1][j]
        result = max(result,ans)


print(result)
# B 
z = list(map(int, input().split(" ")))
maxnum = z[0]*z[2]
for i in range(2):
    for j in range(2):
        x = z[i]
        y = z[j+2]
        prod = x*y
    if prod > maxnum:
        maxnum = prod
print(maxnum)
a, b, c, d = map(int, input().split())
print(max(a,b)*max(c,d))
(X1,X2,Y1,Y2)=list(map(int,input().split()))
print (X1,X2,Y1,Y2)
ans=X2*Y2
ans=max(ans,X1*Y1)
ans=max(ans,X1*Y2)
ans=max(ans,X2*Y1)
print (ans)
a, b, c, d = map(int, input().split())

max = 0
if  max < a*c:
    max = a*c
elif max < a*d:
    max = a*d
elif max < b*c:
    max = b*c
elif max < b*d:
    max = b*d
print(max)
a,b,c,d = map(int, input().split())
if a < 0 and b < 0 and c < 0: 
  print(a*c)
elif a < 0 and b < 0 and c >= 0 and d >= 0:
  print(b*c)
elif a < 0 and b >= 0 and c < 0 and d < 0:
  print(a*c)
elif a < 0 and b >= 0 and c < 0 and d >= 0:
  print(max(a*c, b*d))
elif a < 0 and b >= 0 and c >= 0 and d >= 0:
  print(b*d)
elif a >= 0 and b >= 0 and c < 0:
  print(a*d)
else:
  print(b*d)
a,b,c,d = map(int,input().split())
g= a*c
h= b*d
q=a*d
z=b*c
w=a*d
e=b*c
r=b*c
t=a*d
if g>h:
    print(g)
elif q> z:
    print(q)
elif w>e:
    print(w)
elif r>t:
    print(r)
a,b,c,d=map(int,input().split())
p1=0;p2=0;p3=0;p4=0
if (a,b,c,d)==(0,0,0,0):
  print(0)
else:
  p1=a*c
  p2=a*d
  p3=b*c
  p4=b*d
print(max(max(p1,p2),max(p3,p4)))
a,b,c,d = map(int, input().split())
import numpy as np
A = np.matrix([[a],[b]])
C = np.matrix([c,d])
print(A.shape)
print(C.shape)
X = np.dot(A,C)
print(np.max(X))
a, b, c, d = map(int,input().split())

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

elif a < 0 and b > 0 and c < 0 and d > 0:
  print(b*d)
  
elif a < 0 and b > 0 and d < 0:
  print(a*c)
  
elif a > 0 and c > 0:
  print(b*d)
  
elif b < 0 and c < 0 and d > 0:
  print(a*c)
a, b, c, d = [int(x) for x in input().split()]

x, y = 0, 0

if a == 0:
    a = b
elif b == 0:
    b = a

if c == 0:
    c = d
elif d == 0:
    d = c

if a <= 0 and b <= 0:
    y = c
else:
    y = d

if c <= 0 and d <= 0:
    x = a
else:
    x = b


print(x*y)
a,b,c,d = map(int,input().split())
num =0
if b < 0 and d < 0:
  num = a*c
if b > 0 and d > 0:
  num = b*d
if b < 0 and d >0 and c <0:
  num=0
if b > 0 and d <0 and a <0:
  num = 0
if a >0 and d < 0:
  num = a*d
if c >0 and b <0:
  num = b*c
if b <=0 and d <=0:
  num =a*c
print(num)
a, b, c, d = map(int, input().split())

if b > 0 and d > 0:
    print(b*d)

elif a <= b <= 0 and c <= d <= 0:
    print(max(abs(a), abs(b)) * max(abs(c), abs(d)) * -1)

else:
    print(min(abs(a), abs(b)) * min(abs(c), abs(d)) * -1)
a,b,c,d=map(int, input().split())
ans=-10**10
ans=max(a*c,ans)
ans=max(a*d,ans)
ans=max(b*c,ans)
ans=max(b*d,ans)
print(ans)
a, b, c, d = map(int, input().split())

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

if __name__ == '__main__':
    main()
a, b, c, d = map(int, input().split())
print(max(a * c, b * d))
t = input()
t = t.split(" ")
t = [int(x) for x in t]

a,b = t[0], t[1]
c,d = t[2], t[3]

g1_max = max(a,b)
g1_min = min(a,b)

g2_max = max(c,d)
g2_min = min(c,d)

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

if b == 0:
    b = b - 1

if d == 0:
    d = d - 1

if a == 0:
    a = a + 1

if c == 0:
    c = c + 1

if b < 0 and d < 0:
    print(a*c)
elif b < 0 and d > 0:
    print(b*c)
elif b > 0 and d < 0:
    print(a*d)
else:
    print(b*d)
a,b,c,d=(int(x) for x in 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(b*c)
elif c<0 and a>=0:
  print(a*d)
a,b,c,d=map(int,input().split())

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

a = float(array[0])
b = float(array[1])
c = float(array[2])
d = float(array[3])

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

if a[0] > 0:
	if a[3] < 0:
		print(a[0] * a[3])
	else:
		print(a[1] * a[3])

elif a[1] < 0:
	if a[2] < 0:
		print(a[0] * a[2])
else:
	if a[3] < 0:
		print(a[0] * a[2])
	elif a[2] > 0:
		print(a[1] * a[3])
	else:
		if a[0] * a[2] > a[1] * a[3]:
			print(a[0] * a[2])
		else:
			print(a[1] * a[3])
a,b,c,d = map(int,input().split())
ans = a*c
if(a*d > ans):
	ans = a*d
elif(b*c > ans):
	ans = b*c
elif(b*d > ans):
	ans = b*c
print(ans)
a,b,c,d = map(int , input().split())
if  0 < a and 0 < b and 0 < c and 0 < d:
    x = b
    y = d
elif a < 0 and b < 0 and c < 0 and d < 0:
    x = a
    y = c
elif a < 0 and b < 0 and 0 < c and 0 < d:
    x = b
    y = c
elif 0 < a and 0 < b and c < 0 and d < 0:
    x = a
    y = d
else:
    x = b
    y = d

print(x * y)
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 b*c <= 0:
    print(max(b*c,a*d))
else:
    print(max(a*c,b*d))
i = list(map(int, input().split()))
max_num=0

def seki(x,y):
  return x*y
result=[seki(i[0],i[2]),seki(i[0],i[3]),seki(i[1],i[2]),seki(i[1],i[3])]

for i in result:
  if max_num< i:
    max_num=i

print(max_num)
a,b,c,d=map(int,input().split())
def ret(a,b,c,d):
    return max(b*d,a*c,0 if (a*b<=0 or c*d<=0) else -1e16,a*d,b*c)
print(ret(a,b,c,d))
a, b, c, d = map(int, input().split())
 
x_max = max(a, b)
x_min = min(a, b)
 
y_max = max(c, d)
y_min = min(c, d)
 
ans = max(x_max * y_max, x_max * x_min, x_min * y_max, x_min * y_min)

if (x_max >= 0 and x_min <= 0) or (y_max >= 0 and y_min <= 0):
  ans = max(ans, 0)

print(ans)
a,b,c,d = map(int, input().split())
ans = max(a*c, b*c, b*d)
print(ans)
def main():
    a,b,c,d = map(int, input().split())
    if b <= 0 and d <= 0:
        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:
        if c >= 0:
            print(b*c)
        else:
            print(a*c)
    elif b >= 0 and d >=0:
        print(b*d)
    
    
if __name__ == "__main__":
    main()
a,b,c,d = map(int,input().split())
max = -1000000000
if max < a*c:
  max = a*c
if max < a*d:
  max = a*d
if max < b*c:
  max = b*c
if max < b*d:
  max = b*d
  
print(max)
a,b,c,d = map(int,input().split())

if b > 0 and d > 0:
    print(b*d)
elif a < 0 and c < 0:
    print(a*c)
else:
    x = min(abs(a),abs(b))
    y = min(abs(c),abs(d))
    print(-x*y)
# B 
z = list(map(int, input().split(" ")))
maxnum = z[0]*z[2]
if z[0]*z[1] < 0 or z[2]*z[3] < 0:
    maxnum = 0
for i in range(2):
    for j in range(2):
        x = z[i]
        y = z[j+2]
        prod = x*y
    if prod > maxnum:
        maxnum = prod
print(maxnum)
arr = list(map(int,input().split()))
ans = 0

for i in range(2):
  for j in range(2,4):
    ans = max(ans, arr[i]*arr[j])
  
print(ans)
a,b,c,d=map(int,input().split())
if a>=0 and c>=0:
    print(b*d)
if a>=0 and c<0:
    if d>=0:
        print(b*d)
    else:
        print(a*d)
if a<0 and c>=0:
    if b>=0:
        print(b*c)
    else:
        print(b*c)
if a<0 and c<0:
    if b>=0 and d>=0:
        print(max(a*c,b*d))
    else:
        print(a*c)
a, b, c, d = map(int, input().split())
if b<0 and d<0:
    print(b*d)
elif b<0 and d==0:
    print(b*c)
elif b<0 and c>0:
     print(b*c)
elif b==0 and d<0:
    print(a*d)
elif b==0 and d==0:
    print(a*c)
elif b==0 and c>0:
     print(b*c)
elif b>0 and d<0:
    print(a*d)
elif b>0 and d==0:
    print(b*d)
elif b>0 and d>0:
    print(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 d <= 0:
    print(a * d)
elif b <= 0 and c >= 0:
    print(b * c)
a, b, c, d = map(int, input().split())

if b < 0 or d < 0:
	if b < 0:
		x = b
	else:
		x = a

	if d < 0:
		y = d
	else:
		y = c
else:
	x = max(a, b)
	y = max(c, d)

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

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

input_line = input().split(" ")
a = int(input_line[0])
b = int(input_line[1])
c = int(input_line[2])
d = int(input_line[3])

if b > 0 and d > 0:
    print(b * d)
if b <= 0 and d <= 0:
    print(a * c)
if b > 0 and d <= 0:
    print(a * d)
if b <= 0 and d > 0:
    print(b * c)
A,B,C,D = map(int, input().split())

ans = -(10 ** 9) -1

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(x) for x in input().split()]
if b <= 0 or d <= 0:
  if b <= 0 and d <= 0:
    print(a * c)
  else:
    print(-1 * min(abs(a), abs(b)) * min(abs(c), abs(d)))
else:
  print(b * d)
a, b, c, d = map(int, input().split())
s = []
for i in [a, b]:
  s.append(c * i)
  s.append(d * i)
  s.append(0)
print(max(s))
_list = list(map(int, input().split()))
print(_list)

_list_multi = [_list[0]*_list[2], _list[0]*_list[3], _list[1]*_list[2], _list[1]*_list[3]]
print(max(_list_multi))
a, b, c, d = map(int, input().split())
if b <= 0 and d <= 0:
    print(a * c)
elif b < 0 and 0 < c:
    print(b * c)
elif 0 < a and d < 0:
    print(a * d)
elif 0 <= a and 0 <= c:
    print(b * d)
a, b, c, d = map(int, input().split())

if b < 0 and c < 0 or b >= 0 and d >= 0:
    if a < 0 and c < 0:
        print(a * c) if a * c > b * d else print(b * d)
    else:
        print(b * d)
else:
    if b < 0:
        print(b * c)
    else:
        print(a * d)
listA=list(map(int,input().split()))
print(listA)
x_list = []
for i in [0,1]:
    x_list.append(listA[i])

y_list = []
for i in [2,3]:
    y_list.append(listA[i])

i_list = []
for x in x_list:
    for y in y_list:
        i_list.append(x*y)

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

if ac>ad and ac>bc and ac>bd:
  print(ac)
elif ad >bc and ad>bd and ad>ac:
  print(ad)
elif bc>ac and bc>ad and bc>bd:
  print(bd)
else:
  print(bd)
a, b, c, d = map(int, input().split())

if b > 0 and d > 0:
    print(b*d)
elif a < 0 and c < 0:
    print(a*c)
else:
    e = abs(a)
    f = abs(b)
    g = abs(c)
    h = abs(d)
    l = [e,f,g,h]
    l.sort()
    print(-1*l[0]*l[1])
a,b,c,d=map(int,input().split())
if a>=0 and b>=0 and c>=0 and d>=0:
  print(b*d)
elif a>=0 and b>=0 and c<0 and d<0:
  print(a*d)
elif a<0 and b<0 and c<0 and d<0:
  print(a*c)
else:
  print(a*c)
a,b,c,d = map(int,input().split())

if a <= b:
    x = b
if a >= b:
    x = a

if c <= d:
    y = d
if c >= d:
    y = c
print(x*y)
a = input().split(" ")

x = [int(a[0]),int(a[1])]
y = [int(a[2]),int(a[3])]

max = -1000000000
for i in x:
  for j in y:
    s = i*j
    
    if max < s:
      max = s
print(max)
a, b, c, d = [int(x) for x in input().split()]
print(max(a*c,b*d,a*b,b*c))
a,b,c,d = map(int,input().split())
if a*c >= b*d:
    if a*c >= a*d:
        if a*c >= b*c:
            print(a*c)
if a*d >= b*d:
    if a*d >= b*d:
        if a*d >= a*c:
            print(a*d)
if b*c >= b*d:
    if b*c >= a*d:
        if b*c >= a*c:
            print(b*c)
if b*d >= b*c:
    if b*d >= a*d:
        if b*d >= a*c:
            print(b*d)
a, b, c, d = map(int, input().split())

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

if b <= c:
  if b <= 0 and c >= 0:
  	print(int(b*c))
  elif b >= 0 and c >= 0:
    print(int(b*d))
  elif b <= 0 and d <= 0:
    print(int(a*c))  
else:
  if d <= 0 and a >= 0:
    print(int(a*d))
  elif d >= 0 and a >= 0:
    print(int(b*d))
  elif d <= 0 and b <= 0:
    print(int(a*c))
a, b, c, d = map(int, input().split())
ans = 1
aa, bb, cc, dd = abs(a), abs(b), abs(c), abs(d)

if aa <= bb and cc <= dd:
    ans = b * d
elif aa > bb and cc <= dd:
    ans = b * c
elif aa <= bb and cc > dd:
    ans = a * d
else:
    ans = a * c  

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

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

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

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

n = [[a,b],[c,d]]

result = -10**9
for i in range(2):
    for j in range(2):
        ans = n[0][i]*n[1][j]
        result = max(result,ans)


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

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

if b < 0 and d < 0:
    ans = a * c
elif b < 0 and d > 0:
    ans = b * c
elif b > 0 and d > 0:
    ans = b * d
elif b > 0 and d < 0:
    ans = a * d
else:
    ans = 0
            
print(ans)
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(abs(a),b) * max(abs(c),d))
    else:
        print(b * d)
li = list(map(int,input().split()))

a = li[0]
b = li[1]
c = li[2]
d = li[3]

ac = a * c
bc = b * c
ad = a * d
bd = b * d
result = ac
if result < bc:
    result = bc
elif result < ad:
    result = ad
elif result < bd:
    result = bd
elif a < 0 and 0 < b and result < 0:
    result = 0
elif c < 0 and 0 < d and result < 0:
    result = 0
print(result)
a, b, c, d = map(int, input().split())
if b<0 and c<0:
    print(b*c)
elif b<0 and d==0:
    print(b*c)
elif b<0 and c>0:
     print(b*c)
elif b==0 and d<0:
    print(a*d)
elif b==0 and d==0:
    print(a*c)
elif b==0 and c>0:
     print(b*c)
elif a>0 and d<0:
    print(a*d)
elif a>0 and d==0:
    print(a*d)
elif a>0 and d>0:
    print(b*d)
a,b,c,d = map(int, input().split())
i = 0
for x in range(a, b+1):
  for y in range(c, c+1):
    z = x * y 
    if z >= i:
      i = z
print(i)
a,b,c,d=map(int,input().split())
print(max(a*b,a*c,b*c,b*d))
import numpy as np
a, b, c, d = map(int, input().split())
products = np.zeros(4)
products[0] = a * c
products[1] = a * d
products[2] = b * c
products[3] = b * d
print(int(np.max(products)))