for i in range(int(input())): X,Y=map(int,input().split()) if X==1 and Y!=1: print("No") else: print("Yes")