import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.
lang.
Math.
*; import static java.
util.
Arrays.
*;
public class CompositeSmash {
int INF=1<<28;
double EPS=1e-9;
int n,target;
int[] flag;
public String thePossible
(int n,
int target
) { this.n=n;
this.target=target;
flag=new int[n+1];
fill(flag,-1);
return rec(n)==1?"Yes":"No";
}
int rec(int m){
if(flag[m]>=0){
return flag[m];
}
if(m==target){
return flag[m]=1;
}
int res=1;
boolean prime=true;
for(int i=2;i*i<=m;i++){
if(m%i==0){
if(rec(i)==1||rec(m/i)==1){
prime=false;
}else{
res=0;
break;
}
}
}
if(prime){
res=0;
}
return flag[m]=res;
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLm1hdGguKjsKaW1wb3J0IGphdmEuaW8uKjsKCmltcG9ydCBzdGF0aWMgamF2YS5sYW5nLk1hdGguKjsKaW1wb3J0IHN0YXRpYyBqYXZhLnV0aWwuQXJyYXlzLio7CgpwdWJsaWMgY2xhc3MgQ29tcG9zaXRlU21hc2ggewoKCWludCBJTkY9MTw8Mjg7Cglkb3VibGUgRVBTPTFlLTk7CgkKCWludCBuLHRhcmdldDsKCWludFtdIGZsYWc7CgoJcHVibGljIFN0cmluZyB0aGVQb3NzaWJsZShpbnQgbiwgaW50IHRhcmdldCkgewoJCXRoaXMubj1uOwoJCXRoaXMudGFyZ2V0PXRhcmdldDsKCQlmbGFnPW5ldyBpbnRbbisxXTsKCQlmaWxsKGZsYWcsLTEpOwoJCXJldHVybiByZWMobik9PTE/IlllcyI6Ik5vIjsKCX0KCQoJaW50IHJlYyhpbnQgbSl7CgkJaWYoZmxhZ1ttXT49MCl7CgkJCXJldHVybiBmbGFnW21dOwoJCX0KCQkKCQlpZihtPT10YXJnZXQpewoJCQlyZXR1cm4gZmxhZ1ttXT0xOwoJCX0KCQkKCQlpbnQgcmVzPTE7CgkJYm9vbGVhbiBwcmltZT10cnVlOwoJCW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