import strutils, sequtils, math proc sieve(n: int): seq[int] = var is_prime:seq[bool] = newSeqWith(n+1, true) sq = n.float.sqrt.int is_prime[0] = false is_prime[1] = false for i in 2.. sq: if is_prime[i]: for j in countup(i*i, n, i): is_prime[j] = false result = newSeq[int](0) for i in 0.. n: if is_prime[i]: result.add(i) var n:int primes:seq[int] win:seq[bool] n = stdin.readLine.parseInt primes = sieve(n) win = newSeqWith(n+2, false) win[0] = true win[1] = true for i in 2.. n: for p in primes: if p > i: break if not win[i-p]: win[i] = true break echo if win[n]: "Win" else: "Lose"