from fractions import gcd



T = int(eval(input()))



for _ in range(T):

    a, b, c, d = list(map(int, input().split()))



    if a < b or d < b:

        flag = False

    elif c >= b - 1:

        flag =  True

    else:

        g = gcd(b, d)

        flag = (b + a % g - g) <= c



    if flag:

        print("Yes")

    else:

        print("No")

def gcd(a, b):

    return a if b == 0 else gcd(b, a % b)



T = int(eval(input()))



for _ in range(T):

    a, b, c, d = list(map(int, input().split()))



    if a < b or d < b:

        flag = False

    elif c >= b - 1:

        flag = True

    else:

        g = gcd(b, d)

        flag = (b + a % g - g) <= c



    if flag:

        print("Yes")

    else:

        print("No")

from fractions import gcd

T = int(eval(input()))
for _ in range(T):
    a, b, c, d = list(map(int, input().split()))
    if a < b or d < b:
        flag = False
    elif c >= b - 1:
        flag = True
    else:
        g = gcd(b, d)
        flag = (b + a % g - g) <= c
    if flag:
        print("Yes")
    else:
        print("No")

def gcd(a, b):
    return a if b == 0 else gcd(b, a % b)


T = int(eval(input()))
for _ in range(T):
    a, b, c, d = list(map(int, input().split()))
    if a < b or d < b:
        flag = False
    elif c >= b - 1:
        flag = True
    else:
        g = gcd(b, d)
        flag = (b + a % g - g) <= c
    if flag:
        print("Yes")
    else:
        print("No")

-from fractions import gcd +def gcd(a, b): +    return a if b == 0 else gcd(b, a % b) +