def judge(a,b,c,d):
    if a >= b:
        if   ( b<= c+1 and b<= d)  \
          or ( b>c and (d%b ==0 or (b%2==0 and d%2==0 and b-c <=2 ) ) and a%b <= c ):
            return("Yes")
    return("No")

t = int(input())
for i in range(t):
    a, b, c, d = map(int,input().split(' '))
    #print(a,b,c,d ,judge(a,b,c,d))
    print(judge(a,b,c,d))

