def oi(): return int(input()) def os(): return input() def mi(): return list(map(int, input().split())) input_count = 0 S1 = os() S2 = os() S3 = os() if S1=="#.#" and S2==".#." and S3=="#.#": print("Yes") elif S1==".#." and S2=="#.#" and S3==".#.": print("Yes") else: print("No")