import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public final class Main {

    public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        final long a = fs.nextInt();
        final long b = fs.nextInt();
        final long c = fs.nextInt();
        final long d = fs.nextInt();


        long answer = 0;


        if(a>0 && d<0 || b<0 && c>0) {
        	// MAXが負になるパターン
        	answer = Math.multiplyExact(a, c);

        }


		if(Math.multiplyExact(a, c) > answer) {
			answer = Math.multiplyExact(a, c);
		}
		if(Math.multiplyExact(a, d) > answer) {
			answer = Math.multiplyExact(a, d);
		}

		if(Math.multiplyExact(b, c) > answer) {
			answer = Math.multiplyExact(b, c);
		}
		if(Math.multiplyExact(b, d) > answer) {
			answer = Math.multiplyExact(b, d);
		}
		System.out.print(answer);




    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        int[] readArray(int n) {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.StringTokenizer; StringTokenizer java.util public final class Main {

    public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        final long a = fs.nextInt();
        final long b = fs.nextInt();
        final long c = fs.nextInt();
        final long d = fs.nextInt();


        long answer = 0;


        if(a>0 && d<0 || b<0 && c>0) {
        	// MAXが負になるパターン
        	answer = Math.multiplyExact(a, c);

        }


		if(Math.multiplyExact(a, c) > answer) {
			answer = Math.multiplyExact(a, c);
		}
		if(Math.multiplyExact(a, d) > answer) {
			answer = Math.multiplyExact(a, d);
		}

		if(Math.multiplyExact(b, c) > answer) {
			answer = Math.multiplyExact(b, c);
		}
		if(Math.multiplyExact(b, d) > answer) {
			answer = Math.multiplyExact(b, d);
		}
		System.out.print(answer);




    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        int[] readArray(int n) {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
} Main public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        final long a = fs.nextInt();
        final long b = fs.nextInt();
        final long c = fs.nextInt();
        final long d = fs.nextInt();


        long answer = 0;


        if(a>0 && d<0 || b<0 && c>0) {
        	// MAXが負になるパターン
        	answer = Math.multiplyExact(a, c);

        }


		if(Math.multiplyExact(a, c) > answer) {
			answer = Math.multiplyExact(a, c);
		}
		if(Math.multiplyExact(a, d) > answer) {
			answer = Math.multiplyExact(a, d);
		}

		if(Math.multiplyExact(b, c) > answer) {
			answer = Math.multiplyExact(b, c);
		}
		if(Math.multiplyExact(b, d) > answer) {
			answer = Math.multiplyExact(b, d);
		}
		System.out.print(answer);




    } main {
        final FastScanner fs = new FastScanner();
        final long a = fs.nextInt();
        final long b = fs.nextInt();
        final long c = fs.nextInt();
        final long d = fs.nextInt();


        long answer = 0;


        if(a>0 && d<0 || b<0 && c>0) {
        	// MAXが負になるパターン
        	answer = Math.multiplyExact(a, c);

        }


		if(Math.multiplyExact(a, c) > answer) {
			answer = Math.multiplyExact(a, c);
		}
		if(Math.multiplyExact(a, d) > answer) {
			answer = Math.multiplyExact(a, d);
		}

		if(Math.multiplyExact(b, c) > answer) {
			answer = Math.multiplyExact(b, c);
		}
		if(Math.multiplyExact(b, d) > answer) {
			answer = Math.multiplyExact(b, d);
		}
		System.out.print(answer);




    } final FastScanner fs = new FastScanner(); fs new FastScanner() final long a = fs.nextInt(); a fs.nextInt() fs.nextInt fs final long b = fs.nextInt(); b fs.nextInt() fs.nextInt fs final long c = fs.nextInt(); c fs.nextInt() fs.nextInt fs final long d = fs.nextInt(); d fs.nextInt() fs.nextInt fs long answer = 0; answer 0 if(a>0 && d<0 || b<0 && c>0) {
        	// MAXが負になるパターン
        	answer = Math.multiplyExact(a, c);

        } a>0 && d<0 || b<0 && c>0 a>0 && d<0 a>0 a 0 d<0 d 0 b<0 && c>0 b<0 b 0 c>0 c 0 {
        	// MAXが負になるパターン
        	answer = Math.multiplyExact(a, c);

        } answer = Math.multiplyExact(a, c) answer Math.multiplyExact(a, c) Math.multiplyExact Math a c if(Math.multiplyExact(a, c) > answer) {
			answer = Math.multiplyExact(a, c);
		} Math.multiplyExact(a, c) > answer Math.multiplyExact(a, c) Math.multiplyExact Math a c answer {
			answer = Math.multiplyExact(a, c);
		} answer = Math.multiplyExact(a, c) answer Math.multiplyExact(a, c) Math.multiplyExact Math a c if(Math.multiplyExact(a, d) > answer) {
			answer = Math.multiplyExact(a, d);
		} Math.multiplyExact(a, d) > answer Math.multiplyExact(a, d) Math.multiplyExact Math a d answer {
			answer = Math.multiplyExact(a, d);
		} answer = Math.multiplyExact(a, d) answer Math.multiplyExact(a, d) Math.multiplyExact Math a d if(Math.multiplyExact(b, c) > answer) {
			answer = Math.multiplyExact(b, c);
		} Math.multiplyExact(b, c) > answer Math.multiplyExact(b, c) Math.multiplyExact Math b c answer {
			answer = Math.multiplyExact(b, c);
		} answer = Math.multiplyExact(b, c) answer Math.multiplyExact(b, c) Math.multiplyExact Math b c if(Math.multiplyExact(b, d) > answer) {
			answer = Math.multiplyExact(b, d);
		} Math.multiplyExact(b, d) > answer Math.multiplyExact(b, d) Math.multiplyExact Math b d answer {
			answer = Math.multiplyExact(b, d);
		} answer = Math.multiplyExact(b, d) answer Math.multiplyExact(b, d) Math.multiplyExact Math b d System.out.print(answer) System.out.print System.out System System.out answer String[] args args static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        int[] readArray(int n) {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    } FastScanner BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st = new StringTokenizer(""); st new StringTokenizer("") String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } next {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            } !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            } try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                } IOException e {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    st = new StringTokenizer(br.readLine());
                } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next int[] readArray(int n) {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        } readArray {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        } final int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++) { a[i] = nextInt(); } int i = 0; int i = 0; i 0 i < n i n i++ i++ i { a[i] = nextInt(); } { a[i] = nextInt(); } a[i] = nextInt() a[i] a i nextInt() nextInt return a; a int n n long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public final class Main {

    public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        final long a = fs.nextInt();
        final long b = fs.nextInt();
        final long c = fs.nextInt();
        final long d = fs.nextInt();


        long answer = 0;


        if(a>0 && d<0 || b<0 && c>0) {
        	// MAXが負になるパターン
        	answer = Math.multiplyExact(a, c);

        }


		if(Math.multiplyExact(a, c) > answer) {
			answer = Math.multiplyExact(a, c);
		}
		if(Math.multiplyExact(a, d) > answer) {
			answer = Math.multiplyExact(a, d);
		}

		if(Math.multiplyExact(b, c) > answer) {
			answer = Math.multiplyExact(b, c);
		}
		if(Math.multiplyExact(b, d) > answer) {
			answer = Math.multiplyExact(b, d);
		}
		System.out.print(answer);




    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        int[] readArray(int n) {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
} public final class Main {

    public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        final long a = fs.nextInt();
        final long b = fs.nextInt();
        final long c = fs.nextInt();
        final long d = fs.nextInt();


        long answer = 0;


        if(a>0 && d<0 || b<0 && c>0) {
        	// MAXが負になるパターン
        	answer = Math.multiplyExact(a, c);

        }


		if(Math.multiplyExact(a, c) > answer) {
			answer = Math.multiplyExact(a, c);
		}
		if(Math.multiplyExact(a, d) > answer) {
			answer = Math.multiplyExact(a, d);
		}

		if(Math.multiplyExact(b, c) > answer) {
			answer = Math.multiplyExact(b, c);
		}
		if(Math.multiplyExact(b, d) > answer) {
			answer = Math.multiplyExact(b, d);
		}
		System.out.print(answer);




    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        int[] readArray(int n) {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public final class Main {

    public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        final long a = fs.nextInt();
        final long b = fs.nextInt();
        final long c = fs.nextInt();
        final long d = fs.nextInt();


        long answer = 0;


        if(a>0 && d<0 || b<0 && c>0) {
        	// MAXが負になるパターン
        	answer = Math.multiplyExact(a, c);

        }


		if(Math.multiplyExact(a, c) > answer) {
			answer = Math.multiplyExact(a, c);
		}
		if(Math.multiplyExact(a, d) > answer) {
			answer = Math.multiplyExact(a, d);
		}

		if(Math.multiplyExact(b, c) > answer) {
			answer = Math.multiplyExact(b, c);
		}
		if(Math.multiplyExact(b, d) > answer) {
			answer = Math.multiplyExact(b, d);
		}
		System.out.print(answer);




    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        int[] readArray(int n) {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
}