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