input = gets.to_i

def aaa(_val)
  if (0 == _val % 7)
    return _val / 7
  elsif (0 == _val % 5)
    return _val / 5
  elsif (0 == _val % 3)
    return _val / 3
  elsif (0 == _val % 2)
    return _val / 2
  end
  return -1
end

val1 = input
val2 = 1

if val1 == 1
  puts 'Yes'
  exit
end

loop do
  tmp = aaa(val1)
  if tmp < 0
    break
  end
  val2 = input / tmp
  val1 = tmp
  if (val1 <= 9 && val2 <= 9)
    puts 'Yes'
    exit
  end
  if val1 == 0
    break
  end
end

puts 'No'