input_num= gets.to_i
anser = ""

9.downto(1){|n|
       if input_num % n == 0
        input_num = input_num / n
        break
       end
}
9.downto(1){|n|
        if (input_num / n == 1) && (input_num % n == 0)
        anser = "Yes"
        end
}
        if anser == "Yes"
            puts "Yes"
        else
            puts "No"
        end