import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    int num[] = new int[4];
    Scanner scanner = new Scanner(System.in);
    for (int i = 0; i < 4; i++) {
      num[i] = Integer.parseInt(scanner.next());
    }
    scanner.close();
    long max = (long) num[0] * (long) num[2];
    long tmp = 0;

    if (num[0] > 0 && num[2] > 0) {
      max = (long) num[1] * (long) num[3];
    } else if (num[1] < 0 && num[3] < 0) {
      max = (long) num[0] * (long) num[2];
    } else {
      for (int j = 0; j < 2; j++) {
        for (int k = 2; k < 4; k++) {
          tmp = (long) num[j] * (long) num[k];
          if (max < tmp) {
            max = tmp;
          }
        }
      }
    }
    System.out.println(max);
  }
} import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {
    int num[] = new int[4];
    Scanner scanner = new Scanner(System.in);
    for (int i = 0; i < 4; i++) {
      num[i] = Integer.parseInt(scanner.next());
    }
    scanner.close();
    long max = (long) num[0] * (long) num[2];
    long tmp = 0;

    if (num[0] > 0 && num[2] > 0) {
      max = (long) num[1] * (long) num[3];
    } else if (num[1] < 0 && num[3] < 0) {
      max = (long) num[0] * (long) num[2];
    } else {
      for (int j = 0; j < 2; j++) {
        for (int k = 2; k < 4; k++) {
          tmp = (long) num[j] * (long) num[k];
          if (max < tmp) {
            max = tmp;
          }
        }
      }
    }
    System.out.println(max);
  }
} Main public static void main(String[] args) {
    int num[] = new int[4];
    Scanner scanner = new Scanner(System.in);
    for (int i = 0; i < 4; i++) {
      num[i] = Integer.parseInt(scanner.next());
    }
    scanner.close();
    long max = (long) num[0] * (long) num[2];
    long tmp = 0;

    if (num[0] > 0 && num[2] > 0) {
      max = (long) num[1] * (long) num[3];
    } else if (num[1] < 0 && num[3] < 0) {
      max = (long) num[0] * (long) num[2];
    } else {
      for (int j = 0; j < 2; j++) {
        for (int k = 2; k < 4; k++) {
          tmp = (long) num[j] * (long) num[k];
          if (max < tmp) {
            max = tmp;
          }
        }
      }
    }
    System.out.println(max);
  } main {
    int num[] = new int[4];
    Scanner scanner = new Scanner(System.in);
    for (int i = 0; i < 4; i++) {
      num[i] = Integer.parseInt(scanner.next());
    }
    scanner.close();
    long max = (long) num[0] * (long) num[2];
    long tmp = 0;

    if (num[0] > 0 && num[2] > 0) {
      max = (long) num[1] * (long) num[3];
    } else if (num[1] < 0 && num[3] < 0) {
      max = (long) num[0] * (long) num[2];
    } else {
      for (int j = 0; j < 2; j++) {
        for (int k = 2; k < 4; k++) {
          tmp = (long) num[j] * (long) num[k];
          if (max < tmp) {
            max = tmp;
          }
        }
      }
    }
    System.out.println(max);
  } int num[] = new int[4]; num new int[4] 4 Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) for (int i = 0; i < 4; i++) {
      num[i] = Integer.parseInt(scanner.next());
    } int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
      num[i] = Integer.parseInt(scanner.next());
    } {
      num[i] = Integer.parseInt(scanner.next());
    } num[i] = Integer.parseInt(scanner.next()) num[i] num i Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner scanner.close() scanner.close scanner long max = (long) num[0] * (long) num[2]; max (long) num[0] * (long) num[2] (long) num[0] num 0 (long) num[2] num 2 long tmp = 0; tmp 0 if (num[0] > 0 && num[2] > 0) {
      max = (long) num[1] * (long) num[3];
    } else if (num[1] < 0 && num[3] < 0) {
      max = (long) num[0] * (long) num[2];
    } else {
      for (int j = 0; j < 2; j++) {
        for (int k = 2; k < 4; k++) {
          tmp = (long) num[j] * (long) num[k];
          if (max < tmp) {
            max = tmp;
          }
        }
      }
    } num[0] > 0 && num[2] > 0 num[0] > 0 num[0] num 0 0 num[2] > 0 num[2] num 2 0 {
      max = (long) num[1] * (long) num[3];
    } max = (long) num[1] * (long) num[3] max (long) num[1] * (long) num[3] (long) num[1] num 1 (long) num[3] num 3 if (num[1] < 0 && num[3] < 0) {
      max = (long) num[0] * (long) num[2];
    } else {
      for (int j = 0; j < 2; j++) {
        for (int k = 2; k < 4; k++) {
          tmp = (long) num[j] * (long) num[k];
          if (max < tmp) {
            max = tmp;
          }
        }
      }
    } num[1] < 0 && num[3] < 0 num[1] < 0 num[1] num 1 0 num[3] < 0 num[3] num 3 0 {
      max = (long) num[0] * (long) num[2];
    } max = (long) num[0] * (long) num[2] max (long) num[0] * (long) num[2] (long) num[0] num 0 (long) num[2] num 2 {
      for (int j = 0; j < 2; j++) {
        for (int k = 2; k < 4; k++) {
          tmp = (long) num[j] * (long) num[k];
          if (max < tmp) {
            max = tmp;
          }
        }
      }
    } for (int j = 0; j < 2; j++) {
        for (int k = 2; k < 4; k++) {
          tmp = (long) num[j] * (long) num[k];
          if (max < tmp) {
            max = tmp;
          }
        }
      } int j = 0; int j = 0; j 0 j < 2 j 2 j++ j++ j {
        for (int k = 2; k < 4; k++) {
          tmp = (long) num[j] * (long) num[k];
          if (max < tmp) {
            max = tmp;
          }
        }
      } {
        for (int k = 2; k < 4; k++) {
          tmp = (long) num[j] * (long) num[k];
          if (max < tmp) {
            max = tmp;
          }
        }
      } for (int k = 2; k < 4; k++) {
          tmp = (long) num[j] * (long) num[k];
          if (max < tmp) {
            max = tmp;
          }
        } int k = 2; int k = 2; k 2 k < 4 k 4 k++ k++ k {
          tmp = (long) num[j] * (long) num[k];
          if (max < tmp) {
            max = tmp;
          }
        } {
          tmp = (long) num[j] * (long) num[k];
          if (max < tmp) {
            max = tmp;
          }
        } tmp = (long) num[j] * (long) num[k] tmp (long) num[j] * (long) num[k] (long) num[j] num j (long) num[k] num k if (max < tmp) {
            max = tmp;
          } max < tmp max tmp {
            max = tmp;
          } max = tmp max tmp System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {

  public static void main(String[] args) {
    int num[] = new int[4];
    Scanner scanner = new Scanner(System.in);
    for (int i = 0; i < 4; i++) {
      num[i] = Integer.parseInt(scanner.next());
    }
    scanner.close();
    long max = (long) num[0] * (long) num[2];
    long tmp = 0;

    if (num[0] > 0 && num[2] > 0) {
      max = (long) num[1] * (long) num[3];
    } else if (num[1] < 0 && num[3] < 0) {
      max = (long) num[0] * (long) num[2];
    } else {
      for (int j = 0; j < 2; j++) {
        for (int k = 2; k < 4; k++) {
          tmp = (long) num[j] * (long) num[k];
          if (max < tmp) {
            max = tmp;
          }
        }
      }
    }
    System.out.println(max);
  }
} public class Main {

  public static void main(String[] args) {
    int num[] = new int[4];
    Scanner scanner = new Scanner(System.in);
    for (int i = 0; i < 4; i++) {
      num[i] = Integer.parseInt(scanner.next());
    }
    scanner.close();
    long max = (long) num[0] * (long) num[2];
    long tmp = 0;

    if (num[0] > 0 && num[2] > 0) {
      max = (long) num[1] * (long) num[3];
    } else if (num[1] < 0 && num[3] < 0) {
      max = (long) num[0] * (long) num[2];
    } else {
      for (int j = 0; j < 2; j++) {
        for (int k = 2; k < 4; k++) {
          tmp = (long) num[j] * (long) num[k];
          if (max < tmp) {
            max = tmp;
          }
        }
      }
    }
    System.out.println(max);
  }
} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    int num[] = new int[4];
    Scanner scanner = new Scanner(System.in);
    for (int i = 0; i < 4; i++) {
      num[i] = Integer.parseInt(scanner.next());
    }
    scanner.close();
    long max = (long) num[0] * (long) num[2];
    long tmp = 0;

    if (num[0] > 0 && num[2] > 0) {
      max = (long) num[1] * (long) num[3];
    } else if (num[1] < 0 && num[3] < 0) {
      max = (long) num[0] * (long) num[2];
    } else {
      for (int j = 0; j < 2; j++) {
        for (int k = 2; k < 4; k++) {
          tmp = (long) num[j] * (long) num[k];
          if (max < tmp) {
            max = tmp;
          }
        }
      }
    }
    System.out.println(max);
  }
}