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

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

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

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

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

print(max(mult_list))

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

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

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

Solution (Python):
import sys, re
import math
import numpy as np
from decimal import Decimal
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul	
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd	
from heapq import heappush, heappop

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.maxsize = 10 ** 15
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7



a,b,c,d = MAP()

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

if a1 >= a2:
    b1 = a1
else:
    b1 = a2

if a3 >= a4:
    b2 = a3
else:
    b2 = a4

if b1 >= b2:
    print(b1)
else:
    print(b2)

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

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


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

ans = max(x)

print(ans)

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

ans = []
ans += b*d,
ans += a*c,
ans += a*d,
ans += b*c,
if a <= 0 <= b or c <= 0 <= d:
    ans += 0,
print(max(ans))

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

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

print(sorted(j, reverse=True)[0])

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

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


ans = []
for i in range(0, 2):
    for j in range(2, 4):
        ans.append(L[i] * L[j])

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())
anslist = []

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

print(max(anslist))

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

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

max_num = num[0]

for i in range(4):
    if num[i] >= max_num:
        max_num = num[i]

print(max_num)

Solution (Python):
import math

inp = list(map(int, input().rstrip().split()))

xL = inp[:2]
yL = inp[2:]

_max = -1 * math.inf
for i in xL:
    for j in yL:
        if i * j > _max:
            _max = i * j

print(_max)

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

A = a*c
B = a*d
C = b*c
D = b*d

L = [A,B,C,D]

print(max(L))

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

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

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

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

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

Solution (Python):

import math

numList = []
result = []

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


numList.append(user2[0] * user2[2] )
numList.append(user2[0] * user2[3]) 
numList.append(user2[1] * user2[2]  )
numList.append (user2[1] * user2[3])

numList.sort()

print(numList[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())

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, b*d)
ans = max(ans, a*d)
ans = max(ans, b*d)
ans = max(ans, 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):
a = input().split(' ')
result = []
result.append(int(a[0]))
result.append(int(a[1]))
result.append(int(a[2]))
result.append(int(a[3]))
subresult = []
subresult.append(result[0]*result[2])
subresult.append(result[0]*result[3])
subresult.append(result[1]*result[2])
subresult.append(result[1]*result[3])
print(max(subresult))

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

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

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

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

x = [a,b]
y = [c,d]
n = []
n0 = a*c
n1 = b*d
n2 = b*c
n3 = a*d

n = max(n0, n1, n2, n3)

print(n)

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

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

Solution (Python):
import sys
import itertools as it

a, b, c, d = [int(a) for a in sys.stdin.readline().strip().split()]

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


ret = a * c
for x, y in it.product(l1, l2):
    ret2 = x * y
    if ret < ret2:
        ret = ret2
print(ret)

Solution (Python):
def resolve():
    from itertools import product
    a, b, c, d = map(int, input().split())
    m = - (10 ** 18)
    for c in product([a, b], [c, d]):
        m = max(m, c[0] * c[1])

    print(m)
    
resolve()

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):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy
 


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


   
if __name__ == "__main__":
    main()

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)

c = sorted(l)
print(c[3])

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

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

i = max(v, w)
j = max(x, y)

print(max(i, j))

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())
mi=a*c
mm=a*d
aa=b*c
ma=b*d
print(max(mi,ma,mm,aa))

Solution (Python):

import sys,math

def ii(): return int(input())
def mii(): return map(int,input().split())
def lmii(): return list(mii())


def main():
    a,b,c,d=mii()
    if a>b:
        a,b=b,a
    if c>d:
        c,d=d,c
    print(max(a*c,b*d,a*d,b*c))
if __name__=="__main__":
    main()

Solution (Python):
def main():
    from sys import stdin

    readline = stdin.readline

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

    l=list()

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

    print(max(l))

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

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

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())
s=[]
for x in (a,b):
    for y in (c,d):
        k=x*y
        s.append(k)
print(max(s))

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

n1= a*c
n2= a*d
n3= b*c
n4= b*d

print(max(n1,n2,n3,n4))

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

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

Solution (Python):
from sys import setrecursionlimit
from collections import Counter
from collections import defaultdict
from collections import deque
from heapq import heapify
from heapq import heappop
from heapq import heappush
from time import time
setrecursionlimit(10**9)
mod=10**9+7
inf=10**18

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

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

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

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

Solution (Python):
import math

a,b,c,d = map(int,input().split( ))
a,b,c,d = math.ceil(a),math.floor(b),math.ceil(c),math.floor(d)
print(max([a*c,a*d,b*c,b*d]))

Solution (Python):
from collections import Counter
from collections import deque
from sys import stdin
from bisect import *
from heapq import *
import math

g   = lambda : stdin.readline().strip()
gl  = lambda : g().split()
gil = lambda : [int(var) for var in gl()]
gfl = lambda : [float(var) for var in gl()]
gcl = lambda : list(g())
gbs = lambda : [int(var) for var in g()]
mod = int(1e9)+7
inf = float("inf")


a, b, c, d = gil()
ans = -inf
for i in [a, b]:
	for j in [c, d]:
		ans = max(ans, i*j)
        
if a <= 0<=b or c <= 0 <= d :
	ans = max(0, ans)
    
print(ans)

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

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

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



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

t = max([ac, ad, bc, bd])
print(t)

Solution (Python):
import sys
from heapq import heappush, heappop, heapify
import math
from math import gcd
import itertools as it
from collections import deque 

input = sys.stdin.readline

def inp():
    return int(input())
def inpl():
    return list(map(int, input().split()))
def dbg(o):
    print(o, file=sys.stderr)



a, b, c, d = inpl()
INF = 10**20

ls = []
ls.append(a*c)
ls.append(b*c)
ls.append(a*d)
ls.append(b*d)
mx = -INF
for i in ls:
    mx = max(mx, i)
print(mx)

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

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

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

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

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

print(max(ans))

Solution (Python):
import subprocess
import os
import time


import sys
import math
from copy import deepcopy
from collections import deque, defaultdict
from operator import mul
from functools import reduce
sys.setrecursionlimit(20000000)




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

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


if __name__ == '__main__':
    main()

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

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

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

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

print(ans)

Solution (Python):
hako=list(map(int,input().split()))
hk=[]
A=hako[0]*hako[2]
B=hako[0]*hako[3]
C=hako[1]*hako[2]
D=hako[1]*hako[3]
hk.append(A)
hk.append(B)
hk.append(C)
hk.append(D)
hk.sort()
print(hk.pop())

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

Solution (Python):
A = list(map(int, input().split()))
ans_1 = A[0]*A[2]
ans_2 = A[0]*A[3]
ans_3 = A[1]*A[2]
ans_4 = A[1]*A[3]
answers = [ans_1,ans_2,ans_3,ans_4]
print(max(answers))

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

Solution (Python):
""" B
"""
import sys
import math
from functools import reduce
from bisect import bisect_left

def readString():
    return sys.stdin.readline()

def readInteger():
    return int(readString())

def readStringSet(n):
    return sys.stdin.readline().split(" ")[:n]

def readIntegerSet(n):
    return list(map(int, readStringSet(n)))

def readIntegerMatrix(n, m):
    return [readIntegerSet(m) for _ in range(0, n)]

def main(_a, _b, _c, _d):
    return max([_a * _c, _a * _d, _b * _c, _b * _d])


if __name__ == "__main__":
    _a, _b, _c, _d = readIntegerSet(4)

    print(main(_a, _b, _c, _d))

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


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

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

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

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

Solution (Python):
import sys
from io import StringIO
import unittest
import os


sys.setrecursionlimit(999999999)



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

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

        if a <= 0 <= b or c <= 0 <= d:
            aaa.append(0)

        print(max(aaa))

    except IndexError as err:
        print("インデックスエラー:", err.args[0])



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

    def test_input_1(self):
        test_input = """1 2 1 1"""
        output = """2"""
        self.assertIO(test_input, output)

    def test_input_2(self):
        test_input = """3 5 -4 -2"""
        output = """-6"""
        self.assertIO(test_input, output)

    def test_input_3(self):
        test_input = """-1000000000 0 -1000000000 0"""
        output = """1000000000000000000"""
        self.assertIO(test_input, output)

    
    def test_original(self):
        pass



def list_to_tsv(target: [], limit_row: int = 0, limit_column: int = 0) -> str:
    
    if limit_row is not 0:
        target = target[:limit_row]
    if limit_column is not 0:
        target = [i[:limit_column] for i in target]

    
    target = [[cnt] + i for cnt, i in enumerate(target)]  
    target.insert(0, [i for i in range(len(target[0]))])  
    
    result = ""
    for a in target:
        result += '\t'.join(map(str, a)) + '\r\n'
    return result



if __name__ == "__main__":
    if os.environ.get("USERNAME") is None:
        
        resolve()

    else:
        
        unittest.main(verbosity=2)

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

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

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

Solution (Python):
import numpy as np
a, b, c, d, = map(int, list(input().split()))
print(np.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=[int(x) for x in input().split()]

ans1=a[0]*a[2]
ans2=a[0]*a[3]
ans3=a[1]*a[2]
ans4=a[1]*a[3]
if(ans1>ans2):
    b=ans1
else:
    b=ans2
if(b<ans3):
    b=ans3
if(b<ans4):
    b=ans4
print(b)

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

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

ans.sort()

print(ans[-1])

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 int1(x):
    return int(x) - 1



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



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



def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    a, b, c, d = input_to_int_map()

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


if __name__ == "__main__":
    main()

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

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

lista.sort(reverse=True)

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


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


print(max(outl))

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

Solution (Python):
import sys
import math
from collections import Counter
from collections import OrderedDict
def inputt():
    return sys.stdin.readline().strip()
def printt(n):
    sys.stdout.write(str(n)+'\n')
def listt():
    return [int(i) for i in inputt().split()]

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

def dfs(src, visit):
    count=1
    visit[src] = 1
    for nbr in dic[src]:
        if nbr==-1:
            continue
        if visit[nbr] == 0:
            count+=dfs(nbr, visit)   
    return count          


a,b,c,d=map(int,inputt().split())
l=[]
l.append(b*d)
l.append(a*d)
l.append(a*c)
l.append(b*c)
print(max(l))

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

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

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

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

elif 0 <= a and 0 <= b:
    if c < 0 and 0 <= d:
        answer = b * d
    elif 0 <= c and 0 <= d:
        answer = b * d
    elif c < 0 and d < 0:
        answer = a * d

elif a < 0 and b < 0:
    if c < 0 and 0 <= d:
        answer = a * c
    elif 0 <= c and 0 <= d:
        answer = b * c
    elif c < 0 and d < 0:
        answer = a * c

print(answer)

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

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

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

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

Solution (Python):

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

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

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

ans = max([x*y for x in [a, b] for y in [c, 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())
if a*b<=0 or c*d<=0:ans=0
else:ans=-float('inf')
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())

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


sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

a,b,c,d = inm()

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

print(max(mul))

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

Solution (Python):
a=list(map(int,input().split()))
ans=-1000000000000000000
for i in range(2):
    for j in range(2):
        sum=a[i]*a[j+2]
        ans=max(sum,ans)
print(ans)

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

Solution (Python):
import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    a,b,c,d = i_map()

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

    print(max(ans))






if __name__=="__main__":
    main()

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

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

if a >= 0 and c >=0:
    print(b*d)
elif b <= 0 and d <= 0:
    print(a*c)
elif a >= 0 and d <= 0:
    print(a*d)
elif b <= 0 and c >= 0:
    print(b*c)
else:
    if a*c > b*d:
        print(a*c)
    else:
        print(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]
ans = []
for xi in x:
    for yi in y:
        tmp = xi*yi
        ans.append(tmp)
ans = max(ans)
print(ans)

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

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

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

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

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

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

Solution (Python):
a, b, c, d = list(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())

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



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

Solution (Python):
import sys

input_ = sys.stdin.readline

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

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

print(ans)

Solution (Python):
a, b , c ,d = map(int,input().split(' '))
one = a*c
two = a*d
three = b*c
four = b*d
line = [one, two, three, four]
print(max(line))

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

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

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

Solution (Python):
a,b,c,d =map(int,input().split())
from itertools import product
li=[]
for nu in product([a,b],[c,d]):
  num=nu[0]*nu[1]
  li.append(num)

print(max(li))

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

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

ans_list = [ad,ac,bd,bc]

print(max(ans_list))

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, bc, bd)

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

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

tmp = b*c
if ans < tmp:
    ans = tmp
print(ans)

Solution (Python):
a, b, c, d = 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):
if __name__ == '__main__':
    a = list(map(int, input().split()))
    max_ = -1e18
    for x in a[0:2]:
        for y in a[2:4]:
            if x * y > max_:
                max_ = x * y
    print(max_)

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

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

if max(hoge) < 0:
  if np.sign(a) != np.sign(b) or np.sign(c) != np.sign(d):
    print(0)
  else:
    print(max(hoge))
else:
  print(max(hoge))

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


A=int(S[0])*int(S[2])
B=int(S[0])*int(S[3])
C=int(S[1])*int(S[2])
D=int(S[1])*int(S[3])

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

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

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

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

print(max(x))

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

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

lst1 = [a*c, a*d, b*c, b*d]
lst1.sort(reverse=True)

print(lst1[0])

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

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

print(max(list_xy))

Solution (Python):
a = *map(int, input().split()),
print(max(x * y for x in a[:2] for y in a[2:]))

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

Solution (Python):


import math

import itertools
from collections import deque
from collections import Counter
import heapq
from fractions  import gcd


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

Solution (Python):
a,b,c,d = list(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 = 0
x = a*c
y = a*d
z = b*c
w = b*d
print(max(x,y,z,w))

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

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