from fractions import gcd

T, *L = list(map(int, open(0).read().split()))

for a,b,c,d in zip(*[iter(L)]*4):

  if b>d:

    print('No')

  elif b>a:

    print('No')

  elif c>=b:

    print('Yes')

  elif b==d:

    if a%b<c:

      print('Yes')

    else:

      print('No')

  else:

    m = d%b

    n = a%b

    g = gcd(b,d)

    if b-g+(a%g)>c:

      print('No')

    else:

      print('Yes')
from fractions import gcd

T,*L = list(map(int, open(0).read().split()))

for a,b,c,d in zip(*[iter(L)]*4):

  if b>d:

    print('No')

    continue

  if a<b:

    print('No')

    continue

  if c>b:

    print('Yes')

    continue

  g = gcd(b,d)

  x = a-b

  M = ((c-x)//g+1)*g+x

  if M>=b:

    print('Yes')

  else:

    print('No')

from fractions import gcd

T, *L = list(map(int, open(0).read().split()))
for a, b, c, d in zip(*[iter(L)] * 4):
    if b > d:
        print("No")
    elif b > a:
        print("No")
    elif c >= b:
        print("Yes")
    elif b == d:
        if a % b < c:
            print("Yes")
        else:
            print("No")
    else:
        m = d % b
        n = a % b
        g = gcd(b, d)
        if b - g + (a % g) > c:
            print("No")
        else:
            print("Yes")

from fractions import gcd

T, *L = list(map(int, open(0).read().split()))
for a, b, c, d in zip(*[iter(L)] * 4):
    if b > d:
        print("No")
        continue
    if a < b:
        print("No")
        continue
    if c > b:
        print("Yes")
        continue
    g = gcd(b, d)
    x = a - b
    M = ((c - x) // g + 1) * g + x
    if M >= b:
        print("Yes")
    else:
        print("No")

-    elif b > a: +        continue +    if a < b: -    elif c >= b: +        continue +    if c > b: -    elif b == d: -        if a % b < c: -            print("Yes") -        else: -            print("No") +        continue +    g = gcd(b, d) +    x = a - b +    M = ((c - x) // g + 1) * g + x +    if M >= b: +        print("Yes") -        m = d % b -        n = a % b -        g = gcd(b, d) -        if b - g + (a % g) > c: -            print("No") -        else: -            print("Yes") +        print("No")