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:
      if apple[0] % 2 == 1 or apple[1] % 2 == 1 or apple[3] % 2 == 1:
        if apple[2] + 1 == apple[1]:
          print("Yes")
        else:
          print("No")
      elif apple[0] % 2 == 0 and apple[1] % 2 == 0 and apple[3] % 2 == 0:
        if apple[2] + 2 >= apple[1]:
          print("Yes")
        else:
          print("No")