#include #define int long long #define double long double using namespace std; const int MOD = 1000000007; const int INF = 1e11; using Graph = vector>; signed main(){ int N, H; cin >> N >> H; map fac; for( int i = 2; i <= sqrt(H); i++ ){ while( H%i == 0 ){ H /= i; fac[i]++; } } if( H > 1 ) fac[H]++; map sum; for( int i = 0; i < N; i++ ){ int A; cin >> A; for( auto p : fac ){ while( A%p.first == 0 ){ A /= p.first; sum[p.first]++; } } } for( auto p : fac ){ if( p.second > sum[p.first] ){ cout << "NO" << endl; return 0; } } cout << "YES" << endl; }