#include using namespace std; using ll = long long; constexpr char newl = '\n'; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n; ll h; cin >> n >> h; ll ans = 1; for (int i = 0; i < n; i++) { ll a; cin >> a; (ans *= a) %= h; } cout << (ans == 0 ? "YES" : "NO") << newl; return 0; }