using System; class Program { static void Main(string[] args) { var S1 = Console.ReadLine(); var S2 = Console.ReadLine(); var S3 = Console.ReadLine(); var ans = "No"; if (S1 == "#.#" && S2 == ".#." && S3 == "#.#") ans = "Yes"; else if (S1 == ".#." && S2 == "#.#" && S3 == ".#.") ans = "Yes"; Console.WriteLine(ans); } }