Chef wants to rent a car to travel to his restaurant which is N kilometers away. He can either rent a petrol car or a diesel car.

One litre of petrol costs X rupees and one litre of diesel costs Y rupees. Chef can travel A kilometers with one litre of petrol and B kilometers with one litre of diesel.

Chef can buy petrol and diesel in any amount, not necessarily integer. For example, if X = 95, Chef can buy half a litre of petrol by paying 95/2 = 47.5 rupees.

Which car should the chef rent in order to minimize the cost of his travel?

------ Input Format ------ 

- The first line of input will contain a single integer T, denoting the number of test cases.
- The first and only line of each test case contains 5 space-separated integers, N, X, Y, A, and B - distance that chef needs to travel, the per litre prices of petrol and diesel and the distance chef can travel using one litre of petrol and diesel respectively.

------ Output Format ------ 

For each test case, output on a new line PETROL if the cost of travel is less using petrol car, DIESEL if the cost of travel is less using diesel car or ANY if cost of travel is same in both the cases.

You may print each character of the string in either uppercase or lowercase (for example, the strings PETrol, petrol, Petrol, and PETROL will all be treated as identical).

------ Constraints ------ 

$1 ≤ T ≤ 100$
$1 ≤ N,x,y,a,b ≤ 100$

----- Sample Input 1 ------ 
4
20 10 8 2 4
50 12 12 4 3
40 3 15 8 40
21 9 9 2 9

----- Sample Output 1 ------ 
DIESEL
PETROL
ANY
DIESEL

----- explanation 1 ------ 
Test case $1$: The cost of travelling by the petrol car will be $100$ rupees while that of using the diesel car will be $40$ rupees. Hence, diesel car is better.

Test case $2$: The cost of travelling by the petrol car will be $150$ rupees while that of using the diesel car will be $200$ rupees. Hence, petrol car is better.

Test case $3$: The cost of travel for petrol and diesel car will be $15$ rupees.

Test case $4$: The cost of travelling by the petrol car will be $94.5$ rupees while that of using the diesel car will be $21$ rupees. Hence, diesel car is better.

Difficulty: EASY

Starter code:

Solutions:
for i in range(int(input())):
	(n, x, y, a, b) = map(int, input().split())
	if n / a * x < n / b * y:
		print('PETROL')
	elif n / a * x > n / b * y:
		print('DIESEL')
	else:
		print('ANY')


for i in range(int(input())):
	(d, cp, cd, dp, dd) = map(int, input().split())
	petrol = d * cp / dp
	diesel = d * cd / dd
	if petrol < diesel:
		print('PETROL')
	elif petrol > diesel:
		print('DIESEL')
	elif petrol == diesel:
		print('ANY')


t = int(input())
for i in range(t):
	(N, X, Y, A, B) = map(int, input().split())
	totalPetrol = N / A * X
	totalDiesel = N / B * Y
	if totalDiesel < totalPetrol:
		print('DIESEL')
	elif totalPetrol == totalDiesel:
		print('ANY')
	else:
		print('PETROL')


for i in range(int(input())):
	(n, x, y, a, b) = map(int, input().split())
	p = n / a
	d = n / b
	p1 = p * x
	d1 = d * y
	if p1 == d1:
		print('ANY')
	elif p1 < d1:
		print('PETROL')
	else:
		print('DIESEL')


for i in range(int(input())):
	a = input()
	b = a.split()
	N = int(b[0])
	X = int(b[1])
	Y = int(b[2])
	A = int(b[3])
	B = int(b[4])
	if N / A * X < N / B * Y:
		print('PETROL')
	elif N / A * X > N / B * Y:
		print('DIESEL')
	else:
		print('ANY')


t = int(input())
for i in range(t):
	(N, X, Y, A, B) = map(int, input().split())
	s = N / A
	p = N / B
	if s * X < p * Y:
		print('PETROL')
	elif s * X == p * Y:
		print('ANY')
	else:
		print('DIESEL')


for t in range(int(input())):
	(n, x, y, a, b) = map(int, input().split())
	s1 = n / a
	c1 = s1 * x
	s2 = n / b
	c2 = s2 * y
	if c1 > c2:
		print('DIESEL')
	elif c1 == c2:
		print('ANY')
	else:
		print('PETROL')


t = int(input())
for i in range(t):
	(dist, pet, dis, a, b) = map(int, input().split())
	x = dist / a * pet
	y = dist / b * dis
	if x < y:
		print('PETROL')
	elif x > y:
		print('DIESEL')
	else:
		print('ANY')


t = int(input())
for i in range(t):
	(d, x, y, a, b) = map(int, input().split())
	petrol_cost = x / a * d
	diesel_cost = y / b * d
	if petrol_cost < diesel_cost:
		print('PETROL')
	elif diesel_cost < petrol_cost:
		print('DIESEL')
	else:
		print('ANY')


for i in range(int(input())):
	(a, b, c, d, e) = map(int, input().split())
	x = d * c
	y = b * e
	if x < y:
		print('DIESEL')
	elif x > y:
		print('PETROL')
	else:
		print('ANY')


for _ in range(int(input())):
	(n, x, y, a, b) = map(int, input().split())
	petrolreq = n / a
	diselreq = n / b
	if petrolreq * x == diselreq * y:
		print('ANY')
	elif petrolreq * x > diselreq * y:
		print('DIESEL')
	else:
		print('PETROL')


for _ in range(int(input())):
	(n, x, y, a, b) = map(int, input().split())
	p = n / a * x
	d = n / b * y
	if p < d:
		print('PETROL')
	elif p == d:
		print('ANY')
	else:
		print('DIESEL')


T = int(input())
for i in range(T):
	(N, x, y, a, b) = map(int, input().split())
	result = N / a
	ans = N / b
	if x * result < y * ans:
		print('PETROL')
	elif x * result > y * ans:
		print('DIESEL')
	else:
		print('ANY')


t = int(input())
for i in range(t):
	(n, x, y, a, b) = map(int, input().split())
	p = n * x / a
	d = n * y / b
	if p > d:
		print('DIESEL')
	if d > p:
		print('PETROL')
	if d == p:
		print('ANY')


T = int(input())
for _ in range(T):
	(N, X, Y, A, B) = map(int, input().split())
	petrol_expenses = N / A * X
	diesel_expenses = N / B * Y
	if petrol_expenses < diesel_expenses:
		print('PETROL')
	elif petrol_expenses > diesel_expenses:
		print('DIESEL')
	elif petrol_expenses == diesel_expenses:
		print('ANY')


T = int(input())
for _ in range(T):
	(N, X, Y, A, B) = map(int, input().split())
	a = N / A
	b = N / B
	cost_petrol = X * a
	cost_diesel = Y * b
	if cost_diesel < cost_petrol:
		print('DIESEL')
	elif cost_petrol < cost_diesel:
		print('PETROL')
	else:
		print('ANY')


T = int(input())
for i in range(T):
	(N, X, Y, A, B) = map(int, input().split())
	distance_petrol = N / A
	distance_diesel = N / B
	price_petrol = distance_petrol * X
	price_diesel = distance_diesel * Y
	if price_petrol > price_diesel:
		print('DIESEL')
	elif price_petrol < price_diesel:
		print('PETROL')
	else:
		print('ANY')


t = int(input())
for i in range(t):
	(n, a, b, x, y) = map(int, input().split())
	v = a / x
	v1 = v * n
	u = b / y
	u1 = n * u
	if v1 > u1:
		print('DIESEL')
	elif v1 == u1:
		print('ANY')
	else:
		print('PETROL')


def code():
	cases = int(input())
	for _ in range(cases):
		(N, X, Y, A, B) = map(int, input().split(' '))
		litres_to_travel_with_petrol = N / A
		litres_to_travel_with_diseal = N / B
		petrol_cost = litres_to_travel_with_petrol * X
		diseal_cost = litres_to_travel_with_diseal * Y
		if petrol_cost > diseal_cost:
			print('DIESEL')
		if diseal_cost > petrol_cost:
			print('PETROL')
		if petrol_cost == diseal_cost:
			print('ANY')
code()


T = int(input())
for _ in range(T):
	(N, X, Y, A, B) = map(int, input().split())
	(petrol, diesel) = (N / A * X, N / B * Y)
	if petrol > diesel:
		print('DIESEL')
	elif petrol < diesel:
		print('PETROL')
	else:
		print('ANY')


n = int(input())
for i in range(n):
	(n, a, b, c, d) = map(int, input().split())
	x = a / c
	y = b / d
	p = n * x
	q = n * y
	if p > q:
		print('DIESEL')
	elif p < q:
		print('PETROL')
	else:
		print('ANY')


testcases = int(input())
for i in range(testcases):
	(N, X, Y, A, B) = map(int, input().split())
	if N / A * X < N / B * Y:
		print('PETROL')
	elif N / A * X > N / B * Y:
		print('DIESEL')
	else:
		print('ANY')


n = int(input())
for _ in range(n):
	arr = list(map(int, input().split()))
	p = arr[0] / arr[3]
	d = arr[0] / arr[4]
	pp = p * arr[1]
	dd = d * arr[2]
	if pp > dd:
		print('DIESEL\n')
	elif pp == dd:
		print('ANY\n')
	else:
		print('PETROL \n')


t = int(input())
for i in range(t):
	(N, X, Y, A, B) = map(int, input().split())
	petrol = X / A * N
	diesel = Y / B * N
	if petrol == diesel:
		print('ANY')
	elif petrol > diesel:
		print('DIESEL')
	else:
		print('PETROL')