#include <bits/stdc++.h>
using namespace std;
const double PI =
    3.14159265358979323846264338327950288419716939937510582097494459230;
int area(pair<int, int> a, pair<int, int> b) {
  return a.first * a.second + b.first * b.second;
}
bool poss(int x, int y, int l1, int b1, int l2, int b2) {
  if (l1 + l2 <= x) {
    return max(b1, b2) <= y;
  } else {
    return max(l1, l2) <= x and (b1 + b2) <= y;
  }
}
bool pos(int x, int y, int l1, int b1, int l2, int b2) {
  return poss(x, y, l1, b1, l2, b2) or poss(x, y, l1, b1, b2, l2) or
         poss(x, y, b1, l1, l2, b2) or poss(x, y, b1, l1, b2, l2);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, x, y;
  cin >> n >> x >> y;
  int ans = 0;
  pair<int, int> a[n];
  for (int i = 0; i < (n); i++) cin >> a[i].first >> a[i].second;
  for (int i = 0; i < (n); i++)
    for (int j = (i + 1); j < (n); j++)
      if (pos(x, y, a[i].first, a[i].second, a[j].first, a[j].second))
        (ans) = max((ans), (area(a[i], a[j])));
  cout << ans << endl;
}
