Problem:
 Score : 200 points    Problem Statement Given are integers a,b,c and d .
If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y ?      Constraints  -10^9 \leq a \leq b \leq 10^9  -10^9 \leq c \leq d \leq 10^9  All values in input are integers.         Input Input is given from Standard Input in the following format:  a  b  c  d       Output Print the answer.        Sample Input 1 1 2 1 1      Sample Output 1 2  If x = 1 and y = 1 then x \times y = 1 .
If x = 2 and y = 1 then x \times y = 2 .
Therefore, the answer is 2 .       Sample Input 2 3 5 -4 -2      Sample Output 2 -6  The answer can be negative.       Sample Input 3 -1000000000 0 -1000000000 0      Sample Output 3 1000000000000000000

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

print(ans)

Solution (Python):
n = list(map(int, input().split()))
nums = list()
max_num = int(n[0]*n[3])
for i in range(2):
    for j in range(2):
        num = n[i]*n[j+2]
        if num >= max_num:
            max_num = num
print(max_num)

Solution (Python):
a,b,c,d=map(int,input().split())
l1=[a,b]
l2=[c,d]
ans=[]
for i in range(2):
  for j in range(2):
    ans.append(l1[i]*l2[j])
print(max(ans))

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

Solution (Python):
mod = 10**9 + 7
def C():
    N = int(input())
    ans = 10**N - 2*9**N + 8**N
    print(ans%mod)
def A():
    N = int(input())
    if( N == 0):
        print(1)
    else:
        print(0)
def B():
    a,b,c,d = map(int,input().split())
    print(max(a*c,a*d,b*c,b*d))
B()

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

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

Solution (Python):
import math
a,b,c,d=list(map(int ,input().split()))
l=[]
first_pro=a*c
l.append(first_pro)

second_pro=b*d
l.append(second_pro)

second_pro1=a*d
l.append(second_pro1)

second_pro2=b*c
l.append(second_pro2)
print(int(max(l)))

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

xy=[a*c,a*d,b*c,b*d]
print(max(xy))

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

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

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

Solution (Python):

def input2():
	return map(int,input().split())
  
a,b,c,d=input2()
x=[a,b]
y=[c,d]
ans=a*c
for i in x:
	for j in y:
		if i*j > ans:
			ans=i*j
print(ans)

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

lst = [a*c, a*d, b*c, b*d]
print(max(lst))

Solution (Python):
def product_max(lst):
  first = lst[0]*lst[2]
  second = lst[0]*lst[3]
  third = lst[1]*lst[2]
  fourth = lst[1]*lst[3]
  new_list = [first, second, third, fourth]
  return max(new_list)


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

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

Solution (Python):
if __name__=='__main__':
  a,b,c,d=[int(_) for _ in input().split()]
  print(max(a*c,a*d,b*c,b*d))

Solution (Python):
a , b , c , d = map( int , input().strip().split(" ") ) ; 

v = max ( a* c , a* d , b* c , b * d ) ;
print ( v  ) ;

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

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

Solution (Python):
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))

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

if a<=0<=b or c<=0<=d:
    print(max(a*c,a*d,b*c,b*d,0))
else:
    print(max(a*c,a*d,b*c,b*d))

Solution (Python):
a, b, c, d = list(map(int,input().split()))
y = a*c
x = a*d
w = b*c
v = b*d
e = []
e.append(y)
e.append(x)
e.append(w)
e.append(v)
print(max(e))

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

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

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

ans = max(A)

print(ans)

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

Solution (Python):
a,b,c,d=map(int,input().split())
 
ans=max(a*c,b*d,a*d,b*c)
if ((a*b<=0) or (c*d<=0)):
  print(max(0,ans))
else:
  print(ans)

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

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

print(max(l))

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

h = (b*d)
ha=(a*d)
hi=(a*c)
hu=(b*c)

print(max(h,ha,hi,hu))

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

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

Solution (Python):
a, b, c, d = [int(x) for x in input().split()]


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

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

Solution (Python):
a,b,c,d = map(int, input().split())
aa = [a,b]
bb = [c,d]
pri = []

for i in aa:
  for j in bb:
    pri.append(i*j)
    
print(max(pri))

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

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

Solution (Python):
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))

Solution (Python):


from typing import *




def solve(a, b, c, d):
    ans=[a*c, a*d, b*c, b*d]
    return max(ans)

def main():
    a, b, c, d = map(int, input().split())
    a1 = solve(a, b, c, d)
    print(a1)

if __name__ == '__main__':
    main()

Solution (Python):
L = list(map(int, input().split()))
X = L[:2]
Y = L[2:]


ans_max = -10**20

for x in X:
    for y in Y:
        ans = x * y
        
        
        if ans > ans_max:
            ans_max = ans

print(ans_max)

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

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

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

print(max(tmp))

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")


def solve():
    a, b, c, d = LI()
    print(max(a * c, a * d, b * c, b * d))
    return



if __name__ == '__main__':
    solve()

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

x1 = a * c
x2 = a * d
y1 = b * c
y2 = b * d

print(max(x1,x2,y1,y2))

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

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

print(mx)

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

Solution (Python):
import sys

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

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

Solution (Python):
nums = [int(i) for i in input().split()]
nums1 = nums[:2]
nums2 = nums[2:]
results = []
for i in range(0, 2):
    for j in range (0, 2):
        results.append(nums1[i] * nums2[j])
results.sort()
print(results[-1])

Solution (Python):
A = list(map(int,input().split()))

maximum = -float('inf')
for i in range(2):
    for j in range(2,4):
        maximum = max(maximum,A[i]*A[j])

print(maximum)

Solution (Python):
a,b,c,d = [int(x) for x in input().split()]


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

Solution (Python):
a = list(map(int, input().split()))

m = max(a[0]*a[2], a[0]*a[3], a[1]*a[2], a[1]*a[3])

print(m)

Solution (Python):
a,b,c,d=[int(x) for x in input().split()]
ans=max(a*c,b*d)
if a<0 and b<0:
  cc=a
  a=b
  b=cc

if c<0 and d<0:
  cc=c
  c=d
  d=cc

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

Solution (Python):
a,b,c,d = map(int,input().split())
prod1 = a*c
prod2 = a*d
prod3 = b*c
prod4 = b*d
print(max(prod1,prod2,prod3,prod4))

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

temp1=a*c
temp2=a*d
temp3=b*c
temp4=b*d

ans=max(temp1,temp2,temp3,temp4)
print(ans)

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

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

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

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

Solution (Python):
import collections
a,b,c,d = input().split()
a=int(a)
b=int(b)
c=int(c)
d=int(d)
abi=int(min(a,b))
abm=int(max(a,b))
cdi=int(min(c,d))
cdm=int(max(c,d))
res1=[]
res2=[]
if abi<0 and abm<0:
  res1=[abi,abm]
elif abi<0 and abm==0:
  res1=[abi,-1,0]
elif abi<0 and abm>0:
  res1=[abi,-1,0,1,abm]
elif abi==0 and abm==0:
  res1=[0]
elif abi==0 and abm>0:
  res1=[0,1,abm]
elif abi>0 and abm>0:
  res1=[abi,abm]

if cdi<0 and cdm<0:
  res2=[cdi,cdm]
elif cdi<0 and cdm==0:
  res2=[cdi,-1,0]
elif cdi<0 and cdm>0:
  res2=[cdi,-1,0,1,cdm]
elif cdi==0 and cdm==0:
  res2=[0]
elif cdi==0 and cdm>0:
  res2=[0,1,cdm]
elif cdi>0 and cdm>0:
  res2=[cdi,cdm]

res=[]
for g in res1:
  for h in res2:
    res.append(g*h)

print(max(res))

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

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

num1 = a * c
num2 = a * d
num3 = b * c
num4 = b * d
ans = max(max(num1, num2), max(num3, num4))
print(ans)

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

Solution (Python):
a,b,c,d = list(map(int,input().split()))

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

l = []
l.append(x1)
l.append(x2)
l.append(x3)
l.append(x4)

ans = max(l)

print(ans)

Solution (Python):
[a,b,c,d]=[int(_) for _ in input().split()]
print(max([a*c,a*d,b*c,b*d]))

Solution (Python):
a, b, c, d = list(map(int, input().split()))

res = a * c

if res <= a * d:
    res = a * d
if res <= b * c:
    res = b * c
if res <= b * d:
    res = b * d
print  (res)

Solution (Python):
input1 = list(map(int, input().split()))
a = input1[0]
b = input1[1]
c = input1[2]
d = input1[3]

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

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

lstx=[a,b]
lsty=[c,d]
result=[]
for i in lstx:
    for n in lsty:
        result.append(i*n)
print(max(result))

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

Solution (Python):
def calc(intA,intB,intC,intD):  
    W=intA*intC
    X=intB*intC
    Y=intA*intD
    Z=intB*intD
    ret=max(W,X,Y,Z)
    return ret

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

print(calc(a,b,c,d))

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

if b < 0:
    if c > 0:
        print(b*c)
    else:
        print(a*c)
elif a < 0:
    if d < 0:
        print(a*c)
    elif c < 0:
        print(max(a*c,b*d))
    else:
        print(b*d)
else:
    if d < 0:
        print(a*d)
    else:
        print(b*d)

Solution (Python):
a, b, c, d= map(int, input().split())
abcd = [1] * 4
abcd[0] = a * c
abcd[1] = a * d
abcd[2] = b * c
abcd[3] = b * d

fmax = abcd[0]
for i in abcd:
    if i > fmax:
        fmax = i
print(fmax)

Solution (Python):



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

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

Solution (Python):
li = input().split()

li1 = li[0:2]
li2 = li[2:4]

ans = -999999999999999999999999999999999

for x in li1:
    for y in li2:
        tmp = int(x)*int(y)
        if tmp > ans:
            ans = tmp
print(ans)

Solution (Python):
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]))

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

Solution (Python):
def resolve():
    a, b, c, d = map(int, input().split())
    w = a*c
    x = a*d
    y = b*c
    z = b*d
    ans = max(w, x, y, z)
    print(ans)

resolve()

Solution (Python):
A,B,C,D = map(int, input().split())
ans = max(A*C,A*D,B*C, B*D) 
print(ans)

Solution (Python):
a, b, c, d = list(map(int, input().strip().split()))
ab = [a,b]
cd = [c,d]
xy = a*c

abcd = [a,b,c,d]

for i in range(2):
    for j in range(2):
        if ab[i]*cd[j] > xy:
            xy = ab[i]*cd[j]

print(xy)

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

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

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

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

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

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

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

print(ans)

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

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

F.sort(reverse =True)

print(F[0])

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

Solution (Python):
a,b,c,d = map(int, input().split())
x=[a*c,a*d,b*c,b*d]

print(max(x))

Solution (Python):

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

ans = 0

if a>=0:
    if d>=0:
        ans = b*d
    else:
        ans = a*d

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

else:
    if c>=0:
        ans = b*c
    else:
        ans = a*c

print(ans)

Solution (Python):
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))

Solution (Python):
A, B, C, D = map(int, input().split())
print(max([A * C, A * D, B * C, B * D]))

Solution (Python):
a = list(map(int, input().split()))
w = 0
z = 0
x = 0
y = 0

w = a[0] * a[2]
z = a[0] * a[3]
x = a[1] * a[2]
y = a[1] * a[3]
print(max(w,z,x,y))

Solution (Python):
a = [int(s) for s in input().split()]
b = a[0]
c = a[1]
d = a[2]
e = a[3]
f = int(0)
g = int(0)

if b >= 0 and d >= 0:
    print(c*e)
elif b < 0 and c >= 0 and d < 0 and e >= 0:
    f = b * d
    g = c * e
    print(max([f,g]))
elif b >= 0 and d < 0 and e >= 0:
    print(c*e)
elif d >= 0 and b < 0 and c >= 0:
    print(c*e)
elif b >= 0 and e < 0:
    print(b*e)
elif d >= 0 and c < 0:
    print(c*d)
else:
    print(b*d)

Solution (Python):
a, b, c, d =(int(x) for x in input().split())
a1 = a * c
a2 = a * d
a3 = b * c
a4 = b * d
print(max(a1, a2, a3, a4))

Solution (Python):
a,b,c,d = list(map(int,input().split()))

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)

Solution (Python):
import sys
sys.setrecursionlimit(10**6)


def main(input, print):
    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)


if __name__ == '__main__':
    main(sys.stdin.readline, print)

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

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

elif b>=0:
    if c>=0:
        print(b*d)
    elif d>=0:
        print(max(a*c,b*d))
    else:
        print(a*c)
 
else:
    if c>=0:
        print(b*c)
    elif d>=0:
        print(a*c)
    else:
        print(a*c)

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

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

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

xl = [a,b]
yl = [c,d]
for x in xl:
  for y in yl:
    xy = x*y
    if(x == a and y == c):
      xy_m = xy
	
    xy_m = max(xy_m,xy)

print(xy_m)

Solution (Python):
a,b,c,d = map(int,input().split())
s =[a*c,a*d,b*c,b*d]
num = max(s)
if (a <= 0 and b >=0) or (c <=0 and d>=0):
  cum =0
  if cum > num:
    num =cum
print(num)

Solution (Python):
L = list(map(int, input().split()))
A = [L[0] * L[2], L[0] * L[3], L[1] * L[2], L[1] * L[3]]
print(max(A))

Solution (Python):
a,b,c,d=map(int,input().split())
p1=0;p2=0;p3=0;p4=0
p1=a*c
p2=a*d
p3=b*c
p4=b*d
print(max(max(p1,p2),max(p3,p4)))

Solution (Python):
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 * y_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)

Solution (Python):
list = input().split(" ")
a, b, c, d = int(list[0]), int(list[1]), int(list[2]), int(list[3])
ans1 = a * c
ans2 = a * d
ans3 = b * c
ans4 = b * d
ans_list = [ans1, ans2, ans3, ans4]
ans_list.sort()
print(ans_list[3])

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


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

Solution (Python):
a, b, c, d = map(int, input().split())
l = []

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

print(max(l))

Solution (Python):
import itertools
ls = list(map(int, input().split()))
ab = ls[:2]
cd = ls[2:]
p = itertools.product(ab, cd)
ans = []
for i in p:
    ans.append(i[0] * i[1])
print(max(ans))

Solution (Python):
l = list(map(int, input().split()))

m = l[0]*l[2]

for i in range(0,2):
  for j in range(2,4):
    if l[i]*l[j] > m:
      m = l[i]*l[j]
      
print(m)

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

m=a*c

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

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

if b*d>m:
  m=b*d
  
print(m)

Solution (Python):
num = input().split()
lis = []
for i in range(2):
  for j in range(2,4):
    lis.append(int(num[i])*int(num[j]))

lis.sort(reverse=True)
print(lis[0])

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

ans = -float('inf')

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

Solution (Python):
if __name__ == '__main__':

	a,b,c,d = map(int,input().split())
	
	ans = -10**19;
	A = [a,b]
	B = [c,d]
	for i in A:
		for j in B:
			tmp = i * j
			ans = max(ans,tmp)
	print(ans)

Solution (Python):
g, h, j, k = map(int, input() .split())
a = g * j
b = g * k
c = h * j
d = h * k
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)
else:
    print(d)

Solution (Python):
a,b, c, d = [int(x) for x in input().split()]
print( max(a * c, a * d, b * c,b *d))

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

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

Solution (Python):
array = input().split()
ab = array[0:2]
cd = array[2:4]
res = []

for x in ab:
    for y in cd:
      res.append(int(x)*int(y))

print(max(res))

Solution (Python):
A,B,C,D=map(int,input().split())

ans=max(A*C,B*C,A*D,B*D)
print(ans)

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

Solution (Python):
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))

Solution (Python):
a, b, c, d = [int(x) for x in input().split()]
print(max(a*c, a*d, b*c, b*d))

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

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

Solution (Python):
a, b, c, d = list(map(int, input().split()))
num = a * c
if num < a * d:
    num = a * d
if num < b * c:
    num = b * c
if num < b * d:
    num = b * d
print(num)

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

E = b*c
F = b*d
print(max([A,B,C,D,E,F]))

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

ans = -(10**18)
ans = max(a*c, ans)
ans = max(a*d, ans)
ans = max(b*c, ans)
ans = max(b*d, ans)
print(ans)

Solution (Python):



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

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

ans = num_list[0]
for i in num_list:
        if ans < i:
                ans = i

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

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

if ans < 0 and (a <= 0 <= b or c <= 0 <= d):
    print(0)
else:
    print(ans)

Solution (Python):
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))

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

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

print(ans)

Solution (Python):
a=list(map(int,input().split()))

print(max(a[0]*a[-1],a[0]*a[-2],a[1]*a[-1],a[1]*a[-2]))

Solution (Python):
a,b,c,d=[int(_) for _ in input().split()]
ans=max(a*c,a*d,b*c,b*d)
print(ans)

Solution (Python):
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 and d < 0:
  print(a*d)
else:
  print(b*d)

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

Solution (Python):

import sys


def solve(a: int, b: int, c: int, d: int):
    ac = a*c
    ad = a*d
    bc = b*c
    bd = b*d
    solve = [ac, ad, bc, bd]
    solve = sorted(solve)
    return print(solve[-1])





def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  
    b = int(next(tokens))  
    c = int(next(tokens))  
    d = int(next(tokens))  
    solve(a, b, c, d)

if __name__ == '__main__':
    main()

Solution (Python):
a,b,c,d = list(map(int, input().split()))

ll = [a*c, a*d, b*c,b*d]
ans = max(ll)
print(ans)

Solution (Python):
x = [int(i) for i in input().split()]

a = [x[0]* x[2],x[0]* x[3],x[1]* x[2],x[1]* x[3]]
             
print(max(a))

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

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

ac = a*c
ad= a*d
bc = b*c
bd = b*d
x = [ ]
x.append(ac)
x.append(ad)
x.append(bc)
x.append(bd)

x.sort(reverse=True)

print(x[0])

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

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

win = x1
if win < x2:
  win = x2
if win < x3:
  win = x3
if win < x4:
  win = x4

print(win)

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

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

Solution (Python):
a,b,c,d=map(int,input().split())
'''
if a>b:
  x=a
else:
  x=b
if c>d:
  y=c
else:
  y=d
print(x*y)
'''
print(max(a*c,a*d,b*c,b*d))

Solution (Python):
a,b,c,d = map(int,input().split())
x = a*c
y = a*d
p = b*c
q = b*d
print(max(p,q,x,y))

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

ans = -float('inf')
for i in [a,b]:
    for j in [c,d]:
        ans = max(ans,i*j)
print(ans)

Solution (Python):
def run(a, b, c, d):
    '''

    '''
    print(max([a*c, a*d, b*c, b*d]))

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

    run(a, b, c, d)

Solution (Python):
def main():
    a, b, c, d = map(int, input().split())

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


if __name__ == "__main__":
    main()

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

Solution (Python):
a, b, c, d = input().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

l = [ac, ad, bc, bd]
ans = max(l)
print(ans)

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

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

ans = max(ac, ad, bc, bd)

print(ans)

Solution (Python):
p = input().split()
ans = []
ans.append(int(p[0]) * int(p[2]))
ans.append(int(p[0]) * int(p[3]))
ans.append(int(p[1]) * int(p[2]))
ans.append(int(p[1]) * int(p[3]))
ans = sorted(ans)
print(ans[-1])

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

ans = [a*c, a*d, b*c, b*d]
print(max(ans))

Solution (Python):
nums = input().split(" ")
nums = list(map(int, nums))
sign = []

ir = False
if nums[0]==0 and nums[1]==0:
  ir = True
if nums[2]==0 and nums[3]==0:
  ir = True

if nums[0] == 0:
  nums[0] = 1
if nums[1] == 0:
  nums[1] = -1
if nums[2] == 0:
  nums[2] = 1
if nums[3] == 0:
  nums[3] = -1

anss = []
for i in range(2):
  for j in range(2):
    anss.append(nums[i]*nums[j+2])
if ir:
  print(0)
else:
	print(max(anss))

Solution (Python):
a, b, c, d = list(map(int, input().split()))

bd = b * d
ac = a * c
bc = b * c
ad = a * d
ans = max(bd, ac, bc, ad)

print(ans)

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

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

print(max(ls))

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

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

if d <= 0 <= a:
    print(a * d)
elif b <= 0 <= c:
    print(b * c)
else:
    print(max(b * d, a * c))

Solution (Python):
a = list(map(int, input().split()))
print(max(
  a[0] * a[2], a[0] * a[3], a[1] * a[2], a[1] * a[3]
))

Solution (Python):
a, b , c, d = map(int, input().split())
r1, r2, r3, r4 = a*c, a*d, b*c, b*d
li = [r1, r2, r3, r4]
print(max(li))

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

toki = a*c
shigi = a*d
nue = b*c
iri = b*d

print(max(toki,shigi,nue,iri))

Solution (Python):
a, b, c, d = map(int, input().split())
l = [a*c, a*d, b*c, b*d]
temp = l[0]
for i in range(3):
    if temp < l[i + 1]:
        temp = l[i + 1]

print(temp)

Solution (Python):
a, b, c, d = map(int, input().split())
A = [a, b]
C = [c, d]
result = -1000000000000000000
for i in A:
    for j in C:
        hoge = i*j
        if result < hoge:
            result = hoge
            
print(result)

Solution (Python):
a, b, c, d = map(int, input().split())
list1, list2 = [a, b], [c, d]
max1, max2, min1, min2 = max(list1), max(list2), min(list1), min(list2)
print(max(max1 * max2, min1 * min2, max1 * min2, max2 * min1))

Solution (Python):
def inp():
    return input()
def iinp():
    return int(input())
def inps():
    return input().split()
def miinps():
    return map(int,input().split())
def linps():
    return list(input().split())
def lmiinps():
    return list(map(int,input().split()))
def lmiinpsf(n):
    return [list(map(int,input().split()))for _ in range(n)]

a,b,c,d = miinps()

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

Solution (Python):
import sys
sys.setrecursionlimit(250000)

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

    a1 = max(a*c, a*d)
    a2 = max(b*c, b*d)
    print(max(a1,a2))
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
main()

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