import java.math.BigInteger;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();
		BigInteger ans = BigInteger.ONE;
		BigInteger ans1 = ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(c));
		BigInteger ans2 = ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(d));
		BigInteger ans3 = ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(c));
		BigInteger ans4 = ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(d));
		if (ans1.compareTo(ans2) >= 0) {
			// 2 < 1
			if (ans1.compareTo(ans3) >= 0) {
				if (ans1.compareTo(ans4) >= 0) {
					System.out.println(ans1);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		} else {
			if (ans2.compareTo(ans3) >= 0) {
				if (ans2.compareTo(ans4) >= 0) {
					System.out.println(ans2);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		}
	}
} import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();
		BigInteger ans = BigInteger.ONE;
		BigInteger ans1 = ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(c));
		BigInteger ans2 = ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(d));
		BigInteger ans3 = ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(c));
		BigInteger ans4 = ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(d));
		if (ans1.compareTo(ans2) >= 0) {
			// 2 < 1
			if (ans1.compareTo(ans3) >= 0) {
				if (ans1.compareTo(ans4) >= 0) {
					System.out.println(ans1);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		} else {
			if (ans2.compareTo(ans3) >= 0) {
				if (ans2.compareTo(ans4) >= 0) {
					System.out.println(ans2);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		}
	}
} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();
		BigInteger ans = BigInteger.ONE;
		BigInteger ans1 = ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(c));
		BigInteger ans2 = ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(d));
		BigInteger ans3 = ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(c));
		BigInteger ans4 = ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(d));
		if (ans1.compareTo(ans2) >= 0) {
			// 2 < 1
			if (ans1.compareTo(ans3) >= 0) {
				if (ans1.compareTo(ans4) >= 0) {
					System.out.println(ans1);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		} else {
			if (ans2.compareTo(ans3) >= 0) {
				if (ans2.compareTo(ans4) >= 0) {
					System.out.println(ans2);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		}
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();
		BigInteger ans = BigInteger.ONE;
		BigInteger ans1 = ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(c));
		BigInteger ans2 = ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(d));
		BigInteger ans3 = ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(c));
		BigInteger ans4 = ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(d));
		if (ans1.compareTo(ans2) >= 0) {
			// 2 < 1
			if (ans1.compareTo(ans3) >= 0) {
				if (ans1.compareTo(ans4) >= 0) {
					System.out.println(ans1);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		} else {
			if (ans2.compareTo(ans3) >= 0) {
				if (ans2.compareTo(ans4) >= 0) {
					System.out.println(ans2);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int d = sc.nextInt(); d sc.nextInt() sc.nextInt sc BigInteger ans = BigInteger.ONE; ans BigInteger.ONE BigInteger BigInteger.ONE BigInteger ans1 = ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(c)); ans1 ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(c)) ans.multiply(BigInteger.valueOf(a)).multiply ans.multiply(BigInteger.valueOf(a)) ans.multiply ans BigInteger.valueOf(a) BigInteger.valueOf BigInteger a BigInteger.valueOf(c) BigInteger.valueOf BigInteger c BigInteger ans2 = ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(d)); ans2 ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(d)) ans.multiply(BigInteger.valueOf(a)).multiply ans.multiply(BigInteger.valueOf(a)) ans.multiply ans BigInteger.valueOf(a) BigInteger.valueOf BigInteger a BigInteger.valueOf(d) BigInteger.valueOf BigInteger d BigInteger ans3 = ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(c)); ans3 ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(c)) ans.multiply(BigInteger.valueOf(b)).multiply ans.multiply(BigInteger.valueOf(b)) ans.multiply ans BigInteger.valueOf(b) BigInteger.valueOf BigInteger b BigInteger.valueOf(c) BigInteger.valueOf BigInteger c BigInteger ans4 = ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(d)); ans4 ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(d)) ans.multiply(BigInteger.valueOf(b)).multiply ans.multiply(BigInteger.valueOf(b)) ans.multiply ans BigInteger.valueOf(b) BigInteger.valueOf BigInteger b BigInteger.valueOf(d) BigInteger.valueOf BigInteger d if (ans1.compareTo(ans2) >= 0) {
			// 2 < 1
			if (ans1.compareTo(ans3) >= 0) {
				if (ans1.compareTo(ans4) >= 0) {
					System.out.println(ans1);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		} else {
			if (ans2.compareTo(ans3) >= 0) {
				if (ans2.compareTo(ans4) >= 0) {
					System.out.println(ans2);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		} ans1.compareTo(ans2) >= 0 ans1.compareTo(ans2) ans1.compareTo ans1 ans2 0 {
			// 2 < 1
			if (ans1.compareTo(ans3) >= 0) {
				if (ans1.compareTo(ans4) >= 0) {
					System.out.println(ans1);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		} if (ans1.compareTo(ans3) >= 0) {
				if (ans1.compareTo(ans4) >= 0) {
					System.out.println(ans1);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			} ans1.compareTo(ans3) >= 0 ans1.compareTo(ans3) ans1.compareTo ans1 ans3 0 {
				if (ans1.compareTo(ans4) >= 0) {
					System.out.println(ans1);
				} else {
					System.out.println(ans4);
				}
			} if (ans1.compareTo(ans4) >= 0) {
					System.out.println(ans1);
				} else {
					System.out.println(ans4);
				} ans1.compareTo(ans4) >= 0 ans1.compareTo(ans4) ans1.compareTo ans1 ans4 0 {
					System.out.println(ans1);
				} System.out.println(ans1) System.out.println System.out System System.out ans1 {
					System.out.println(ans4);
				} System.out.println(ans4) System.out.println System.out System System.out ans4 {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			} if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				} ans3.compareTo(ans4) >= 0 ans3.compareTo(ans4) ans3.compareTo ans3 ans4 0 {
					System.out.println(ans3);
				} System.out.println(ans3) System.out.println System.out System System.out ans3 {
					System.out.println(ans4);
				} System.out.println(ans4) System.out.println System.out System System.out ans4 {
			if (ans2.compareTo(ans3) >= 0) {
				if (ans2.compareTo(ans4) >= 0) {
					System.out.println(ans2);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		} if (ans2.compareTo(ans3) >= 0) {
				if (ans2.compareTo(ans4) >= 0) {
					System.out.println(ans2);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			} ans2.compareTo(ans3) >= 0 ans2.compareTo(ans3) ans2.compareTo ans2 ans3 0 {
				if (ans2.compareTo(ans4) >= 0) {
					System.out.println(ans2);
				} else {
					System.out.println(ans4);
				}
			} if (ans2.compareTo(ans4) >= 0) {
					System.out.println(ans2);
				} else {
					System.out.println(ans4);
				} ans2.compareTo(ans4) >= 0 ans2.compareTo(ans4) ans2.compareTo ans2 ans4 0 {
					System.out.println(ans2);
				} System.out.println(ans2) System.out.println System.out System System.out ans2 {
					System.out.println(ans4);
				} System.out.println(ans4) System.out.println System.out System System.out ans4 {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			} if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				} ans3.compareTo(ans4) >= 0 ans3.compareTo(ans4) ans3.compareTo ans3 ans4 0 {
					System.out.println(ans3);
				} System.out.println(ans3) System.out.println System.out System System.out ans3 {
					System.out.println(ans4);
				} System.out.println(ans4) System.out.println System.out System System.out ans4 String[] args args public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();
		BigInteger ans = BigInteger.ONE;
		BigInteger ans1 = ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(c));
		BigInteger ans2 = ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(d));
		BigInteger ans3 = ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(c));
		BigInteger ans4 = ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(d));
		if (ans1.compareTo(ans2) >= 0) {
			// 2 < 1
			if (ans1.compareTo(ans3) >= 0) {
				if (ans1.compareTo(ans4) >= 0) {
					System.out.println(ans1);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		} else {
			if (ans2.compareTo(ans3) >= 0) {
				if (ans2.compareTo(ans4) >= 0) {
					System.out.println(ans2);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		}
	}
} public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();
		BigInteger ans = BigInteger.ONE;
		BigInteger ans1 = ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(c));
		BigInteger ans2 = ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(d));
		BigInteger ans3 = ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(c));
		BigInteger ans4 = ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(d));
		if (ans1.compareTo(ans2) >= 0) {
			// 2 < 1
			if (ans1.compareTo(ans3) >= 0) {
				if (ans1.compareTo(ans4) >= 0) {
					System.out.println(ans1);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		} else {
			if (ans2.compareTo(ans3) >= 0) {
				if (ans2.compareTo(ans4) >= 0) {
					System.out.println(ans2);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		}
	}
} Main
import java.math.BigInteger;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();
		BigInteger ans = BigInteger.ONE;
		BigInteger ans1 = ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(c));
		BigInteger ans2 = ans.multiply(BigInteger.valueOf(a)).multiply(BigInteger.valueOf(d));
		BigInteger ans3 = ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(c));
		BigInteger ans4 = ans.multiply(BigInteger.valueOf(b)).multiply(BigInteger.valueOf(d));
		if (ans1.compareTo(ans2) >= 0) {
			// 2 < 1
			if (ans1.compareTo(ans3) >= 0) {
				if (ans1.compareTo(ans4) >= 0) {
					System.out.println(ans1);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		} else {
			if (ans2.compareTo(ans3) >= 0) {
				if (ans2.compareTo(ans4) >= 0) {
					System.out.println(ans2);
				} else {
					System.out.println(ans4);
				}
			} else {
				if (ans3.compareTo(ans4) >= 0) {
					System.out.println(ans3);
				} else {
					System.out.println(ans4);
				}
			}
		}
	}
}
