a=[gets,gets,gets].map{|e| e.chomp}.join("") puts (a=="#.#.#.#.#" || a==".#.#.#.#.")?"Yes":"No"