#include <bits/stdc++.h>
using namespace std;
const int N = 110;
int x[N], y[N];
void update(int &x, int y) {
  if (y > x) {
    x = y;
  }
}
int a, b;
bool judge(int x, int y, int n, int m) { return x <= n && y <= m; }
bool fun(int x1, int y1, int x2, int y2) {
  if (judge(x2, y2, a - x1, b)) {
    return true;
  }
  if (judge(x2, y2, a, b - y1)) {
    return true;
  }
  if (judge(y2, x2, a - x1, b)) {
    return true;
  }
  if (judge(y2, x2, a, b - y1)) {
    return true;
  }
  return false;
}
bool judge_main(int x1, int y1, int x2, int y2) {
  if (judge(x1, y1, a, b)) {
    if (fun(x1, y1, x2, y2)) {
      return true;
    }
  }
  if (judge(y1, x1, a, b)) {
    if (fun(y1, x1, x2, y2)) {
      return true;
    }
  }
  return false;
}
int main() {
  int n;
  scanf("%d%d%d", &n, &a, &b);
  int ret = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &x[i], &y[i]);
    for (int j = 0; j < i; j++) {
      if (judge_main(x[j], y[j], x[i], y[i])) {
        update(ret, x[j] * y[j] + x[i] * y[i]);
      }
    }
  }
  printf("%d\n", ret);
  return 0;
}
