#include using namespace std; template bool cmin(T &a, U b) { return a > b && (a = b, true); } template bool cmax(T &a, U b) { return a < b && (a = b, true); } signed main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); int N, H; cin >> N >> H; vector A(N); for (int i = 0; i < N; i++) cin >> A.at(i); long ans = 1; for (auto a : A) ans *= a, ans %= H; cout << ((ans) ? "NO" : "YES") << "\n"; }