n = int(input())
for i in range(n):
    result = 0
    line = input().split()
    if int(line[0])%int(line[1])<=int(line[2]) and (int(line[0])%int(line[1])+int(line[3]))-int(line[1])>=0:
        print("yes")
    else:
        print("no")