S = [input() for i in range(3)] print("Yes" if S == ["#.#",".#.","#.#"] or S == [".#.","#.#",".#."] else "No")