#include <bits/stdc++.h>
using namespace std;
int n, k;
long long num[1000010];
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  while (~scanf("%d %d", &n, &k)) {
    long long flag = 1;
    for (int i = 1; i <= n; i++) scanf("%d", &num[i]);
    for (int i = 1; i <= n; i++) {
      flag = flag * num[i] / gcd(flag, num[i]);
      flag %= k;
    }
    if (flag == 0)
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
