#include using namespace std; #define rep(i,n) for (int i = 0; i < n; ++i) using ll = long long; using P = pair; // Sieve of Eratosthenes // https://youtu.be/UTVg7wzMWQc?t=2774 struct Sieve { int n; vector f, primes; Sieve(int n=1):n(n), f(n+1) { f[0] = f[1] = -1; for (ll i = 2; i <= n; ++i) { if (f[i]) continue; primes.push_back(i); f[i] = i; for (ll j = i*i; j <= n; j += i) { if (!f[j]) f[j] = i; } } } bool isPrime(int x) { return f[x] == x;} vector factorList(int x) { vector res; while (x != 1) { res.push_back(f[x]); x /= f[x]; } return res; } vector

factor(int x) { vector fl = factorList(x); if (fl.size() == 0) return {}; vector

res(1, P(fl[0], 0)); for (int p : fl) { if (res.back().first == p) { res.back().second++; } else { res.emplace_back(p, 1); } } return res; } }; bool result[10001]; int main() { result[0]=result[1]=true; int N;cin>>N; Sieve prime(N); for (int i = 2; i <= N; i++){ bool res=true; for (auto &&p : prime.primes){ if(p>i)break; res&=result[i-p]; } result[i]=!res; } cout<<(result[N]?"Win":"Lose")<