#include #include #include #include #include #include #include #include //#include #include #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define REP(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) #define SWAP(a,b) (a ^= b,b = a ^ b,a ^= b) #define swap(type,a,b) do{type _c;_c=a;a=b;b=_c;}while(0) using namespace std; typedef long long int lint; template ostream& operator << (ostream& ostr, const vector<_Ty>& v) { if (v.empty()) { cout << "{ }"; return ostr; } cout << "{" << v.front(); for (auto itr = ++v.begin(); itr != v.end(); itr++) { cout << ", " << *itr; } cout << "}"; return ostr; } int yuki0007() { int N; cin >> N; vector sieve(N + 1, true); sieve[0] = sieve[1] = false; for (int i = 2; i * i <= N; i++) { if (!sieve[i]) continue; for (int j = i * i; j <= N; j += i) sieve[j] = false; } vector p; for (int i = 0; i < sieve.size(); i++) if (sieve[i]) p.push_back(i); vector win(N + 1, false); for (int i = 2; i <= N; i++) { if (sieve[i - 1] || sieve[i]) { win[i] = true; continue; } for (int j = 0; j < p.size() && p[j] <= i; j++) if (!win[i - p[j]]) { win[i] = true; break; } } cout << (win[N] ? "Win" : "Lose") << endl; return 0; } int main() { //clock_t start, end; //start = clock(); yuki0007(); //end = clock(); //printf("%d msec.\n", end - start); return 0; }