t = int(input())

for i in range(t):
  ai = list(map(int, input().split(" ")))
  stock = ai[0]
  while stock > ai[1]:
    stock -= ai[1]
    if stock < ai[2]:
      if stock + ai[3] < ai[1]:
          stock += ai[3]
      else:
        print("No")
        break
  print("Yes")


