import std.stdio; import std.string, std.conv, std.array, std.algorithm; import std.range, std.uni, std.math, std.container; import core.bitop, std.datetime; void main(){ int N = readln.chomp.to!int; auto primes = get_primes(N); auto dp = new bool[](N + 1); dp[0] = dp[1] = true; foreach(i ; 2 .. N + 1){ foreach(p ; primes){ if(p > i) break; if(!dp[i - p]){ dp[i] = true; break; } } } //stderr.writeln(dp); writeln(dp[N] ? "Win" : "Lose"); } auto get_primes(int N){ if(N < 2) throw new Exception("N must be over 1."); auto sieve = new bool[](N); sieve[] = true; sieve[0] = sieve[1] = false; foreach(p ; 2 .. N){ if(p*p > N) break; if(!sieve[p]) continue; foreach(d ; iota(p*p, N, p)){ sieve[d] = false; } } return iota(N).filter!(a => sieve[a]).array; }