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