#include #include #include using namespace std; #define fastcin {\ cin.tie(0);\ ios::sync_with_stdio(false);\ } #define rep(i, a, b) for(int i = a; i < b; i++) #define REP(i, a) for(int i = 0; i < a; i++) #define scan(x) cin >> x #define print(x) cout << x << "\n" bool prime[10001]; vector primelist; int gr[10001]; void makePrimeList (int x) { REP(i, x+1) prime[i] = true; prime[0] = prime[1] = false; rep(i, 2, x+1) { if (prime[i]) { for (int j = i << 1; j < x+1; j += i) prime[j] = false; primelist.push_back(i); } } } int main() { fastcin; int n; scan(n); makePrimeList(n); gr[0] = gr[1] = gr[2] = gr[3] = 0; rep(i, 4, n+1) { set g; for (auto &v: primelist) { int next = i - v; if (next < 2) break; g.insert(gr[next]); } int res = 0; for (auto &s: g) { if (res == s) res++; else break; } gr[i] = res; } if (gr[n]) print("Win"); else print("Lose"); return 0; }