#include <bits/stdc++.h> using namespace std; int main(){ int N,H; cin>>N>>H; long long temp=1; long long res=1; for(int i=0;i<N;i++){ cin>>temp; res*=temp; res%=H; } if(res==0){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } return 0; }