import sys input = lambda: sys.stdin.readline().rstrip() from collections import deque # ----------------------- # s1 = input() s2 = input() s3 = input() if s1 == '#.#' and s2 == '.#.' and s3 == '#.#': print('Yes') elif s1 == '.#.' and s2 == '#.#' and s3 == '.#.': print('Yes') else: print('No')