#include <bits/stdc++.h>
int a[1003], b[1003];
bool valid(int x1, int y1, int x2, int y2, int x, int y) {
  if (x - x1 >= x2 && y2 <= y && y1 <= y) return 1;
  if (x - x1 >= y2 && x2 <= y && y1 <= y) return 1;
  if (x - y1 >= x2 && y2 <= y && x1 <= y) return 1;
  if (x - y1 >= y2 && x2 <= y && x1 <= y) return 1;
  if (y - x1 >= x2 && y2 <= x && y1 <= x) return 1;
  if (y - x1 >= y2 && x2 <= x && y1 <= x) return 1;
  if (y - y1 >= x2 && y2 <= x && x1 <= x) return 1;
  if (y - y1 >= y2 && x2 <= x && x1 <= x) return 1;
  return 0;
}
int main() {
  int n, x, y;
  scanf("%d %d %d", &n, &x, &y);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &a[i], &b[i]);
  }
  int mx = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      if (mx < a[i] * b[i] + a[j] * b[j] && valid(a[i], b[i], a[j], b[j], x, y))
        mx = a[i] * b[i] + a[j] * b[j];
    }
  }
  printf("%d\n", mx);
  return 0;
}
