# coding: utf-8
t=int(input())
for i in range(t):
    a,b,c,d=map(int,input().split())
    if a<b or d<b or a-b*(a//b)>c:
        print('No')
    elif c>=b:
        print('Yes')
    else:
        syoki=a-b*(a//b)
        sabun=d-b*(d//b)
        if sabun==0:
            print('Yes')
            continue
        z=sabun*(b//sabun+1)-b
        if z!=0 and syoki-z*(syoki//z-1)<b-c:
            print('No')
        else:
            print('Yes')