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

Solution (Python):
a, b, c, d = (int(i) for i in 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):
a = list(map(int, input().split()))
x = a[:2]
y = a[2:]
num = []
for i in x:
  for j in y:
    num.append(i * j)
    
  
print(max(num))

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

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

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

print(max(nums))

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

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

Solution (Python):
nums=list(map(int, input().split()))
ans=[]
for i in range(2):
  ans.append(nums[i]*nums[2])
  ans.append(nums[i]*nums[3])
print (max(ans))

Solution (Python):
def I(): return int(input())
def LI(): return list(map(int,input().split()))
def MI(): return map(int,input().split())
def LLI(n): return [list(map(int, input().split())) for _ in range(n)]

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

print(_max)

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

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([i for i in [i*j for i in (a, b) for j in (c,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())
ans = max(max(a*c, a*d), max(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):
import sys



from copy import *
from bisect import *	



 
def eprint(*args):
    print(*args, file=sys.stderr)
zz=1
 

if zz:
	input=sys.stdin.readline
else:	
	sys.stdin=open('input.txt', 'r')
	sys.stdout=open('all.txt','w')
di=[[-1,0],[1,0],[0,1],[0,-1]]
def inc(d,c,x=1):
	d[c]=d[c]+x if c in d else x
def bo(i):
	return ord(i)-ord('A')	
def li():
	return [int(xx) for xx in input().split()]
def fli():
	return [float(x) for x in input().split()]	
def comp(a,b):
	if(a>b):
		return 2
	return 2 if a==b else 0		
def gi():	
	return [xx for xx in input().split()]
def fi():
	return int(input())
def pro(a): 
	return reduce(lambda a,b:a*b,a)		
def swap(a,i,j): 
	a[i],a[j]=a[j],a[i]	
def si():
	return list(input().rstrip())	
def mi():
	return 	map(int,input().split())			
def gh():
	sys.stdout.flush()
def isvalid(i,j):
	return 0<=i<n and 0<=j<m and a[i][j]!="."
def bo(i):
	return ord(i)-ord('a')	
def graph(n,m):
	for i in range(m):
		x,y=mi()
		a[x].append(y)
		a[y].append(x)
def represent(n):
	s=""
	while n>0:
		s+=str(n%3)
		n//=3
	s=s[::-1]
	return s			

t=1
while t>0:
	t-=1
	a,b,c,d=mi()
	maxi=-10**19
	for i in a,b:
		for j in c,d:
			maxi=max(maxi,i*j)		
	print(maxi)

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

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):
a,b,c,d = list(map(int, input().split()))

p = a * c
o = a * d
i = b * c
u = b * d

print(max(p, o, i, u))

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=list(map(int,input().split()))
c=-10**100
for i in range(2):
  for j in range(2,4):
    b=a[i]*a[j]
    if b>c:
      c=b
print(c)

Solution (Python):
a, b, c, d = map(int, input().split())
ac = a * c
bc = b * c
ad = a * d
bd = b * d
ans = max(ac, bc, ad, bd)
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 copy
import random
import bisect 
import fractions 
import math
import sys
import collections
from decimal import Decimal 

mod = 10**9+7
sys.setrecursionlimit(mod) 

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

a, b, c, d = LI()

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

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

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

print(max(cal))

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

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

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

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

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

Solution (Python):
x_low,x_up,y_low,y_up=map(int,input().split())

a1=x_low*y_low
a2=x_low*y_up
a3=x_up*y_low
a4=x_up*y_up

ans=max(a1,a2,a3,a4)
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())

ans = [0] * 4
ans[0] = a * c
ans[1] = a * d
ans[2] = b * c
ans[3] = b * d

print(max(ans))

Solution (Python):
A, B, C, D = input().split()
 
AC = int(A)*int(C)
AD = int(A)*int(D)
BC = int(B)*int(C)
BD = int(B)*int(D)

 
l = [AC, AD, BC, BD]

print(max(l))

Solution (Python):
import math
from decimal import *
import random

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

Solution (Python):

def main(a, b, c, d):
    ans = -float('inf')
    for x in [a, b]:
        for y in [c, d]:
            z = x * y
            if ans < z:
                ans = z
    return ans

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

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

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

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

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




















import numpy as np
import math
import copy
import string



INF = 10**18 
pi = math.pi

MOD = 1000000007








def my_pow(N, a, M):
    if(a == 0):
        return 1
    else:
        if(a % 2 == 0):
            tempo = my_pow(N, a/2, M)
            return (tempo * tempo) % M
        else:
            tempo = my_pow(N, a - 1, M)
            return (tempo * N) % M





def my_combination(N, a, M):
    res = 1

    for i in range(0, a):
        res *= N - i
        res %= M

    for i in range(0, a):
        res *= my_pow(i + 1, M - 2, M)
        res %= M

    return res





def my_combination_table(N, M, v):
    if(len(v) < N + 1):
        l = N + 1 - len(v)
        tempo = [1] * l
        v.extend(tempo)

    for i in range(1, N + 1):
        v[i] = v[i - 1] * (N - (i - 1))
        v[i] %= M

        v[i] *= my_pow(i, M - 2, M)
        v[i] %= M

    return










a, b, c, d = (int(x) for x in input().split())
res = int(b * d)
res = max(res, a * c)
res = max(res, a * d)
res = max(res, b * c)

if(a <= 0 and 0 <= b):
    res = max(res, 0)
if(c <= 0 and 0 <= d):
    res = max(res, 0)


print(res)

Solution (Python):
arr = [int(x) for x in input().split()]
print( max( max(arr[0]*arr[2], arr[0]*arr[3]), max(arr[1]*arr[2], arr[1]*arr[3]) ))

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

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

Solution (Python):
import sys
input = sys.stdin.readline


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

Solution (Python):

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

cands = [a*c, a*d, b*c, b*d]
if a * b <= 0 or c * d <= 0:
    cands.append(0)

print(max(cands))

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

if b < 0:
    if c <= 0:
        print(a * c)
    else:
        print(b * c)

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

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

max_a = max(ac, ad)
max_b = max(bc, bd)

print(max(max_a, max_b))

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

res = float("-inf")

for i in [a,b]:
    for j in [c,d]:
        res = max(i * j, res)
        
print(res)

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

max_pro = -float("inf")
for i in range(2):
  for j in range(1,3):
    product = abcd[i] * abcd[-j]
    if max_pro < product:
      max_pro = product

print(max_pro)

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


if __name__ == "__main__":
    main()

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
a, b, c, d = M()
li = list()
li.append(a*c)
li.append(a*d)
li.append(b*c)
li.append(b*d)
li.sort()
print(li[-1])

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

lst = [ [a,b], [c,d] ]
mx = a*c
for i in range(2):
  x = lst[0][i]*lst[1][0]
  if x >= mx:
    mx = x
  x = lst[0][i]*lst[1][1]
  if x >= mx:
    mx = x
print(mx)

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

Solution (Python):
a,b,c,d = map(int,input().split())
max = 10 ** 20 * -1
if a*c >= max:
  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):
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(b * d, a * c, a * d, b * c))

Solution (Python):
a,b,c,d=map(int,input().split())
ab=list([a,b])
cd=list([c,d])
ans=ab[0]*cd[0]
for i in range(len(ab)):
    for j in range(len(cd)):
        temp=ab[i]*cd[j]
        ans=max(ans,temp)
print(ans)

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

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

m()

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

m()

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(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, 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,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 numpy as np
a = list(map(int, input().split()))
ans = -1*float('inf')
y = np.array(a[2:])
for i in a[:2]:
  ans = max(ans, max(i*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())
ans = max(a*c,a*d,b*c,d*b)
print(ans)

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

Solution (Python):
def main():
    import itertools
    a,b,c,d = map(int,input().split())
    ans = -1 * float('inf')
    if a*c>ans:
        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)

if __name__ == "__main__":
    main()

Solution (Python):
a,b,c,d = map(int,input().split())
def getmax(a,b):
    if a>b:
        return a
    else:
        return b
def getmin(a,b):
    if a<b:
        return a
    else:
        return b
if (a>0 and b>0 and c<0 and d<0) or (a<0 and b<0 and c>0 and d>0):
    x = getmin(a,b)
    y = getmax(c,d)
    max = x*y
    x = getmax(a,b)
    y = getmin(c,d)
    min = x*y
    if max > min:
        print(max)
    else:
        print(min)
else:
    x = getmax(a,b)
    y = getmax(c,d)
    max = x*y
    x = getmin(a,b)
    y = getmin(c,d)
    min = x*y
    if max > min:
        print(max)
    else:
        print(min)

Solution (Python):
a, b, c, d = map(int, input().split())
ans = []
for i in [a, b]:
  for j in [c, d]:
    ans.append(i * 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):
a,b,c,d = map(int,input().split())

A = [a,b]
B = [c,d]
INF = float("INF")
M = -INF

for i in A:
    for j in B:
        M = max(i*j,M)
print(M)

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

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

Solution (Python):

def solve():
    a,b,c,d=[int(v) for v in input().split()]
    print(max(a*c, a*d, b*c, b*d))

t = 1 
for _ in range(t):
    solve()

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

main()

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

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

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

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

print(max(array))

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

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

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

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())
e=a*c
f=a*d
g=b*c
h=b*d
MAX=max(e,f,g,h)
print(MAX)

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

Solution (Python):
a = input().split(" ")

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

ans = []

for i in x:
  for j in y:
    s = i*j
    
    ans.append(s)
ans.sort(reverse = True)  
print(ans[0])

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

Solution (Python):

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

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

print(max(li))

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

main()

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

if __name__ == '__main__':
    main()

Solution (Python):
a, b, c, d = map(int, input().split())
ans = max(max(a*c, a*d), max(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())
arr = []

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

print(max(arr))

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

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

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

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

print(max(prod))

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 = []

for i in [a, b]:
    for j in [c, d]:
        A.append(i * j)
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())
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):
a, b, c, d = map(int, input().split())

e = a * c
f = a * d
g = b * c
h = b * d

list1 = [e, f, g, h]
max = max(list1)
print(max)

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

Solution (Python):
a, b, c, d = map(int, input().split())
x = [a, min(a+1, b), max(a, b-1), b]
y = [c, min(c+1, d), max(c, d-1), d]

ans = -int(1e19)
for i in x:
  for j in y:
    ans = max(ans, i*j)
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
a, b, c, d = map(int, input().split())
ans = []
ans.append(a * c)
ans.append(a * d)
ans.append(b * c)
ans.append(b * d)

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 = map(int, input().split())
ans = max(a * c, a * d, b * c, b * d)
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=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,max(a*d,max(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
print(max(e,f,g,h))

Solution (Python):
def main():
    INP = list(map(int, input().split()))
    list1 = [INP[0],INP[1]]
    list2 = [INP[2],INP[3]]
    if INP[0] < 0 and INP[1] > 0:
        list1.extend([-1,0,1])
    if INP[2] < 0 and INP[3] > 0:
        list2.extend([-1,0,1])
    ans = -(10**18)
    for item in list1:
        for item2 in list2:
            ans = max(ans,item*item2)
    print(ans)     


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

max_num = 0

max_num = num[0] * num[2]

max_num = max(max_num, num[0] * num[3])

max_num = max(max_num, num[1] * num[2])

max_num = max(max_num, num[1] * num[3])

print(max_num)

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

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

Solution (Python):



def main():
    import sys
    input = sys.stdin.readline

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

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

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

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

Solution (Python):
s = list(map(int, input().split()))
s1 = s[0]*s[2]
s2 = s[0]*s[3]
s3 = s[1]*s[2]
s4 = s[1]*s[3]
print(max(s1,s2,s3,s4))

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

Solution (Python):
abcd=input().split()
a=int(abcd[0])
b=int(abcd[1])
c=int(abcd[2])
d=int(abcd[3])
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):


def get_input() -> tuple:
    """
    標準入力を取得する.

    Returns:\n
        tuple: 標準入力
    """
    a, b, c, d = list(map(int, input().split()))

    return a, b, c, d


def main(a: int, b: int, c: int, d: int) -> None:
    """
    メイン処理.

    Args:\n
        a (int): 整数(-10**9 <= a <= b <= 10**9)
        b (int): 整数(-10**9 <= a <= b <= 10**9)
        c (int): 整数(-10**9 <= c <= d <= 10**9)
        d (int): 整数(-10**9 <= c <= d <= 10**9)
    """
    
    ans = max([a * c, a * d, b * c, b * d])

    
    print(ans)


if __name__ == "__main__":
    
    a, b, c, d = get_input()

    
    main(a, b, c, 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):
x = [int(i) for i in input().split(" ")]
ans = max([x[0]*x[2],x[0]*x[3],x[1]*x[2],x[1]*x[3]])

print(ans)

Solution (Python):
tmp = [int(e) for e in input().split()]

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

res = a * c

tmp = a * d

if tmp > res:
    res = tmp

tmp = b * c

if tmp > res:
    res = tmp

tmp = b * d

if tmp > res:
    res = tmp

print(res)

Solution (Python):
(X1,X2,Y1,Y2)=list(map(int,input().split()))
ans=max(X2*Y2,X1*Y1,X1*Y2,X2*Y1)
print (ans)

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

Solution (Python):
(X1,X2,Y1,Y2)=list(map(int,input().split()))
ans=X2*Y2
ans=max(ans,X1*Y1)
ans=max(ans,X1*Y2)
ans=max(ans,X2*Y1)
print (ans)

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

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

Solution (Python):
import numpy as np

a, b, c, d = map(int, input().split())
x = np.array([a, b])
y = np.array([c, d])
z = np.outer(x, y)
print(z.max())

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

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

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

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

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

Solution (Python):
inputs = [int(d) for d in input().split()]

results = []
for i in (0, 1):
  for j in (2, 3):
    results.append(inputs[i] * inputs[j])

print(max(results))

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

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):
abcd = list(map(int,input().split()))

ac=abcd[0]*abcd[2]
ad=abcd[0]*abcd[3]
bc=abcd[1]*abcd[2]
bd=abcd[1]*abcd[3]

maxnum=ac

if maxnum<ad:
    maxnum=ad
if maxnum<bc:
    maxnum=bc
if maxnum<bd:
    maxnum=bd

print(maxnum)

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

a, b, c, d = read()

p = a * c
q = a * d
r = b * c
s = b * d
print(max(p, q, r, s))

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

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

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

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


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

ans1 = max( ac, bd )
ans2 = max( ad, bc )

ans = max( ans1, ans2 )
print( ans )

Solution (Python):
def gets_ints():
  return list(map(int,input().split()))

a,b,c,d = gets_ints()

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):
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())
tmp=[a*c,a*d,b*c,b*d]
print(max(tmp))

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=list(map(int,input().split()))
tmp=[a*c,a*d,b*c,b*d]
print(max(tmp))

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

Solution (Python):




def main():
    A, B, C, D = map(int, input().split())
    ans = -10**9**2

    for ab in (A, B):
        for cd in (C, D):
            if ab * cd > ans:
                ans = ab * cd

    print(ans)


if __name__ == "__main__":
    main()

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

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


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

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

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

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