#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
const int MAXN = 1E6 + 3;
const int oo = 1e9 + 3;
bool kt, kt1, kt2;
int n, a, b, x[200], y[200], ans;
struct data {
  int x, y;
} l1[3], l2[3];
int main() {
  cin >> n >> a >> b;
  for (int i = (1), _b = (n); i <= _b; i = i + 1) cin >> x[i] >> y[i];
  for (int i = (1), _b = (n); i <= _b; i = i + 1)
    for (int j = (1), _b = (n); j <= _b; j = j + 1)
      if (i != j) {
        l1[1].x = x[i];
        l1[1].y = y[i];
        l1[2].x = y[i];
        l1[2].y = x[i];
        l2[1].x = x[j];
        l2[1].y = y[j];
        l2[2].x = y[j];
        l2[2].y = x[j];
        for (int k1 = (1), _b = (2); k1 <= _b; k1 = k1 + 1)
          for (int k2 = (1), _b = (2); k2 <= _b; k2 = k2 + 1) {
            if (max(l1[k1].x, l2[k2].x) <= a)
              kt1 = 1;
            else
              kt1 = 0;
            if (l1[k1].y + l2[k2].y <= b)
              kt2 = 1;
            else
              kt2 = 0;
            if (kt1)
              if (kt2) {
                ans = max(ans, l1[k1].x * l1[k1].y + l2[k2].x * l2[k2].y);
              }
          }
        swap(a, b);
        for (int k1 = (1), _b = (2); k1 <= _b; k1 = k1 + 1)
          for (int k2 = (1), _b = (2); k2 <= _b; k2 = k2 + 1) {
            if (max(l1[k1].x, l2[k2].x) <= a)
              kt1 = 1;
            else
              kt1 = 0;
            if (l1[k1].y + l2[k2].y <= b)
              kt2 = 1;
            else
              kt2 = 0;
            if (kt1)
              if (kt2) {
                ans = max(ans, l1[k1].x * l1[k1].y + l2[k2].x * l2[k2].y);
              }
          }
      }
  cout << ans;
  return 0;
}
