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

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

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

print(max(ans_list))

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

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

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

XY=[]

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

print(max(XY))

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

Solution (Python):
import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    sys.setrecursionlimit(10**7)
    INF = 10**18
    MOD = 10**9 + 7
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    _LI = lambda : [int(x)-1 for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())
    SI = lambda : sys.stdin.readline().rstrip()
    DD = ((1,0),(0,1),(-1,0),(0,-1))

    a,b,c,d = LI()

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



if __name__ == '__main__':
    main()

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

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

s=[]

s.append(a*c)
s.append(a*d)
s.append(b*c)
s.append(b*d)
if (a<=0 and b>=0) or (c<=0 and d>=0):
  s.append(0)
s.sort()

print(s[-1])

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

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

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

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

    list = sorted(list)

   

    print(list[3])


if __name__ == "__main__":
    solve()

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

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

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

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

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

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

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

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

print(ans)

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

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

print(ans)

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

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

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

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

one = [a, b]
two = [c, d]

ans = a * c

for i in one:
    for j in two:
        ans = max(i*j, ans)
        
print(ans)

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

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

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

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

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())
list1=[a,b]
list2=[c,d]
ans=-1*10**100
tmp=0
for i in list1:
    for j in list2:
        tmp=i*j
        if ans<tmp:
            ans=tmp
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().strip().split())
x=max(a*c,b*d)
y=max(a*d,b*c)
print(max(x,y))

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


def main():
    probB()


if __name__ == '__main__':
    main()

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

sum = []
sum.append(arr[0]*arr[2])
sum.append(arr[0]*arr[3])
sum.append(arr[1]*arr[2])
sum.append(arr[1]*arr[3])
print(max(sum))

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

ans = -float('inf')
for x in [a, b]:
    for y in [c, d]:
        tmp = x * y
        if tmp > ans:
            ans = tmp
print(ans)

Solution (Python):
import sys


def main():
    a, b, c, d = map(int, sys.stdin.readline().rstrip().split())

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

    if (a <= 0 and 0 <= b) or (c <= 0 and 0 <= d):
        print(max(ac, bc, ad, bd, 0))
    else:
        print(max(ac, bc, ad, bd))


main()

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

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

Solution (Python):

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


ans = -10**18
t = a*c
if ans < t:
    ans = t
t = a*d
if ans < t:
    ans = t
t = b*c
if ans < t:
    ans = t
t = b*d
if ans < t:
    ans = t


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

print(max_value)

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

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

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

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

_list_multi = [_list[0]*_list[2], _list[0]*_list[3], _list[1]*_list[2], _list[1]*_list[3]]
print(max(_list_multi))

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

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

Solution (Python):
def p(val):
    print(val)


x =  list(map(int,input().split()))
a=[x[0],x[1]]
b=[x[2],x[3]]
a1 = max(a)
b1 = max(b)
c=[x[0]*x[2],x[0]*x[3],x[1]*x[2],x[1]*x[3]]
p(max(c))

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

A = max(a*c, a*d)
B = max(b*c, b*d)
print(max(A, B))

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

Solution (Python):
import math


A = list(map(int, input().split()))
B = list()
for i in range(2):
    for j in range(2):
        B.append(A[i]*A[j+2])

print('{}'.format(max(B)))

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

ans.append(num[0]*num[2])
ans.append(num[0]*num[3])
ans.append(num[1]*num[2])
ans.append(num[1]*num[3])

print(max(ans))

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



ans = a*c

for i in [a,b]:
  for j in [c,d]:
    tmp = i*j
    if tmp > ans:
      ans = tmp
print(ans)

Solution (Python):
a,b,c,d = input().split()
a = int(a)
b = int(b)
c = int(c)
d = int(d)
def MAX(n,m):
  if n >= m:
    return n
  else:
    return m
x1 = MAX(a*c,a*d)
x2 = MAX(b*c,b*d)
print(MAX(x1,x2))

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

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

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

Solution (Python):


import sys
input=sys.stdin.readline

a,b,c,d=map(int,input().split())
ans=-10**18

if a<=0<=b or c<=0<=d:
    ans=max(ans,0)

ans=max(ans,b*c)

ans=max(ans,b*d)

ans=max(ans,a*c)

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

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

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())
x = [a*c,a*d,b*c,b*d]
x.sort(reverse=True)
print(x[0])

Solution (Python):

import sys
sys.setrecursionlimit(1000000)
from collections import deque


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

t1 = a*c
t2 = a*d
t3 = b*c
t4 = b*d

print(max(t1, t2, t3, t4))

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

Solution (Python):
import math
ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return divisors
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())
mod = 10**9 + 7



a,b,c,d = inm()
x = [a,b]
y = [c,d]
ans = a*c
for i in x:
    for j in y:
        ans = max(ans,i*j)

print(ans)

Solution (Python):

from math import floor, ceil, sqrt, factorial, log, gcd
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from heapq import heappop, heappush, heappushpop, heapify
import copy
import sys
INF = float('inf')
mod = 10**9+7
sys.setrecursionlimit(10 ** 6)


def lcm(a, b): return a * b / gcd(a, b)





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 main():
    a, b, c, d = LI()

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


if __name__ == "__main__":
    main()

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

Solution (Python):
def main():
    a,b,c,d = map(int, input().split())
    max = -1000000000000000000000000000
    for x in [a, b]:
        for y in [c, d]:
            if x*y > max:
                max = x*y
    print(max)
        
        

if __name__ == '__main__':
    main()

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

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

Solution (Python):
a,b,c,d = map(int, input().split())
List = [a,b,c,d]
tmp = a*c
for i in range(0,2):
    for j in range(2,4):
        tmp= max(List[i]*List[j],tmp)

print(tmp)

Solution (Python):
import itertools

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

num = None
for x, y in itertools.product([a, b], [c, d]):
  if num == None:
    num = x * y
  else:
    num = max(num, x * y)

print(num)

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

max = li[0] * li[2]
for x in range(2):
    for y in range(2,4):
        if li[x] * li[y] > max:
            max = li[x] * li[y]
print(max)

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

x = a[0]
y = a[1]
z = a[2]
v = a[3]

A = x*z
B = x*v
C = y*z
D = y*v

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

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

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

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

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




numbers = input().split(" ")

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

if(int(numbers[0]) < 0 and int(numbers[1]) > 0):
    x.append(0)
if(int(numbers[2]) < 0 and int(numbers[3]) > 0):
    y.append(0)

xy = x[0] * y[0]

for xx in x:
    for yy in y:
        if xx * yy > xy:
            xy = xx * yy

print(xy)

Solution (Python):
a,b,c,d=map(int,input().split())
p=[a,b]
q=[c,d]
e=[]
for l in range(2):
    for k in range(2):
        e.append(p[l]*q[k])
print(max(e))

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

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

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

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

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

a = int(N[0])
b = int(N[1])
c = int(N[2])
d = int(N[3])
q = a * c 

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

print(q)

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

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

Solution (Python):
from sys import stdin,stdout

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

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

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

print(ret)

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

Solution (Python):
import sys

input = sys.stdin.readline

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

Solution (Python):
a,b,c,d = map(int,input().split())
ans1 = b*d
ans2 = a*c
ans3 = a*d
ans4 = b*c
ans = max(ans1,ans2,ans3,ans4,)
if 0 in range(a,b+1) or 0 in range(c,d+1):
  if 0 > ans:
    ans =0
print(ans)

Solution (Python):

import sys


def main():
    a,b,c,d = list(map(int, sys.stdin.readline().split()))

    max_calc = -float("inf")

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


if __name__ == "__main__":
    main()

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

ans = -(10 ** 18)
for i in range(2):
  for j in range(2):
    p = a[i] * a[j+2]
    ans = max(ans,p)

print(ans)

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

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


num = a[0]*a[2]

if a[0]*a[3] > num:
  num = a[0]*a[3]

if a[1]*a[2] > num:
  num = a[1]*a[2]

if a[1]*a[3] > num:
  num = a[1]*a[3]


print(num)

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

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

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

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

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

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

Solution (Python):









import os
import sys




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



if __name__ == "__main__":
    main()

Solution (Python):


import sys

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

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




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

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

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

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

a=[]
a.append(ans1)
a.append(ans2)
a.append(ans3)
a.append(ans4)

print(max(a))

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

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

print(max(l))

Solution (Python):

import itertools

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

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

ans = []

prod = itertools.product(x,y)
for i in prod:
    ans.append(i[0]*i[1])

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

result = []
result.extend([a*c, a*d, b*c, b*d])


print(max(result))

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())
n1=[]
if a<=0 and b>=0:
    n1.append(0)
elif c<=0 and d>=0:
    n1.append(0)
n1.append(a*c)
n1.append(a*d)
n1.append(b*c)
n1.append(b*d)
print(max(n1))

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

Solution (Python):
abcd  = input('').split()

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

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

l = [a*c, a*d, b*c, b*d]
answer = l[0]
for i in l:
  if answer < i:
    answer = i

print(answer)

Solution (Python):
N = list(map(int,input().split()))
ans = -10000000000000000000

for i in range(2):
    for j in range(2):
        result = N[i]*N[j+2]
        if ans < result:
            ans = result

print(ans)

Solution (Python):

import os,sys
from io import BytesIO, IOBase

def main():
    a,b,c,d=map(int,input().split())
    print(max(b*d,b*c,c*a,d*a))
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

if __name__ == '__main__':
    main()

Solution (Python):
import sys
import math,bisect
sys.setrecursionlimit(10 ** 5)
from collections import defaultdict
from itertools import groupby,accumulate
from heapq import heapify,heappop,heappush
from collections import deque,Counter,OrderedDict
def I(): return int(sys.stdin.readline())
def neo(): return map(int, sys.stdin.readline().split())
def Neo(): return list(map(int, sys.stdin.readline().split()))
a,b,c,d = neo()
print(max(max(a,b)*max(c,d),min(a,b)*max(c,d),max(a,b)*min(c,d),min(a,b)*min(c,d)))

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

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

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

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

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

ans = max(e)

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

Solution (Python):
import sys,bisect,string,math,time,functools,random,fractions
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
from itertools import permutations,combinations,groupby
rep=range;R=range
def Golf():n,*t=map(int,open(0).read().split())
def I():return int(input())
def S_():return input()
def IS():return input().split()
def LS():return [i for i in input().split()]
def MI():return map(int,input().split())
def LI():return [int(i) for i in input().split()]
def LI_():return [int(i)-1 for i in input().split()]
def NI(n):return [int(input()) for i in range(n)]
def NI_(n):return [int(input())-1 for i in range(n)]
def NLI(n):return [[int(i) for i in input().split()] for i in range(n)]
def NLI_(n):return [[int(i)-1 for i in input().split()] for i in range(n)]
def StoLI():return [ord(i)-97 for i in input()]
def ItoS(n):return chr(n+97)
def LtoS(ls):return ''.join([chr(i+97) for i in ls])
def RA():return map(int,open(0).read().split())
def RLI(n=8,a=1,b=10):return [random.randint(a,b)for i in range(n)]
def RI(a=1,b=10):return random.randint(a,b)
def INP():
    N=10;A=10
    n=random.randint(1,N)
    a=[random.randint(1,A) for i in range(n)]
    return n,a
def Rtest(T):
    case,err=0,0
    for i in range(T):
        inp=INP()
        a1=naive(*inp)
        a2=solve(*inp)
        if a1!=a2:
            print((a1,a2),inp)
            err+=1
        case+=1
    print('Tested',case,'case with',err,'errors')
def GI(V,E,ls=None,Directed=False,index=1):
    org_inp=[];g=[[] for i in range(V)]
    FromStdin=True if ls==None else False
    for i in range(E):
        if FromStdin:
            inp=LI()
            org_inp.append(inp)
        else:
            inp=ls[i]
        if len(inp)==2:
            a,b=inp;c=1
        else:
            a,b,c=inp
        if index==1:a-=1;b-=1
        aa=(a,c);bb=(b,c);g[a].append(bb)
        if not Directed:g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'
    
    mp=[boundary]*(w+2);found={}
    for i in R(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[boundary]+[mp_def[j] for j in s]+[boundary]
    mp+=[boundary]*(w+2)
    return h+2,w+2,mp,found
def TI(n):return GI(n,n-1)
def accum(ls):
    rt=[0]
    for i in ls:rt+=[rt[-1]+i]
    return rt
def bit_combination(n,base=2):
    rt=[]
    for tb in R(base**n):s=[tb//(base**bt)%base for bt in R(n)];rt+=[s]
    return rt
def gcd(x,y):
    if y==0:return x
    if x%y==0:return y
    while x%y!=0:x,y=y,x%y
    return y
def YN(x):print(['NO','YES'][x])
def Yn(x):print(['No','Yes'][x])
def show(*inp,end='\n'):
    if show_flg:print(*inp,end=end)

mo=10**9+7

inf=float('inf')
FourNb=[(-1,0),(1,0),(0,1),(0,-1)];EightNb=[(-1,0),(1,0),(0,1),(0,-1),(1,1),(-1,-1),(1,-1),(-1,1)];compas=dict(zip('WENS',FourNb));cursol=dict(zip('LRUD',FourNb))
l_alp=string.ascii_lowercase

read=sys.stdin.buffer.read;readline=sys.stdin.buffer.readline;input=lambda:sys.stdin.readline().rstrip()


class Comb:
    def __init__(self,n,mo=10**9+7):
        self.fac=[0]*(n+1)
        self.inv=[1]*(n+1)
        self.fac[0]=1
        self.fact(n)
        for i in range(1,n+1):
            self.fac[i]=i*self.fac[i-1]%mo
            self.inv[n]*=i
            self.inv[n]%=mo
        self.inv[n]=pow(self.inv[n],mo-2,mo)
        for i in range(1,n):
            self.inv[n-i]=self.inv[n-i+1]*(n-i+1)%mo
        return
    
    def fact(self,n):
        return self.fac[n]
        
    def invf(self,n):
        return self.inv[n]

    def comb(self,x,y):
        if y<0 or y>x:
            return 0
        return self.fac[x]*self.inv[x-y]*self.inv[y]%mo

show_flg=False
show_flg=True

ans=-inf

a,b,c,d=LI()

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

print(ans)

Solution (Python):
import itertools
import functools
import math
from collections import Counter
from itertools import combinations
import re

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

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

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

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

Solution (Python):
def cal(a,b,c,d):
    list = []
    list.append(a*c)
    list.append(b*c)
    list.append(a*d)
    list.append(b*d)
    new_list = sorted(list, reverse=True)
    print(new_list[0])

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

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

Solution (Python):
l = list(map(int, input().split()))
a = l[:2]
c = l[2:]
ans = -float('INF')
for i in a:
  for j in c:
    ans = max(ans, i*j)
print(ans)