#include <iostream>
using namespace std;
int main() {
int x;
cin >> x;
int a = x/10;
int b=x%10;
if(a!=0&&b%a==0 || b!=0&&a%b==0){
cout << "Yes" << endl;}
else{
cout << "No" << endl;}
return 0;
}
CgojaW5jbHVkZSA8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKICAgIGludCB4OwogICAgY2luID4+IHg7CgogICAgaW50IGEgPSB4LzEwOwogICAgaW50IGI9eCUxMDsKICAgIGlmKGEhPTAmJmIlYT09MCB8fCBiIT0wJiZhJWI9PTApewogICAgY291dCA8PCAiWWVzIiA8PCBlbmRsO30KICAgIGVsc2V7CiAgICBjb3V0IDw8ICJObyIgPDwgZW5kbDt9CgogICAgcmV0dXJuIDA7Cn0KCg==