#include //const static double de_PI = 3.14159265358979323846; //const static double de_EPS = 0.000001; //const static int de_MOD = 1000000007; //const static int de_MAX = 999999999; //const static int de_MIN = -999999999; inline void Enumerate_PrimeNumber(const int &N, std::vector &result) { std::vector flg(N + 1, true); for (int i = 2; i*i <= N; i++) { if (flg[i]) { for (int j = i + i; j <= N; j += i) { flg[j] = false; } } } for (int i = 2; i < N + 1; i++) { if (flg[i]) { result.push_back(i); } } } inline bool Judge_PrimeNumber(const int &a) { if (a < 2) { return false; } if (a == 2 || a == 3) { return true; } if (a % 2 == 0) { return false; } if (a % 6 != 1 && a % 6 != 5) { return false; } for (int i = 5; i <= a / i; i += 2) { if (a%i == 0) { return false; } } return true; } int main(void) { //std::ifstream inf("123.txt"); std::cin.rdbuf(inf.rdbuf()); int N = 0; std::cin >> N; std::vector pn; Enumerate_PrimeNumber(N, pn); bool flg = true; std::vector now, next; now.push_back(N); while (1) { for (unsigned int j = 0; j < now.size(); j++) { int temp = now[j]; for (unsigned int i = 0; i < pn.size() && pn[i] <= temp; i++) { int a = temp - pn[i]; if (a > 1) { if (!Judge_PrimeNumber(a - 2)) { if (!Judge_PrimeNumber(a - 3)) { next.push_back(a); } } } } } if (next.empty()) { break; } std::sort(next.begin(), next.end()); next.erase(std::unique(next.begin(), next.end()), next.end()); now.clear(); std::copy(next.begin(), next.end(), std::back_inserter(now)); next.clear(); flg = !flg; } if (flg) { std::cout << "Lose" << std::endl; } else { std::cout << "Win" << std::endl; } }