t=int(input())
for i in range(t):
    a,b,c,d=map(int,input().split())
    if a<b:
        print('No')
    else:
        aa=a
        bb=b
        count=(aa-c)//bb
        e=aa-b*count
        for j in range(100):
            e=e-b
            if e>0 and e<c:
                e+=d
            elif e<0:
                print('No')
                break
            else:
                pass
            if j==99:
                print('Yes')
                break
            else:
                pass
