s = [input() for _ in range(3)] print( "Yes" if (s[0] == "#.#" and s[1] == ".#." and s[2] == "#.#") or (s[0] == ".#." and s[1] == "#.#" and s[2] == ".#.") else "No" )