s = gets.chomp arr = "kadomatsu".split("") 0.upto(9) do |j| arr.combination(j) do |i| if i.join("") == s puts "Yes" exit end end end puts "No"