#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i,s,e) for(i64 (i) = (s);(i) < (e);(i)++)
#define all(x) x.begin(),x.end()
#define let auto const

int main() {
  i64 N;
  while(cin >> N, N) {
    i64 W, H;
    cin >> W >> H;
    vector<vector<i64>> fie(H +1, vector<i64>(W + 1));
    rep(i,0,N) {
      i64 x, y;
      cin >> x >> y;
      fie[y][x]++;
    }
    i64 s, t;
    cin >> t >> s;
    rep(i,1,H + 1) rep(j, 1, W + 1) fie[i][j] += fie[i][j - 1];
    rep(i,1,H + 1) rep(j, 1, W + 1) fie[i][j] += fie[i - 1][j];
    i64 ans = 0;
    for(int i = s; i <= H; i++) {
      for(int j = t; j <= W;j++) {
        ans = max(ans, fie[i][j] + fie[i - s][j - t] - fie[i][j - t] - fie[i - s][j]);
      }
    }

    cout << ans << endl;
  }
}

