using System; using System.Collections.Generic; using System.Text; public class Program { public void Proc(){ Reader.IsDebug = false; int max = int.Parse(Reader.ReadLine()); this.SetPrimeList(max); this.SetCanWinDic(max); bool ans = false; if(CanWin.ContainsKey(max)) { ans = this.CanWin[max]; } Console.WriteLine(ans?"Win":"Lose"); } private void SetCanWinDic(int max) { this.CanWin.Add(2, false); if(max >= 3) { this.CanWin.Add(3, false); } List keyList = new List(); keyList.AddRange(CanWin.Keys); foreach (int key in keyList) { foreach (int prime in this.PrimeList) { int newKey = key + prime; if(newKey <= max) { if(!CanWin.ContainsKey(newKey)) { CanWin.Add(newKey, true); } } else { break; } } } } private Dictionary CanWin = new Dictionary(); private List PrimeList = new List(); private void SetPrimeList(int max) { bool[] tempList = new bool[max+1]; for(int i=2; i<=max; i++) { if(!tempList[i]) { PrimeList.Add(i); for(int j=1; j<=max / i; j++) { tempList[j*i] = true; } } } } public static void Main(string[] args) { Program prg = new Program(); prg.Proc(); } } class Reader { public static bool IsDebug = true; private static System.IO.StringReader sr; public static string ReadLine() { if(IsDebug) { if(sr == null) { sr = new System.IO.StringReader(initStr.Trim()); } return sr.ReadLine(); } else { return Console.ReadLine(); } } public static int[] GetInt(char delimiter = ' ') { string[] inpt = ReadLine().Split(delimiter); int[] ret = new int[inpt.Length]; for(int i=0; i