a = io.read() b = io.read() c = io.read() a = a .. b .. c if a == "#.#.#.#.#" or a == ".#.#.#.#." then print("Yes") else print("No") end