#include <bits/stdc++.h>
using namespace std;
int x[110], y[110], ans = 0, a, n, b;
void sl(int i, int j, int u, int v) {
  if (max(i, j) <= a && u + v <= b) ans = max(ans, i * u + j * v);
}
void ls(int i, int j, int u, int v) {
  if (u + v <= a && max(i, j) <= b) ans = max(ans, i * u + j * v);
}
int main() {
  scanf("%d %d %d", &n, &a, &b);
  for (int i = 1; i <= n; i++) scanf("%d %d", &x[i], &y[i]);
  for (int i = 1; i < n; i++)
    for (int j = i + 1; j <= n; j++)
      sl(x[i], x[j], y[i], y[j]), ls(x[i], x[j], y[i], y[j]),
          sl(x[i], y[j], y[i], x[j]), ls(x[i], y[j], y[i], x[j]),
          sl(y[i], x[j], x[i], y[j]), ls(y[i], x[j], x[i], y[j]),
          sl(y[i], y[j], x[i], x[j]), ls(y[i], y[j], x[i], x[j]);
  printf("%d\n", ans);
  return 0;
}
