#include<bits/stdc++.h>
#define int unsigned long long
using namespace std;
inline int read(){
int x=0,f=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while(ch>='0'&&ch<='9')x=x*10+ch-'0',ch=getchar();return x*f;
}
int a[1000005];
int gcd(int x,int y){
return y==0?x:gcd(y,x%y);
}
signed main(){
int n,k;
n=read(),k=read();
for(int i=1;i<=n;i++){
a[i]=read();
}
for(int i=2;i<=n;i++){
int temp=gcd(a[i],a[i-1]);
a[i]=a[i]/temp*a[i-1];
}
if(a[n]%k==0){
cout<<"Yes";
}
else cout<<"No";
return 0;
}