open Printf
open Scanf

let () =
  let n, m = scanf "%d %d\n" (fun x y -> (x, y)) in
  let rec read x =
    let ar = Array.init x (fun _ -> let p = scanf "%s\n" (fun i -> i) in p) in ar in
  let pa = read n in
  let pb = read m in
  let eq (si, sj) =
    let rec iter i =
      if i = m then true
      else
        if String.sub pa.(si+i) sj m  <> pb.(i) then false else iter (i+1) in
    iter 0 in
  let rec loop (i, j) =
    if i > n - m then "No"
    else
      if j > n - m then loop (i+1, 0) else
        if eq (i, j) then "Yes" else loop (i, j+1) in
  loop (0, 0) |> printf "%s\n"
