n=eval(input())
for i in range(n):
m,p=map(int,input().split())
total=float((p-m)/m*100)
if total>=10 or total<=-7.00:
print(f'{total:.2f}%',end=" ")
print("dispose")
else:
print(f'{total:.2f}%',end=" ")
print("keep")