t = int(input())

for i in range(t):
    able = "Yes"
    l = list(map(int, input().split()))
    if l[0]-l[1] <0:
        able = "No"
    if (l[0]-l[2])%l[1]+l[2] < l[1]:
        able = "No"
    if l[3] < l[1]:
        able = "No"
    print(able)