#include "bits/stdc++.h" using namespace std; using int64 = long long; template using p_que = priority_queue; template using rp_que = priority_queue, greater>; constexpr int INF = (1 << 30) - 1; constexpr int64 INF64 = (1ll << 60) - 1; #define rep(i, N) for(int i=0;i<(int)(N);++i) #define fs first #define sc second #define e_b emplace_back #define m_p make_pair #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() template ostream& operator<<(ostream& os, const pair& p) { return os << "P(" << p.first << ", " << p.second << ")"; } template ostream& operator<<(ostream& os, const vector& v) { os << "["; for (auto& e : v) os << e << ", "; return os << "]"; } template ostream& operator<<(ostream& os, const map& m) { os << "{" << endl; for (auto& e : m) os << "(" << e.first << ", " << e.second << ")" << endl; return os << "}"; } template ostream& operator<<(ostream& os, const set& s) { os << "{" << endl; for (auto& e : s) os << ", " << e << endl; return os << "}"; } template vector make_v(size_t a, T b) { return vector(a, b); } template auto make_v(size_t a, Ts... ts) { return vector(a, make_v(ts...)); } int64 gcd(int64 x, int64 y) { if (x == 0 || y == 0) return 0; int64 r; while ((r = y % x) != 0) { y = x; x = r; } return x; } int64 lcm(int64 x, int64 y) { if (x == 0 || y == 0) return 0; return x / gcd(x, y) * y; } int dx[] = { -1, 0, 1, 0 }; int dy[] = { 0, 1, 0, -1 }; void Main(); signed main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); cout << fixed << setprecision(30); Main(); } /*----------------------------Insert from here!----------------------------*/ vector< bool > prime_table(int n) { vector< bool > prime(n + 1, true); if (n >= 0) prime[0] = false; if (n >= 1) prime[1] = false; for (int i = 2; i * i <= n; i++) { if (!prime[i]) continue; for (int j = i + i; j <= n; j += i) { prime[j] = false; } } return prime; } /*----------------------------Insert above here----------------------------*/ vector> memo; int calc(const vector& table, const vector& prime, int N, int idx) { if (N == 2 || N == 3) return idx; if (memo[N][idx % 2] != -1) return memo[N][idx % 2]; int n; idx % 2 == 1 ? n = 1 : n = 0; for (int i = 0; N - prime[i] > 1; ++i) { if (N - prime[i] == 2 || N - prime[i] == 3) return idx + 1; if (table[N - prime[i] - 2] || table[N-prime[i] - 3]) continue; int t = -1; if (memo[N - prime[i]][(idx + 1) % 2] != -1) t = memo[N - prime[i]][(idx + 1) % 2]; else t = calc(table, prime, N - prime[i], idx + 1); if (idx % 2 == 1 && t % 2 == 0) { n = t; break; } else if (idx % 2 == 0 && t % 2 == 1) { n = t; break; } } memo[N][idx % 2] = n % 2; memo[N][!(idx % 2)] = !(n % 2); return n; } void Main() { int N; cin >> N; memo = make_v(N + 1, 2, -1); auto table = prime_table(N); vector prime; for (int i = 2; i <= N; ++i) if (table[i]) prime.emplace_back(i); if (calc(table, prime, N, 0) % 2 == 1) cout << "Win" << endl; else cout << "Lose" << endl; }