T = int(input())

while T:
  T -= 1
  
  A, B, C, D = map(int, input().split())
  
  if B > D:
    print("No")
  else:
    p = A - max((A - C + B - 1) // B, 1) * B
    r = D % B
    if p < 0:
      print("No")
    elif p >= 0 and (r == 0 or ((C + r - p) // r) * r + p - B >= 0):
      print("Yes")
    else:
      print("No")