#include #include #include #include #include #include #include #include #include #include #include #include #define REP(i, n) for(int i=0;i void print(const T &value) { std::cout << value << std::endl; } void yesno(bool a) { if (a)cout << "yes" << endl; else cout << "no" << endl; } void YesNo(bool a) { if (a)cout << "Yes" << endl; else cout << "No" << endl; } void YESNO(bool a) { if (a)cout << "YES" << endl; else cout << "NO" << endl; } typedef long long ll; typedef unsigned long ul; typedef long double ld; template inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } ll INF = 10000000; ll mod = 1000000007;//10^9+7 int dx[8] = {-1, 0, 0, 1, -1, -1, 1, 1}; int dy[8] = {0, -1, 1, 0, -1, 1, -1, 1}; using Graph = vector>;//隣接リスト:G[i]にはiと隣接する頂点が入るよ。 using P = pair;//BFSで利用。queueに入れる。 using PP = pair; //dijkstraで利用,priority_queueに入れる。 using p_queue = priority_queue, greater()>; //struct edge{int to, cost}; //番号ズレ注意!! int main() { int N; cin >> N; vector primes; int i = 2; while (i <=10000) { bool prime = true; for (int x:primes) { if (i % x == 0) { prime = false; break; } } if (prime) { primes.push_back(i); } i++; } int dp[N + 1];//dp[i]:=-1なら未確定,0ならlose,1ならwin! fill(dp, dp + N + 1, -1); dp[2] = 0; dp[3] = 0; for (int i = 4; i <= N; i++) { int lose = 1; for (int x:primes) { if (i - x >= 2) { lose *= dp[i - x]; } } if (lose) { dp[i] = 0; } else { dp[i] = 1; } } if (dp[N] == 0) { print("Lose"); } else { print("Win");} }