#include "bits/stdc++.h" using namespace std; #define MAX_N 10000 //エラトステネスの篩 int find_primes(vector &prime_nums, int num) { vector arr(num, true); for (int i = 2; i < sqrt(num); i++) { if (arr[i]) { for (int j = 0; i * (j + 2) < num; j++) { arr[i * (j + 2)] = false; } } } int j = 0; for (int i = 2; i < num; i++) { if (arr[i]) { prime_nums[j] = i; j++; } } return j; } int main() { int N; cin >> N; vector result(N + 1, false); result[1] = true; result[2] = false; vector prime_nums(N, N); int size = find_primes(prime_nums, N); for (int i = 3; i <= N; i++) { bool flag = true; for (int j = 0; prime_nums[j] < i; j++) { flag &= result[i - prime_nums[j]]; } result[i] = !flag; } cout << (result[N] ? "Win" : "Lose"); }