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):
s = input()
nums = s.split()
a = int(nums[0])
b = int(nums[1])
c = int(nums[2])
d = int(nums[3])
print(max(a*c,a*d,b*c,b*d))

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

print(max(hoge))

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

Solution (Python):
ans=-10**18
a,b,c,d=map(int,input().split())
if a<=0<=b or c<=0<=d:
  ans=0
ans=max(ans,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):
a,b,c,d = map(int, input().split())
m = a*c
n = a*d
o = b*c
p = b*d
if(m>n and m>o and m>p):
    print(m)
elif (n>m and n>o and n>p):
    print(n)
elif (o> m and o>n and o>p):
    print(o)
else:
    print(p)

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())
X=[a,b]
Y=[c,d]
ans=-10**30
for x in X:
    for y in Y:
        if ans<x*y:
            ans=x*y
print(ans)

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, b*d, a*d, b*c]))

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

Solution (Python):
def resolve():
    a, b, c, d = map(int, input().split())
    ans = [a * c, b * d]
    if (a <= 0) ^ (0 <= b):
        ans.append(b * c)
        ans.append(a * d)
    else:
        ans.append(0)
    if (c <= 0) ^ (0 <= d):
        ans.append(b * c)
        ans.append(a * d)
    else:
        ans.append(0)
    print(max(ans))


if __name__ == '__main__':
    resolve()

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
ans_1 = max(ac,ad)
ans_2 = max(bc, bd)
ans = max(ans_1, ans_2)
print(ans)

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

import itertools

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

print(max_xy)

Solution (Python):
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())


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

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

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

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

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

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

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


ans = n[1] * n[3]
ans = max(n[0]*n[2],ans)
ans = max(n[0]*n[3],ans)
ans = max(n[1]*n[2],ans)
ans = max(n[1]*n[3],ans)
print(ans)

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

z1 = a*c
z2 = a*d
z3 = b*c
z4 = b*d

l = [z1, z2, z3, z4]
max_value = max(l)
print(max_value)

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

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

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

ANS = max(A, B, C, D)

print(ANS)

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

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)

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

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

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

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

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

Solution (Python):
def main():
    a, b, c, d = map(int, input().split())
    x = [a, b]
    y = [c, d]
    z = []
    for i in x:
        for k in y:
            z.append(i * k)
    print(max(z))


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    a, b, c, d = map(int, input().split())
    if a >= 0:
        if b >= 0:
            if c >= 0:
                return b * d
            
            if d >= 0:
                return max(a*c, b*d)
            return a * d
    else:
        if b >= 0:
            if c >= 0:
                return b * d
            if d >= 0:
                return max(a*c, b*d)
            return a * c
        if c >= 0:
            return b * c
        if d >= 0:
            return a * c
        return a * c

if __name__ == "__main__":
    print(main())

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

M = max(a*c, a*d, b*c, b*d)
print(str(M))

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

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

elif a < 0 and b >= 0:
    if c >= 0:
        print(b * d)
    elif d <= 0:
        print(a * c)
    else:
        ac = a * c
        bd = b * d
        if ac >= bd:
            print(ac)
        else:
            print(bd)
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())
 
if b >= 0 and d >= 0 and a <= 0 and c <= 0:
    e = b*d
    f = a*c
    if e > f:
        print(e)
    else:
        print(f)
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*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*d)
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(b*d)
elif a <= 0 and b >= 0 and c <= 0 and d <= 0: 
    print(a*c)

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

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

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

r = [ i[0]*i[2], i[1]*i[2], i[0]*i[3], i[1]*i[3] ]

print(max(r))

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

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

Solution (Python):
nums=[int(e) for e in input().split()]
if nums[0]>=0 and nums[1]>=0 and nums[2]>=0 and nums[3]>=0:
    print(nums[1]*nums[3])
elif nums[0]>=0 and nums[1]>=0 and nums[2]<0 and nums[3]>=0:
    print(nums[1]*nums[3])
elif nums[0]>=0 and nums[1]>=0 and nums[2]<0 and nums[3]<0:
    print(nums[0]*nums[3])
elif nums[0]<0 and nums[1]>=0 and nums[2]>=0 and nums[3]>=0:
    print(nums[1]*nums[3])
elif nums[0]<0 and nums[1]>=0 and nums[2]<0 and nums[3]>=0:
    if abs(nums[0])*abs(nums[2]) > abs(nums[1])*abs(nums[3]):
        print(nums[0]*nums[2])
    elif abs(nums[0])*abs(nums[2]) <= abs(nums[1])*abs(nums[3]):
        print(nums[1]*nums[3])
elif nums[0]<0 and nums[1]>=0 and nums[2]<0 and nums[3]<0:
    print(nums[0]*nums[2])
elif nums[0]<0 and nums[1]<0 and nums[2]>=0 and nums[3]>=0:
    print(nums[1]*nums[2])
elif nums[0]<0 and nums[1]<0 and nums[2]<0 and nums[3]>=0:
    print(nums[0]*nums[2])
elif nums[0]<0 and nums[1]<0 and nums[2]<0 and nums[3]<0:
    print(nums[0]*nums[2])

Solution (Python):
import math

def a():
    x = int(input())
    if x == 0:
        print(1)
    else:
        print(0)


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



def c():
    pass



def d():
    pass



b()

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

a,b,c,d = mi()

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

print(max(l))

Solution (Python):
A = input()
B = A.split()
a = int(B[0])
b = int(B[1])
c = int(B[2])
d = int(B[3])

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 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)
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*d)
elif a <= 0 and b > 0:
    if c <= 0 and d > 0:
        if -c <= d and -a <= b:
            print(d*b)
        elif -c <= d and -a > b:
            if a*c > b*d:
                print(a*c)
            elif a*c <= b*d:
                print(b*d)
        elif -c > d and -a <= b:
            if a*c > b*d:
                print(a*c)
            elif a*c <= b*d:
                print(b*d)
        elif -c > d and -a > b:
            print(a*c)
    elif c> 0 and d > 0:
        print(b*d)
    elif c<=0 and d<=0:
        print(a*c)

Solution (Python):
a, b, c, d = input().split()
a = int(a)
b = int(b)
c = int(c)
d = int(d)
A = []
w = a * c
x = a * d
y = b * c
z = b * d
A.append(w)
A.append(x)
A.append(y)
A.append(z)
B = max(A)
print(B)

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

if b >= 0 and d >= 0 and a <= 0 and c <= 0:
    e = b*d
    f = a*c
    if e > f:
        print(e)
    else:
        print(f)
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*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*d)
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(b*d)
elif a <= 0 and b >= 0 and c <= 0 and d <= 0: 
    print(a*c)

Solution (Python):
N = input()
num = N.split(' ')
a = int(num[0])
b = int(num[1])
c = int(num[2])
d = int(num[3])

e = a * c
f = a * d
g = b * c
h = b * d
num_max = max([e, f, g, h])
print(num_max)

Solution (Python):
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)
elif(a*c >= b*d):
    print(a*c)
elif(a*c < b*d):
    print(b*d)

Solution (Python):
a, b, c, d = map(int, input().split())
x = [a*d,a*c,b*c,b*d]
ma =x[0]
for i in range(4):
    if ma<=x[i]:
        ma = x[i]
print(ma)

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

Solution (Python):
import math

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

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(a * d)
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:
    if a * c > b * d:
        print(a * c)
    else:
        print(b * d)
elif a <= 0 and b >= 0 and c <= 0 and d <= 0:
    if a * c > a * d:
        print(a * c)
    else:
        print(a * d)
elif a <= 0 and b <= 0 and c <= 0 and d >= 0:
    if a * c > b * c:
        print(a * c)
    else:
        print(b * c)
elif a <= 0 and b >= 0 and c >= 0 and d >= 0:
    if b * c > b * d:
        print(b * c)
    else:
        print(b * d)
elif a >= 0 and b >= 0 and c <= 0 and d >= 0:
    if a * d > b * d:
        print(a * d)
    else:
        print(b * d)

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

x=a*c
y=a*d
z=b*c
xx=b*d


print(max(x,y,z,xx))

Solution (Python):

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


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

Solution (Python):
if __name__ == "__main__":
  a, b, c, d = [int(a) for a in 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())
L = [a * c, a * d, b * c, b * d]
print(max(L))

Solution (Python):
*X, = map(int, open(0).read().split())
print(max(X[0]*X[2],X[1]*X[2],X[0]*X[3],X[1]*X[3]))

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

resolve()

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

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())
print(max(a*c,a*d,b*c,b*d))

Solution (Python):
a = list(map(int,input().split()))
max = -10 ** 25
for i in range(2):
  for j in range(2,4):
    p = a[i] * a[j]
    if max < p:
      max = p
print(max)

Solution (Python):

import numpy as np
from functools import *
import sys
sys.setrecursionlimit(100000)
input = sys.stdin.readline


def array(size, init=0):
    return [[init for j in range(size[1])] for i in range(size[0])]


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


def II():
    return int(input())


def nitti(x, y):
    count = 0
    for i in range(len(x)):
        if x[i] == y[i]:
            count += 1
    return count


x = acinput()


res = 10**20*(-1)

for i in range(2):
    for j in range(2, 4):
        res = max(res, x[i]*x[j])

print(res)

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())
print(max(a*c, b*d, a*d, b*c))

Solution (Python):
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<=0 and c>=0:
  print(b*c)
elif a>=0 and d<=0:
  print(a*d)
elif a<=0 and b>=0 and c<=0 and d>=0:
  print(max([a*c, b*d]))
elif b<=0 and c<=0 and d>=0:
  print(a*c)
elif a<=0 and b>=0 and d<=0:
  print(a*c)
elif a<=0 and b>=0 and c>=0:
  print(b*d)
elif a>=0 and c<=0 and d>=0:
  print(b*d)

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

Ns = [a*c, a*d, b*c, b*d]
print(sorted(Ns)[-1])

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

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

Solution (Python):
def f(a):
	r = [a[0]*a[2], a[0]*a[3], a[1]*a[2], a[1]*a[3]]
	return max(r)


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

print(f(arr))

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

M = b * d;
if M < a * c:
    M = a*c;
if M < b * c:
    M = b*c;
if M < a * d:
    M = a * d;
    

print (M);

Solution (Python):
def l_in(type_): return list(map(type_, input().split()))
def i_in(): return int(input())
def m_in(type_): return map(type_, input().split())
def r_in(n, type_): return [type_(input()) for _ in range(n)]
ans = None

def absmax(a, b):
    if abs(a) > abs(b): return a
    return b

def absmin(a, b):
    if abs(a) < abs(b): return a
    return b

a, b, c, d = m_in(int)
aa, bb, cc, dd = abs(a), abs(b), abs(c), abs(d)
x, y = 0, 0

abm = absmax(a, b)
cdm = absmax(c, d)
if (abm>0) == (cdm>0):
    ans = abm*cdm
else:
    abi = absmin(a, b)
    cdi = absmin(c, d)
    if (abi>0) == (cdm>0):
        k = abi*cdm
        if ans is None or k > ans: ans = k
    if (abm>0) == (cdi>0):
        k = abm*cdi
        if ans is None or k > ans: ans = k
    k = abi*cdi
    if ans is None: ans = k

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())

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

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

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

Solution (Python):
nums = [int(e) for e in input().split()]
a=nums[0]
b=nums[1]
c=nums[2]
d=nums[3]
max = a*c
if a * d > max:
    max = a * d
if b * c > max:
    max = b * c
if b * d > max:
    max = b * d

print(max)

Solution (Python):
def main():
    data = list(map(int, input().split()))
    ans = [data[0]*data[2],data[0]*data[3],data[1]*data[2],data[1]*data[3],]
    print(max (ans))
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 = map(int, input().split())
e = a * c
f = a * d
g = b * c
h = b * d
l = [e, f, g, h]
print(max(l))

Solution (Python):
S=list(input().split())
A=[int(n) for n in S]
if A[0]<0 and A[1]<0 and A[2]<0 and A[3]<0:
    print(A[0]*A[2])
elif A[0]<=0 and A[1]<=0 and A[2]<=0 and A[3]>=0:
    print(A[0]*A[2])
elif A[0]<=0 and A[1]<=0 and A[2]>=0 and A[3]>=0:
    print(A[1]*A[2])
elif A[0]<=0 and A[1]>=0 and A[2]<=0 and A[3]<=0:
    print(A[0]*A[2])
elif A[0]<=0 and A[1]>=0 and A[2]<=0 and A[3]>=0:
    print(max(A[0]*A[2],A[1]*A[3]))
elif A[0]<=0 and A[1]>=0 and A[2]>=0 and A[3]>=0:
    print(A[1]*A[3])
elif A[0]>=0 and A[1]>=0 and A[2]<=0 and A[3]<=0:
    print(A[0]*A[3])
elif A[0]>=0 and A[1]>=0 and A[2]<=0 and A[3]>=0:
    print(A[1]*A[3])
elif A[0]>=0 and A[1]>=0 and A[2]>=0 and A[3]>=0:
    print(A[1]*A[3])

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

l = [a*c, a*d, b*c, b*d]
maxNum = max(l)

print(maxNum)

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())
e = []
for i in [a, b]:
    for j in [c, d]:
        e += [i * j]

print(max(e))

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

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 c>0 :
        print(b*c)
    else :
        print(a*c)
else :
    if c>0 :
        print(b*d)
    elif d<0 :
        print(a*c)
    else :
        if a*c<b*d :
            print(b*d)
        else :
            print(a*c)

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

Solution (Python):
E = input()
F = E.split(" ")

a=int(F[0])
b=int(F[1])
c=int(F[2])
d=int(F[3])

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

if xy1 >= xy2 and xy1 >= xy3 and xy1 >= xy4:
    print(xy1)

elif xy2 >= xy1 and xy2 >= xy3 and xy2 >= xy4:
    print(xy2)

elif xy3 >= xy1 and xy3 >= xy2 and xy3 >= xy4:
    print(xy3)

else: 
    print(xy4)

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

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

Solution (Python):
nums = [int(i) for i in input().split()]
a = nums[0]
b = nums[1]
c = nums[2]
d = nums[3]
ac = a*c
bd = b*d
if (ac<=0 and bd<=0):
  max = max(a*d, b*c)
elif (ac>=0 and bd>=0):
  max = max(ac, bd)
elif ac>=0:
  max = ac
elif bd>=0:
  max = bd
  
print(max)

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

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

print(ans)

Solution (Python):
a, b, c, d = map(int,input().split())
e1 = a*c
e2 = a*d
e3 = b*c
e4 = b*d

list = [e1, e2, e3, e4]
list.sort()

print(list[3])

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

if a == c and b == d:
    print(max(a*c, b*d))
    exit()
else:
    print(max(a*c, a*d,b*c,b*d))

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

Solution (Python):
import numpy as np

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 = -10000000000000000000

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

print(ans)

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

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

Solution (Python):
a,b,c,d = (int(x) for x in 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())

a_b = [a, b]
c_d = [c, d]

multi = []

for i in a_b:
    for j in c_d:
        multi.append(i * j)

print(max(multi))

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

Solution (Python):
ab = []
cd = []
abcd = list(map(int, input().split()))
ab.append(abcd[0])
ab.append(abcd[1])
cd.append(abcd[2])
cd.append(abcd[3])
ans = []
for i in ab:
    for j in cd:
        ans.append(i * j)
print(max(ans))

Solution (Python):
a, b, c, d = map(int, input().split())
xmx = max([a, b])
xmin = min([a, b])


ymx = max([c, d])
ymin = min([c, d])


if xmin >= 0:
    if ymx <= 0:
        print(xmin * ymx)
    else:
        print(xmx * ymx)

elif xmx <= 0:
    if ymin >= 0:
        print(xmx * ymin)
    else:
        print(xmin * ymin)
else:
    if ymx <= 0:
        print(xmin * ymin)
    elif ymin >= 0:
        print(xmx * ymx)
    else:
        if xmx * ymx > xmin * ymin:
            print(xmx * ymx)
        else:
            print(xmin * ymin)

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 = [int(i) for i in input().split()]
x=y=0
print(max([a*c, a*d, b*c, b*d]))

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

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

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)

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

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

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

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

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

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

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

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

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

max=a*c
for i in  (a,b):
    for j in (c,d):
        if max < i*j:
            max = i*j

print(max)

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

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

for i in x:
  for j in y:
    A = i*j
    ans.append(A)
    
print(max(ans))

Solution (Python):





def int_mtx(N):
    x = []
    for _ in range(N):
        x.append(list(map(int,input().split())))
    return np.array(x)

def str_mtx(N):
    x = []
    for _ in range(N):
        x.append(list(input()))
    return np.array(x)

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

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

def print_space(l):
    return print(" ".join([str(x) for x in l]))


import numpy as np
import collections as col

a,b,c,d = int_map()

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

print(max(x1,x2,x3,x4))

Solution (Python):
a,b,c,d = list(map(int,input().split()))
if (a<=0 and 0<=b) or (c<=0 and 0<= d):
    ls = [0]
else:
    ls = []

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

ans = max(ls)
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())
print(max(a*c,b*c,a*d,b*d))

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

for i in x:
    for j in y:
        num = i*j
        xy.append(num)
ans = max(xy)
print(ans)

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

Solution (Python):
lists = list(map(int,input().split()))
a = lists[0]
b = lists[1]
c = lists[2]
d = lists[3]
e = a*d
f = a*c
g = b*c
h = b*d
list2 = [e,f,g,h]
list2.sort()
print(list2[3])

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


K = a*c
L = a*d
M = b*c
N = b*d

A = max(K,L,M,N)

print(A)

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

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

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

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

ans1=a*c
ans2=a*d
ans3=b*c
ans4=b*d

print(max(max(ans1,ans2),max(ans3,ans4)))

Solution (Python):
import os
import sys
from atexit import register
from io import BytesIO
sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))
input = lambda: sys.stdin.readline().rstrip('\r\n')
raw_input = lambda: sys.stdin.readline().rstrip('\r\n')

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())
answer =0
if b < 0:
	if c < 0:
		answer = max(a*c,b*d)
	if c>=0:
		answer = max(a*c,b*d,b*c)
if b>=0:
	if a <0:
		answer = max(a*c ,b * d,0)
	if a >= 0:
		if d< 0:
			if a == 0:
				answer = 0
			else:
				answer = a*d
		if d>=0:
			answer = b*d
print(answer)

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

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())

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

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

print(max(list_n))

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

possibleSolutions = []

possibleSolutions.append(arr[0] * arr[2])
possibleSolutions.append(arr[0] * arr[3])
possibleSolutions.append(arr[1] * arr[2])
possibleSolutions.append(arr[1] * arr[3])

print(max(possibleSolutions))

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

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

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):
a,b,c,d = [int(v) for v in input().split()]
print(max([a*c,a*d,b*c,b*d]))

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

max_x = max(a,b)
min_x = min(a,b)
max_y = max(c,d)
min_y = min(c,d)


if max_x >= 0 and min_x >= 0:
    if max_y >= 0 and min_y >= 0:
        x = max_x
        y = max_y
    elif max_y >= 0 and min_y < 0:
        x = max_x
        y = max_y
    else:
        x = min_x
        y = max_y

elif max_x >= 0 and min_x < 0:
    if max_y >= 0 and min_y >= 0:
        x = max_x
        y = max_y
    elif max_y >= 0 and min_y < 0:
        if max_x * max_y >= min_x * min_y:
            x = max_x
            y = max_y
        else:
            x = min_x
            y = min_y
    else:
        x = min_x
        y = min_y
else:
    if max_y >= 0 and min_y >= 0:
        x = max_x
        y = min_y
    elif max_y >= 0 and min_y < 0:
        x = min_x
        y = min_y
    else:
        x = min_x
        y = min_y

print(x*y)

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

Solution (Python):
a = input()
l_si=a.split()
l_si_i = [int(s) for s in l_si]
print(max(l_si_i[0]*l_si_i[2],l_si_i[0]*l_si_i[3],l_si_i[1]*l_si_i[2],l_si_i[1]*l_si_i[3]))

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

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

print(max(list_res))

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

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

Solution (Python):
a, b, c, d = map(int, input().split())
X = [a, b]
Y = [c, d]
lst = [[x*y for x in X] for y in Y]
mylist=[]
for i in lst:
    for I in i:
        mylist.append(I)

mylist.sort()
print(mylist[-1])

Solution (Python):
a,b,c,d=(int(x) for x in input().split())
A = a*c
B = a*d
C = b*c
D = b*d
print(max(A,B,C,D))