#int(input()) #map(int, input().split()) #list(map(int, input().split())) s1 = input() s2 = input() s3 = input() a = "#.#" b = ".#." ans = 0 if s1 == a and s3 == a and s2 == b: ans = 1 elif s2 == a and s3 == b and s1 == b: ans = 1 if ans: print("Yes") else: print("No")