#include // #include // NOTE: AtCoderライブラリ #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; // using namespace atcoder; // NOTE: AtCoderライブラリ typedef long long ll; typedef long double ld; typedef vector vi; typedef vector vl; typedef vector vb; typedef vector vc; typedef pair pii; // #define INF __INT32_MAX__ // #define INF 1e9 // #define LINF __LONG_LONG_MAX__ int main() { ll N, H; cin >> N >> H; vector A(N); rep(i, N) cin >> A[i]; ll tmp = 1; rep(i, N) { tmp *= (A[i] % H); tmp %= H; } if (tmp == 0) { cout << "YES" << endl; } else { cout << "NO" << endl; } }