from sys import stdin
for s in stdin:
n=int(s)
for i in range(n):
q=0
m,p=map(float,input().split())
q=((p-m)/m)*100
if q>0: #這裡解決誤差,怎麼py算都有誤差
q+=0.00001
elif q<0:
q-=0.00001
if q>=10 or q<=-7:
print('%.2f'%(q)+'%'+' dispose')
else:
print('%.2f'%(q)+'%'+' keep')