#include #include #include using namespace std; void prime(int n); bool dfs(int i, bool player); vector prime_num; vector first_win(10100, -1); int main() { int N; cin >> N; prime(N); cout << (!dfs(N, 1) ? "Win" : "Lose") << endl; return 0; } bool dfs(int i, bool player) { if(i==0 || i==1){ return player; } if(first_win[i]!=-1){ return player!=first_win[i]; } for(int j=0; (i-prime_num[j]>=0 && j!=(int)prime_num.size()); ++j){ if(dfs(i-prime_num[j], !player) == player){ first_win[i] = !player; return !player; } } first_win[i] = player; return player; } void prime(int n) { bool is_prime[n+1]; for (int i=0; i