/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
What do you think? What do you think?
1st on Billboard, what do you think of it
Next is a Grammy, what do you think of it
However you think, I’m sorry, but shit, I have no fcking interest
*******************************
I'm standing on top of my Monopoly board
That means I'm on top of my game and it don't stop
til my hip don't hop anymore
https://www.a2oj.com/Ladder16.html
*******************************
Shining through the city with a little funk and soul
*******************************
300iq as writer = Sad!
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class Main
   {
      public static void main(String hi[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int A = Integer.parseInt(st.nextToken());
         int B = Integer.parseInt(st.nextToken());
         int C = Integer.parseInt(st.nextToken());
         int D = Integer.parseInt(st.nextToken());
         ArrayList<Integer> ls = new ArrayList<Integer>();
         ls.add(A);
         ls.add(B);
         if(A <= 1 && B >= 1)
            ls.add(1);
         if(A <= -1 && B >= -1)
            ls.add(-1);
         ArrayList<Integer> ls2 = new ArrayList<Integer>();
         ls2.add(C);
         ls2.add(D);
         if(C <= 1 && D >= 1)
            ls2.add(1);
         if(C <= -1 && D >= -1)
            ls2.add(-1);
         long res = Long.MIN_VALUE;
         if(A <= 0 && B >= 0 || C <= 0 && D >= 0)
            res = 0L;
         for(int a=0; a < ls.size(); a++)
         {
            long temp = ls.get(a);
            for(int b=0; b < ls2.size(); b++)
               res = Math.max(res, temp*ls2.get(b));
         }
         System.out.println(res);
      }
   } import java.util.*; util.* java import java.io.*; io.* java import java.math.*; math.* java public class Main
   {
      public static void main(String hi[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int A = Integer.parseInt(st.nextToken());
         int B = Integer.parseInt(st.nextToken());
         int C = Integer.parseInt(st.nextToken());
         int D = Integer.parseInt(st.nextToken());
         ArrayList<Integer> ls = new ArrayList<Integer>();
         ls.add(A);
         ls.add(B);
         if(A <= 1 && B >= 1)
            ls.add(1);
         if(A <= -1 && B >= -1)
            ls.add(-1);
         ArrayList<Integer> ls2 = new ArrayList<Integer>();
         ls2.add(C);
         ls2.add(D);
         if(C <= 1 && D >= 1)
            ls2.add(1);
         if(C <= -1 && D >= -1)
            ls2.add(-1);
         long res = Long.MIN_VALUE;
         if(A <= 0 && B >= 0 || C <= 0 && D >= 0)
            res = 0L;
         for(int a=0; a < ls.size(); a++)
         {
            long temp = ls.get(a);
            for(int b=0; b < ls2.size(); b++)
               res = Math.max(res, temp*ls2.get(b));
         }
         System.out.println(res);
      }
   } Main public static void main(String hi[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int A = Integer.parseInt(st.nextToken());
         int B = Integer.parseInt(st.nextToken());
         int C = Integer.parseInt(st.nextToken());
         int D = Integer.parseInt(st.nextToken());
         ArrayList<Integer> ls = new ArrayList<Integer>();
         ls.add(A);
         ls.add(B);
         if(A <= 1 && B >= 1)
            ls.add(1);
         if(A <= -1 && B >= -1)
            ls.add(-1);
         ArrayList<Integer> ls2 = new ArrayList<Integer>();
         ls2.add(C);
         ls2.add(D);
         if(C <= 1 && D >= 1)
            ls2.add(1);
         if(C <= -1 && D >= -1)
            ls2.add(-1);
         long res = Long.MIN_VALUE;
         if(A <= 0 && B >= 0 || C <= 0 && D >= 0)
            res = 0L;
         for(int a=0; a < ls.size(); a++)
         {
            long temp = ls.get(a);
            for(int b=0; b < ls2.size(); b++)
               res = Math.max(res, temp*ls2.get(b));
         }
         System.out.println(res);
      } main {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int A = Integer.parseInt(st.nextToken());
         int B = Integer.parseInt(st.nextToken());
         int C = Integer.parseInt(st.nextToken());
         int D = Integer.parseInt(st.nextToken());
         ArrayList<Integer> ls = new ArrayList<Integer>();
         ls.add(A);
         ls.add(B);
         if(A <= 1 && B >= 1)
            ls.add(1);
         if(A <= -1 && B >= -1)
            ls.add(-1);
         ArrayList<Integer> ls2 = new ArrayList<Integer>();
         ls2.add(C);
         ls2.add(D);
         if(C <= 1 && D >= 1)
            ls2.add(1);
         if(C <= -1 && D >= -1)
            ls2.add(-1);
         long res = Long.MIN_VALUE;
         if(A <= 0 && B >= 0 || C <= 0 && D >= 0)
            res = 0L;
         for(int a=0; a < ls.size(); a++)
         {
            long temp = ls.get(a);
            for(int b=0; b < ls2.size(); b++)
               res = Math.max(res, temp*ls2.get(b));
         }
         System.out.println(res);
      } BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); infile new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st = new StringTokenizer(infile.readLine()); st new StringTokenizer(infile.readLine()) int A = Integer.parseInt(st.nextToken()); A Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int B = Integer.parseInt(st.nextToken()); B Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int C = Integer.parseInt(st.nextToken()); C Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int D = Integer.parseInt(st.nextToken()); D Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st ArrayList<Integer> ls = new ArrayList<Integer>(); ls new ArrayList<Integer>() ls.add(A) ls.add ls A ls.add(B) ls.add ls B if(A <= 1 && B >= 1)
            ls.add(1); A <= 1 && B >= 1 A <= 1 A 1 B >= 1 B 1 ls.add(1) ls.add ls 1 if(A <= -1 && B >= -1)
            ls.add(-1); A <= -1 && B >= -1 A <= -1 A -1 1 B >= -1 B -1 1 ls.add(-1) ls.add ls -1 1 ArrayList<Integer> ls2 = new ArrayList<Integer>(); ls2 new ArrayList<Integer>() ls2.add(C) ls2.add ls2 C ls2.add(D) ls2.add ls2 D if(C <= 1 && D >= 1)
            ls2.add(1); C <= 1 && D >= 1 C <= 1 C 1 D >= 1 D 1 ls2.add(1) ls2.add ls2 1 if(C <= -1 && D >= -1)
            ls2.add(-1); C <= -1 && D >= -1 C <= -1 C -1 1 D >= -1 D -1 1 ls2.add(-1) ls2.add ls2 -1 1 long res = Long.MIN_VALUE; res Long.MIN_VALUE Long Long.MIN_VALUE if(A <= 0 && B >= 0 || C <= 0 && D >= 0)
            res = 0L; A <= 0 && B >= 0 || C <= 0 && D >= 0 A <= 0 && B >= 0 A <= 0 A 0 B >= 0 B 0 C <= 0 && D >= 0 C <= 0 C 0 D >= 0 D 0 res = 0L res 0L for(int a=0; a < ls.size(); a++)
         {
            long temp = ls.get(a);
            for(int b=0; b < ls2.size(); b++)
               res = Math.max(res, temp*ls2.get(b));
         } int a=0; int a=0; a 0 a < ls.size() a ls.size() ls.size ls a++ a++ a {
            long temp = ls.get(a);
            for(int b=0; b < ls2.size(); b++)
               res = Math.max(res, temp*ls2.get(b));
         } {
            long temp = ls.get(a);
            for(int b=0; b < ls2.size(); b++)
               res = Math.max(res, temp*ls2.get(b));
         } long temp = ls.get(a); temp ls.get(a) ls.get ls a for(int b=0; b < ls2.size(); b++)
               res = Math.max(res, temp*ls2.get(b)); int b=0; int b=0; b 0 b < ls2.size() b ls2.size() ls2.size ls2 b++ b++ b res = Math.max(res, temp*ls2.get(b)); res = Math.max(res, temp*ls2.get(b)) res Math.max(res, temp*ls2.get(b)) Math.max Math res temp*ls2.get(b) temp ls2.get(b) ls2.get ls2 b System.out.println(res) System.out.println System.out System System.out res String hi[] hi public class Main
   {
      public static void main(String hi[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int A = Integer.parseInt(st.nextToken());
         int B = Integer.parseInt(st.nextToken());
         int C = Integer.parseInt(st.nextToken());
         int D = Integer.parseInt(st.nextToken());
         ArrayList<Integer> ls = new ArrayList<Integer>();
         ls.add(A);
         ls.add(B);
         if(A <= 1 && B >= 1)
            ls.add(1);
         if(A <= -1 && B >= -1)
            ls.add(-1);
         ArrayList<Integer> ls2 = new ArrayList<Integer>();
         ls2.add(C);
         ls2.add(D);
         if(C <= 1 && D >= 1)
            ls2.add(1);
         if(C <= -1 && D >= -1)
            ls2.add(-1);
         long res = Long.MIN_VALUE;
         if(A <= 0 && B >= 0 || C <= 0 && D >= 0)
            res = 0L;
         for(int a=0; a < ls.size(); a++)
         {
            long temp = ls.get(a);
            for(int b=0; b < ls2.size(); b++)
               res = Math.max(res, temp*ls2.get(b));
         }
         System.out.println(res);
      }
   } public class Main
   {
      public static void main(String hi[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int A = Integer.parseInt(st.nextToken());
         int B = Integer.parseInt(st.nextToken());
         int C = Integer.parseInt(st.nextToken());
         int D = Integer.parseInt(st.nextToken());
         ArrayList<Integer> ls = new ArrayList<Integer>();
         ls.add(A);
         ls.add(B);
         if(A <= 1 && B >= 1)
            ls.add(1);
         if(A <= -1 && B >= -1)
            ls.add(-1);
         ArrayList<Integer> ls2 = new ArrayList<Integer>();
         ls2.add(C);
         ls2.add(D);
         if(C <= 1 && D >= 1)
            ls2.add(1);
         if(C <= -1 && D >= -1)
            ls2.add(-1);
         long res = Long.MIN_VALUE;
         if(A <= 0 && B >= 0 || C <= 0 && D >= 0)
            res = 0L;
         for(int a=0; a < ls.size(); a++)
         {
            long temp = ls.get(a);
            for(int b=0; b < ls2.size(); b++)
               res = Math.max(res, temp*ls2.get(b));
         }
         System.out.println(res);
      }
   } Main
/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
What do you think? What do you think?
1st on Billboard, what do you think of it
Next is a Grammy, what do you think of it
However you think, I’m sorry, but shit, I have no fcking interest
*******************************
I'm standing on top of my Monopoly board
That means I'm on top of my game and it don't stop
til my hip don't hop anymore
https://www.a2oj.com/Ladder16.html
*******************************
Shining through the city with a little funk and soul
*******************************
300iq as writer = Sad!
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class Main
   {
      public static void main(String hi[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int A = Integer.parseInt(st.nextToken());
         int B = Integer.parseInt(st.nextToken());
         int C = Integer.parseInt(st.nextToken());
         int D = Integer.parseInt(st.nextToken());
         ArrayList<Integer> ls = new ArrayList<Integer>();
         ls.add(A);
         ls.add(B);
         if(A <= 1 && B >= 1)
            ls.add(1);
         if(A <= -1 && B >= -1)
            ls.add(-1);
         ArrayList<Integer> ls2 = new ArrayList<Integer>();
         ls2.add(C);
         ls2.add(D);
         if(C <= 1 && D >= 1)
            ls2.add(1);
         if(C <= -1 && D >= -1)
            ls2.add(-1);
         long res = Long.MIN_VALUE;
         if(A <= 0 && B >= 0 || C <= 0 && D >= 0)
            res = 0L;
         for(int a=0; a < ls.size(); a++)
         {
            long temp = ls.get(a);
            for(int b=0; b < ls2.size(); b++)
               res = Math.max(res, temp*ls2.get(b));
         }
         System.out.println(res);
      }
   }