from math import gcd



def solve(a,b,c,d):

  

    if a < b:

        return False

    if d < b:

        return False



    g = gcd(b,d)

    c += 1

    m = c + (a-c)%g

    return b <= m



T = int(eval(input()))

for _ in range(T):

    print(('Yes' if solve(*list(map(int,input().split()))) else 'No'))
import math

for _ in range(int(eval(input()))):

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

    print(('Yes' if b <= min(a, d, c+1+(a-c-1)%math.gcd(b,d)) else 'No'))
from math import gcd


def solve(a, b, c, d):
    if a < b:
        return False
    if d < b:
        return False
    g = gcd(b, d)
    c += 1
    m = c + (a - c) % g
    return b <= m


T = int(eval(input()))
for _ in range(T):
    print(("Yes" if solve(*list(map(int, input().split()))) else "No"))

import math

for _ in range(int(eval(input()))):
    a, b, c, d = list(map(int, input().split()))
    print(("Yes" if b <= min(a, d, c + 1 + (a - c - 1) % math.gcd(b, d)) else "No"))

-from math import gcd +import math - -def solve(a, b, c, d): -    if a < b: -        return False -    if d < b: -        return False -    g = gcd(b, d) -    c += 1 -    m = c + (a - c) % g -    return b <= m - - -T = int(eval(input())) -for _ in range(T): -    print(("Yes" if solve(*list(map(int, input().split()))) else "No")) +for _ in range(int(eval(input()))): +    a, b, c, d = list(map(int, input().split())) +    print(("Yes" if b <= min(a, d, c + 1 + (a - c - 1) % math.gcd(b, d)) else "No"))