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

import sys
input = sys.stdin.readline
from bisect import bisect_left;
from bisect import bisect_right;
from math import ceil, factorial;

def ceil(x):
    if x != int(x):
        x = int(x) + 1;
    return x;
    

def swaparr(arr, a,b):
    temp = arr[a];
    arr[a] = arr[b];
    arr[b] = temp;


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


def nCr(n, k): 
    if(k > n - k): 
        k = n - k; 
    res = 1;
    for i in range(k): 
        res = res * (n - i);
        res = res / (i + 1); 
    return int(res);


def primefs(n):
    
    primes = {}
    while(n%2 == 0 and n > 0):
        primes[2] = primes.get(2, 0) + 1
        n = n//2
    for i in range(3, int(n**0.5)+2, 2):
        while(n%i == 0 and n > 0):
            primes[i] = primes.get(i, 0) + 1
            n = n//i
    if n > 2:
        primes[n] = primes.get(n, 0) + 1
    
    
    return primes


def power(x, y, p): 
    res = 1
    x = x % p  
    if (x == 0) : 
        return 0
    while (y > 0) : 
        if ((y & 1) == 1) : 
            res = (res * x) % p 
        y = y >> 1      
        x = (x * x) % p 
    return res 


def swap(a,b):
    temp = a
    a = b
    b = temp
    return a,b;









def find(x, link):
    p = x;
    while( p != link[p]):
        p = link[p];
    
    while( x != p):
        nex = link[x];
        link[x] = p;
        x = nex;
    return p;




def union(x, y, link, size):
    x = find(x, link)
    y = find(y, link)
    if size[x] < size[y]:
        x,y = swap(x,y)
    if x != y:
        size[x] += size[y]
        link[y] = x


def sieve(n): 
    prime = [True for i in range(n+1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p * p, n+1, p):
                prime[i] = False
        p += 1
    return prime


MAXN = int(1e5 + 5)
def spf_sieve():
    spf[1] = 1;
    for i in range(2, MAXN):
        spf[i] = i;
    for i in range(4, MAXN, 2):
        spf[i] = 2;
    for i in range(3, ceil(MAXN ** 0.5), 2):
        if spf[i] == i:
            for j in range(i*i, MAXN, i):
                if spf[j] == j:
                    spf[j] = i;
    




def factoriazation(x):
    ret = {};
    while x != 1:
        ret[spf[x]] = ret.get(spf[x], 0) + 1;
        x = x//spf[x]
    return ret;
    
    


def int_array():
    return list(map(int, input().strip().split()));

def float_array():
    return list(map(float, input().strip().split()));


def str_array():
    return input().strip().split();


MOD = int(1e9)+7;
CMOD = 998244353;
INF = float('inf'); NINF = -float('inf');



a, b, c, d = int_array();
ans = NINF;
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())

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

Solution (Python):
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

a, b, c, d = mi()

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

Solution (Python):
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
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())
def main():
    a,b,c,d = LI()
    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())
ans = -1e20
ans = max(ans,b*d,a*c)
ans = max(ans,a*d,b*c)
if a*b <= 0 or c*d <=0:
  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):
l = list(map(int, input().split()))
ans = []

for i in range(2):
  ans.append(l[i] * l[2])
  ans.append(l[i] * l[3])

print(max(ans))

Solution (Python):
from sys import stdin

a,b,c,d = map(int, stdin.readline().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, a*d, b*c, b*d]
print(max(ans))

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

Solution (Python):
import math,sys,bisect,heapq
from collections import defaultdict,Counter,deque
from itertools import groupby,accumulate

int1 = lambda x: int(x) - 1
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
ilele = lambda: map(int,input().split())
alele = lambda: list(map(int, input().split()))
ilelec = lambda: map(int1,input().split())
alelec = lambda: list(map(int1, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]

def Y(c):  print(["NO","YES"][c])
def y(c):  print(["no","yes"][c])
def Yy(c):  print(["No","Yes"][c])

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

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

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


maxa=a*c
ans2=a*d
if maxa<ans2:
    maxa=ans2
ans3=b*c
if maxa<ans3:
    maxa=ans3
ans4=b*d
if maxa<ans4:
    maxa=ans4
print(maxa)

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

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


if __name__ == "__main__":
    main()

Solution (Python):

import sys

input = sys.stdin.readline


def ST():
    return input().rstrip()


def I():
    return int(input())


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


def LI():
    return list(MI())


a, b, c, d = MI()

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

Solution (Python):




import sys









MOD = 10 ** 9 + 7
INF = 10 ** 9
PI = 3.14159265358979323846

def read_str():      return sys.stdin.readline().strip()
def read_int():      return int(sys.stdin.readline().strip())
def read_ints():     return map(int, sys.stdin.readline().strip().split())
def read_ints2(x):   return map(lambda num: int(num) - x, sys.stdin.readline().strip().split())
def read_str_list(): return list(sys.stdin.readline().strip().split())
def read_int_list(): return list(map(int, sys.stdin.readline().strip().split()))
def GCD(a: int, b: int) -> int: return b if a%b==0 else GCD(b, a%b)
def LCM(a: int, b: int) -> int: return (a * b) // GCD(a, b)

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

if __name__ == '__main__':
    Main()

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

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

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

Solution (Python):

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

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

ans = a * c
if ans < a * d:
  ans = a * d
if ans < b * c:
  ans = b * c
if ans < b * d:
  ans = b * d
print(ans)

Solution (Python):
import itertools

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

l = [a, b]
r = [c, d]

m = int(-1e20)
for x, y in itertools.product(l, r):
    m = max(m, x*y)

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

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

Solution (Python):

import sys


def solve(a: int, b: int, c: int, d: int):
    ans = -float("inf")
    if a <= 0 <= b or c <= 0 <= d:
        ans = 0
    for x in [a, b]:
        for y in [c, d]:
            ans = max(ans, x*y)
    return ans


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

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    
    main()

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

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

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

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

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

Solution (Python):

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

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


main()

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

Solution (Python):



a, b, c, d = map(int, input().strip().split())
res = a * c
res2 = b * d
res3 = a * d
res4 = b * c
if res < res2:
    res = res2
if res < res3:
    res = res3
if res < res4:
    res = res4
print(res)

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

Solution (Python):





import math
import fractions
import sys
import bisect
import heapq  
import collections
from collections import Counter
from collections import deque
import pprint
import itertools

sr = lambda: input()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    if n == 1:
        return arr

    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr



def power(a, n, mod):
    x = 1
    while n:
        if n & 1:
            x *= a % mod
        n >>= 1
        a *= a % mod
    return x % mod



def kaijo(n, l, mod):
    if n == 0:
        return 1
    a = n
    tmp = n - 1
    while (tmp >= l):
        a = a * tmp % mod
        tmp -= 1
    return a


class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

inf = 10 ** 18
mod = 10 ** 9 + 7

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

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

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

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

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

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

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

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

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



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

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

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

print(max(A))

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

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

flg = 0
rslt = -10000000000000000000000000
for x in [A[0],A[1]]:
    for y in [A[2],A[3]]:
        flg = x*y
        
        rslt = max(rslt,flg)
        
        

print(rslt)

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

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

Solution (Python):


import math
import re
import numpy as np
import copy


S = input().split(' ')

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

ls = []

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

ans = max(ls)

print(ans)

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

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

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

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

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

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

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

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


if __name__ == '__main__':
    main()

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

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

ans=max(ans1)
print(ans)

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

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

print(ans)

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

Solution (Python):
a, b, c, d = [int(s) for s in input().split(" ")]
ans1 = a * c
ans2 = b * d
ans3 = a * d
ans4 = b * c
print("%d" % max([ans1, ans2, ans3, ans4]))

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

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

print(max(check))

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from sys import exit
from decimal import *
from heapq import heapify, heappop, heappush
import math
import random
import string
from copy import deepcopy
from itertools import combinations, permutations, product
from operator import mul, itemgetter
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7





a, b, c, d = getNM()
x = [a, b]
y = [c, d]

ans = []
for i in range(2):
    for j in range(2):
        ans.append(x[i] * y[j])

ans.sort()
print(ans[-1])

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

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

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

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

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

Solution (Python):



import collections
import sys
import copy
import re
import math


def I(): return int(sys.stdin.readline().rstrip())


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


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

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

Solution (Python):

import sys,io,os,time
from collections import defaultdict
from collections import Counter
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"

input = sys.stdin.readline




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







'''


import collections,sys,threading
sys.setrecursionlimit(10**9)
threading.stack_size(10**8)



threading.Thread(target=solve).start()
'''

Solution (Python):

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

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

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

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

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

ab = [a, b]
cd = [c, d]

ans = a*c

for i in ab:
  for j in cd:
    if i*j > ans:
      ans = i* j

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


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

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

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

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

Solution (Python):
a,b,c,d=map(int, input().split())
ans=max(a*c,a*d,b*c,b*d)
if (a<=0 and b>=0) or (c<=0 and d>=0):
  ans=max(ans,0)
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())
l = [a,b]
k = [c,d]
maxi = -10**18
for i in l:
    for j in k:
        maxi = max(maxi,i*j)
print(maxi)

Solution (Python):
from sys import exit, stdin

input = stdin.readline
import copy



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

l = []
l.append(A)
l.append(B)
l.append(C)
l.append(D)

print(max(l))

Solution (Python):
import sys
import collections as cc
import math as mt
I=lambda:list(map(int,input().split()))
a,b,c,d=I()
print(max(a*c,a*d,b*c,b*d))

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

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

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

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

Solution (Python):

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

    b = [a[0]*a[2],a[0]*a[3],a[1]*a[2],a[1]*a[3] ]
    if ((a[0]<=0 ) and ( 0<=a[1] )  ) or ((a[2] <=0) and (0<=a[3])):
        b.append(0)
    print(max(b))

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

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

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

x_cands = [a, b]
if a <= 0 <= b:
	x_cands.append(0)
y_cands = [c, d]
if c <= 0 <= d:
	y_cands.append(0)

values = []
for x in x_cands:
	for y in y_cands:
		values.append(x * y)

print(max(values))

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

Solution (Python):
import math as mt
import sys
import bisect
input=sys.stdin.readline

t=1
mod=10**9+7
for _ in range(t):
    
    
    a,b,c,d=map(int,input().split())
    
    
    
    
    print(max(b*d,b*c,a*c,a*d))

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

Solution (Python):


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

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

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

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

Solution (Python):




import sys
input = sys.stdin.readline



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

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

    print(res)



main()

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

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

    ans = -float("inf")
    for x in [a, b]:
        for y in [c, d]:
            tmp = x * y
            if ans < tmp:
                ans = tmp

    print(ans)

if __name__ == "__main__":
    resolve()

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

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

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

Solution (Python):

"""
Created on Sun Sep 13 21:02:10 2020

@author: liang
"""

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

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

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


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

    
if __name__ == "__main__":
    main()

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

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

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

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=list(map(int,input().split()))
s=[a[0],a[1]]
t=[a[2],a[3]]
ans=a[0]*a[2]
for i in s:
    for j in t:
        if ans<i*j:
            ans=i*j
print(ans)

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

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

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

print(ans)

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







e1,e2,e3,e4 = map(int,input().split())



a=e1*e3
b=e1*e4
c=e2*e3
d=e2*e4
print(max(a,b,c,d))

Solution (Python):
from __future__ import division, print_function
import bisect
import math
import heapq
import itertools
import sys
from collections import deque
from atexit import register
from collections import Counter
from functools import reduce
if sys.version_info[0] < 3:
    from io import BytesIO as stream
else:
    from io import StringIO as stream
 
 
if sys.version_info[0] < 3:
    class dict(dict):
        """dict() -> new empty dictionary"""
        def items(self):
            """D.items() -> a set-like object providing a view on D's items"""
            return dict.iteritems(self)
 
        def keys(self):
            """D.keys() -> a set-like object providing a view on D's keys"""
            return dict.iterkeys(self)
 
        def values(self):
            """D.values() -> an object providing a view on D's values"""
            return dict.itervalues(self)
 
    input = raw_input
    range = xrange
 
    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip
 
 
def sync_with_stdio(sync=True):
    """Set whether the standard Python streams are allowed to buffer their I/O.
 
    Args:
        sync (bool, optional): The new synchronization setting.
 
    """
    global input, flush
 
    if sync:
        flush = sys.stdout.flush
    else:
        sys.stdin = stream(sys.stdin.read())
        input = lambda: sys.stdin.readline().rstrip('\r\n')
 
        sys.stdout = stream()
        register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

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

if __name__ == '__main__':
    sync_with_stdio(False)
    main()

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

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

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

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

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

print(max(l))

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

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

print(ans)

Solution (Python):
from collections import Counter, defaultdict, deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

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

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

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

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

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

print(max(lista))

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

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

ans_candi = []

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

print(max(ans_candi))

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

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

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

max_a = max(a*c,a*d)
max_b = max(b*c,b*d)
print(max(max_a,max_b))

Solution (Python):





"""
"""

from collections import defaultdict
import bisect

import sys
input = sys.stdin.readline

def solve(a,b,c,d):
    anss = [a*c,a*d,b*c,b*d]
    print(max(anss))

            

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


if __name__ == "__main__":
    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())

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

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

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

Solution (Python):
import math
import collections
import itertools

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

resolve()

Solution (Python):

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


if __name__ == '__main__':
    main()

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