Problem: A dam construction project was designed around an area called Black Force. The area is surrounded by mountains and its rugged terrain is said to be very suitable for constructing a dam.

However, the project is now almost pushed into cancellation by a strong protest campaign started by the local residents. Your task is to plan out a compromise proposal. In other words, you must find a way to build a dam with sufficient capacity, without destroying the inhabited area of the residents.

The map of Black Force is given as H × W cells (0 < H, W ≤ 20). Each cell hi, j is a positive integer representing the height of the place. The dam can be constructed at a connected region surrounded by higher cells, as long as the region contains neither the outermost cells nor the inhabited area of the residents. Here, a region is said to be connected if one can go between any pair of cells in the region by following a sequence of left-, right-, top-, or bottom-adjacent cells without leaving the region. The constructed dam can store water up to the height of the lowest surrounding cell. The capacity of the dam is the maximum volume of water it can store. Water of the depth of 1 poured to a single cell has the volume of 1.

The important thing is that, in the case it is difficult to build a sufficient large dam, it is allowed to choose (at most) one cell and do groundwork to increase the height of the cell by 1 unit. Unfortunately, considering the protest campaign, groundwork of larger scale is impossible. Needless to say, you cannot do the groundwork at the inhabited cell.

Given the map, the required capacity, and the list of cells inhabited, please determine whether it is possible to construct a dam.



Input

The input consists of multiple data sets. Each data set is given in the following format:


H W C R
h1,1 h1,2 . . . h1,W
...
hH,1 hH,2 . . . hH,W
y1 x1
...
yR xR


H and W is the size of the map.  is the required capacity. R (0 < R < H × W) is the number of cells inhabited. The following H lines represent the map, where each line contains W numbers separated by space. Then, the R lines containing the coordinates of inhabited cells follow. The line “y x” means that the cell hy,x is inhabited.

The end of input is indicated by a line “0 0 0 0”. This line should not be processed.

Output

For each data set, print “Yes” if it is possible to construct a dam with capacity equal to or more than C. Otherwise, print “No”.

Example

Input

4 4 1 1
2 2 2 2
2 1 1 2
2 1 1 2
2 1 2 2
1 1
4 4 1 1
2 2 2 2
2 1 1 2
2 1 1 2
2 1 2 2
2 2
4 4 1 1
2 2 2 2
2 1 1 2
2 1 1 2
2 1 1 2
1 1
3 6 6 1
1 6 7 1 7 1
5 1 2 8 1 6
1 4 3 1 5 1
1 4
5 6 21 1
1 3 3 3 3 1
3 1 1 1 1 3
3 1 1 3 2 2
3 1 1 1 1 3
1 3 3 3 3 1
3 4
0 0 0 0


Output

Yes
No
No
No
Yes

Solution (in CPP):

Solution:
#include <cstdio>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int dy[] = {0, 1, -1, 0};
int dx[] = {1, 0, 0, -1};

int h, w;
vector<vector<int> > height;
vector<vector<bool> > house;

int solve()
{
    int ret = 0;
    for(int y0=1; y0<=h; ++y0){
        for(int x0=1; x0<=w; ++x0){
            bool ng = false;
            int surround = INT_MAX;
            queue<pair<int, int> > q;
            q.push(make_pair(y0, x0));
            vector<vector<bool> > check(h+2, vector<bool>(w+2, false));
            check[y0][x0] = true;
            while(!q.empty()){
                int y = q.front().first;
                int x = q.front().second;
                q.pop();
                if(house[y][x]){
                    ng = true;
                    break;
                }

                for(int i=0; i<4; ++i){
                    int y2 = y + dy[i];
                    int x2 = x + dx[i];
                    if(height[y2][x2] <= height[y0][x0]){
                        if(!check[y2][x2]){
                            q.push(make_pair(y2, x2));
                            check[y2][x2] = true;
                        }
                    }else{
                        surround = min(surround, height[y2][x2]);
                    }
                }
            }

            if(ng)
                continue;

            int ret2 = 0;
            q.push(make_pair(y0, x0));
            check[y0][x0] = false;
            while(!q.empty()){
                int y = q.front().first;
                int x = q.front().second;
                q.pop();
                ret2 += surround - height[y][x];

                for(int i=0; i<4; ++i){
                    int y2 = y + dy[i];
                    int x2 = x + dx[i];
                    if(check[y2][x2]){
                        q.push(make_pair(y2, x2));
                        check[y2][x2] = false;
                    }
                }
            }
            ret = max(ret, ret2);
        }
    }

    return ret;
}

int main()
{
    for(;;){
        int c, r;
        cin >> h >> w >> c >> r;
        if(h == 0)
            return 0;

        height.assign(h+2, vector<int>(w+2, -1));
        for(int i=1; i<=h; ++i){
            for(int j=1; j<=w; ++j){
                cin >> height[i][j];
            }
        }

        house.assign(h+2, vector<bool>(w+2, false));
        for(int i=1; i<=h; ++i)
            house[i][0] = house[i][w+1] = true;
        for(int i=1; i<=w; ++i)
            house[0][i] = house[h+1][i] = true;
        for(int i=0; i<r; ++i){
            int y, x;
            cin >> y >> x;
            house[y][x] = true;
        }

        if(solve() >= c){
            cout << "Yes" << endl;
            continue;
        }

        bool ok = false;
        for(int i=1; i<=h; ++i){
            for(int j=1; j<=w; ++j){
                if(house[i][j])
                    continue;

                ++ height[i][j];
                if(solve() >= c){
                    ok = true;
                    break;
                }
                -- height[i][j];
            }
        }

        if(ok)
            cout << "Yes" << endl;
        else
            cout << "No" << endl;
    }
}