#include using namespace std; #define ll long long int int main(){ ll n,h;cin>>n>>h; ll p=1; for(ll i=0,a;i>a; p*=a; } p%h==0?cout<<"YES":cout<<"NO"; return 0; }