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); //primes.array.writeln; auto judge = game(N, primes.array); writeln(judge ? "Win" : "Lose"); } bool game(int N, int[] primes){ bool ret = false; if(N <= 1) return true; foreach(i ; primes){ if(i > N) break; ret |= !game(N - i, primes); } return ret; } auto get_primes(int N){ 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]); }