T=int(input()) for _ in range(T): x1,y1,x2,y2,X1,Y1,X2,Y2=map(int,input().split()) if (x1-x2)**2+(y1-y2)**2<=(X1-X2)**2+(Y1-Y2)**2: print('No') else: print('Yes')