Rufus wants to go to the Lily's birthday party to surprise Lily. But Lily's party invitation has a unique code on it which is in the form X-Y(e.g. 123-456). So Rufus need a invitation but he fails to get the invitation.

So he decided to make a invitation on his own with a fake code on it. But each code has a unique characteristic that the total Fibonacci numbers lies in the range X and Y are even in counting. But Rufus did not know about this characteristic of the code.

NOTE: Both numbers X and Y are inclusive in the range i.e. [X, Y].

Help Rufus to tell whether the code is valid code or not.

INPUT

First line of input contains number of test cases T and followed by next T lines, each contains two space space separated integers X and Y.

OUTPUT

If total Fibonacci numbers are even in the counting, print "VALID" otherwise, print "INVALID" .

Constraints

1 ≤ T ≤ 10

1 ≤ X, Y ≤ 100000

SAMPLE INPUT
2
3 10
2 8

SAMPLE OUTPUT
INVALID
VALID

Explanation

[1] In first test case, Fibonacci numbers between 3 and 10 are 3, 5, 8 which are odd in counting i.e. 3. Hence the code is invalid code.

[2] In second test case, Fibonacci numbers between 2 and 8 are 2, 3, 5, 8 which are even in counting i.e. 4. Hence the code is valid code.
f=[1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025]
for i in xrange(input()):
	a,b=map(int,raw_input().split())
	c=0
	for i in f:
		if a<=i<=b:c+=1
	if c&1:print("INVALID")
	else:print("VALID")