import java.util.Scanner;
public class Main {
	public static Scanner sc = new Scanner(System.in);
    public void run() throws Exception {

    	Scanner sc = new Scanner(System.in);
    	long aa[] = new long[4];
    	long a = sc.nextLong();
    	long b = sc.nextLong();
    	long c = sc.nextLong();
    	long d = sc.nextLong();
    	aa[0] = a*c;
    	aa[1] = a*d;
    	aa[2] = b*c;
    	aa[3] = b*d;

    	long res = Long.MIN_VALUE;
    	for(int i=0; i<4;i++){
    		if(res<aa[i]){
    			res = aa[i];
    		}
    	}

/*    	int n = 5;
    			int []aaa = {2, 0, 9, 0, -5};
    			int res = -10000000;
    			for(int i=0; i<n;i++){
    				if(res<aaa[i]){
    					res = aaa[i];
    				}
    			}*/
		System.out.println(res);
		
		
    }
    //再帰
    static long fib(int n){
	    if (n <= 1){
	    	return 1;
	    }else{
	    	return fib(n-1) + fib(n-2);
	    }
	}


    //動的計画法 DP
    static long nCr(int n,int r) {
    	  int dp[][]=new int[2001][2001];
    	  for(int i=0;i<2001;i++) {
    	    dp[0][i]=0;
    	  }
    	  for(int i=0;i<2001;i++) {
    	    dp[i][0]=1;
    	  }
    	  for(int i=1;i<2001;i++) {
    	    for(int j=1;j<2001;j++) {
    	      if(i==j) {
    	        dp[i][j]=1;
    	      }else {
    	        dp[i][j]=dp[i-1][j-1]+dp[i][j-1];
    	      }
    	    }
    	  }
    	  return dp[n][r];
    	}

    public static void main(String[] args) throws Exception {
        new Main().run();
    }
    //2 つの Key をもつ Map.pair は二つの要素を入れる入れ物
    class pair{
    	  int wt,val;
    	  pair(int wt,int val){
    	    this.wt=wt;
    	    this.val=val;
    	  }
    }
} import java.util.Scanner; Scanner java.util public class Main {
	public static Scanner sc = new Scanner(System.in);
    public void run() throws Exception {

    	Scanner sc = new Scanner(System.in);
    	long aa[] = new long[4];
    	long a = sc.nextLong();
    	long b = sc.nextLong();
    	long c = sc.nextLong();
    	long d = sc.nextLong();
    	aa[0] = a*c;
    	aa[1] = a*d;
    	aa[2] = b*c;
    	aa[3] = b*d;

    	long res = Long.MIN_VALUE;
    	for(int i=0; i<4;i++){
    		if(res<aa[i]){
    			res = aa[i];
    		}
    	}

/*    	int n = 5;
    			int []aaa = {2, 0, 9, 0, -5};
    			int res = -10000000;
    			for(int i=0; i<n;i++){
    				if(res<aaa[i]){
    					res = aaa[i];
    				}
    			}*/
		System.out.println(res);
		
		
    }
    //再帰
    static long fib(int n){
	    if (n <= 1){
	    	return 1;
	    }else{
	    	return fib(n-1) + fib(n-2);
	    }
	}


    //動的計画法 DP
    static long nCr(int n,int r) {
    	  int dp[][]=new int[2001][2001];
    	  for(int i=0;i<2001;i++) {
    	    dp[0][i]=0;
    	  }
    	  for(int i=0;i<2001;i++) {
    	    dp[i][0]=1;
    	  }
    	  for(int i=1;i<2001;i++) {
    	    for(int j=1;j<2001;j++) {
    	      if(i==j) {
    	        dp[i][j]=1;
    	      }else {
    	        dp[i][j]=dp[i-1][j-1]+dp[i][j-1];
    	      }
    	    }
    	  }
    	  return dp[n][r];
    	}

    public static void main(String[] args) throws Exception {
        new Main().run();
    }
    //2 つの Key をもつ Map.pair は二つの要素を入れる入れ物
    class pair{
    	  int wt,val;
    	  pair(int wt,int val){
    	    this.wt=wt;
    	    this.val=val;
    	  }
    }
} Main public static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public void run() throws Exception {

    	Scanner sc = new Scanner(System.in);
    	long aa[] = new long[4];
    	long a = sc.nextLong();
    	long b = sc.nextLong();
    	long c = sc.nextLong();
    	long d = sc.nextLong();
    	aa[0] = a*c;
    	aa[1] = a*d;
    	aa[2] = b*c;
    	aa[3] = b*d;

    	long res = Long.MIN_VALUE;
    	for(int i=0; i<4;i++){
    		if(res<aa[i]){
    			res = aa[i];
    		}
    	}

/*    	int n = 5;
    			int []aaa = {2, 0, 9, 0, -5};
    			int res = -10000000;
    			for(int i=0; i<n;i++){
    				if(res<aaa[i]){
    					res = aaa[i];
    				}
    			}*/
		System.out.println(res);
		
		
    } run {

    	Scanner sc = new Scanner(System.in);
    	long aa[] = new long[4];
    	long a = sc.nextLong();
    	long b = sc.nextLong();
    	long c = sc.nextLong();
    	long d = sc.nextLong();
    	aa[0] = a*c;
    	aa[1] = a*d;
    	aa[2] = b*c;
    	aa[3] = b*d;

    	long res = Long.MIN_VALUE;
    	for(int i=0; i<4;i++){
    		if(res<aa[i]){
    			res = aa[i];
    		}
    	}

/*    	int n = 5;
    			int []aaa = {2, 0, 9, 0, -5};
    			int res = -10000000;
    			for(int i=0; i<n;i++){
    				if(res<aaa[i]){
    					res = aaa[i];
    				}
    			}*/
		System.out.println(res);
		
		
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long aa[] = new long[4]; aa new long[4] 4 long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc long c = sc.nextLong(); c sc.nextLong() sc.nextLong sc long d = sc.nextLong(); d sc.nextLong() sc.nextLong sc aa[0] = a*c aa[0] aa 0 a*c a c aa[1] = a*d aa[1] aa 1 a*d a d aa[2] = b*c aa[2] aa 2 b*c b c aa[3] = b*d aa[3] aa 3 b*d b d long res = Long.MIN_VALUE; res Long.MIN_VALUE Long Long.MIN_VALUE for(int i=0; i<4;i++){
    		if(res<aa[i]){
    			res = aa[i];
    		}
    	} int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
    		if(res<aa[i]){
    			res = aa[i];
    		}
    	} {
    		if(res<aa[i]){
    			res = aa[i];
    		}
    	} if(res<aa[i]){
    			res = aa[i];
    		} res<aa[i] res aa[i] aa i {
    			res = aa[i];
    		} res = aa[i] res aa[i] aa i System.out.println(res) System.out.println System.out System System.out res //再帰
    static long fib(int n){
	    if (n <= 1){
	    	return 1;
	    }else{
	    	return fib(n-1) + fib(n-2);
	    }
	} fib {
	    if (n <= 1){
	    	return 1;
	    }else{
	    	return fib(n-1) + fib(n-2);
	    }
	} if (n <= 1){
	    	return 1;
	    }else{
	    	return fib(n-1) + fib(n-2);
	    } n <= 1 n 1 {
	    	return 1;
	    } return 1; 1 {
	    	return fib(n-1) + fib(n-2);
	    } return fib(n-1) + fib(n-2); fib(n-1) + fib(n-2) fib(n-1) fib n-1 n 1 fib(n-2) fib n-2 n 2 int n n //動的計画法 DP
    static long nCr(int n,int r) {
    	  int dp[][]=new int[2001][2001];
    	  for(int i=0;i<2001;i++) {
    	    dp[0][i]=0;
    	  }
    	  for(int i=0;i<2001;i++) {
    	    dp[i][0]=1;
    	  }
    	  for(int i=1;i<2001;i++) {
    	    for(int j=1;j<2001;j++) {
    	      if(i==j) {
    	        dp[i][j]=1;
    	      }else {
    	        dp[i][j]=dp[i-1][j-1]+dp[i][j-1];
    	      }
    	    }
    	  }
    	  return dp[n][r];
    	} nCr {
    	  int dp[][]=new int[2001][2001];
    	  for(int i=0;i<2001;i++) {
    	    dp[0][i]=0;
    	  }
    	  for(int i=0;i<2001;i++) {
    	    dp[i][0]=1;
    	  }
    	  for(int i=1;i<2001;i++) {
    	    for(int j=1;j<2001;j++) {
    	      if(i==j) {
    	        dp[i][j]=1;
    	      }else {
    	        dp[i][j]=dp[i-1][j-1]+dp[i][j-1];
    	      }
    	    }
    	  }
    	  return dp[n][r];
    	} int dp[][]=new int[2001][2001]; dp new int[2001][2001] 2001 2001 for(int i=0;i<2001;i++) {
    	    dp[0][i]=0;
    	  } int i=0; int i=0; i 0 i<2001 i 2001 i++ i++ i {
    	    dp[0][i]=0;
    	  } {
    	    dp[0][i]=0;
    	  } dp[0][i]=0 dp[0][i] dp[0] dp 0 i 0 for(int i=0;i<2001;i++) {
    	    dp[i][0]=1;
    	  } int i=0; int i=0; i 0 i<2001 i 2001 i++ i++ i {
    	    dp[i][0]=1;
    	  } {
    	    dp[i][0]=1;
    	  } dp[i][0]=1 dp[i][0] dp[i] dp i 0 1 for(int i=1;i<2001;i++) {
    	    for(int j=1;j<2001;j++) {
    	      if(i==j) {
    	        dp[i][j]=1;
    	      }else {
    	        dp[i][j]=dp[i-1][j-1]+dp[i][j-1];
    	      }
    	    }
    	  } int i=1; int i=1; i 1 i<2001 i 2001 i++ i++ i {
    	    for(int j=1;j<2001;j++) {
    	      if(i==j) {
    	        dp[i][j]=1;
    	      }else {
    	        dp[i][j]=dp[i-1][j-1]+dp[i][j-1];
    	      }
    	    }
    	  } {
    	    for(int j=1;j<2001;j++) {
    	      if(i==j) {
    	        dp[i][j]=1;
    	      }else {
    	        dp[i][j]=dp[i-1][j-1]+dp[i][j-1];
    	      }
    	    }
    	  } for(int j=1;j<2001;j++) {
    	      if(i==j) {
    	        dp[i][j]=1;
    	      }else {
    	        dp[i][j]=dp[i-1][j-1]+dp[i][j-1];
    	      }
    	    } int j=1; int j=1; j 1 j<2001 j 2001 j++ j++ j {
    	      if(i==j) {
    	        dp[i][j]=1;
    	      }else {
    	        dp[i][j]=dp[i-1][j-1]+dp[i][j-1];
    	      }
    	    } {
    	      if(i==j) {
    	        dp[i][j]=1;
    	      }else {
    	        dp[i][j]=dp[i-1][j-1]+dp[i][j-1];
    	      }
    	    } if(i==j) {
    	        dp[i][j]=1;
    	      }else {
    	        dp[i][j]=dp[i-1][j-1]+dp[i][j-1];
    	      } i==j i j {
    	        dp[i][j]=1;
    	      } dp[i][j]=1 dp[i][j] dp[i] dp i j 1 {
    	        dp[i][j]=dp[i-1][j-1]+dp[i][j-1];
    	      } dp[i][j]=dp[i-1][j-1]+dp[i][j-1] dp[i][j] dp[i] dp i j dp[i-1][j-1]+dp[i][j-1] dp[i-1][j-1] dp[i-1] dp i-1 i 1 j-1 j 1 dp[i][j-1] dp[i] dp i j-1 j 1 return dp[n][r]; dp[n][r] dp[n] dp n r int n n int r r public static void main(String[] args) throws Exception {
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args class pair{
    	  int wt,val;
    	  pair(int wt,int val){
    	    this.wt=wt;
    	    this.val=val;
    	  }
    } pair int wt wt val; val pair(int wt,int val){
    	    this.wt=wt;
    	    this.val=val;
    	  } pair {
    	    this.wt=wt;
    	    this.val=val;
    	  } this.wt=wt this.wt this this.wt wt this.val=val this.val this this.val val int wt wt int val val public class Main {
	public static Scanner sc = new Scanner(System.in);
    public void run() throws Exception {

    	Scanner sc = new Scanner(System.in);
    	long aa[] = new long[4];
    	long a = sc.nextLong();
    	long b = sc.nextLong();
    	long c = sc.nextLong();
    	long d = sc.nextLong();
    	aa[0] = a*c;
    	aa[1] = a*d;
    	aa[2] = b*c;
    	aa[3] = b*d;

    	long res = Long.MIN_VALUE;
    	for(int i=0; i<4;i++){
    		if(res<aa[i]){
    			res = aa[i];
    		}
    	}

/*    	int n = 5;
    			int []aaa = {2, 0, 9, 0, -5};
    			int res = -10000000;
    			for(int i=0; i<n;i++){
    				if(res<aaa[i]){
    					res = aaa[i];
    				}
    			}*/
		System.out.println(res);
		
		
    }
    //再帰
    static long fib(int n){
	    if (n <= 1){
	    	return 1;
	    }else{
	    	return fib(n-1) + fib(n-2);
	    }
	}


    //動的計画法 DP
    static long nCr(int n,int r) {
    	  int dp[][]=new int[2001][2001];
    	  for(int i=0;i<2001;i++) {
    	    dp[0][i]=0;
    	  }
    	  for(int i=0;i<2001;i++) {
    	    dp[i][0]=1;
    	  }
    	  for(int i=1;i<2001;i++) {
    	    for(int j=1;j<2001;j++) {
    	      if(i==j) {
    	        dp[i][j]=1;
    	      }else {
    	        dp[i][j]=dp[i-1][j-1]+dp[i][j-1];
    	      }
    	    }
    	  }
    	  return dp[n][r];
    	}

    public static void main(String[] args) throws Exception {
        new Main().run();
    }
    //2 つの Key をもつ Map.pair は二つの要素を入れる入れ物
    class pair{
    	  int wt,val;
    	  pair(int wt,int val){
    	    this.wt=wt;
    	    this.val=val;
    	  }
    }
} public class Main {
	public static Scanner sc = new Scanner(System.in);
    public void run() throws Exception {

    	Scanner sc = new Scanner(System.in);
    	long aa[] = new long[4];
    	long a = sc.nextLong();
    	long b = sc.nextLong();
    	long c = sc.nextLong();
    	long d = sc.nextLong();
    	aa[0] = a*c;
    	aa[1] = a*d;
    	aa[2] = b*c;
    	aa[3] = b*d;

    	long res = Long.MIN_VALUE;
    	for(int i=0; i<4;i++){
    		if(res<aa[i]){
    			res = aa[i];
    		}
    	}

/*    	int n = 5;
    			int []aaa = {2, 0, 9, 0, -5};
    			int res = -10000000;
    			for(int i=0; i<n;i++){
    				if(res<aaa[i]){
    					res = aaa[i];
    				}
    			}*/
		System.out.println(res);
		
		
    }
    //再帰
    static long fib(int n){
	    if (n <= 1){
	    	return 1;
	    }else{
	    	return fib(n-1) + fib(n-2);
	    }
	}


    //動的計画法 DP
    static long nCr(int n,int r) {
    	  int dp[][]=new int[2001][2001];
    	  for(int i=0;i<2001;i++) {
    	    dp[0][i]=0;
    	  }
    	  for(int i=0;i<2001;i++) {
    	    dp[i][0]=1;
    	  }
    	  for(int i=1;i<2001;i++) {
    	    for(int j=1;j<2001;j++) {
    	      if(i==j) {
    	        dp[i][j]=1;
    	      }else {
    	        dp[i][j]=dp[i-1][j-1]+dp[i][j-1];
    	      }
    	    }
    	  }
    	  return dp[n][r];
    	}

    public static void main(String[] args) throws Exception {
        new Main().run();
    }
    //2 つの Key をもつ Map.pair は二つの要素を入れる入れ物
    class pair{
    	  int wt,val;
    	  pair(int wt,int val){
    	    this.wt=wt;
    	    this.val=val;
    	  }
    }
} Main
import java.util.Scanner;
public class Main {
	public static Scanner sc = new Scanner(System.in);
    public void run() throws Exception {

    	Scanner sc = new Scanner(System.in);
    	long aa[] = new long[4];
    	long a = sc.nextLong();
    	long b = sc.nextLong();
    	long c = sc.nextLong();
    	long d = sc.nextLong();
    	aa[0] = a*c;
    	aa[1] = a*d;
    	aa[2] = b*c;
    	aa[3] = b*d;

    	long res = Long.MIN_VALUE;
    	for(int i=0; i<4;i++){
    		if(res<aa[i]){
    			res = aa[i];
    		}
    	}

/*    	int n = 5;
    			int []aaa = {2, 0, 9, 0, -5};
    			int res = -10000000;
    			for(int i=0; i<n;i++){
    				if(res<aaa[i]){
    					res = aaa[i];
    				}
    			}*/
		System.out.println(res);
		
		
    }
    //再帰
    static long fib(int n){
	    if (n <= 1){
	    	return 1;
	    }else{
	    	return fib(n-1) + fib(n-2);
	    }
	}


    //動的計画法 DP
    static long nCr(int n,int r) {
    	  int dp[][]=new int[2001][2001];
    	  for(int i=0;i<2001;i++) {
    	    dp[0][i]=0;
    	  }
    	  for(int i=0;i<2001;i++) {
    	    dp[i][0]=1;
    	  }
    	  for(int i=1;i<2001;i++) {
    	    for(int j=1;j<2001;j++) {
    	      if(i==j) {
    	        dp[i][j]=1;
    	      }else {
    	        dp[i][j]=dp[i-1][j-1]+dp[i][j-1];
    	      }
    	    }
    	  }
    	  return dp[n][r];
    	}

    public static void main(String[] args) throws Exception {
        new Main().run();
    }
    //2 つの Key をもつ Map.pair は二つの要素を入れる入れ物
    class pair{
    	  int wt,val;
    	  pair(int wt,int val){
    	    this.wt=wt;
    	    this.val=val;
    	  }
    }
}
