s1=input() s2=input() s3=input() if s1 == "#.#" + s2 == ".#." + s3 == "#.#" or s1 ==".#." + s2 == "#.#" + s3 == ".#.": print("Yes") else: print("No")