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

print (max(min))

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

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

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

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

print(max(ans1,ans2,ans3,ans4))

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

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

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

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

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

Solution (Python):

import sys

if __name__ == '__main__':
    
    
    
    
    aList = list(map(int, input().split()))     
    
    

    
    x = 5
    
    
    
    
    

    
    
    
    
    

    
    a = aList[0]
    b = aList[1]
    c = aList[2]
    d = aList[3]
    m = max(a*c, a*d, b*c, b*d)

    
    print("{}".format(m))

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

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

Solution (Python):
import os
import sys
import math
import heapq
from decimal import *
from io import BytesIO, IOBase
from collections import defaultdict, deque

def r():
    return int(input())
def rm():
    return map(int,input().split())
def rl():
    return list(map(int,input().split()))


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

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

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

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

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

aa = int(a)*int(c)
bb = int(a)*int(d)
cc = int(b)*int(c)
dd = int(b)*int(d)

li = [aa,bb,cc,dd]

print(max(li))

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

Solution (Python):

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

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

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

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

ans = []
for x in range(2):
	for y in range(2,4):
		ans.append(nums[x]*nums[y])	 
print(max(ans))

Solution (Python):
a, b, c, d = map(int, input().split())
L = [a*c, a*d, b*c, b*d]
ans = max(L)
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():
    _in = [_.rstrip() for _ in stdin.readlines()]
    a, b, c, d = list(map(int, _in[0].split(' ')))  
    
    ans = -float('inf')
    for _ in [a * c, a * d, b * c, b * d]:
        ans = max(ans, _)
    
    print(ans)


if __name__ == "__main__":
    main()

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

val1 = a*c
val2 = a*d
val3 = b*c
val4 = b*d
print(max(val1,val2,val3,val4))

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

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

Solution (Python):
def main():
    lis = list(map(int, input().split()))
    ans = lis[0] * lis[2]
    a, b = lis[0:2], lis[2:4]
    for i in a:
        for j in b:
            if i * j > ans:
                ans = i * j
                
    print(ans)
    
    
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(max(a*c, a*d), max(b*c, b*d)))

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

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

ans = -10**18+1
for i in [a,b]:
  for j in [c,d]:
    if ans < i*j: ans = i*j
print(ans)

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

Solution (Python):
a = list(map(int,input().split()))
x = []
for i in range(2):
  for j in range(2,4):
    x.append(a[i]*a[j])

print(max(x))

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

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

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

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

Solution (Python):
'''
Created on 2020/09/14

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  a,b,c,d=map(int,pin().split())
  print(max(a*c,a*d,b*c,b*d))
  return
main()

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

x_li = [a, b]
y_li = [c, d]

my_list = []

for x in x_li:
    for y in y_li:
        my_list.append(x * y)
        
print(max(my_list))

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()))
r = []
for i in range(0, 2, 1):
  for j in range(2, 4, 1):
    r.append(l[i] * l[j])

print(max(r))

Solution (Python):
a,b,c,d = (int(x) for x 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):
from sys import stdin, setrecursionlimit

setrecursionlimit(10 ** 7)

from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
from collections import deque, defaultdict, Counter
from itertools import combinations, permutations, combinations_with_replacement
from itertools import accumulate
from math import ceil, sqrt, pi, radians, sin, cos

MOD = 10 ** 9 + 7
INF = 10 ** 18

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

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

Solution (Python):
import sys
INF = float('inf')
a,b,c,d = map(int, sys.stdin.readline().rstrip("\n").split())
l = [a,b]
r = [c,d]
ans = -INF
for ln in l:
    for rn in r:
        ans = max(ans,ln*rn)
print(ans)

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


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


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 itertools

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

ans = - float('inf')
for x, y in itertools.product(ab,cd):
  ans = max(ans, x*y)
  
print(ans)

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
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):
import itertools

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

if a<=0 and 0<=b:ab.append(0)
if c<=0 and 0<=d:cd.append(0)

ans = - float('inf')
for x, y in itertools.product(ab,cd):
  ans = max(ans, x*y)
  
print(ans)

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

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

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

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

print(res)

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

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

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

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

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

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

ans = -float('inf')
for i in a:
  for j in b:
    ans = max(ans, i * j)
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):

def main():
    A, B, C, D = map(int, input().split())
    res = max(A * C, A * D, B * C, B * D)
    print(res)


if __name__ == "__main__":
    main()

Solution (Python):
a, b, c, d = 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
input = sys.stdin.readline

def main():
    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,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):

from sys import stdin, stdout



def input():
	a = stdin.readline()
	if a[-1] == "\n": a = a[:-1]
	return a
def print(*argv, end="\n", sep=" "):
	n = len(argv)
	for i in range(n):
		if i == n-1: stdout.write(str(argv[i]))
		else: stdout.write(str(argv[i]) + sep)
	stdout.write(end)

mod = 10**9+7
def lcm(x, y): return (x * y) / (gcd(x, y))
def fact(x, mod=mod):
	ans = 1
	for i in range(1, x+1): ans = (ans * i) % mod
	return ans
def arr2D(n, m, default=0):
	lst = []
	for i in range(n): temp = [default] * m; lst.append(temp)
	return lst
def sortDictV(x): return {k: v for k, v in sorted(x.items(), key = lambda item : item[1])}

def solve(a, b, c, d):
	return max([a*c, a*d, b*c, b*d])

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

Solution (Python):
import sys,math
try:sys.stdin,sys.stdout=open('input.txt','r'),open('out.txt','w')
except:pass
from sys import stdin,stdout;mod=int(1e9 + 7);from statistics import mode
from collections import *;from math import ceil,floor,inf,factorial,gcd,log2,sqrt,log
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()


def lcm(a,b): return (a*b)//gcd(a,b)
def setbits(n):return bin(n).count('1')
def resetbits(n):return bin(n).count('0')
def modinv(n,p):return pow(n,p-2,p)
def ncr(n,r):
    num,den=1,1;r=min(n,n-r)
    for i in range(r):num*=(n-i);den*=(i+1)
    return num//den
def ncr_p(n, r, p):
    num,den=1,1;r=min(r,n-r)
    for i in range(r):num = (num * (n - i)) % p ;den = (den * (i + 1)) % p
    return (num * modinv(den,p)) % p
def isPrime(num) :
    if num<=1:return False
    if num==2 or n==3:return True
    if (num % 2 == 0 or num % 3 == 0) :return False
    m = int(num**0.5)+1
    for i in range(5,m,6):
        if (num % i == 0 or num % (i + 2) == 0) :return False
    return True
def bin_search(s, low, high, val):
    while low <= high:
        mid = low + (high - low) // 2;
        if s[mid] == val:return mid
        elif s[mid] < val:low = mid + 1
        else:high = mid - 1
    return -1
def sumofdigit(num):
    count=0;
    while num : count+=num % 10;num //= 10;
    return count;
def inputmatrix():
    r,c=iia();mat=[0]*r;
    for i in range(r):mat[i]=iia();
    return r,c,mat;
def prefix_sum(n,s):
    for i in range(1,n):s[i]+=s[i-1]
    return s;
def binomial(n, k):
    if 0 <= k <= n:
        ntok = 1;ktok = 1
        for t in range(1, min(k, n - k) + 1):ntok *= n;ktok *= t;n -= 1
        return ntok // ktok
    else:return 0
def divisors(n):
    res = [];
    for i in range(1,ceil(sqrt(n))+1):
        if n%i == 0:
            if i==n//i:res.append(i)
            else:res.append(i);res.append(n//i)
    return res;


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

Solution (Python):
from itertools import product
a, b, c, d = map(int, input().split())
print(max(v[0] * v[1] for v in product((a, b), (c, d))))

Solution (Python):

import os
import sys
from math import *
from collections import *


from bisect import *
from io import BytesIO, IOBase
def vsInput():
    sys.stdin = open('input.txt', 'r')
    sys.stdout = open('output.txt', 'w')
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")
ALPHA='abcdefghijklmnopqrstuvwxyz'
M=10**9+7
EPS=1e-6
def value():return tuple(map(int,input().split()))
def array():return [int(i) for i in input().split()]
def Int():return int(input())
def Str():return input()
def arrayS():return [i for i in input().split()]






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

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


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

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

Solution (Python):
l = list(map(int,input().split()))
mx = float('-inf')

for i in range(2):
  for j in range(2,4):
    mx = max(mx,l[i]*l[j])
print(mx)

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

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

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

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

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

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

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

ans = -float("INF")  

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

print(ans)

Solution (Python):
def ri():
    return int(input())


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


def solve(*args):
    a, b, c, d = args
    return max(a * c, a * d, b * c, b * d)


if __name__ == "__main__":
    print(solve(*rii()))

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

  max1 = max(a[0], a[1])
  min1 = min(a[0], a[1])
  max2 = max(a[2], a[3])
  min2 = min(a[2], a[3])
  result = [max1 * max2, max1 * min2, min1 * max2, min1 * min2]

  return max(result)

if __name__ == '__main__':
  print(a())

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

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

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[1]*A[2])
b.append(A[0]*A[3])
b.append(A[1]*A[3])

print(max(b))

Solution (Python):
FAST_IO = 0
if FAST_IO:
    import io, sys, atexit
    rr = iter(sys.stdin.read().splitlines()).next
    sys.stdout = _OUTPUT_BUFFER = io.BytesIO()

    @atexit.register
    def write():
        sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
else:
    rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())
rrmm = lambda n: [rrm() for _ in xrange(n)]


MOD = 10**9 + 7
YES, NO, IMP = "YES", "NO", "IMPOSSIBLE"
from collections import defaultdict as ddic

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

Solution (Python):

z = list(map(int, input().split(" ")))
maxnum = z[0]*z[2]
for i in range(2):
    for j in range(2):
        x = z[i]
        y = z[j+2]
        prod = x*y
        
        if prod > maxnum:
            maxnum = prod
print(maxnum)

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

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

print(mx)

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

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

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

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

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

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

Solution (Python):
def l_in(type_): return list(map(type_, input().split()))
def i_in(): return int(input())
def m_in(type_): return map(type_, input().split())
def r_in(n, type_): return [type_(input()) for _ in range(n)]
ans = None

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

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

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

Solution (Python):
'''
Problem Link - https://atcoder.jp/contests/abc178/tasks/abc178_b
'''
from sys import stdin,stdout
from math import *
from collections import *

mod = 1000000007

def gcd(a,b):
	while b:
		a,b = b,a%b
	return a

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

def set_bits(X):
	c = 0
	while X:
		X &= (X-1);c += 1
	return c

def compute_MOD(N,M): return (N%M + M) % M

def get_array(): return list(map(int, stdin.readline().split()))
 
def get_ints(): return map(int, stdin.readline().split())

def get_int(): return int(stdin.readline())

def get_input(): return stdin.readline().strip()

def main():
	a,b,c,d = get_ints()
	stdout.write(str(max(a*c,a*d,b*c,b*d))+'\n')

if __name__ == "__main__":
    main()

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

def i_input(): return int(readline().rstrip())
def i_map(): return map(int, readline().rstrip().split())
def i_list(): return list(i_map())

def main():
    A, B, C, D = i_map()
    print(max([A * C, A * D, B * C, B * D]))

if __name__ == "__main__":
    main()

Solution (Python):
def main() -> None:
    a, b, c, d = map(lambda x: int(x), 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())
maxxy=max(a*c,a*d,b*c,b*d)
print(maxxy)

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

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

X = [ac,ad,bc,bd]

print(max(X))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import math as mt
import sys, string
from collections import Counter, defaultdict
input = sys.stdin.readline


I = lambda : int(input())
M = lambda : map(int, input().split())
ARR = lambda: list(map(int, input().split()))

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

Solution (Python):



"""






















using namespace std;

using int64 = long long;




int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);

  int64 a, b, c, d; cin >> a >> b >> c >> d;
  cout << max({a * c, a * d, b * c, b * d}) << endl;

  return 0;
}

"""

import base64
import subprocess
import zlib


exe_bin = "c$~die{5UD9Y5P~;<Sn5h89B0R<ER5QWO)nX>iwd

open("./kyomu", 'wb').write(zlib.decompress(base64.b85decode(exe_bin)))
subprocess.run(["chmod +x ./kyomu"], shell=True)
subprocess.run(["./kyomu"], shell=True)

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

Solution (Python):
import sys
import itertools
sys.setrecursionlimit(10000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy

if __name__ == "__main__":
    a,b,c,d = map(int,input().split())
    e = a*c
    f = a*d
    g = b*c
    h = b*d
    ans = max(e,f)
    ans = max(ans,g)
    ans = max(ans,h)
    print(ans)

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

Solution (Python):


def main():
    a, b ,c, d = map( int, input().split())
    A = [a*c, a*d, b*c, b*d]
    if a < b:
        A.append((a+1)*c)
        A.append((b-1)*c)
        A.append((a+1)*d)
        A.append((b-1)*d)

    if c < d:
        A.append(a*(c+1))
        A.append(a*(d-1))
        A.append(b*(c+1))
        A.append(b*(d-1))

    if a < b and c < d:
        A.append((a+1)*(c+1))
        A.append((a+1)*(d-1))
        A.append((b-1)*(c+1))
        A.append((b-1)*(d-1))

    print(max(A))
        
            


if __name__ == '__main__':
    main()

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

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

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 ** 19
for p in x:
    for q in y:
        ans = max(ans, p * q)

print(ans)

Solution (Python):
import sys

input=sys.stdin.buffer.readline





def RD(): return sys.stdin.read()


def II(): return int(input())


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


def MF(): return map(float,input().split())


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


def LF(): return list(map(float,input().split()))


def TI(): return tuple(map(int,input().split()))





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

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

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

Solution (Python):
def resolve():
    a, b, c, d = list(map(int, input().split()))
    ans = - 10 ** 19

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

    print(ans)

resolve()

Solution (Python):

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

    res1 = a * c
    res2 = a * d
    res3 = b * c
    res4 = b * d

    print(max(res1, res2, res3, res4))


if __name__ == "__main__":
    resolve()

Solution (Python):

a, b, c, d = list(map(int, input().split(" ")))
numlist = [a*c, a*d, b*c, b*d]
maxnum = max(numlist)
print(maxnum)

Solution (Python):
import sys
INF = 1 << 60
MOD = 10**9 + 7 
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    a, b, c, d = map(int, input().split())
    print(max(a * c, a * d, b * c, b * d))
resolve()

Solution (Python):
a,b,c,d = map(int,input().split())
A = set()
B = set()
A.add(a)
A.add(b)
B.add(c)
B.add(d)
for i in {-1,0,1}:
    A.add(i)
    B.add(i)

o = set()
for j in A:
    for k in B:
        if a <= j <= b and c <= k <= d:
            o.add(j*k)
print(max(o))

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

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