#include struct vector_hash { size_t operator()(const std::vector& v) const { std::hash hasher; size_t seed = 0; for (int i : v) { seed ^= hasher(i) + 0x9e3779b9 + (seed<<6) + (seed>>2); } return seed; } }; bool solve(int n, int x, const std::vector &a) { if (n == 1) return x == a[0]; int64_t prod = 1; bool cnt1 = false; for (int i = 0; i < n; i++) { prod *= a[i] + 1; if (prod > x + 1) return false; if (a[i] == 1) cnt1 = true; } if (cnt1) return true; std::unordered_set, vector_hash> que; que.insert(a); while (que.size()) { if (que.begin()->size() == 1) return std::find(que.begin(), que.end(), std::vector{x}) != que.end(); std::unordered_set, vector_hash> next; for (auto &i : que) { int prod = 1; for (auto j : i) prod *= j + 1; for (int j = 0; j < (int) i.size(); j++) { if (j && i[j] == i[j - 1]) continue; for (int k = 0; k < (int) i.size(); k++) { if (j == k) continue; int cur = prod / (i[j] + 1) / (i[k] + 1); for (int l = i[k] + 1; ; l++) { if ((l * i[j] + i[k] + 1) * cur > x + 1) break; std::vector tmp = i; tmp[j] = l * i[j] + i[k]; tmp.erase(tmp.begin() + k); std::sort(tmp.begin(), tmp.end()); next.insert(tmp); } } } } que.swap(next); } return false; } int main() { int n, x; scanf("%d%d", &n, &x); assert(1 <= n && n <= 100000); assert(1 <= x && x <= 5000); std::vector a(n); for (int i = 0; i < n; i++) scanf("%d", &a[i]), assert(1 <= a[i] && a[i] <= 5000); clock_t r0 = clock(); std::cout << (solve(n, x, a) ? "YES" : "NO") << std::endl; clock_t r1 = clock(); std::cerr << (double) (r1 - r0) * 1000 / CLOCKS_PER_SEC << "ms" << std::endl; return 0; }