print('Yes' if [input() for _ in range(3)] in (['#.#', '.#.', '#.#'], ['.#.', '#.#', '.#.']) else 'No')