_input = input().split('\n') t = int(_input[0]) case = list(map(lambda x: x.split(' '),_input[1:])) for x,y in case: print('X' if x*2>y*2 else 'Y') print()