n = gets.chomp.to_i

div_num = [*1..9]
p div_num

div_num.each do |v|
  temp = n.divmod(v)
  # p temp
  # p temp[1] != 0
  # p temp[0] > 9
  next if temp[1] != 0 || temp[0] > 9

  puts "Yes"
  return
end

p "No"