def f(n, k) dp = [true]*n dp[0] = false (0..n-1).each{|i| dp[i] = (1..[k,i].min).any?{|v|!dp[i-v]} } # p dp dp[n-1] end P = gets.to_i NK = P.times.map{gets.split.take(2).map(&:to_i)} NK.each{|n, k| puts f(n, k) ? :Win : :Lose }