1 #include <iostream>
2 #include <string>
3 #include <new>
4 #include <vector>
5 #include <algorithm>
6 using namespace std;
7
8 int main()
9 {
10 //freopen( "in.txt","r",stdin );
11 int tree[100][100];
12 int sum[100][100];
13 int num;
14 while ( cin >> num && num != 0 )
15 {
16 int w,h;
17 cin >> w >> h;
18 for ( int i = 0; i != h; ++i )
19 for ( int j = 0; j != w; ++j )
20 {
21 tree[i][j] = 0;
22 sum[i][j] = 0;
23 }
24 int x,y;
25 for ( int i = 0; i != num; ++i )
26 {
27 cin >> x >> y;
28 tree[y-1][x-1] = 1;
29 }
30 //for ( int i = 0; i != h; ++i )
31 //{
32 //for ( int j = 0; j != w; ++j )
33 //cout << tree[i][j] << " ";
34 //cout << endl;
35 //}
36 cin >> x >> y; //x是宽 ,y 是长
37 for ( int i = 0; i != h; ++i ) //对于 宽度的 叠加
38 for ( int j = 0; j != w - x + 1; ++j )
39 for ( int k = j,n = 0; n != x; ++k,++n )
40 sum[i][j] += tree[i][k];
41 int max1 = 0;
42 int s = 0;
43 for ( int i = 0; i != w - x + 1; ++i ) // 宽 // 对于 长度的 叠加
44 for ( int j = 0; j != h - y + 1; ++j ) // 高
45 {
46 s = 0;
47 for ( int k = j,n = 0; n != y; ++k,++n )
48 s +=sum[k][i];
49 max1 = max( s,max1 );
50 }
51 //for ( int i = 0; i != h; ++i )
52 //{
53 //for ( int j = 0; j != w-x + 1; ++j )
54 //cout << sum[i][j] << " ";
55 //cout << endl;
56 //}
57 cout << max1 << endl;
58 }
59 return 0;
60 }
61
62
63
64