let [| H; W |] = stdin.ReadLine().Split(' ') |> Array.map int let S = [| for i in 1 .. H do let s = stdin.ReadLine().Trim() yield [| for j in 0 .. s.Length - 1 -> if s.[j] = '#' then 1 else 0 |] |] let move h w moveh movew (ss:int[][]) = if h+moveh < H && w+movew < W && ss.[h].[w] = 1 && ss.[h+moveh].[w+movew] = 1 then [| for hi in 0 .. H - 1 -> [| for wi in 0 .. W - 1 do if hi = h && wi = w then yield 0 else if hi = h+moveh && wi = w+movew then yield 0 else yield ss.[hi].[wi] |] |] |> Some else None let isAll0 (ss:int[][]) = 0 = Array.fold (fun acc sss -> acc + Array.sum sss) 0 ss if isAll0 S then printfn "NO" else let result = [ for moveh in 0 .. H - 1 do for movew in 0 .. W - 1 do if moveh > 0 || movew > 0 then let mutable ss = S for h in 0 .. H - 1 do for w in 0 .. W - 1 do match (move h w moveh movew ss) with | Some (newss) -> ss <- newss | None -> () if isAll0 ss then yield 1 ] if List.sum result > 0 then printfn "YES" else printfn "NO"