T, *L = 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
    x = ((b-a%b)//m)*m+a%b
#    print(a,b,c,d,x)
    if x%b==0:
      x = (-m)%b
    if c<x:
      print('No')
    else:
      print('Yes')