a=input() b=input() c=input() print('YNeos'[not((a=='#.#'and b=='.#.'and c=='#.#')or(a=='.#.'and b=='#.#'and c=='.#.'))::2])