#!/usr/bin/env python
# -*- coding:utf-8 -*-

T = int(input())
L = []

for i in range(T):
     L.append(list(map(int, input().split())))
P=0
F=0
for i in range(T):
     A=L[i]
     #print(A)
     P=A[0]
     X = P%A[1]
     if A[0]<A[1]:
         F=1
         print("No")
     elif X>A[2]:
         F=1
         print("No")
     P=X+A[3]
     for i in range(100):
         P=P-A[1]
         if (P<0) and (F==0):
             F=1
             print("No")
             break;
         if P<=A[2]:
             P = P+A[3]
     if F==0:
         print("Yes")
     P=0
     F=0

