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

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

print(max(ans))

Solution (Python):


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

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

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

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

Solution (Python):

def resolve():
  A, B, C, D = map(int, input().split(" "))

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

if __name__ == "__main__":
  resolve()

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

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

Solution (Python):

from collections import defaultdict, deque, Counter, OrderedDict
from bisect import bisect_left, bisect_right
from functools import reduce, lru_cache
from heapq import heappush, heappop, heapify

import itertools
import math, fractions
import sys, copy

def L(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline().rstrip())
def SL(): return list(sys.stdin.readline().rstrip())
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return [list(x) for x in sys.stdin.readline().split()]
def R(n): return [sys.stdin.readline().strip() for _ in range(n)]
def LR(n): return [L() for _ in range(n)]
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def LIR1(n): return [LI1() for _ in range(n)]
def SR(n): return [SL() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]

def perm(n, r): return math.factorial(n) // math.factorial(r)
def comb(n, r): return math.factorial(n) // (math.factorial(r) * math.factorial(n-r))

def make_list(n, *args, default=0): return [make_list(*args, default=default) for _ in range(n)] if len(args) > 0 else [default for _ in range(n)]

dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
alphabets = "abcdefghijklmnopqrstuvwxyz"
ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
MOD = 1000000007
INF = float("inf")

sys.setrecursionlimit(1000000)

def main():
    a, b, c, d = LI()
    print(max([a * d, a * c, 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):
import sys
input = sys.stdin.readline

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,B*C,A*D,B*D))

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

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

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

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

print(ans)

Solution (Python):
def solve():
    a,b,c,d = map(int,input().split())
    lower = [a,b]
    upper = [c,d]

    mx = -float('inf')
    for l in lower:
        for u in upper:
            mx = max(mx, l*u)
    
    print(mx)
    
if __name__ == '__main__':
    solve()

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

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):
def main():
    from sys import setrecursionlimit, stdin, stderr
    from os import environ
    from collections import defaultdict, deque, Counter
    from math import ceil, floor
    from itertools import accumulate, combinations, combinations_with_replacement
    setrecursionlimit(10**6)
    dbg = (lambda *something: stderr.write("\033[92m{}\033[0m".format(str(something)+'\n'))) if 'TERM_PROGRAM' in environ else lambda *x: 0
    input = lambda: stdin.readline().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    P = 10**9+7
    INF = 10**18+10
    a,b,c,d = LMIIS()
    ans = -10**20
    for i in [a,0,b] if a<= 0 <= b else [a,b]:
        for j in [c,0,d] if c <= 0 <= d else [c,d]:
            ans = max(ans,i*j)
    print(ans)
    
main()

Solution (Python):

import sys


def solve(a: int, b: int, c: int, d: int):
    ans1 = max(a, b) * max(c, d)
    ans2 = max(a, b) * min(c, d)
    ans3 = min(a, b) * max(c, d)
    ans4 = min(a, b) * min(c, d)
    print(max(ans1, max(ans2, max(ans3, ans4))))
    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):



def maximize_product(a, b, c, d):
    return max(a * c, a * d, b * c, b * d)


def main():
    a, b, c, d = (int(z) for z in input().split())
    res = maximize_product(a, b, c, d)
    print(res)


if __name__ == '__main__':
    main()

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

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

Solution (Python):


import sys
import math
import time

import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq
import itertools











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

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

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

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

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

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

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

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

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

Solution (Python):
import sys

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

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

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

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

print(result)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



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

print(max(result))

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

Solution (Python):
from typing import List, Any


def read_int() -> int:
    return int(input().strip())


def read_ints() -> List[int]:
    return list(map(int, input().strip().split(' ')))


def solve() -> Any:
    a, b, c, d = read_ints()
    return max(a*d, a*c, b*c, b*d)


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

Solution (Python):
import os
import heapq
import sys,threading
import math as mt
import operator
from copy import copy
from collections import defaultdict,deque
from io import BytesIO, IOBase

sys.setrecursionlimit(2*10 ** 5)



def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)


"""def pw(a,b):
    result=1
    while(b>0):
        if(b%2==1): result*=a
        a*=a
        b//=2
    return result"""


def inpt():
    return [int(k) for k in input().split()]

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





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

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

A = a*c
B = a*d
C = b*c
D = b*d
print(max(A,B,C,D))

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

print(max(p))

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

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

Solution (Python):
a,b,c,d=map(int,input().split())
n=[a,b]
m=[c,d]
o=[]
for i in n:
    for j in m:
        o.append(i*j)
print(max(o))

Solution (Python):
def main():

    a,b,c,d = map(int,input().split())
    e = a * c
    f = a * d
    g = b * c
    h = b * d

    print(max(e,f,g,h))
if __name__=='__main__':
    main()

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

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


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


print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(10**7)

def input(): return sys.stdin.readline()[:-1]
mod = 10**9 + 7
def readInt():return int(input())
def readIntList():return list(map(int,input().split()))
def readStringList():return list(input())
def readStringListWithSpace():return list(input().split())
def readString():return input()

a,b,c,d = readIntList()

res = max(a*d,a*c,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):
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())

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

ans = a * c
for i in x:
    for j in y:
        ans = max(ans, i * j)

print(ans)

Solution (Python):

"""
Created on Sun Sep 13 21:01:40 2020

@author: NEC-PCuser
"""

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

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

print(max_num)

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

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

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

ans = max(A*C, A*D, B*C, B*D)
if A <= 0 <= B or C <= 0 <= D:
    ans = max(0, ans)
print(ans)

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

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

Solution (Python):
import math
import itertools



def calc_digit_sum(num):
    digits = sums = 0
    while num > 0:
        digits += 1
        sums += num % 10
        num //= 10
    return digits, sums


a, b, c, d = map(int, input().split())
answer = float('-inf')
for x in [a,b]:
    for y in [c, d]:
        answer = max(answer, x * y)

print(answer)

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

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

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

Solution (Python):
A,B,C,D = list(map(int,input().split()))
L = [A,B]
M = [C,D]
out = []
if A<=0 and B>=0:
    L.append(0)
if C<=0 and D>=0:
    M.append(0)
for i in L:
    for j in M:
        out.append(i*j)
print(max(out))

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

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

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

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

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

Solution (Python):
mod=1000000007
ans=-pow(10,19)
arr=list(map(int,input().split()))
for i in range(0,2):
    for j in range(2,4):
        ans=max(ans,arr[i]*arr[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())
ans = max(a*c, a*d, b*c, b*d)

print(ans)

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

ac = a * c
ad = a * d
bc = b * c
bd = b * d
ans_cand = [ac, ad, bc, bd]
ans = max(ans_cand)

print(ans)

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    a, b, c, d = LI()

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

if __name__ == '__main__':
    resolve()

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

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

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

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

Solution (Python):
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def main():
    a, b, c, d = MI()
    temp = [a*c, a*d, b*c, b*d]
    ans = max(temp)
    print(ans)

if __name__ == '__main__':
    main()

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

Solution (Python):
if __name__ == "__main__":
    a, b, c, d = map(int, input().split())
    ac = a*c
    ad = a*d
    bc = b*c
    bd = b*d
    print(max(ac, ad, bc, bd))

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

Solution (Python):




import sys
import heapq, functools, collections
import random
from collections import Counter, defaultdict











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

if a <= 0 <= b:
    xx = [a,0,b] 
else:
    xx = [a,b]

if c <= 0 <= d:
    yy = [c,0,d]
else:
    yy = [c,d]

maxres = -10**18
for x in xx:
    for y in yy:
        maxres = max(maxres, x*y)

print(maxres)

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

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

print(max(ans_list))

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

Solution (Python):
"""AtCoder Beginner Contest 178.

B
"""

import sys


def input() -> str:  
    """Input."""
    return sys.stdin.readline()[:-1]


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


main()

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

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

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

Solution (Python):
a, b, c, d = map(int, input().split())
a1 = a * c
a2 = a * d
a3 = b * c
a4 = b * d
t1 = max(a1, a2)
t2 = max(a3, a4)
ans = max(t1, t2)
print(ans)

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

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

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

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

ans = -10000000000000000001

if l[0] * l[2] >= ans:
    ans = l[0] * l[2]
if l[0] * l[3] >= ans:
    ans = l[0] * l[3]
if l[1] * l[2] >= ans:
    ans = l[1] * l[2]
if l[1] * l[3] >= ans:
    ans = l[1] * l[3]

print(ans)

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

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

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

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

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

max_mul = -1 * 10**18

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

print(max_mul)

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
import math

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

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

Solution (Python):
def li():
    return [int(x) for x in input().split()]


a, b, c, d = li()

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

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

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

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

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

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

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

result = -10**18
for x in [a, b]:
    for y in [c, d]:
        result = max(x * y, result)
print(result)

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

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

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

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

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

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

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

print(ans)

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

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

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

print(ans)

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

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

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

print(xy)

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

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

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

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

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

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

Solution (Python):


from sys import stdin, stdout

def main():
	a, b, c, d = [int(i) for i in stdin.readline().split()]
	ans = max(a*c, a*d, b*c, b*d)
	print(ans)

main()

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

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

Solution (Python):

a,b,c,d = map(int, input().split())
s = [0]*4
s[0] = a*c
s[1] = a*d
s[2] = b*c
s[3] = b*d
print(max(s))

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

Solution (Python):
ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
tma = lambda :tuple(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq
import sys
gcd = math.gcd
a,b,c,d = ma()
a1 = a*c
a2 = a*d
a3 = b*c
a4 = b*d
print(max(a1,a2,a3,a4))

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

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

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

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

Solution (Python):
a, b, c, d = map(int, input().split())
AB = [a, b]
CD = [c, d]
ans = []
for i in AB:
    for s in CD:
        ans.append(i*s)
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):
from math import trunc
import sys
import copy
from collections import deque
import collections
import itertools
stdin = sys.stdin
import math

mod = 10**9+7

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

a = na()

ans = []

ans.append(a[0]*a[2])
ans.append(a[0]*a[3])
ans.append(a[1]*a[2])
ans.append(a[1]*a[3])

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

A = a * c
B = a * d
C = b * c
D = b * d
print(max(A, max(B, max(C, D))))

Solution (Python):

def ii(): return int(input())


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


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


a, b, c, d = mi()

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

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

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

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

Solution (Python):
a, b, c, d = map(int, input().split())
ans = float('inf')*-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):
import sys
input = lambda : sys.stdin.readline().rstrip()

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

outs = []
xs = [a, b]
ys = [c, d]
for x in xs:
    for y in ys:
        out = x*y
        outs.append(out)

out = max(outs)
print(out)

Solution (Python):

import os
from sys import stdin, stdout


def solve(tc):
    a, b, c, d = map(int, stdin.readline().split())

    ans = int(-1e19)
    ans = max(ans, a*c)
    ans = max(ans, b*d)
    ans = max(ans, a*d)
    ans = max(ans, b*c)
    print(ans)


tcs = 1
tc = 1
while tc <= tcs:
    solve(tc)
    tc += 1

Solution (Python):



import sys


def get_ints():
    return map(int, sys.stdin.readline().strip().split())


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

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


if __name__ == "__main__":
    main()

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

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

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