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