#include using namespace std; // エラトステネスの篩(nは1以上, 素数列挙のみならi*i<=nで良い) O(nloglogn) vector sieve(int n) { vector x(n + 1, true); x.at(0) = x.at(1) = false; for (int i = 2; i <= n; i++) { if (x.at(i)) { for (int j = 2 * i; j <= n; j += i) x.at(j) = false; } } return x; } int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; vector prime = sieve(n); vector primelist; for (int i = 0; i <= n; i++) { if (prime[i]) primelist.emplace_back(i); } vector dp(n + 1, false); dp[0] = dp[1] = true; for (int i = 2; i <= n; i++) { bool win = false; for (int j = 0; j < primelist.size(); j++) { int look = i - primelist[j]; if (look < 0) break; if (!dp[look]) { win = true; break; } } dp[i] = win; } if (dp[n]) cout << "Win\n"; else cout << "Lose\n"; }