T=int(input())
A=[]
B=[]
C=[]
D=[]
for i in range(T):
  AA,BB,CC,DD=list(map(int,input().split()))
  A.append(AA)
  B.append(BB)
  C.append(CC)
  D.append(DD)
for i in range(T):
  if B[i]<=D[i]:
    if A[i]-B[i]>=0:
      if A[i]%B[i]<=C[i]:
        print("Yes")
        continue
  print("No")

    