#include <bits/stdc++.h>
using namespace std;
int n, a, b;
int x[101], y[101];
int ans;
bool overlap(int p, int q, int r, int s) {
  int m = max(a, b);
  if (p > m || q > m || r > m || s > m) return 1;
  if ((p + r > a && q + s > b) && (p + r > b && q + s > a))
    if ((p + s > a && q + r > b) && (p + s > b && q + r > a))
      return 1;
    else
      return 0;
}
bool overlap1(int p, int q, int r, int s) {
  int A, B;
  A = p + r, B = max(q, s);
  if (max(A, B) <= max(a, b) && min(A, B) <= min(a, b)) return 0;
  A = p + s, B = max(q, r);
  if (max(A, B) <= max(a, b) && min(A, B) <= min(a, b)) return 0;
  A = q + r, B = max(p, s);
  if (max(A, B) <= max(a, b) && min(A, B) <= min(a, b)) return 0;
  A = q + s, B = max(p, r);
  if (max(A, B) <= max(a, b) && min(A, B) <= min(a, b)) return 0;
  return 1;
}
int main() {
  scanf("%d%d%d", &n, &a, &b);
  ans = 0;
  if (n == 1) {
    printf("0\n");
    return 0;
  }
  for (int i = 1; i <= n; ++i) scanf("%d%d", &x[i], &y[i]);
  for (int i = 1; i <= n - 1; ++i)
    for (int j = i + 1; j <= n; ++j) {
      if (!overlap1(x[i], y[i], x[j], y[j]))
        ans = max(ans, x[i] * y[i] + x[j] * y[j]);
    }
  printf("%d\n", ans);
}
