# 入力された値を文字列で受け取る str = gets.chomp # if str.include? "575" if str =~ /575/ puts "YES" else puts "NO" end