import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); StringBuilder sb = new StringBuilder(); for (int i = 0; i < 3; i++) { sb.append(sc.next()); } sc.close(); String s = sb.toString(); if (s.equals("#.#.#.#.#") || s.equals(".#.#.#.#.")) { System.out.println("Yes"); } else { System.out.println("No"); } } }