import java.io.*;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class brigt {
    public static void main(String[] args) {
        KattioTrains in = new KattioTrains(System.in);
        int h = in.getInt();
        int w = in.getInt();
        int n = in.getInt();
        final char ACTIVE = 'x';
        final char OFF = '.';
        boolean[][][] allData = new boolean[n][h][w];
        for (int i = 0; i < n; i++) {
            for (int y = 0; y < h; y++) {
                String line = in.getWord();
                for (int x = 0; x < w; x++) {
                    allData[i][y][x] = line.charAt(x) == ACTIVE;
                }
            }
        }

        boolean[] matchingStops = new boolean[n];
        for (int i = 0; i < n; i++) {
            matchingStops[i] = true;
        }
        int left_to_be_matched = n;
        boolean done = false;
        for (int y = 0; y < h; y++) {
            String line = in.getWord();
            for (int x = 0; x < w; x++) {
                if(line.charAt(x) == ACTIVE) {
                    for (int i = 0; i < n; i++) {
                        if(matchingStops[i]){
                            if(!allData[i][y][x]){
                                matchingStops[i] = false;
                                left_to_be_matched--;
                            }
                        }
                    }
                    if(left_to_be_matched <= 1){
                        done = true;
                        break;
                    }
                }
            }
            if(done){
                break;
            }
        }

        if(done){
            System.out.println("yes");
        } else {
            System.out.println("no");
        }

    }
}


class KattioTrains extends PrintWriter {
    public KattioTrains(InputStream i) {
        super(new BufferedOutputStream(System.out));
        r = new BufferedReader(new InputStreamReader(i));
    }
    public KattioTrains(InputStream i, OutputStream o) {
        super(new BufferedOutputStream(o));
        r = new BufferedReader(new InputStreamReader(i));
    }

    public boolean hasMoreTokens() {
        return peekToken() != null;
    }

    public int getInt() {
        return Integer.parseInt(nextToken());
    }

    public double getDouble() {
        return Double.parseDouble(nextToken());
    }

    public long getLong() {
        return Long.parseLong(nextToken());
    }

    public String getWord() {
        return nextToken();
    }



    private BufferedReader r;
    private String line;
    private StringTokenizer st;
    private String token;

    private String peekToken() {
        if (token == null)
            try {
                while (st == null || !st.hasMoreTokens()) {
                    line = r.readLine();
                    if (line == null) return null;
                    st = new StringTokenizer(line);
                }
                token = st.nextToken();
            } catch (IOException e) { }
        return token;
    }

    private String nextToken() {
        String ans = peekToken();
        token = null;
        return ans;
    }
}
