fun readStr () = let fun scan reader stream = SOME (StringCvt.splitl (not o Char.isSpace) reader (StringCvt.skipWS reader stream)) in valOf (TextIO.scanStream scan TextIO.stdIn) end val () = let val s1 = readStr () val s2 = readStr () val s3 = readStr () val ans = if s1 = "#.#" andalso s2 = ".#." andalso s3 = "#.#" then "Yes" else if s1 = ".#." andalso s2 = "#.#" andalso s3 = ".#." then "Yes" else "No" in print (ans ^ "\n") end