import strutils
import sequtils
import math
import future

proc judge(a:int,b:int,c:int,d:int): bool =
    if a < b:
        return false
    if d < b:
        return false
    if b < c:
        return true
    var
        temp1 = a mod b
        temp2 = d mod b
    while temp1 < b:
        if temp1 > c:
            return false
        if temp2 == 0:
            return true
        temp1 += temp2
    return true

let
    t = stdin.readLine.parseInt

for i in countup(1,t):
    var
        A = stdin.readLine.split.map(parseInt)
    if judge(A[0],A[1],A[2],A[3]):
        echo "Yes"
    else:
        echo "No"