P = int(input()) for p in range(P): N, K = map(int, input().split()) if N % (K + 1) == 1: print('LOSE') else: print('WIN')