ichimatsu = Array.new() 3.times do ichimatsu.push gets.chomp end ary = ichimatsu.join puts (ary == "#.#.#.#.#" || ary == ".#.#.#.#.") ? "Yes" : "No"