N = gets.to_i if N.digits.all? { |x| x == 9 } puts 'Yes' else puts 'No' end