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



Sample input:
1 2 1 1


Sample output:
2

Submission status: Accepted

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

temp_1 = a * c
temp_2 = a * d
temp_3 = b * c
temp_4 = b * d

maxv = temp_1
if temp_2 > maxv:
    maxv = temp_2
if temp_3 > maxv:
    maxv = temp_3
if temp_4 > maxv:
    maxv = temp_4

print(maxv)

Submission status: Accepted

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

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

ans = [ans1, ans2, ans3, ans4]
ans.sort()
print(ans.pop())

Submission status: Accepted

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

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

Submission status: Accepted

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

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

maxa = max(a1, a2, a3, a4)

print(maxa)

Submission status: Accepted

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

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

ans = max(w, x, y, z)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(max(a1,a2,a3,a4))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

l = []

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

print( max(l) )

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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]))

Submission status: Accepted

Solution code:
from __future__ import print_function

from functools import reduce
from operator import mul
from collections import Counter
from collections import deque
from itertools import accumulate
from queue import Queue
from queue import PriorityQueue as pq
from heapq import heapreplace
from heapq import heapify
from heapq import heappushpop
from heapq import heappop
from heapq import heappush
import heapq
import time
import random
import bisect
import itertools
import collections
from fractions import Fraction
import fractions
import string
import math
import operator
import functools
import copy
import array
import re
import sys
sys.setrecursionlimit(500000)


input = sys.stdin.readline


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return

# from fractions import gcd
# from math import gcd

# def lcm(n, m):
#     return int(n * m / gcd(n, m))


# def coprimize(p, q):
#     common = gcd(p, q)
#     return (p // common, q // common)


# def find_gcd(list_l):
#     x = reduce(gcd, list_l)
#     return x


def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom


mod = 1000000007


def combinations_count_mod(n, r):
    r = min(r, n - r)
    numer = reduce(lambda x, y: x * y % mod, range(n, n - r, -1), 1)
    denom = pow(reduce(lambda x, y: x * y % mod, range(1, r + 1), 1), mod - 2, mod)
    return numer * denom % mod


def solve():
    pass


def main():
    a, b, c, d = map(int, input().strip().split())
    ans=-1*sys.maxsize
    for x in [a, b]:
        for y in [c, d]:
            ans = max(ans, x * y)
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools
a, b, c, d = (int(each) for each in input().split())

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

Submission status: Accepted

Solution code:
import math
a, b, c, d = (int(x) for x in input().split())
print(max(a*c, a*d, b*c, b*d))

Submission status: Accepted

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

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

Submission status: Accepted

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

print(max(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c,d = map(int,input().split())
max_prod = float('-inf')
for i in [a,b]:
    for j in [c,d]:
        max_prod = max(max_prod,i*j)
print(max_prod)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=list(map(int,input().split()))
sai=-1*10**18
for i in range(2):
    for j in range(2):
        sai=max(sai,N[i]*N[j+2])
print(sai)

Submission status: Accepted

Solution code:
a,b,c,d = list(map(int,input().split()))
max_ = a*c
for i in [a,b]:
    for j in [c,d]:
        #print(max_,i*j)

        if max_<i*j:
            max_ = i*j
print(max_)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

ans=max(ac,ad)
num=max(bc,bd)
ans=max(ans,num)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c,d = map(int,input().split())
l = []
l.append(a*c)
l.append(a*d)
l.append(b*c)
l.append(b*d)
if a<=0<=b:
  l.append(0)
elif c<=0<=d:
  l.append(0)
print(max(l))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import lru_cache
import bisect
import re
import queue
import copy
import decimal


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [Scanner.string() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [Scanner.int() for i in range(n)]


def solve():
    a, b, c, d = Scanner.map_int()
    ans = max(a * c, a * d, b * c, b * d)
    if a <= 0 and 0 <= b:
        ans = max(ans, 0)
    if c <= 0 and 0 <= d:
        ans = max(ans, 0)
    print(ans)


def main():
    # sys.setrecursionlimit(1000000)
    # sys.stdin = open("sample.txt")
    # T = Scanner.int()
    # for _ in range(T):
    solve()


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

tmp=max(abcd)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

a,b,c,d = (int(x) for x in input().rstrip('\n').split())
res = [a*c,b*d,b*c,d*a]
print(max(res))

Submission status: Accepted

Solution code:
def solve():
  a,b,c,d = list(map(int, input().split()))
  
  ret = max(a*c, b*d, a*d, b*c)
  print(ret)
  
solve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b,c,d = map(int,input().split())
lsx = [a,b]
lsy = [c,d]
ans = -10**20
for x in lsx:
    for y in lsy:
        ans = max(ans,x*y)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

ms = [a*c, a*d, b*c, b*d]
#print('# ms:', ms)

print(max(ms))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c,d = map(int,input().split())
A = [a,b]
B = [c,d]
min_l = (-1)*((10)**18)
for i in A:
  for j in B:
    min_l = max(i*j,min_l)
print(min_l)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a,b,c,d=map(int, input().split())
v1=a*c
v2=b*d
v3=a*d
v4=b*c
s=[v1,v2,v3,v4]
s.sort()
print(s[3])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import copy
import math
import time
import statistics
import math
import itertools
import bisect
import sys
from decimal import *
from collections import deque


def get_int():
    return int(input())

def get_string():
    return input()

def get_int_list():
    return [int(x) for x in input().split()]

def get_string_list():
    return input().split()

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

def get_string_char_list():
    return list(str(input()))

# print("{} {}".format(a, b))
# a_list = [0] * a
sys.setrecursionlimit(10 ** 6)

def main():
    start = time.time()

    a, b, c, d = get_int_multi()

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

    print(max(a1,a2,a3,a4))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import itertools

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

list_ans = []
for D in itertools.product(A[:2], A[2:]):
    list_ans.append(D[0] * D[1])

print(max(list_ans))

Submission status: Accepted

Solution code:
A, B, C, D = map(int, input().split())
print(max([A*C,A*D,B*C,B*D]))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

res1 = a * c
res2 = a * d
res3 = b * c
res4 = b * d
ans = max(res1, res2, res3, res4)
print(ans)

Submission status: Accepted

Solution code:
import sys,collections,math,random,fractions,bisect;sys.setrecursionlimit(10**7)
sr = sys.stdin.readline; P = print; P2 = lambda x: print(*x, sep="\n")
def I(i=0): t = [int(x)-i for x in sr().split()];return t
def S(): t = sr().split(); return t if len(t) > 1 else t[0]
L1,L2,L3,L4, = [],[],[],[]
 
a,b,c,d = I()
mx = max(a*c,a*d,b*c,b*d)
print(mx)

Submission status: Accepted

Solution code:
import sys

def dump(x):
    print(x, file=sys.stderr)

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

Submission status: Accepted

Solution code:
a, b, c, d = map(int, input().split())
A = [a, b]
C = [c, d]

ans = -(10**20)
for i in A:
    for j in C:
        ans = max(ans, i*j)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
a, b, c, d = map(int, input().split())
T1 = a*c
T2 = a*d
T3 = b*c
T4 = b*d
T = [T1, T2, T3, T4]
print(max(T))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c,d = map(int, input().split())
#a≤x≤b,c≤y≤d を満たす整数 x,y について、x×y の最大値はいくつですか。
print(max(a*c,a*d,b*c,b*d))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
line = list(map(int,input().split()))
lin = []
ans1 = line[0]*line[3]
ans2 = line[0]*line[2]
ans3 = line[1]*line[3]
ans4 = line[1]*line[2]

lin.append(ans1)
lin.append(ans2)
lin.append(ans3)
lin.append(ans4)

print(max(lin))

Submission status: Accepted

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


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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from math import ceil as C, floor as F, sqrt, gcd as G
from collections import defaultdict as D, Counter as CNT
from functools import reduce as R
import heapq as HQ

class Heap:
  def __init__(self, data, reverse=False):
    self.reverse = -1 if reverse else 1
    self.data = [self.reverse * d for d in data]
    HQ.heapify(self.data)
  def push(self, x): return HQ.heappush(self.data, self.reverse * x)
  def pop(self): return self.reverse * HQ.heappop(self.data) 

ALP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
alp = 'abcdefghijklmnopqrstuvwxyz'
def _X(): return sys.stdin.readline().rstrip().split(' ')
def _S(ss): return tuple(ss) if len(ss) > 1 else ss[0]
def S(): return _S(_X())
def Ss(): return list(S())
def _I(ss): return tuple([int(s) for s in ss]) if isinstance(ss, tuple) else int(ss)
def I(): return _I(S())
def _Is(ss): return list(ss) if isinstance(ss, tuple) else [ss]
def Is(): return _Is(I())

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

Submission status: Accepted

Solution code:
a,b,c,d = map(int,input().split())
ans = a*c
for x in a,b:
  for y in c,d:
    if ans < x*y:
      ans = x*y
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b, c, d = map(int, input().rstrip().split(' '))
xx = [a, b]
yy = [c, d]
ans = []
for x in xx:
    for y in yy:
        ans.append(x * y)
print(max(ans))

Submission status: Accepted

Solution code:
A=list(map(int,input().split()))
B=[]
for i in range(2):
    for j in range(2):
        B.append(A[i]*A[j+2])
print(max(B))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest

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

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

    def test_入力例_1(self):
        input = """1 2 1 1"""
        output = """2"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """3 5 -4 -2"""
        output = """-6"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """-1000000000 0 -1000000000 0"""
        output = """1000000000000000000"""
        self.assertIO(input, output)


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

ac = a*c
ad = a * d
bc = b * c
bd = b * d
l = [ac, ad, bc, bd]
l.sort()
print(l[-1])

Submission status: Accepted

Solution code:
from sys  import stdin,stdout

st=lambda:list(stdin.readline().strip())
li=lambda:list(map(int,stdin.readline().split()))
mp=lambda:map(int,stdin.readline().split())
inp=lambda:int(stdin.readline())
pr=lambda n: stdout.write(str(n)+"\n")

mod=1000000007

def solve():
    a,b,c,d=mp()
    x=a*d
    y=a*c
    z=b*d
    p=b*c
    pr(max(x,y,z,p))
    


for _ in range(1):
    solve()

Submission status: Accepted

Solution code:
a, b, c, d = map(int, input().split())
t = []
t.append(a*c)
t.append(a*d)
t.append(b*c)
t.append(b*d)

print(max(t))

Submission status: Accepted

Solution code:
s = input().split()

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

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

print(max(max_list))

Submission status: Accepted

Solution code:
a,b,c,d= map(int, input().split())
D=[a*c,a*d,b*c,b*d]
if a*b<0 or c*d<0:
  D.append(0)
print(max(D))

Submission status: Accepted

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

negneg = a * c
negpos = a * d
posneg = b * c
pospos = b * d

print(max([negneg,negpos,posneg,pospos]))

Submission status: Accepted

Solution code:
A, B, C, D = (int(i) for i in input().split())
print(max(A * C, A * D, B * C, B * D))

Submission status: Accepted

Solution code:
a,b,c,d=map(int,input().split())
X=[a,b]
Y=[c,d]
if a<=0<=b:
    X.append(0)
if c<=0<=d:
    Y.append(0)
ans=-10**30
for x in X:
    for y in Y:
        if ans<x*y:
            ans=x*y
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# a<=x<=b
# c<=y<=d

a,b,c,d = map(int,input().split())
maxans = -10**18 - 1
maxans = max(a*c,maxans)
maxans = max(a*d,maxans)
maxans = max(b*c,maxans)
maxans = max(b*d,maxans)
print(maxans)

Submission status: Accepted

Solution code:

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

A =[]

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

print(max(A))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(a: int, b: int, c: int, d: int):
    print(max(
        max(a*c,a*d),
        max(b*c,b*d)
    ))
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    b = int(next(tokens))  # type: int
    c = int(next(tokens))  # type: int
    d = int(next(tokens))  # type: int
    solve(a, b, c, d)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
si=sys.stdin.readline

a,b,c,d=[int(e) for e in si().split()]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
def resolve():
    '''
    code here
    '''
    a, b, c, d = [int(item) for item in input().split()]

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
int_a, int_b, int_c, int_d = map(int, input().split())

#print(int_a, int_b, int_c, int_d)

max = int_a*int_c
for i in [int_a, int_b]:
  for j in [int_c, int_d]:
    if max < i*j:
      max = i*j
      
print(max)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 標準入力を取得
a, b, c, d = list(map(int, input().split()))

# 求解処理
ans = max([a * c, a * d, b * c, b * d])

# 結果出力
print(ans)

Submission status: Accepted

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

ans_1 = a * c
ans_2 = a * d
ans_3 = b * c
ans_4 = b * d

print(max(ans_1,ans_2,ans_3,ans_4))

Submission status: Accepted

Solution code:
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
#======================================================#
def main():
    a,b,c,d = MII()
    print(max(a*c, a*d, b*c, b*d))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c,d = list(map(int,input().split()))
x1 = a*c
x2 = b*d
x3 = a*d
x4 = b*c
l = [x1,x2,x3,x4]
print(max(l))

Submission status: Accepted

Solution code:
import math
a, b, c, d = map(int, input().split())
a = math.ceil(a)
b = math.floor(b)
c = math.ceil(c)
d = math.floor(d)
ans = max(a*c, b*d, a*d, b*c)
print(ans)

Submission status: Accepted

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

AC = a * c
AD = a * d
BC = b * c
BD = b * d

l = [AC, AD, BC, BD]
print(max(l))

Submission status: Accepted

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

m = -999999999999999999

ac = a * c
if ac >= m:
  m = ac

ad = a * d
if ad >= m:
  m = ad

bc = b * c
if bc >= m:
  m = bc

bd = b * d
if bd >= m:
  m = bd

print(m)

Submission status: Accepted

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

list1 = []

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

print(max(list1))

Submission status: Accepted

Solution code:
import sys
import itertools

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

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


print(max(s,d))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if a <= 0 <= b:
    l.append(c*0)
    l.append(d*0)
if c <= 0 <= d:
    l.append(a*0)
    l.append(b*0)
print(max(l))

Submission status: Accepted

Solution code:
import sys
import numpy as np
import math  # gcdもあるよ
from collections import deque
from collections import defaultdict
from copy import deepcopy
from itertools import accumulate #リストを与えると累積和を返す
import bisect #二部探索
def input(): return sys.stdin.readline().rstrip()
from functools import lru_cache #メモ化
mod = 10**9 + 7
INF = 10**9 + 7

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

print("{}".format(max(a*c,a*d,b*c,b*d)))

Submission status: Accepted

Solution code:
a,b,c,d=map(int,input().split())
r=min(abs(a),abs(b))*(min(abs(c),abs(d)))
print(max(a*c,b*d,-r))

Submission status: Accepted

Solution code:
#B - Product Max
a,b,c,d= map(int,input().split())
print(max(a*c,a*d,b*c,b*d))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b,c,d= map(int,input().split())
i = a*c
j = a*d
k = b*c
l = b*d
print(max(i,j,k,l))

Submission status: Accepted

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

Submission status: Accepted

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

a=int(a)
b=int(b)
c=int(c)
d=int(d)

X1 = min(a,b) * min(c,d)
X2 = min(a,b) * max(c,d)
X3 = max(a,b) * min(c,d)
X4 = max(a,b) * max(c,d)

print(max(X1,X2,X3,X4))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(max(l))

Submission status: Accepted

Solution code:
import sys
import math
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
a,b,c,d=get_ints()
ans=[]
x=a*c
y=a*d
z=b*c
w=b*d
ans.extend(list([x,y,z,w]))
print(max(ans))

Submission status: Accepted

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

x1 = a * c
x2 = a * d
x3 = b * c
x4 = b * d

ans = max(x1, x2, x3, x4)

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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


    
if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(a, b, c, d):

    if a < 0 and b > 0:
        x = [0, a, b]
    else:
        x = [a, b]
    if c < 0 and d > 0:
        y = [0, c, d]
    else:
        y = [c, d]

    tmp = x[0] * y[0]
    for xx in x:
        for yy in y:
            if tmp < xx * yy:
                tmp = xx * yy

    return tmp


if __name__ == "__main__":
    a, b, c, d = map(int, input().split())
    print(solve(a, b, c, d))

Submission status: Accepted

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

print(max(ans_list))

Submission status: Accepted

Solution code:
a,b,c,d=map(int,input().split())
x1=a*c
x2=a*d
x3=b*c
x4=b*d
lst=[]
lst.append(x2)
lst.append(x3)
lst.append(x4)
lst.append(x1)
lst.sort()
print(lst[-1])

Submission status: Accepted

Solution code:
a,b,c,d = list(map(int,input().split()))
max = a* c
for i in [a,b]:
  for j in [c,d]:
    if i* j > max:
      max = i*j
print(max)

Submission status: Accepted

Solution code:
A,B,C,D = map(int, input().split())
Ans = 0

AC = A * C
AD = A * D
BC = B * C
BD = B * D

Ans = AC

if AD > Ans:
  Ans = AD
if BC > Ans:
  Ans = BC
if BD > Ans:
  Ans = BD

print(Ans)

Submission status: Accepted

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

t1 = d * b

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

print(t1)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**6)
int1 = lambda x: int(x)-1
p2D = lambda x: print(*x, sep="\n")
def II(): 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 LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

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

Submission status: Accepted

Solution code:
import sys
#sys.exit()
#sorted( ,reverse=True)

a,b,c,d = map(int, input().split())
#A = list(map(int, input().split()))
#A = [int(input()) for _ in range(N)]
#print(a,b,c,d)
#cnt = 0
#cnt += 1

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

#print(N)
#print(S,T)
#print(A)
#print('Yes')
#print('No')
#print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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


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


a, b, c, d = rii()
m = max(a * c, a * d, b * c, b * d)
print(m)

Submission status: Accepted

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