n = int(input())

for _ in range(n):
    a , b, c, d = map(int, input().split())
    if a < b or d < b:
        print("No")
        continue
    if b <= c :
        print("Yes")
        continue
    s = a % b
    l = d % b
    if l == 0 :
        if s <= c:
            print("Yes")
            continue
        else :
            print("No")
            continue
    tmp = -((s- b) // l) 
    tmp = (tmp-1) * l + s
    if tmp <= c :
        print("Yes")
    else :
        print("No") 

