#include #include #include #include #include #include #include #include #include #define repd(i,a,b) for (int i=(a);i<(b);i++) #define rep(i,n) repd(i,0,n) typedef long long ll; using namespace std; int inputValue(){ int a; cin >> a; return a; }; void inputArray(int * p, int a){ rep(i, a){ cin >> p[i]; } }; void inputVector(vector * p, int a){ rep(i, a){ int input; cin >> input; p -> push_back(input); } } template void output(T a, int precision) { if(precision > 0){ cout << setprecision(precision) << a << "\n"; } else{ cout << a << "\n"; } } // n未満の素数リストを返す vector primeList(int n){ vector isPrime(n); // prime: false, composite: true rep(i, n){ isPrime[i] = false; } isPrime[0] = isPrime[1] = true; vector prime; repd(i, 2, n){ if (isPrime[i]) { continue; } prime.push_back(i); for (int j = i * 2; j < n; j += i) { isPrime[j] = true; } } return prime; } bool V[10010]; void isVictory(int N){ rep(i, N) { V[i] = false; } V[0] = V[1] = true; //勝ち vector pl = primeList(N + 1); repd(i, 2, N + 1){ int ind = 0; bool e = true; while (pl[ind] <= i) { e &= V[i - pl[ind]]; ind++; } V[i] = !e; } } int main(int argc, const char * argv[]) { // source code int N = inputValue(); isVictory(N + 2); output(V[N] ? "Win" : "Lose", 0); return 0; }