#include #include #include std::vector cul_prime() { bool array[10001]{ false }; int sum = 0; for (auto i = 2; i <= 10000; ++i) { if (!array[i]) { ++sum; for (auto j = 2; j <= 10000 / i; ++j) { array[i * j] = true; } } } std::vector res(sum); int idx = 0; for (auto i = 2; i <= 10000; ++i) { if (!array[i]) res.at(idx++) = i; } return res; } int main() { bool must_lose[10001]{ false }; must_lose[0] = true; must_lose[1] = true; auto prime = cul_prime(); for (auto i = 0; i <= 10000; ++i) { if (!must_lose[i]) { for (auto j = 0; j < prime.size() && prime[j] <= 10000 - i; ++j) { must_lose[i + prime[j]] = true; } } } int n; std::cin >> n; if (must_lose[n]) std::cout << "Lose\n"; else std::cout << "Win\n"; return 0; }