x=list(map(int,input().split())) t=x[0] x=x[1::] for i in range(0,2*t,2): if x[i]>4 or x[i]>=x[i+1]: print ("Yes") else: print ("No")