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):
def resolve():
    '''
    code here
    '''
    a, b, c, d = [int(item) for item in input().split()]

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


if __name__ == "__main__":
    resolve()

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

ans_l = [0]*4
ans_l[0] = a*c
ans_l[1] = a*d
ans_l[2] = b*c
ans_l[3] = b*d
print(max(ans_l))

Solution (Python):
int_a, int_b, int_c, int_d = map(int, input().split())



max = int_a*int_c
for i in [int_a, int_b]:
  for j in [int_c, int_d]:
    if max < i*j:
      max = i*j
      
print(max)

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

ans_1 = a * c
ans_2 = a * d
ans_3 = b * c
ans_4 = b * d

print(max(ans_1,ans_2,ans_3,ans_4))

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 IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))

def main():
    a,b,c,d = MII()
    print(max(a*c, a*d, b*c, b*d))

if __name__ == '__main__':
    main()

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

Solution (Python):
a,b,c,d=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 = list(map(int,input().split()))
x1 = a*c
x2 = b*d
x3 = a*d
x4 = b*c
l = [x1,x2,x3,x4]
print(max(l))

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

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

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

AC = a * c
AD = a * d
BC = b * c
BD = b * d

l = [AC, AD, BC, BD]
print(max(l))

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

m = -999999999999999999

ac = a * c
if ac >= m:
  m = ac

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

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

bd = b * d
if bd >= m:
  m = bd

print(m)

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

list1 = []

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

print(max(list1))

Solution (Python):
import sys
import itertools

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

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


print(max(s,d))

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

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

if a <= 0 <= b:
    l.append(c*0)
    l.append(d*0)
if c <= 0 <= d:
    l.append(a*0)
    l.append(b*0)
print(max(l))

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

Solution (Python):
import sys
import numpy as np
import math  
from collections import deque
from collections import defaultdict
from copy import deepcopy
from itertools import accumulate 
import bisect 
def input(): return sys.stdin.readline().rstrip()
from functools import lru_cache 
mod = 10**9 + 7
INF = 10**9 + 7

def main():
    a,b,c,d = list(map(int,input().split()))
    print(max(a*c, a*d, b*c, b*d))
    return 0

if __name__ == "__main__":
    main()

Solution (Python):


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

print("{}".format(max(a*c,a*d,b*c,b*d)))

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

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

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

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

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

a=int(a)
b=int(b)
c=int(c)
d=int(d)

X1 = min(a,b) * min(c,d)
X2 = min(a,b) * max(c,d)
X3 = max(a,b) * min(c,d)
X4 = max(a,b) * max(c,d)

print(max(X1,X2,X3,X4))

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

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

print(max(l))

Solution (Python):
import sys
import math
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
a,b,c,d=get_ints()
ans=[]
x=a*c
y=a*d
z=b*c
w=b*d
ans.extend(list([x,y,z,w]))
print(max(ans))

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

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

ans = max(x1, x2, x3, x4)

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

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

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


    
if '__main__' == __name__:
    resolve()

Solution (Python):
mod = 1000000007
eps = 10**-9


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

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


if __name__ == '__main__':
    main()

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

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

    if a < 0 and b > 0:
        x = [0, a, b]
    else:
        x = [a, b]
    if c < 0 and d > 0:
        y = [0, c, d]
    else:
        y = [c, d]

    tmp = x[0] * y[0]
    for xx in x:
        for yy in y:
            if tmp < xx * yy:
                tmp = xx * yy

    return tmp


if __name__ == "__main__":
    a, b, c, d = map(int, input().split())
    print(solve(a, b, c, 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())
x1=a*c
x2=a*d
x3=b*c
x4=b*d
lst=[]
lst.append(x2)
lst.append(x3)
lst.append(x4)
lst.append(x1)
lst.sort()
print(lst[-1])

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

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

AC = A * C
AD = A * D
BC = B * C
BD = B * D

Ans = AC

if AD > Ans:
  Ans = AD
if BC > Ans:
  Ans = BC
if BD > Ans:
  Ans = BD

print(Ans)

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

t1 = d * b

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

print(t1)

Solution (Python):
import sys

sys.setrecursionlimit(10**6)
int1 = lambda x: int(x)-1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

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

Solution (Python):
import sys



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

Solution (Python):
import sys

a, b, c, d = map(int, sys.stdin.readline().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):
def ri():
    return int(input())


def rii():
    return [int(v) for v in input().split()]


a, b, c, d = rii()
m = max(a * c, a * d, b * c, b * d)
print(m)

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

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

def maxp():
  xy=[a*c,a*d,b*c,b*d]
  return max(xy)

print(maxp())

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

Solution (Python):
a, b, c, d = map(int, input().split(' '))
result = [a * c, a * d, b * c, b * d]
result.sort()
print(result[-1])

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

input = sys.stdin.readline


arr = list(map(int, input().split()))
ans = []
ans.append(arr[0]*arr[2])
ans.append(arr[0]*arr[3])
ans.append(arr[1]*arr[2])
ans.append(arr[1]*arr[3])


print(max(ans))

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

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

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

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

Solution (Python):
a, b, c, d = map(int, input().split())
if a<=0 and b>=0:
    xlist = [a,0,b]
else:
    xlist = [a,b]
if c<=0 and d>=0:
    ylist = [c,0,d]
else:
    ylist = [c,d]

ans = -1001001001001001001
for x in xlist:
    for y in ylist:
        ans = max(ans, x*y)
print(ans)

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

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

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

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

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

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

print(max(e,f,g,h))

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

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

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




if __name__ == '__main__':
    main()

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

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

print(max(nums))

Solution (Python):


import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        for line in sys.stdin:
            lines.append(line.strip())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (a, b, c, d) = [int(e) for e in lines[0].split(" ")]

    return (a, b, c, d)


def solve(a, b, c, d):

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

    return result


def main():
    
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Solution (Python):
import math
def solve():
	arr = [int(x) for x in input().split()]
	a = arr[0]
	b = arr[1]
	c = arr[2]
	d = arr[3]
	arr2 = [a*c,a*d,b*c,b*d];
	print(max(arr2));

solve()

Solution (Python):
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import bisect_right
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")

INF = float("inf")


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

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

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

num_list = []

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

print(max(num_list))

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


if __name__ == '__main__':
    main()

Solution (Python):


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


if __name__ == "__main__":
    main()

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()]
mn1=a
mx1=b
mn2=c
mx2=d
prod=a*c
prod=max(prod,b*d)
prod=max(prod,a*d)
prod=max(prod,b*c)
if(a<=0 and b>=0):
    prod=max(prod,0)
if(c<=0 and d>=0):
    prod=max(prod,0)
print(prod)

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

Solution (Python):
import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c for j in range(b)] for i in range(a)]
def list3d(a, b, c, d): return [[[d for k in range(c)] for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e for l in range(d)] for k in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10**9)
INF = 10**19
MOD = 10**9 + 7
EPS = 10**-10

a, b, c, d = MAP()

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

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

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

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

print(ans)

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

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

print(ans)

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

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

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

product = a * c

if (product < a * d):
    product = a * d
if (product < b * c):
    product = b * c
if (product < b * d):
    product = b * d

print(product)

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

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

x = max(a * c, a * d)
y = max(b * c, b * d)
z = max(x, y)

print(z)

Solution (Python):


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

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

print(max(A))

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

Solution (Python):
i1=lambda : input()
i2=lambda : int(input())
i3=lambda : map(int,input().split())
i4=lambda n : [list(map(int,input().split()) for _ in range(n))]

A,B,C,D=i3()

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

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

print(max(A))

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

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

Solution (Python):
l=list(map(int,input().split()))
lans=[]
for i in range(0,2):
  for j in range(2,4):
    lans.append(l[i]*l[j])
print(max(lans))

Solution (Python):

import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect
import copy
import math
from itertools import accumulate
sys.setrecursionlimit(10**6)




def floor(a, b): return -(-a // b)


def zz(): return list(map(int, sys.stdin.readline().split()))


def z(): return int(sys.stdin.readline())


def S(): return sys.stdin.readline()[:-1]


def C(line): return [sys.stdin.readline() for _ in range(line)]


a, b, c, d = zz()

a1 = a * c
a2 = a * d
a3 = b * c
a4 = b * d
if (a <= 0 <= b):
    a5 = 0
else:
    a5 = a4
if (c <= 0 <= d):
    a6 = 0
else:
    a6 = a4
print(max(a1, a2, a3, a4, a5, a6))

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

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

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

print(max(prod))

Solution (Python):



def solve(*args: str) -> str:
    a, b, c, d = map(int, args[0].split())

    return str(max(a*c, a*d, b*c, b*d))


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

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

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

M = -(10 ** 20)

for i in range(2):
    for j in range(2, 4):
        m = l[i] * l[j]
        if M < m:
            M = m

print(M)

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

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

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

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

print(ans)

Solution (Python):
import itertools

a, b, c, d = map(int, input().split())
print(max(x*y for x, y in itertools.product([a, b], [c, d])))

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

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

print(max(list))

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

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

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

print(max(data))

Solution (Python):



import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
input = sys.stdin.readline




a, b, c, d = list(map(int, input().split()))
if (a <= 0 and b >= 0) or (c<=0 and d>=0):
    zero = True
else:
    zero = False

if zero:
    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())
val1 = a * c
val2 = b * c
val3 = a * d
val4 = b * d
print(max(val1, val2, val3, val4))

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

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

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

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

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

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

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

ans = 10**100
ans = ans * -1    

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

print(ans)

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

print(max(b*d,a*c,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()))
B = []
B.append(A[0]*A[2])
B.append(A[0]*A[3])
B.append(A[1]*A[2])
B.append(A[1]*A[3])
print(max(B))

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())
a1 = a*c
a2 = b*d
a3 = a*d
a4 = b*c

print(max(a1,a2,a3,a4))

Solution (Python):

import sys,math,collections,itertools
input = sys.stdin.readline

a,b,c,d=list(map(int,input().split()))
A = [a,b]
C = [c,d]
ans = -1*float('inf')
for ta in A:
    for tc in C:
        ans = max(ta*tc,ans)
print(ans)

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

Solution (Python):
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    A, B, C, D = map(int, input().split())
    ans = max(A * C, A * D, B * C, B * D)
    print(ans)


main()

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

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

Solution (Python):

def input_int():
    return(int(input()))

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

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

def run():
    a, b, c, d = input_int_map()

    reuslt = max(a * c, a * d, b * c, b * d)
    print(reuslt)
run()

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

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

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

Solution (Python):




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




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

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

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

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

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

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

Solution (Python):
from collections import defaultdict
from collections import deque
from collections import Counter
import math
import itertools

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()

a,b,c,d = readInts()

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, 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(x) for x in input().strip().split()]

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

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()

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

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

Solution (Python):


a,b,c,d = list(map(int, input().split()))
 
max_value = max([a*c,a*d,b*c,b*d])

print(max_value)

Solution (Python):








import math,sys

a,b,c,d = map(int,sys.stdin.readline().split())
print(max([a*c,a*d,b*c,b*d]))

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

Solution (Python):

a,b,c,d = list(map(int, input().split()))
e = a*c
f = a*d
g = b*c
h = b*d
ans=[e,f,g,h]
print(max(ans))

Solution (Python):
import sys

def resolve(in_):
    a, b, c, d = map(int, next(in_).split())
    return max(a * c, b * d, b * c, a * d)
    

def main():
    answer = resolve(sys.stdin.buffer)
    print(answer)


if __name__ == '__main__':
    main()

Solution (Python):
from sys import stdin
from sys import setrecursionlimit
setrecursionlimit(10 ** 7)

a,b,c,d = map(int,stdin.readline().rstrip().split())

ma = -10**18

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

print(ma)

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

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

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

score_list = []

for x in (a,b):
    for y in (c,d):
        score = x * y
        score_list.append(score)

print(max(score_list))

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

result = -1e21

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

print(result)

Solution (Python):
import sys












stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

def solve():
    
    a,b,c,d = map(int, stdin.readline().rstrip().split())
    
    
    
    
    
    A = a * c
    B = b * d
    C = a * d
    D = b * c
    print(max(A,B,C,D))


if __name__ == '__main__':
    solve()

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 sys, os, math, bisect, itertools, collections, heapq, queue, copy, array





sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
INF = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()

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