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

A = []
A.append(a*c)
A.append(a*d)
A.append(b*c)
A.append(b*d)

M = max(A)

print(M)

Solution (Python):



def main():
    a, b, c, d = map(int, input().split())
    stdOut = solve(a, b, c, d)
    print(stdOut)


"""
方針


"""


def solve(a, b, c, d):
    ac = a * c
    ad = a * d
    bc = b * c
    bd = b * d
    l = [ac, ad, bc, bd]
    m = max(l)
    return m


if __name__ == "__main__":
    main()

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

if __name__ == "__main__":
    main()

Solution (Python):
def main():
    a, b, c, d = (int(i) for i in input().split())
    ans = max(a * c, b * d, a * d, b * c)
    if ans < 0 and (a <= 0 <= b or c <= 0 <= d):
        ans = 0
    print(ans)


if __name__ == '__main__':
    main()

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

list1 = [a, b]
list2 = [c, d]

max = list1[0] * list2[0]

for n1 in list1:
  for n2 in list2:
    if max < (n1 * n2):
      max = n1 * n2

print(max)

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

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

import sys
import math 
input = sys.stdin.readline  
a,b,c,d = map(int, input().split())
ans =0
if 0 <= a and 0 <= c:
    ans =b*d
elif b <=0  and d <=0 :
    ans =a*c
else:
    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 = b*d

if ans<a*c:
    ans = a*c

if ans<a*d:
    ans = a*d

if ans<b*c:
    ans = b*c

print(ans)

Solution (Python):
min_x, max_x, min_y, max_y = map(int, input().split())

print(max(min_x * min_y, max_x * max_y, min_x * max_y, max_x * min_y))

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

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

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

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

a, b, c, d = cin()
ans1 = a * c
ans2 = a * d
ans3 = b * c
ans4 = b * d
ans = max(ans1, ans2, ans3, ans4)
if((a <= 0 and b >= 0) or (c <= 0 and 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())
ans = max(a*c, a*d, b*c, b*d)
print(ans)

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

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

Solution (Python):
import sys,math,collections
from collections import defaultdict


    
def file():
    sys.stdin = open('input.py', 'r')
    sys.stdout = open('output.py', 'w') 
def get_array():
    l=list(map(int, input().split()))
    return l
def get_ints():   
    return map(int, input().split())
    
def get_3_ints():   
    a,b,c=map(int, input().split())
    return a,b,c    
def sod(n):
    n,c=str(n),0
    for i in n: 
        c+=int(i)
    return c    
def isPrime(n):
    if (n <= 1):
        return False
    if (n <= 3):
        return True
    if (n % 2 == 0 or n % 3 == 0):
        return False
    i = 5
    while(i * i <= n):
        if (n % i == 0 or n % (i + 2) == 0):
            return False
        i = i + 6
  
    return True
def getFloor(A, x):

    (left, right) = (0, len(A) - 1)

    floor = -1
    while left <= right:
        mid = (left + right) // 2
        if A[mid] == x:
            return A[mid]
        elif x < A[mid]:
            right = mid - 1
        else:
            floor = A[mid]
            left = mid + 1
            
    return floor
def chk(aa,bb):
	f=0
	for i in aa:
		for j in bb:
			if(j[0]>=i[0] and j[1]<=i[1]):
				f+=1
			elif(j[0]<=i[0] and j[1]>=i[1]):	
				f+=1
			elif(i[0]==j[1] or i[1]==j[0]):
				f+=1
			else:
				continue
	return f			


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

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

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

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

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

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

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

hantei = [ac, ad, bc, bd]

print(max(hantei))

Solution (Python):
x = list(map(int, input().split()))
print(max(x[0]*x[2], x[0]*x[3], x[1]*x[2], x[1]*x[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())

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

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

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

print(r)

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

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

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

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

Solution (Python):
import sys
from collections import deque
from functools import lru_cache
import bisect
import copy
import heapq
import itertools
import math
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
mod = 10 ** 9 + 7

def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(): return list(read_values())
def read_lists(N): return [read_list() for n in range(N)]


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


if __name__ == "__main__":
    main()

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

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

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

if __name__ == '__main__':
    main()

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

Solution (Python):
n = list(map(int, input().split()))
n_max = n[0] * n[2]
for i in range(0, 2):
    for j in range(2, 4):
        if n_max < n[i] * n[j]:
            n_max = n[i] * n[j]
print(n_max)

Solution (Python):
"""
    こんにちは。これはクシャルです
    
    Author : thekushalghosh (クシャル)
    Team   : CodeDiggers
 
    I prefer Python language over the C++ language :p :D
        
    Visit my website : thekushalghosh.github.io
"""
import sys,math,cmath,time
start_time = time.time()


    
def solve():
    a,b,c,d = invr()
    print(max(a * c,b * d,a * d,b * c))
    


 
def main():
    global tt
    if not ONLINE_JUDGE:
        sys.stdin = open("input.txt","r")
        sys.stdout = open("output.txt","w")
    t = 1
    for tt in range(t):
        solve()
    if not ONLINE_JUDGE:
        print("Time Elapsed :",time.time() - start_time,"seconds")
        sys.stdout.close()
    

def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    return(input().strip())
def invr():
    return(map(int,input().split()))
 

def counter(a):
    q = [0] * max(a)
    for i in range(len(a)):
        q[a[i] - 1] = q[a[i] - 1] + 1
    return(q)

def counter_elements(a):
    q = dict()
    for i in range(len(a)):
        if a[i] not in q:
            q[a[i]] = 0
        q[a[i]] = q[a[i]] + 1
    return(q)

def string_counter(a):
    q = [0] * 26
    for i in range(len(a)):
        q[ord(a[i]) - 97] = q[ord(a[i]) - 97],1
    return(q)
 
def factors(n):
    q = []
    for i in range(1,int(n ** 0.5) + 1):
        if n % i == 0: q.append(i); q.append(n // i)
    return(list(sorted(list(set(q)))))
 
def prime_factors(n):
    q = []
    while n % 2 == 0: q.append(2); n = n // 2
    for i in range(3,int(n ** 0.5) + 1,2):
        while n % i == 0: q.append(i); n = n // i
    if n > 2: q.append(n)
    return(list(sorted(q)))

def transpose(a):
    n,m = len(a),len(a[0])
    b = [[0] * n for i in range(m)]
    for i in range(m): 
        for j in range(n): 
            b[i][j] = a[j][i]
    return(b)


        
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
    input = sys.stdin.readline
main()

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

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

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

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


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    a, b, c, d = map(int, input().split())
    conds = [a*c, a*d, b*c, b*d]
    print(max(conds))
    
 
if __name__ == '__main__':
    main()

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

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

ans1 = A * C
ans2 = A * D
ans3 = B * C
ans4 = B * D


ans = max(ans1, ans2, ans3, ans4)
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())


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

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

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


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

print(max(ans))

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

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

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 = [int(x) for x in input().split()]

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

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

ans = -10 ** 20
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=list(map(int,input().split()))

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

print(m)

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

temp_1 = a * c
temp_2 = a * d
temp_3 = b * c
temp_4 = b * d

maxv = temp_1
if temp_2 > maxv:
    maxv = temp_2
if temp_3 > maxv:
    maxv = temp_3
if temp_4 > maxv:
    maxv = temp_4

print(maxv)

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

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

ans = [ans1, ans2, ans3, ans4]
ans.sort()
print(ans.pop())

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

a1 = a * c
a2 = a* d
a3 = b * c
a4 = b * d

maxa = max(a1, a2, a3, a4)

print(maxa)

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

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

ans = max(w, x, y, z)

print(ans)

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

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

a1 = a*c
a2 = a*d
a3 = b*c
a4 = b*d

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

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

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

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

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

print(max(ans))

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

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

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

Solution (Python):
from __future__ import print_function

from functools import reduce
from operator import mul
from collections import Counter
from collections import deque
from itertools import accumulate
from queue import Queue
from queue import PriorityQueue as pq
from heapq import heapreplace
from heapq import heapify
from heapq import heappushpop
from heapq import heappop
from heapq import heappush
import heapq
import time
import random
import bisect
import itertools
import collections
from fractions import Fraction
import fractions
import string
import math
import operator
import functools
import copy
import array
import re
import sys
sys.setrecursionlimit(500000)


input = sys.stdin.readline


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return


















def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom


mod = 1000000007


def combinations_count_mod(n, r):
    r = min(r, n - r)
    numer = reduce(lambda x, y: x * y % mod, range(n, n - r, -1), 1)
    denom = pow(reduce(lambda x, y: x * y % mod, range(1, r + 1), 1), mod - 2, mod)
    return numer * denom % mod


def solve():
    pass


def main():
    a, b, c, d = map(int, input().strip().split())
    ans=-1*sys.maxsize
    for x in [a, b]:
        for y in [c, d]:
            ans = max(ans, x * y)
    print(ans)


if __name__ == '__main__':
    main()

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

Solution (Python):
import itertools
a, b, c, d = (int(each) for each in 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):
import math
a, b, c, d = (int(x) for x in input().split())
print(max(a*c, a*d, b*c, b*d))

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

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

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

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())
max_prod = float('-inf')
for i in [a,b]:
    for j in [c,d]:
        max_prod = max(max_prod,i*j)
print(max_prod)

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

Solution (Python):
N=list(map(int,input().split()))
sai=-1*10**18
for i in range(2):
    for j in range(2):
        sai=max(sai,N[i]*N[j+2])
print(sai)

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 max_<i*j:
            max_ = i*j
print(max_)

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

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

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

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

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

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

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

ans=max(ac,ad)
num=max(bc,bd)
ans=max(ans,num)

print(ans)

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

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

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)
if a<=0<=b:
  l.append(0)
elif c<=0<=d:
  l.append(0)
print(max(l))

Solution (Python):

import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import lru_cache
import bisect
import re
import queue
import copy
import decimal


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [Scanner.string() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [Scanner.int() for i in range(n)]


def solve():
    a, b, c, d = Scanner.map_int()
    ans = max(a * c, a * d, b * c, b * d)
    if a <= 0 and 0 <= b:
        ans = max(ans, 0)
    if c <= 0 and 0 <= d:
        ans = max(ans, 0)
    print(ans)


def main():
    
    
    
    
    solve()


if __name__ == "__main__":
    main()

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

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

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

tmp=max(abcd)

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

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

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

a,b,c,d = (int(x) for x in input().rstrip('\n').split())
res = [a*c,b*d,b*c,d*a]
print(max(res))

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

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

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

Solution (Python):
a,b,c,d = map(int,input().split())
lsx = [a,b]
lsy = [c,d]
ans = -10**20
for x in lsx:
    for y in lsy:
        ans = max(ans,x*y)
print(ans)

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

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

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


print(max(ms))

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

ans = -10 ** 20
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())
A = [a,b]
B = [c,d]
min_l = (-1)*((10)**18)
for i in A:
  for j in B:
    min_l = max(i*j,min_l)
print(min_l)

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

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

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

Solution (Python):
a,b,c,d=map(int, input().split())
v1=a*c
v2=b*d
v3=a*d
v4=b*c
s=[v1,v2,v3,v4]
s.sort()
print(s[3])

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

Solution (Python):
import copy
import math
import time
import statistics
import math
import itertools
import bisect
import sys
from decimal import *
from collections import deque


def get_int():
    return int(input())

def get_string():
    return input()

def get_int_list():
    return [int(x) for x in input().split()]

def get_string_list():
    return input().split()

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

def get_string_char_list():
    return list(str(input()))



sys.setrecursionlimit(10 ** 6)

def main():
    start = time.time()

    a, b, c, d = get_int_multi()

    a1 = a * c
    a2 = a * d
    a3 = b * c
    a4 = b * d

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

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

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

list_ans = []
for D in itertools.product(A[:2], A[2:]):
    list_ans.append(D[0] * D[1])

print(max(list_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())
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())

res1 = a * c
res2 = a * d
res3 = b * c
res4 = b * d
ans = max(res1, res2, res3, res4)
print(ans)

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

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

Solution (Python):
import sys,collections,math,random,fractions,bisect;sys.setrecursionlimit(10**7)
sr = sys.stdin.readline; P = print; P2 = lambda x: print(*x, sep="\n")
def I(i=0): t = [int(x)-i for x in sr().split()];return t
def S(): t = sr().split(); return t if len(t) > 1 else t[0]
L1,L2,L3,L4, = [],[],[],[]
 
a,b,c,d = I()
mx = max(a*c,a*d,b*c,b*d)
print(mx)

Solution (Python):
import sys

def dump(x):
    print(x, file=sys.stderr)

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

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

ans = -(10**20)
for i in A:
    for j in C:
        ans = max(ans, i*j)

print(ans)

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

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

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

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

print(ans)

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

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

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

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

Solution (Python):
line = list(map(int,input().split()))
lin = []
ans1 = line[0]*line[3]
ans2 = line[0]*line[2]
ans3 = line[1]*line[3]
ans4 = line[1]*line[2]

lin.append(ans1)
lin.append(ans2)
lin.append(ans3)
lin.append(ans4)

print(max(lin))

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

Solution (Python):
import sys
from math import ceil as C, floor as F, sqrt, gcd as G
from collections import defaultdict as D, Counter as CNT
from functools import reduce as R
import heapq as HQ

class Heap:
  def __init__(self, data, reverse=False):
    self.reverse = -1 if reverse else 1
    self.data = [self.reverse * d for d in data]
    HQ.heapify(self.data)
  def push(self, x): return HQ.heappush(self.data, self.reverse * x)
  def pop(self): return self.reverse * HQ.heappop(self.data) 

ALP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
alp = 'abcdefghijklmnopqrstuvwxyz'
def _X(): return sys.stdin.readline().rstrip().split(' ')
def _S(ss): return tuple(ss) if len(ss) > 1 else ss[0]
def S(): return _S(_X())
def Ss(): return list(S())
def _I(ss): return tuple([int(s) for s in ss]) if isinstance(ss, tuple) else int(ss)
def I(): return _I(S())
def _Is(ss): return list(ss) if isinstance(ss, tuple) else [ss]
def Is(): return _Is(I())

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

Solution (Python):
a,b,c,d = map(int,input().split())
ans = a*c
for x in a,b:
  for y in c,d:
    if ans < x*y:
      ans = x*y
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())

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

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().rstrip().split(' '))
xx = [a, b]
yy = [c, d]
ans = []
for x in xx:
    for y in yy:
        ans.append(x * y)
print(max(ans))

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

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
from io import StringIO
import unittest

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

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """1 2 1 1"""
        output = """2"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """3 5 -4 -2"""
        output = """-6"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """-1000000000 0 -1000000000 0"""
        output = """1000000000000000000"""
        self.assertIO(input, output)


if __name__ == "__main__":
    resolve()

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

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

ac = a*c
ad = a * d
bc = b * c
bd = b * d
l = [ac, ad, bc, bd]
l.sort()
print(l[-1])

Solution (Python):
from sys  import stdin,stdout

st=lambda:list(stdin.readline().strip())
li=lambda:list(map(int,stdin.readline().split()))
mp=lambda:map(int,stdin.readline().split())
inp=lambda:int(stdin.readline())
pr=lambda n: stdout.write(str(n)+"\n")

mod=1000000007

def solve():
    a,b,c,d=mp()
    x=a*d
    y=a*c
    z=b*d
    p=b*c
    pr(max(x,y,z,p))
    


for _ in range(1):
    solve()

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

print(max(t))

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

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

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

print(max(max_list))

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

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

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

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

negneg = a * c
negpos = a * d
posneg = b * c
pospos = b * d

print(max([negneg,negpos,posneg,pospos]))

Solution (Python):
A, B, C, D = (int(i) for i in input().split())
print(max(A * C, A * D, B * C, B * D))

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

Solution (Python):
a,b,c,d=map(int,input().split())
X=[a,b]
Y=[c,d]
if a<=0<=b:
    X.append(0)
if c<=0<=d:
    Y.append(0)
ans=-10**30
for x in X:
    for y in Y:
        if ans<x*y:
            ans=x*y
print(ans)

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

Solution (Python):



a,b,c,d = map(int,input().split())
maxans = -10**18 - 1
maxans = max(a*c,maxans)
maxans = max(a*d,maxans)
maxans = max(b*c,maxans)
maxans = max(b*d,maxans)
print(maxans)

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.append(a*c)
A.append(b*c)
A.append(a*d)
A.append(b*d)

print(max(A))

Solution (Python):

import sys


def solve(a: int, b: int, c: int, d: int):
    print(max(
        max(a*c,a*d),
        max(b*c,b*d)
    ))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  
    b = int(next(tokens))  
    c = int(next(tokens))  
    d = int(next(tokens))  
    solve(a, b, c, d)

if __name__ == '__main__':
    main()

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

a,b,c,d=[int(e) for e in si().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, b, c, d = map(int, input().split())

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

print(ans)