T = int(input())

for i in range(T):
  apple = list(map(int, input().split(" ")))
  if apple[0] < apple[1]:
    print("No")
  elif apple[1] > apple[3]:
    print("No")
  elif apple[1] < apple[2]:
    print("Yes")
  else:
    A = apple[0] % apple[1]
    B = apple[3] % apple[1]
    if A > apple[2]:
      print("No")
    elif B == 0:
      if A <= apple[2]:
        print("Yes")
      else:
        print("No")
    else:
      C = (apple[2] - A) // B
      if A + (B * (C + 1)) < apple[1]:
        print("No")
      else:
        print("Yes")