#!/usr/local/gnu/bin/bash
read n m
for i in `seq $n`
do
    read s
    a+=($s)
done
for i in `seq $m`
do
    read s
    b+=($s)
done
l=$((n-m))
for i in `seq 0 $l`
do
    for j in `seq 0 $l`
    do
        flag=1
        for k in `seq 0 $((m-1))`
        do
            if [ ${a[i+k]:j:m} != ${b[k]} ]
            then
                flag=0
                break
            fi
        done
        if((flag))
        then
            echo Yes
            exit
        fi
    done
done
echo No
