n = int(input()) for _ in range(n): x,y = map(int,input().split()) if x == 1: print("No") else: print("Yes")