using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); public static void Main() { Solve(); } static void Solve() { var s1 = ReadLine(); var s2 = ReadLine(); var s3 = ReadLine(); var a = "#.#"; var b = ".#."; WriteLine((s1 == a && s2 == b && s3 == a) || (s1 == b && s2 == a && s3 == b) ? "Yes" : "No"); } }