#include <bits/stdc++.h>
using namespace std;
int n, a, b;
vector<pair<int, int>> c;
vector<int> p;
void f() {
  int maxs = 0;
  for (int i = 0; i < n; i++) {
    int x1 = c[i].first, y1 = c[i].second;
    for (int j = i + 1; j < n; j++) {
      int x2 = c[j].first, y2 = c[j].second;
      vector<int> k(4);
      k[0] = x1 + x2;
      k[1] = x2 + y1;
      k[2] = y1 + y2;
      k[3] = x1 + y2;
      if (k[0] <= a && max(y1, y2) <= b) {
        int news = k[0] * max(y1, y2);
        if (y2 > y1)
          news -= x1 * (y2 - y1);
        else
          news -= x2 * (y1 - y2);
        p.push_back(news);
      }
      if (k[0] <= b && max(y1, y2) <= a) {
        int news = k[0] * max(y1, y2);
        if (y2 > y1)
          news -= x1 * (y2 - y1);
        else
          news -= x2 * (y1 - y2);
        p.push_back(news);
      }
      if (k[1] <= a && max(x1, y2) <= b) {
        int news = k[1] * max(x1, y2);
        if (x1 > y2)
          news -= x2 * (x1 - y2);
        else
          news -= y1 * (y2 - x1);
        p.push_back(news);
      }
      if (k[1] <= b && max(x1, y2) <= a) {
        int news = k[1] * max(x1, y2);
        if (x1 > y2)
          news -= x2 * (x1 - y2);
        else
          news -= y1 * (y2 - x1);
        p.push_back(news);
      }
      if (k[2] <= a && max(x1, x2) <= b) {
        int news = k[2] * max(x1, x2);
        if (x2 > x1)
          news -= y1 * (x2 - x1);
        else
          news -= y2 * (x1 - x2);
        p.push_back(news);
      }
      if (k[2] <= b && max(x1, x2) <= a) {
        int news = k[2] * max(x1, x2);
        if (x2 > x1)
          news -= y1 * (x2 - x1);
        else
          news -= y2 * (x1 - x2);
        p.push_back(news);
      }
      if (k[3] <= a && max(x2, y1) <= b) {
        int news = k[3] * max(x2, y1);
        if (x2 > y1)
          news -= x1 * (x2 - y1);
        else
          news -= y2 * (y1 - x2);
        p.push_back(news);
      }
      if (k[3] <= b && max(x2, y1) <= a) {
        int news = k[3] * max(x2, y1);
        if (x2 > y1)
          news -= x1 * (x2 - y1);
        else
          news -= y2 * (y1 - x2);
        p.push_back(news);
      }
    }
  }
}
int main() {
  scanf("%d %d %d", &n, &a, &b);
  c = vector<pair<int, int>>(n);
  for (int i = 0; i < n; i++) scanf("%d %d", &c[i].first, &c[i].second);
  sort(c.begin(), c.end());
  f();
  if (p.empty())
    cout << 0 << endl;
  else {
    sort(p.begin(), p.end());
    cout << p[p.size() - 1] << endl;
  }
}
