/* -*- coding: utf-8 -*- * * 1250.cc: No.1250 汝は倍数なりや? - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ /* typedef */ /* global variables */ /* subroutines */ template T gcd(T m, T n) { // m > 0, n > 0 if (m < n) swap(m, n); while (n > 0) { T r = m % n; m = n; n = r; } return m; } /* main */ int main() { int n, h; scanf("%d%d", &n, &h); for (int i = 0; h > 1 && i < n; i++) { int ai; scanf("%d", &ai); int g = gcd(h, ai); h /= g; } if (h == 1) puts("YES"); else puts("NO"); return 0; }