#include <bits/stdc++.h>
using namespace std;
int n, a, b, tot = 0;
struct node {
  int x, y;
};
node rec[101];
int cmp(const void *a, const void *b) {
  node rec1 = *(node *)a;
  node rec2 = *(node *)b;
  return rec1.x * rec1.y > rec2.x * rec2.y ? -1 : 1;
}
bool judge(int ix, int iy, int jx, int jy) {
  if (ix + jx <= a && iy <= b && jy <= b) return true;
  if (ix + jy <= a && iy <= b && jx <= b) return true;
  if (iy + jx <= a && ix <= b && jy <= b) return true;
  if (iy + jy <= a && ix <= b && jx <= b) return true;
  if (ix + jx <= b && iy <= a && jy <= a) return true;
  if (ix + jy <= b && iy <= a && jx <= a) return true;
  if (iy + jx <= b && ix <= a && jy <= a) return true;
  if (iy + jy <= b && ix <= a && jx <= a) return true;
  return false;
}
int main() {
  scanf("%d %d %d", &n, &a, &b);
  int i, j, ans = 0, tmpx, tmpy;
  ;
  for (i = 1; i <= n; i++) {
    scanf("%d %d", &tmpx, &tmpy);
    if ((tmpx > a && tmpx > b) || (tmpy > a && tmpy > b))
      continue;
    else {
      rec[tot + 1].x = tmpx;
      rec[tot + 1].y = tmpy;
      tot++;
    }
  }
  n = tot;
  qsort(rec + 1, n, sizeof(rec[1]), cmp);
  for (i = 1; i < n; i++) {
    for (j = i + 1; j <= n; j++) {
      if (judge(rec[i].x, rec[i].y, rec[j].x, rec[j].y))
        ans = max(ans, rec[i].x * rec[i].y + rec[j].x * rec[j].y);
    }
  }
  cout << ans;
  return 0;
}
