T = int(input())
A = list()
B = list()
C = list()
D = list()
for i in range(T):
    K = list(map(int, input().split()))
    a,b,c,d = K
    A.append(a)
    B.append(b)
    C.append(c)
    D.append(d)

for i in range(T):
    if D >= B and A%B < C:
        print("Yes")
    else:
        print("No")