function Main(input) { const getPrimes = n => { if (n < 2) return [] let list = [] let primes = [] for (let i = 0; i < n - 1; i++) { list[i] = i + 2 } const limit = Math.sqrt(n) while (true) { const num = list.shift() primes.push(num) list.forEach((v, i) => { if (v % num === 0) list.splice(i, 1) }) if (limit < num) break } return primes.concat(list) } const N = parseInt(input.trim()) const primes = getPrimes(N) let a = [2, 3] let win = [true, true, false, false] for (let i = 4; i <= N; i++) { for (let j = a.length; j < primes.length; j++) { if (i < primes[j]) break a[j] = primes[j] } b = a.map(v => i - v) for (let k = 0; k < b.length; k++) { if (!win[b[k]]) { win[i] = true break } } if (!win[i]) win[i] = false } const result = (win[N]) ? "Win" : "Lose" console.log(result) } Main(require("fs").readFileSync("/dev/stdin", "utf8"))