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

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

print(max(result))

Solution (Python):
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
input = sys.stdin.readline
INF = float("inf")



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())
lis=[A*C,A*D,B*C,B*D]
print(max(lis))

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

top = a*c

for i in range(1,4):
    if top < val[i]:
        top = val[i]

print(top)

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
x = [x1,x2,x3,x4]
print(max(x))

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(max(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 = input().split() 
a = int(a)
b = int(b)
c = int(c)
d = int(d)
xy1 = a*c
xy2 = a*d
xy3 = b*c
xy4 = b*d
 
print(max([xy1, xy2, xy3, xy4]))

Solution (Python):



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

main()

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):
n1, n2, n3, n4 = [int(k) for k in input().split()]

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

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

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

Solution (Python):
a,b,c,d=list(map(int, input("").split()))
la=[]
lb=[]
if a<0 and b>0:
    la.append(0)
la.append(a)
la.append(b)
if c<0 and d>0:
    lb.append(0)
lb.append(c)
lb.append(d)
m=a*c
for i in la:
    for j in lb:
        o=i*j
        if o>m:
            m=o
print(m)

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 = -1e30
for i in x:
    for j in y:
        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):
a, b, c, d = map(int, input().split())
if a<0:
    candi = a*c
else:
    candi = a*d

if b<0:
    candi2 = b*c
else:
    candi2 = b*d

print(max(candi, candi2))

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

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

temp1 = a*c
temp2 = a*d
temp3 = b*c
temp4 = b*d

answer = max(temp1,temp2,temp3,temp4)

print(answer)

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

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())
ans=[]
for X in [a,b]:
  for Y in [c,d]:
    ans.append(X*Y)
print(max(ans))

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

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

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

Solution (Python):
import os,sys
a=input().split(' ')
n=[int(i) for i in a]
m=[n[0]*n[2],n[0]*n[3],n[1]*n[2],n[1]*n[3]]
print(max(m))

Solution (Python):
import sys


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

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

print(ans)

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

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

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

print(e)

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

print(max(li))

Solution (Python):

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

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

Solution (Python):
def main():
    a, b, c, d = (int(i) for i in input().split())
    print(max(a*c, b*d, a*d, b*c))


if __name__ == '__main__':
    main()

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

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

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

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

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

matrix = sorted(matrix, reverse=True)

print(str(matrix[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())
s1 = a*c
s2 = a*d
s3 = b*c
s4 = b*d
print(max(s1,s2,s3,s4))

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

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

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

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

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):
import sys
from functools import reduce


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


a, b, c, d = map(int, input().split())
ans1 = a * c
ans2 = b * d
ans3 = b * c
ans4 = a * d
print(max([ans1, 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):
nums = input().split()
ab = [int(nums[0]), int(nums[1])]
cd = [int(nums[2]), int(nums[3])]

res = []

for i in ab:
  for j in cd:
    tmp = i * j
    res.append(tmp)
    
print(max(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(' '))

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys
def get_ints(): return map(int, sys.stdin.readline().strip().split())
a,b,c,d=get_ints()
pro=[a*c,a*d,b*c,b*d]
print(max(pro))

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

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

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

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):
list=input().split(" ")

list1=[list[0], list[1]]
list2=[list[2], list[3]]

list_a=[int(x)*int(y) for x in list1 for y in list2]

print(max(list_a))

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


a, b, c, d = i_map()

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

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

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

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

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

Solution (Python):

import sys


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

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

Solution (Python):
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
A,B,C,D=MI()
ans1=A*C
ans2=A*D
ans3=B*C
ans4=B*D
Max=max(ans1,ans2,ans3,ans4)
if A<=0<=B or C<=0<=D:
  Max=max(0,Max)
print(Max)

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
input = stdin.readline


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

if __name__ == "__main__":
    main()

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

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

Solution (Python):

















import sys, re
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
from functools import reduce
import numpy as np
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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)

print(a())

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

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

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())
xy1 = xy2 = xy = 0

k = a*c
l = a*d
m = b*c
n = b*d

if k >= l:
    xy1 = k
else:
    xy1 = l

if m >= n:
    xy2 = m
else:
    xy2 = n

if xy1 >= xy2:
    xy = xy1
else:
    xy = xy2

print(xy)

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

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

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

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

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

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

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

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

sorted = sorted([ac, ad, bc, bd])
print(sorted[3])

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):
def gets_ints():
    return list(map(int, input().split()))

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

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

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

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

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

Solution (Python):

def inputlist(): return [int(j) for j in input().split()]

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

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

if (a<0<b or c<0<d) and max(prd)<0:
    print(0)
else:
    print(max(prd))

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

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

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

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

Solution (Python):
a, b, c, d = map(int, input().split())
ans = -float("inf")
for x in [a, b]:
    for y in [c, d]:
        tmp = x*y
        ans = max(ans, tmp)
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=[]
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*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
l = [ac, ad, bc, bd]
print(max(l))

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    a,b,c,d = map(int, readline().split())
    ans = max(a*c, a*d, b*c, b*d)
    print(ans)
if __name__ == '__main__':
    main()

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

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

Solution (Python):


import sys

input = iter(sys.stdin.read().splitlines()).__next__

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

A = [a, b]
if a < 0 and b > 0:
   A.append(0)

B = [c, d]
if c < 0 and d > 0:
   B.append(0)

res = -1000000000000000001
for x in A:
   for y in B:
      res = max(res, x*y)

print(res)

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

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

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

b[0] = a[0]*a[2]
b[1] = a[0]*a[3]
b[2] = a[1]*a[2]
b[3] = a[1]*a[3]

b.sort()

print(b[3])

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

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

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

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

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

Solution (Python):
import sys

sys.setrecursionlimit(1000000)


def main():
    a, b, c, d = map(int, input().split())
    
    max_ab = max(a, b)
    min_ab = min(a,b)
    max_cd = max(c,d)
    min_cd = min(c,d)
    
    
    if min_ab >= 0:
        
        if min_cd >= 0:
            
            print(max_ab * max_cd)
        
        elif max_cd >= 0:
            
            print(max_ab * max_cd)
        
        else:
            
            print(min_ab * max_cd)
    
    elif max_ab >= 0:
        
        if min_cd >= 0:
            
            print(max_ab * max_cd)
        
        elif max_cd >= 0:
            
            print(max(max_ab * max_cd, min_ab * min_cd))
        
        else:
            
            print(min_ab * min_cd)
    
    else:
        
        if min_cd >= 0:
            
            print(max_ab * min_cd)
        
        elif max_cd >= 0:
            
            print(min_ab * min_cd)
        
        else:
            
            print(min_ab * min_cd)


main()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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

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):
import sys
sys.setrecursionlimit(10**7)

readline = sys.stdin.buffer.readline
def readstr():return readline().rstrip().decode()
def readstrs():return list(readline().decode().split())
def readint():return int(readline())
def readints():return list(map(int,readline().split()))
def printrows(x):print('\n'.join(map(str,x)))
def printline(x):print(' '.join(map(str,x)))

a,b,c,d = readints()

ans = -10**20

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

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

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

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

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

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

if f>g:
  if h>f:
    if i>h:
      print(i)
    else:
      print(h)
  else:
    if i>f:
      print(i)
    else:
      print(f)
else:
  if h>g:
    if i>h:
      print(i)
    else:
      print(h)
  else:
    if i>g:
      print(i)
    else:
      print(g)

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

Solution (Python):
import sys
sys.setrecursionlimit(1 << 25)
readline = sys.stdin.buffer.readline
read = sys.stdin.readline  
ra = range
enu = enumerate


def exit(*argv, **kwarg):
    print(*argv, **kwarg)
    sys.exit()


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))



def a_int(): return int(readline())


def ints(): return list(map(int, readline().split()))


def read_col(H):
    '''H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) 
    ret = []
    for _ in range(H):
        ret.append(list(map(int, readline().split())))
    return tuple(map(list, zip(*ret)))


def read_tuple(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, readline().split())))
    return ret


def read_matrix(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, readline().split())))
    return ret
    


MOD = 10**9 + 7
INF = 2**31  

from collections import defaultdict, Counter, deque
from operator import itemgetter, xor, add
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  
from functools import reduce
from math import gcd


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


a, b, c, d = ints()
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())
ans = max(a*d,a*c,b*d,b*c)
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())
L = [a*c, b*c, a*d, b*d]
L.sort()
print(L[3])

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

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

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

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

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

result_a = ac if ac > ad else ad
result_b = bc if bc > bd else bd

print(result_a if result_a > result_b else result_b)

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

a = int(arr[0])
b = int(arr[1])

c = int(arr[2])
d = int(arr[3])

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

ans = max(tmp)

print(ans)

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

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

from collections import defaultdict
from collections import deque
import bisect
from decimal import *
def main():
    a, b, c, d = MI()
    print(max(a * c, b * d, a * d, b * c))
if __name__ == "__main__":
    main()

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

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

one=[a,b]
two=[c,d]
aha=a*c
ihi=a*d
uhu=b*c
ehe=b*d
print(max([aha,ihi,uhu,ehe]))

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

Solution (Python):
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007



def main():
	
	a,b,c,d = tin()
	
	return max(a*c, a*d,b*c, b*d)
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

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

answers = []

one = a*c
two = a*d
three = b*c
four = b*d

answers.append(one)
answers.append(two)
answers.append(three)
answers.append(four)

print(max(answers))

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

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

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

print(max(list))

Solution (Python):
x=input().split(" ")
z=[]
for i in range(2):
	z.append(int(x[i-2])*int(x[0]))
for i in range(2):
    z.append(int(x[i-2])*int(x[1]))
print(max(z))

Solution (Python):
def main():
   a,b,c,d=map(int,input().split())
   p1=a*c
   p2=a*d
   p3=b*c
   p4=b*d
   x=max(p1,p2)
   y=max(p3,p4)
   print(max(x,y))

main()

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

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

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

if(a<0 and 0<b):
    l1.append(0)
if(c<0 and 0<d):
    l2.append(0)

l = []
for x in l1:
    for y in l2:
        l.append(x*y)

print(max(l))

Solution (Python):
a,b,c,d=map(int,input().split())
def ret(a,b,c,d):
    return max(b*d,a*c,0 if (a*b<=0 or c*d<=0) else -1e64,a*d,b*c)
print(ret(a,b,c,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())
ans = max(a*c, b*d, a*d, b*c)
print(ans)

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

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

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

answer = []

answer.append(number[0] * number[2])
answer.append(number[0] * number[3])
answer.append(number[1] * number[2])
answer.append(number[1] * number[3])

print(max(answer))

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

answer = []

answer.append(number[0] * number[2])
answer.append(number[0] * number[3])
answer.append(number[1] * number[2])
answer.append(number[1] * number[3])

print(max(answer))

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

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

ans = - 10 ** 18
for i in range(4):
    if multi[i] > ans:
        ans = multi[i]

print(ans)

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 = -float("INF")  

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

print(ans)

Solution (Python):

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

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


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

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

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

Solution (Python):
import numpy as np
import sys

if __name__ == "__main__":
    read = sys.stdin.buffer.read
    readline = sys.stdin.buffer.readline
    readlines = sys.stdin.buffer.readlines

    a, b, c, d = map(int, readline().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*c,b*d,a*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())
n = [0]*4
n[0] = a * c
n[1] = a * d
n[2] = b * c
n[3] = b * d

print(max(n))

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