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

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