in_n = gets.chomp.to_i in_s = in_n.times.map { gets.chomp.chars } if in_n % 2 == 0 or in_s.flatten.count("#") % 2 == 0 puts "Yes" else puts "No" end