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 = a*c
if ans < a*d:
    ans = a*d
if ans < b*c:
    ans = b*c
if ans < b*d:
    ans = b*d

print(ans)

Solution (Python):
a=input()
a=[int(i) for i in a.split()]
a1=[a[0],a[1]]
a2=[a[2],a[3]]

re=[]

for i in a1:
	for j in a2:
		m=i*j
		re.append(m)

print(max(re))

Solution (Python):
import sys
a,b,c,d=map(int,input().split())
l=[0 for i in range(4)]
l[0]=max(a,b)*max(c,d)
l[1]=max(a,b)*min(c,d)
l[2]=min(a,b)*max(c,d)
l[3]=min(a,b)*min(c,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()))

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

print(max(e))

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

n1 = a * c
n2 = b*d
n3 = c*b
n4 = d*a
print(max(n1,n2,n3,n4))

Solution (Python):
abcd = list(map(int,input().split()))
ma = -float('inf')
for i in range(2):
    for ii in range(2,4):
        ma = max(abcd[i]*abcd[ii],ma)

print(ma)

Solution (Python):
import sys, bisect, math, itertools, string, queue, copy
import numpy as np
import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush

sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplt(n): return [tuple(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

a,b,c,d = inpm()

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

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

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

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

p = [a,b]
if a <= 0 <= b:
    p.append(0)
q = [c,d]
if c <= 0 <= d:
    q.append(0)

res = a*c
for x in p:
    for y in q:
        res = max(res,x*y)

print(res)

Solution (Python):


lis = list(map(int,input().split()))
lists = []
inc = 0

for i in range(2):
    for j in range(2):
        lists.append(lis[i]*lis[j+2])
        inc += 1

    

print("{}".format(max(lists)))

Solution (Python):
def main():
    a, b, c, d = map(int, input().split())
    answer = a*c
    if answer < a*d:
        answer = a*d
    if answer < b*c:
        answer = b*c
    if answer < b*d:
        answer = b*d
    return answer


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

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

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

print(ans)

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

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

Solution (Python):
def fn(a, b, c, d):
  result = []
  result.append(a * c)
  result.append(a * d)
  result.append(b * c)
  result.append(b * d)
  if (a <= 0 and b >= 0) or (c <= 0 and d >= 0):
    result.append(0)

  return max(result)

if __name__ == "__main__":
  input = list(map(int, input().split()))
  print(fn(input[0], input[1], input[2], input[3]))

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

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

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

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

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

if(a*b < 0 or c*d < 0):
    list.append(0)

print(max(list))

Solution (Python):
a,b,c,d=input().split()
a=int(a)
b=int(b)
c=int(c)
d=int(d)
list1=[]
list1.append(a*c)
list1.append(a*d)
list1.append(b*c)
list1.append(b*d)
list1.sort()
print(list1[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())

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

max = ac
if(max<ad):
    max=ad
if(max<bc):
    max=bc
if(max<bd):
    max=bd

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())
list1=[a*c,a*d,b*c,b*d]
if (b<0 and c>0) or (a>0 and d<0):
  ans=max(list1)
else:
  list1.append(0)
  ans=max(list1)
print(ans)

Solution (Python):
A, B, C, D = (int(x) for x in input().split())
L = []
L.append(A * C)
L.append(A * D)
L.append(B * C)
L.append(B * D)
L.sort()
print(L[3])

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

seki = []
seki.append(a*c)
seki.append(a*d)
seki.append(b*c)
seki.append(b*d)
seki = sorted(seki)
print(seki[-1])

Solution (Python):
a,b,c,d = map(int,input().split())
res1 = a*c
res2 = a*d
res3 = b*c
res4 = b*d

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

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

res0 = x+y+z+l

m = max(res0)

print(m)

Solution (Python):
a,b,c,d = map(int,input().split())
ans = -10**19
ab = [a,b]
cd = [c,d]
for i in ab:
  for j in cd:
    ans = max(i*j,ans)
print(ans)

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

for i in range(2):
  for j in range(2,4):
    if i == 0 and j == 2:
      ans = arr[i]*arr[j]
    else:
      ans = max(ans, arr[i]*arr[j])
  
print(ans)

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

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















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

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

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

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

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

print(max(ans_list))

Solution (Python):
a, b, c, d = map(int, input().split())
e = [a, b]; f = [c, d]; g = -10**18
if a < 0 and 0 < b: e.append(0)
if c < 0 and 0 < d: f.append(0)
for i in range(len(e)):
    for j in range(len(f)):
        g = max(g, e[i]*f[j])
print(g)

Solution (Python):

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

pp = b*d
pm = b*c
mp = a*d
mm = a*c

ans = pp

if (ans < pm):
    ans = pm
if (ans < mp):
    ans = mp
if (ans < mm):
    ans = mm

print(ans)

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

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

if(ans<f):
    ans = f
if(ans<g):
    ans = g
if(ans<h):
    ans = h

print(ans)

Solution (Python):
a,b,c,d=map(int,input().split())
ans=0
kouho1=a*c
kouho2=a*d
kouho3=b*c
kouho4=b*d
ans=max(kouho1,kouho2,kouho3,kouho4)
if a*b<=0 or c*d<=0:
    ans=max(ans,0)
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())

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

print(max(miny * minx, maxx * maxy, maxx * miny, minx * maxy))

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

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


import sys
from typing import Any, Callable, Deque, Dict, List, Mapping, Optional, Sequence, Set, Tuple, TypeVar, Union































def main():
    Num = Union[int, float]
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input():  return sys.stdin.readline().rstrip()
    def ii():     return int(input())
    def isp():    return input().split()
    def mi():     return map(int, input().split())
    def mi_0():   return map(lambda x: int(x)-1, input().split())
    def lmi():    return list(map(int, input().split()))
    def lmi_0():  return list(map(lambda x: int(x)-1, input().split()))
    def li():     return list(input())
    def debug(x): print(x, file=sys.stderr)
    
    
    
    a, b, c, d = mi()
    lx = [a, b]
    ly = [c, d]
    if a <= 0 <= b:
        lx.append(0)
    if c <= 0 <= d:
        ly.append(0)
    
    m = - inf
    for x in lx:
        for y in ly:
            m = max(m, x * y)
    print(m)
    

if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
n = input()
m = n.split(" ")
 
x_min = int(m[0])
x_max = int(m[1])
y_min = int(m[2])
y_max = int(m[3])
 
a = x_min * y_min
b = x_min * y_max
c = x_max * y_min
d = x_max * y_max
 
if a >= b and a >= c and a >= d:
    print(a)
 
elif b >= a and b >= c and b >= d:
    print(b)
 
elif c >= a and c >= b and c >= d:
    print(c)
 
elif d >= a and d >= b and d >= c:
    print(d)

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

max_value = -float('inf')
if max_value < a * c:
    max_value = a * c
if max_value < a * d:
    max_value = a * d
if max_value < b * c:
    max_value = b * c
if max_value < b * d:
    max_value = b * d

print(max_value)

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

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

ans = ac
if ans < ad:
    ans = ad
if ans < bc:
    ans = bc
if ans < bd:
    ans = bd
    
print(ans)

Solution (Python):
details = input()
details = details.split()
first = details[:2]
second = details[2:]
checker = []
for numbers in first:
    for dig in second:
        checker.append(int(numbers) * int(dig))
print(max(checker))

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

Solution (Python):

_INPUT = """\

"""
"""
K = int(input())
H, W, K = map(int, input().split())
a = list(map(int, input().split()))
xy = [list(map(int, input().split())) for i in range(N)]
p = tuple(map(int,input().split()))
"""
def main():
    a, b, c, d = map(int, input().split())

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

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


            
if __name__ == '__main__':
    import io
    import sys
    import math
    import itertools
    from collections import deque

    
    main()

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

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

Solution (Python):
import numpy as np
a, b, c, d = map(int, input().split())
x = [a,b]
y = [c,d]
max = -(10**18)
for i in x:
    for j in y:
        if i*j > max:
            max = i*j
print(max)

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

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

Solution (Python):
in_n = input().split()
a,b,c,d = int(in_n[0]),int(in_n[1]),int(in_n[2]),int(in_n[3])
num_list = []
num_list.append(a * c)
num_list.append(a * d)
num_list.append(b * c)
num_list.append(b * d)
if a <= 0 and b >= 0:
    num_list.append(0)
if c <= 0 and d >= 0:
    num_list.append(0)
print(max(num_list))

Solution (Python):


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

nums = []

for x in (a, b):
    for y in (c, d):
        nums.append(x * y)

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

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

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)
else:
    print(max(b*c,max(a*d,max(a*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(" ")))
list=[a*c,a*d,b*c,b*d]
B=sorted(list)
print(B[-1])

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

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

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

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

Solution (Python):
listA=list(map(int,input().split()))
x_list = []
for i in [0,1]:
    x_list.append(listA[i])

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

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

print(max(i_list))

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, b, c, d = [int(i) for i in input().split()]

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

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

l1 = [a, b]
l2 = [c, d]

p = itertools.product(l1, l2)

max_num = -inf

for e1, e2 in p:
    max_num = max(max_num, e1*e2)
print(max_num)

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

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

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

Solution (Python):
a, b, c, d = map(int, input().split())
ac = a * c
bc = b * c
ad = a * d
bd = b * d


print(max(ac, bc, ad, bd))

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

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

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

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())
big=-99999999999999999999999999999999999999999
if a*c>a*d:
    big=a*c
else:
    big=a*d

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

print(big)

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

l1=a*c
l2=a*d
l3=b*c
l4=b*d
ans = max(l1,l2,l3,l4)
print(ans)

Solution (Python):
import sys
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 ** 2


a, b, c, d = LI()

x = [a, b]
y = [c, d]
xy = -mod

for i in range(2):
    for j in range(2):
        buf = x[i] * y[j]
        
        if xy < buf:
            xy = buf
print(xy)

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


sums = []

x1 = sums.append(a*c)
x2 = sums.append(a*d)
x3 = sums.append(b*c)
x4 = sums.append(b*d)

print(max(sums))

Solution (Python):
a,b,c,d = [int(s) for s 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())
ans=-100000000000000000000000000000

for i in [a,b]:
    for j in [c,d]:
        temp=i*j
        if temp>ans:
            ans=temp
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 math
A,B,C,D = map(int,input().split())

cal1 = A*C
cal2 = A*D
cal3 = B*C
cal4 = B*D

ans = max(cal1,cal2,cal3,cal4)
print(ans)

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

ans = a[0] * a[2]
if a[0] * a[3] > ans:
    ans = a[0] * a[3]
if a[1] * a[2] > ans:
    ans = a[1] * a[2]
if a[1] * a[3] > ans:
    ans = a[1] * a[3]

print(ans)

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

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

mn = min(a, b)
mn1 = min(c, d)

ans = max(mx * mx1, mn * mn1, mx * mn1, mx1 * mn)

print(ans)

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

if M <= b * d:
    M = b * d

print(M)

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

x1 = data[0]
x2 = data[1]
y1 = data[2]
y2 = data[3]

if x1 >= 0 and y2 < 0:
    print(x1 * y2)
elif x2 < 0 and y1 >= 0:
    print(x2 * y1)
elif (x1 < 0 and x2 >= 0) and (y1 < 0 and y2 >= 0):
    print(max(x1*y1,x2*y2))
elif x1 >= 0 or y1 >= 0:
    print(x2 * y2)
elif x2 < 0 or y2 < 0:
    print(x1 * y1)

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

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

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


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

Solution (Python):
import itertools
a,b,c,d = map(int,input().split())
x = [a,b]
y = [c,d]
comb = list(itertools.product(x,y))
ans = x[0]*y[0]

for i in range(len(comb)):
    seki = comb[i][0] * comb[i][1]
    if seki > ans:
        ans = seki
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 = list(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 = a*c

for i in X:
    for j in Y:
        if ans < i*j:
            ans = i*j

print(ans)

Solution (Python):
a, b, c, d = map(int, open(0).read().split())
 
if a * c <= 0 and b * d <= 0:
  print(max([a * d, b * c]))
else:
  print(max([a * c, b * d]))

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

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

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

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

print(maxval)

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

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

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

print(max(list))

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

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

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

s = n[0]*n[2]
t = [0,1,1]
u = [3,2,3]
for i in range(3):
    s1 = n[t[i]]*n[u[i]]
    s = max(s,s1)
print(s)

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

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

Solution (Python):
def main():
    a, b, c, d = map(int, input().split())
    ans_a = a * c
    ans_b = a * d
    ans_c = b * c
    ans_d = b * d
    if ans_a <= ans_b:
        if ans_c <= ans_b:
            if ans_d <= ans_b:
                print(ans_b)
                return 0
            elif ans_b <= ans_d:
                print(ans_d)
                return 0
        elif ans_b <= ans_c:
            if ans_d <= ans_c:
                print(ans_c)
                return 0
            elif ans_c <= ans_d:
                print(ans_d)
                return 0
        
    if ans_b <= ans_a:
        if ans_c <= ans_a:
            if ans_d <= ans_a:
                print(ans_a)
                return 0
            elif ans_a <= ans_d:
                print(ans_d)
                return 0
        elif ans_a <= ans_c:
            if ans_d <= ans_c:
                print(ans_c)
                return 0
            elif ans_c <= ans_d:    
                print(ans_d)
                return 0
main()

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

q=a*c
w=a*d
e=b*c
r=b*d

ans=max(q,w,e,r)
print(ans)

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

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

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

a1 = a * c
a2 = a * d
b1 = b * c
b2 = b * d

print(max([a1, a2, b1, b2]))

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

l = [0]*4

l[0] = a*c
l[1] = a*d 
l[2] = b*c
l[3] = 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
X=[ac,ad,bc,bd]

print(max(X))

Solution (Python):



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

if __name__ == '__main__':
    main()

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

Solution (Python):
a,b,c,d=[int(i) for i in input().split()]
l=[]
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=(int(x) for x in input().split())
e = a*c
f = a*d
g = b*c
h = b*d
list = [e, f, g, h]
print(max(list))

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

diff1 = b - a
diff2 = d - c
l1 = [a, b]
l2 = [c,d]



m = 0
sl = []
for i in range(len(l1)):
    for j in range(len(l2)):
        s = l1[i] * l2[j]
        sl.append(s)
        m = max(m, s)
b = False
for l in sl:
    if l > 0:
        b = True

if b == False:
    print(max(sl))
else:
    print(m)

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


if __name__ == "__main__":
    main()

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

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


minus_num = len([i for i in nums if i < 0])
if minus_num == 4:
  print(a * c)
  exit(0)
if minus_num == 1 or minus_num == 0:
  print(b * d)
  exit(0)

if a * c < b * d:
  print(b * d)
else:
  print(a * c)

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

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

AB = [a, b]
CD = [c, d]

ans = -10 ** 19
for ab in AB:
    for cd in CD:
        ans = max(ans, ab * cd)
print(ans)

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

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

Solution (Python):
i = list(map(int,input().split()))
a = i[0]
b = i[1]
c = i[2]
d = i[3]
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:
    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)
    
else:
    print(max(a * 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):
def solve():
    a, b, c, d  = map(int, input().split())

    max_val = -10**18

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

solve()

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


a, b, c, d = LI()

ans = a*c
ans = max(ans, a*d)
ans = max(ans, b*c)
ans = max(ans, b*d)
if a == 0:
    if b != 0:
        ans = max(ans, c)
        ans = max(ans, d)
if b == 0:
    if a != 0:
        ans = max(ans, -1*c)
        ans = max(ans, -1*d)
if c == 0:
    if d != 0:
        ans = max(ans, a)
        ans = max(ans, b)
if d == 0:
    if c != 0:
        ans = max(ans, -1*a)
        ans = max(ans, -1*b)

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

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

print(max(x))

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

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

print(max(results))

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

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

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

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
a,b,c,d=map(int, input().split())

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

print(result)

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

if (a <= 0 and b >= 0) or (c <= 0 and d >= 0):
    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 = map(int, input().split())
x = [0,0,0,0]
x[0] = a * c
x[1] = a * d
x[2] = b * c
x[3] = b * d

print(max(x))

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

T = 1
for t in range(1,T + 1):
	a,b,c,d = map(int,input().split())
	print(max(a * c,max(b * d,max(a * d,b * c))))

Solution (Python):
a,b,c,d = map(int, input().split())
result1 = a * c
result2 = a * d
result3 = b * c
result4 = b * d
result = max(result1, result2, result3, result4)
print(result)

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

l1 = a*c
l2 = a*d
l3 = b*c
l4 = b*d
l = [l1, l2, l3, l4]
max_l = max(l)

print (max_l)

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

ans= -10**18
ans=max(ans,a*c)
ans=max(ans,a*d)
ans=max(ans,b*c)
ans=max(ans,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 = (int(i) for i in input().split())
if a > 0:
    if d > 0:
        print(max(a*c, a*d, b*c, b*d))
    else:
        print(max(a*c, a*d, b*c, b*d))
else:
    if d > 0:
        print(max(a*c, a*d, b*c, b*d))
    else:
        print(max(a*c, a*d, b*c, b*d))

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):
il = [int(k) for k in input().split()]
a = il[0]
b = il[1]
c = il[2]
d = il[3]

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

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

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

Solution (Python):
a,b,c,d=map(int,input().split())
ans = -float('inf')
alist = [a,b]
blist = [c,d]
if a >= 0 and b <= 0:
    alist.append(0)
if a<= 0 and b >= 0:
    alist.append(0)
if c >= 0 and d <= 0:
    blist.append(0)
if c <= 0 and d >= 0:
    blist.append(0)
for i in [a,b]:
    for j in [c,d]:
        ans = max(ans,i*j)

print(ans)