t=int(input())
for i in range(t):
  a,b,c,d=map(int,input().split())
  if d<=b:
    if d<b:
      print("No")
    else:
      if a-(a//b)*b<=c:
        print("Yes")
      else:
        print("No")
  else:
    p= (c+b-a)//(d-b) +1
    if a+(d-b)*p>=2*b:
      print("Yes")
    else:
      print("No")