#include //#include // Begin Header {{{ //using namespace atcoder; using namespace std; using ll = long long; using P = pair; using Graph = vector>; #define rep(i,n) for(ll i=0; i inline bool chmax(T &a, const S &b) { if (a inline bool chmin(T &a, const S &b) { if (a>b) { a = b; return 1; } return 0; } #define INT(...) \ int __VA_ARGS__; \ IN(__VA_ARGS__) #define LL(...) \ ll __VA_ARGS__; \ IN(__VA_ARGS__) #define STR(...) \ string __VA_ARGS__; \ IN(__VA_ARGS__) #define CHR(...) \ char __VA_ARGS__; \ IN(__VA_ARGS__) #define DBL(...) \ double __VA_ARGS__; \ IN(__VA_ARGS__) template void scan(T &a) { cin >> a; } void IN() {} template void IN(Head &head, Tail &... tail){ scan(head); IN(tail...); } // }}} End Header void Main(){ bool ok = false; ll ans = 1; LL(n, h); rep(i,n){ LL(a); ans*=a; ans%=h; } if(ans%h == 0) puts("YES"); else puts("NO"); } int main(int argc, char **argv) { ios_base::sync_with_stdio(false); cin.tie(0); Main(); return 0; }