input = gets.chomp if input[0] == input[1] if input[0] != input[2] puts "Yes" exit end end puts "No"