#include <bits/stdc++.h>
using namespace std;
const int N = 400;
struct node {
  int x, y;
} aa[N];
int n, a, b;
int solve(int xx, int yy) {
  int flag = 0;
  int l = aa[xx].x + aa[yy].x, r = max(aa[yy].y, aa[xx].y);
  if (l <= a && r <= b || l <= b && r <= a) flag = 1;
  l = aa[xx].x + aa[yy].y, r = max(aa[yy].x, aa[xx].y);
  if (l <= a && r <= b || l <= b && r <= a) flag = 1;
  l = aa[xx].y + aa[yy].y, r = max(aa[yy].x, aa[xx].x);
  if (l <= a && r <= b || l <= b && r <= a) flag = 1;
  l = aa[xx].y + aa[yy].x, r = max(aa[yy].y, aa[xx].x);
  if (l <= a && r <= b || l <= b && r <= a) flag = 1;
  if (flag)
    return aa[xx].x * aa[xx].y + aa[yy].x * aa[yy].y;
  else
    return 0;
}
int main() {
  scanf("%d %d %d", &n, &a, &b);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &aa[i].x, &aa[i].y);
  }
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      sum = max(sum, solve(i, j));
    }
  }
  printf("%d\n", sum);
  return 0;
}
