T = int(input())
llist = []
for i in range(T):
    L = list(map(int, input().split()))
    llist.append(L)
for i in range(T):
    A = llist[i][0]
    B = llist[i][1]
    C = llist[i][2]
    D = llist[i][3]
    b = False
    N = A%B
    if A>=B:
        while N >= 0:
            if N<=C:
                N += D
            if N==A:
                b = True
                break
            if N>A+D:
                b = True
                break
            N %= B
    if b:
        print("Yes")
    else:
        print("No")