using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; namespace Program { class Program { static void Main() { int count = int.Parse(Console.ReadLine()); Program2 program2=new Program2(); program2.Calc(); Console.WriteLine(program2.GetWin(count)); Console.ReadLine(); } } class Program2 { private int[] _win=new int[10001]; private Sosuu sosuu = new Sosuu(); public string GetWin(int inNumber) { return _win[inNumber]==1 ? "Win":"Lose"; } public void Calc() { _win = _win.Select(x => -1).ToArray(); _win[0] = 0; _win[1] = 0; for (int number = 2; number <= 10000; number++) { _win[number] = Convert.ToInt32(GetWinCalc(number)); } } private bool GetWinCalc(int inNumber) { if (_win[inNumber] != -1) return _win[inNumber] == 1; List card = sosuu.sosuuList.Where(x => x < inNumber && inNumber - x > 1).ToList(); if (card.Count == 0) return false; foreach (int item in card) { int Aite_No = inNumber - item; if (!GetWinCalc(Aite_No)) return true; } return false; } } class Sosuu { public List sosuuList = new List(); public Sosuu() { sosuuList.Add(2); for (int number = 3;number <= 10000;number++) { if (number % 2 == 0) { continue; } for (int waruNumbre = 3; waruNumbre < number; waruNumbre++) { if (number % waruNumbre == 0) { break; } if(waruNumbre==number-1) sosuuList.Add(number); } } } } }