#include #include using namespace std; /*dp[i] : 値iの時、自分が勝つ⇒true/ 相手が勝つ⇒false*/ bool dp[10001]; /*素数表*/ bool prime_memo[10001] = { false }; /*素数表の初期化*/ void prime_init(int num) { prime_memo[2] = true; for (int i = 3; i <= num; i += 2) { int k = 0; for (int j = 3; j <= sqrt(i); j += 2) { if (i%j == 0) { k = 1; break; } } if (k == 0) { prime_memo[i] = true; } } } /*勝敗計算*/ bool calc(int num) { for (int i = 2; i <= num;i++) { if (prime_memo[i] == true) { if (num - i >= 0) { if (dp[num - i] == false) { return true; } } } } return false; } int main() { int num; cin >> num; prime_init(num); dp[0] = true; dp[1] = true; for (int i = 2; i <= num; i++) { dp[i] = calc(i); } if (dp[num] == true) { cout << "Win" << endl; } else { cout << "Lose" << endl; } return 0; }