#include<stdio.h>
int main(){
  int n,w,h,x,y,i,j,s,max;
  while(scanf("%d",&n),n){
    int d[510][510]={0};
    scanf("%d %d",&w,&h);
    while(n--){
      scanf("%d %d",&x,&y);
      d[y][x]=1;
    }
    for(i=max=0;i<h;i++){
      for(j=0;j<w;j++)d[i+1][j+1]=d[i+1][j+1]+d[i][j+1]+d[i+1][j]-d[i][j];
    }
    scanf("%d %d",&x,&y);
    for(i=y;i<=h;i++){
      for(j=x;j<=w;j++){
	s=d[i][j]-d[i-y][j]-d[i][j-x]+d[i-y][j-x];
	if(max<s)max=s;
      }
    }
    printf("%d\n",max);
  }
  return 0;
}
  