def Main(): s=[input()for _ in range(3)] if s==["#.#",".#.","#.#"] or s==[".#.","#.#",".#."]: print("Yes") else: print("No") Main()