ans = [] for i in range(3): S = input() ans.extend(S) d = "".join(ans) if d == "#.#.#.#.#" or d == ".#.#.#.#.": print('Yes') else: print('No')