def main(): A = ''.join(input() for i in range(3)) print('Yes' if A == '#.#.#.#.#' or A == '.#.#.#.#.' else 'No') if __name__ == '__main__': main()