a = input() b= input() c=input() if a=='#.#' and b=='.#.' and c=='#.#': print('Yes') elif a=='.#.'and b=='#.#' and c=='.#.': print('Yes') else: print('No')