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