S1 = input() S2 = input() S3 = input() ex1 = '#.#' ex2 = '.#.' if S1 == ex1 and S2 == ex2 and S3 == ex1 or S1 == ex2 and S2 == ex1 and S3 == ex2: print('Yes') else: print('No')