def primes2(limit): ''' returns a list of prime numbers upto limit. source: Rossetta code: Sieve of Eratosthenes http://rosettacode.org/wiki/Sieve_of_Eratosthenes#Odds-only_version_of_the_array_sieve_above ''' if limit < 2: return [] if limit < 3: return [2] lmtbf = (limit - 3) // 2 buf = [True] * (lmtbf + 1) for i in range((int(limit ** 0.5) - 3) // 2 + 1): if buf[i]: p = i + i + 3 s = p * (i + 1) + i buf[s::p] = [False] * ((lmtbf - s) // p + 1) return [2] + [i + i + 3 for i, v in enumerate(buf) if v] def solve(N): primes = primes2(N) dp = [-1] * (N + 1) dp[0] = 1 dp[1] = 1 for n in range(2, N + 1): for p in primes: if p > n: dp[n] = 0 break if dp[n - p] == 0: dp[n] = 1 break else: dp[n] = 0 print(dp) return dp[N] N = int(input()) if solve(N): print('Win') else: print('Lose')