#include <bits/stdc++.h>
using namespace std;
const long long md = 1e9 + 7;
long long n, x, y;
pair<long long, long long> a[105];
long long get(long long x1, long long y1, long long x2, long long y2) {
  if (x1 + x2 > x and y1 + y2 > y or (x1 > x or x2 > x or y1 > y or y2 > y))
    return 0;
  return x1 * y1 + x2 * y2;
}
long long solve(pair<long long, long long> u, pair<long long, long long> v) {
  return max({get(u.first, u.second, v.first, v.second),
              get(u.first, u.second, v.second, v.first),
              get(u.second, u.first, v.first, v.second),
              get(u.second, u.first, v.second, v.first)});
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long ans = 0;
  cin >> n >> x >> y;
  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) {
      ans = max(ans, solve(a[i], a[j]));
    }
  cout << ans;
}
