T = int(input())
set = []
for i in range(T):
    set.append([int(j) for j in input().split()])

for i in range(T):
    if set[i][0] < set[i][1] or set[i][1] > set[i][3]:
        print("No")
    elif set[i][1] == set[i][3]:
        if set[i][0] - set[i][1] > set[i][2] and set[i][0] < 2*set[i][1]:
            print("No")
        else:
            print("Yes")
    else:
        E = set[i][0] - set[i][1]
        F = set[i][3] - set[i][1]
        G = (set[i][2] - E)//F
        if set[i][0] - 2 * set[i][1] + (G + 1)*F >= 0:
            print("Yes")
        else:
            print("No")