#include using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); int n,h,t; long long int val = 1; cin >> n >> h; for(int i=0;i> t; val*=t; val%=h; } if(val==0) cout << "YES" << '\n'; else cout << "NO" << '\n'; return 0; }