import sequtils,strutils,strscans,algorithm,math,future,sets,tables template get():string = stdin.readLine() proc getIsPrimes(n:int) :seq[bool] = result = newSeqWith(n+1,true) result[0] = false result[1] = false for i in 2..n.float.sqrt.int : if not result[i]: continue for j in countup(i*2,n,i): result[j] = false proc getPrimes():seq[int] = const isPrime = getIsPrimes(10000) result = newSeq[int](0) for i,p in isPrime: if p : result.add(i) # lose 2 3 ... <=> win 0 1 4 5 6 7 ... let primes = getPrimes() let N = get().parseInt var win = newSeqWith(N,false) win[0] = true win[1] = true for i in 2..N: for p in primes: if i - p < 0 : break if not win[i-p]: win[i] = true break echo if win[N]: "Win" else: "Lose"