#include<iostream>
using namespace std;

int main(){
  int N,S,T,H,W,x,y;// S->y T->x
  while(cin >> N && N){
    cin >> W >> H;
    int imap[H+140][W+140],graph[H+140][W+140];
    for(int i=0;i<=H+110;i++)for(int j=0;j<=W+110;j++)imap[i][j] =graph[i][j] = 0;
    for(int i=0;i<N;i++){
      cin >> x >> y;
      imap[y][x] = 1;
    }

    int plus;
    //Create DP-graph
    for(int i=1;i<=H+100;i++){
      plus = 0;
      for(int j=1;j<=W+100;j++){
	if(imap[i][j] == 1){
	  plus++;
	}
	graph[i][j] = plus+graph[i-1][j];

      }
    }

    int ans = 0;
    cin >> S >> T;
    for(int i=1;i<=H;i++){
      for(int j=1;j<=W;j++){
	ans = max(ans,graph[i+T-1][j+S-1]-graph[i+T-1][j-1]-graph[i-1][j+S-1]+graph[i-1][j-1]);
      }
    }
    cout << ans << endl;



  }
  return 0;
}