S = '' for _ in range(3): S += input() if S == '#.#.#.#.#' or S == '.#.#.#.#.': print("Yes") else: print("No")