#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <queue>


using namespace std;

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

struct D{
    int x, y, s;
};

struct P{
    int x, y;
    P() = default;
    P(int y, int x): x(x), y(y){}
};

int h,w,d,n;
vector<vector<int>> m;

inline bool innerRange(const int x, const int l, const int r){
    return l <= x && x < r;
}

vector<vector<bool>> makeMask(const D &data, const vector<int> &d){
    vector<vector<bool>> ret(h,vector<bool>(w, true));
    if(data.s == d.size()){
        int dis = d.back();
        for(int i = -dis; i <= dis; i++){
            for(int j = -dis; j <= dis; j++){
                if(innerRange(i+data.y, 0, h) && innerRange(j+data.x, 0, w)){
                    ret[i+data.y][j+data.x] = false;
                }
            }
        }
    }
    else{
        int dis = d[data.s];
        int prev = data.s == 0 ? -1 : d[data.s-1];
        for(int i = 0; i < h; i++){
            for(int j = 0; j < w; j++){
                if((abs(i-data.y) > prev || abs(j-data.x) > prev) && abs(i-data.y) <= dis && abs(j-data.x) <= dis)continue;
                ret[i][j] = false;
            }
        }
    }
    return ret;
}

int bfs(const vector<vector<int>> &m, const vector<vector<bool>> &takara){
    vector<vector<bool>> used(h, vector<bool>(w, false));
    queue<P> q;
    for(int i = 0; i < h; i++){
        for(int j = 0; j < w; j++){
            if(m[i][j] == 1){
                q.push(P(i,j));
                i = j = 1e9;
            }
        }
    }
    int ret = 0;
    used[q.front().y][q.front().x] = true;
    while(!q.empty()){
        auto nowpoint = q.front();
        q.pop();
        if(takara[nowpoint.y][nowpoint.x]) ret++;
        for(int i = 0; i < 4; i++){
            P nextpoint(nowpoint.y + dy[i], nowpoint.x + dx[i]);
            if(!(innerRange(nextpoint.y, 0, h) && innerRange(nextpoint.x, 0, w)))continue;
            if(m[nextpoint.y][nextpoint.x] == -1 || used[nextpoint.y][nextpoint.x])continue;
            used[nextpoint.y][nextpoint.x] = true;
            q.push(nextpoint);
        }
    }
    //cerr << ret << endl;
    return ret;
}



signed main(){
    cin >> h >> w >> d >> n;
    m.resize(h,vector<int>(w));
    for(auto &a : m)for(auto &e : a){
        char tmp; cin >> tmp;
        switch(tmp){
            case '.': e = 0; break;
            case '#': e = -1; break;
            case 'D': e = 1; break;
        }
    }
    vector<vector<bool>> takara(h, vector<bool>(w,true));
    vector<int> r(d);
    for(auto &e : r)cin >> e;
    vector<D> data(n);
    for(auto &e : data){
        cin >> e.x >> e.y >> e.s;
    }
//  for(auto a : m){for(auto e : a)cerr << e << " "; cerr << endl;}
//  for(auto e : data)cerr << e.x << e.y << e.s << endl;

    for(auto e : data){
        auto mask = makeMask(e, r);
        //cerr << e.x << e.y << e.s << "mask" << endl;
        //for(auto a : mask){for(auto e : a)cerr << e; cerr << endl;}
        //cerr << "takara" << endl;
        //for(auto a : takara){for(auto e : a)cerr << e; cerr << endl;}
        for(int i = 0; i < h; i++){
            for(int j = 0; j < w; j++){
                if(m[i][j] == -1) takara[i][j] = false;
                else{
                    takara[i][j] = takara[i][j] && mask[i][j];
                }
            }
        }
    }
    //cerr << "maskowari" << endl;
    //for(auto a : takara){for(auto e : a)cerr << e; cerr << endl;}
    int cnt = 0;
    for(auto a : takara)for(auto e : a)if(e)cnt++;
    if(cnt == 0){
        cout << "Broken" << endl;
        return 0;
    }
    int ans = bfs(m,takara);
    if(ans == cnt){
        cout << "Yes" << endl;
    }
    else if(ans > 0){
        cout << "Unknown" << endl;
    }
    else{
        cout << "No" << endl;
    }

    return 0;
}



Measured memory_bytes: 3192