#include using namespace std; int main(){ int N; cin>>N; long long H; cin>>H; long long A[202020]; for(int i=1;i<=N;i++)cin>>A[i]; long long count=1; for(int i=1;i<=N;i++)count=(count*(A[i]))%H; if(count==0)cout<<"YES"; else cout<<"NO"; }