#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long int; using pii = pair; using pll = pair; using vll = std::vector; using vpll = std::vector; using vpii = std::vector; using vi = std::vector; const ll mod197 = 1000000007LL; const ll INF = INT_MAX; const double PI11 = 3.14159265359; vi prime; int desk[10010] = {}; int memo[10010][2] = {}; //敗北条件0,1を作る。 //現在の値を入れて。 //勝った方を返す関数 //はじめのターンは0つまり先攻は0 //後攻は1 int solve(int i,int depth) { if (memo[i][depth % 2] != -1) { return memo[i][depth % 2]; } if (i == 0 || i == 1) { return depth; } //cout << i << " " << depth << endl; int res = 0; int j = 0; while (i >= prime[j]) { res = solve(i - prime[j], depth + 1); if (depth % 2 == 0) { if (res % 2 == 0) { return memo[i][depth % 2] = res; } } else { if (res % 2 == 1) { return memo[i][depth % 2] = res; } } j++; } return memo[i][depth % 2] = depth+1; } void enum_prime() { for (int i = 2; i <= 10000; i++) { if (desk[i] == false) { for (int j = i; j <= 10000; j += i) { desk[j] = true; } prime.push_back(i); } } } int main() { enum_prime(); int n; cin >> n; for (int i = 0; i < 10010; i++) for (int j = 0; j < 2; j++) memo[i][j] = -1; if (solve(n,0) % 2 == 0) { cout << "Win" << endl; } else { cout << "Lose" << endl; } return 0; }