import std.stdio, std.format, std.string, std.conv, std.algorithm;

void main()
{
  while ( true ) {
	immutable int n = to!int( strip( readln ) );
	if ( n == 0 ) break;

	int w, h;
	string input = strip( readln );
	formattedRead( input, "%d %d", &w, &h );
	auto table = new int[][]( h + 1, w + 1 );
	foreach ( ary; table ) {
	  ary[] = 0;
	}
	foreach ( i; 0 .. n ) {
	  input = strip( readln );
	  int x, y;
	  formattedRead( input, "%d %d", &x, &y );
	  table[ y ][ x ]++;
	}
	for ( int i = 0; i <= h; i++ ) {
	  for ( int j = 0; j <= w - 1; j++ ) {
		table[ i ][ j + 1 ] += table[ i ][ j ];
	  }
	}
	for ( int i = 0; i <= h - 1; i++ ) {
	  for ( int j = 0; j <= w; j++ ) {
		table[ i + 1 ][ j ] += table[ i ][ j ];
	  }
	}

	int s, t;
	input = strip( readln );
	formattedRead( input, "%d %d", &s, &t );
	int ans = -1;
	for ( int i = t; i <= h; i++ ) {
	  for ( int j = s; j <= w; j++ ) {
		ans = max( ans, table[ i ][ j ] - table[ i - t ][ j ] - table[ i ][ j - s ] + table [ i - t ][ j - s ] );
	  }
	}
	writeln( ans );
  }
}