require 'prime' MAX_N = 10000 @dp = [nil]*(MAX_N + 1) def check(n) n.downto(2) do |i| next if !i.prime? next if [0,1].include?(n-i) return @dp[n] = true if !check(n-i) end return @dp[n] = false end def main n = gets.to_i ans = check(n) ? "Win" : "Lose" end puts main()