#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //#include #define rep(i,n) for(int i=0;i<(n);i++) #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define sz(x) ((int)(x).size()) #define pb push_back using ll = long long; using namespace std; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> N; ll H; cin >> H; vector A(N); rep(i,N) cin >> A[i]; rep(i,N){ A[i] = abs(A[i]); if(A[i]==0){ cout << "YES" << endl; return 0; } } rep(x,N){ map primes; ll tmp = A[x]; for(ll i=2;i*i<=tmp;i++){ while(tmp%i==0){ if(H%i==0) H/=i; tmp/=i; } if(tmp==1) break; } if(tmp!=1) if(H%tmp==0) H/=tmp; } if(H==1) cout << "YES" << endl; else cout << "NO" << endl; return 0; }