var
	n: int64;
	g: int64;

function sq(x: int64): int64;
var
	r: int64;
begin
	r := round(sqrt(1.0 * x)) - 2;
	while (r + 1) * (r + 1) <= x do
		inc(r);
	sq := r;
end;

begin
	reset(input, 'nim.in');
	rewrite(output, 'nim.out');

	readln(n);
	g := 0;
	while (n > 0) do begin
		if (sq(n) = sq(n - 1)) then begin
			n := n - sq(n) - 1;
		end else begin
			g := sq(n);
			break;
		end;
	end;

	if (g = 0) then begin
		writeln('LOSE');
	end else begin
		writeln('WIN');
	end;

	close(input);
	close(output);
end.