def divisor(num)
    num_sqrt = Math.sqrt(num).floor
    (1..num_sqrt).select{ |i| num % i == 0 }
end

n = gets.to_i

divisions = divisor(n)

divisions_list = []

divisions.each do |d|
    b = n/d
    arr = [d, b]
    divisions_list.push(arr)  
end

divisions_list.each do |d|
    d_len = d[0].to_s.length 
    b_len = d[1].to_s.length
    if d_len == 1 && b_len == 1
        puts("Yes")
        exit
    end
end

puts("No")