#include <bits/stdc++.h>
using namespace std;
using vi=vector<int>;
using vvi=vector<vi>;
using vs=vector<string>;
#define rep(i,n) for(int i=0;i<n;i++)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()

int main(void){
    int n;
    while(cin>>n,n){
        int w,h;
        cin>>w>>h;
        vector<valarray<int>> f(h+1,valarray<int>(0,w+1));
        rep(i,n){
            int x,y; cin>>x>>y;
            f[y][x]=1;
        }
        rep(i,h+1) partial_sum(begin(f[i]),end(f[i]),begin(f[i]));
        rep(i,h) f[i+1]+=f[i];
        int s,t,ans=0;
        cin>>s>>t;
        for(int y=t;y<=h;y++){
            for(int x=s;x<=w;x++){
                ans=max(ans, f[y][x]-f[y-t][x]-f[y][x-s]+f[y-t][x-s]);
            }
        }
        cout<<ans<<endl;
    }
}