let rec gcd a b = if b = 0 then a else gcd b (a mod b)
let solve a b c d =
  if a < b || b > d then "No"
  else if b <= c then "Yes"
  else let v = gcd b d in if b - v + (a mod v) <= c then "Yes" else "No"
let () =
  Scanf.scanf "%d" @@ fun t ->
  Array.init t (fun _ -> Scanf.scanf " %d %d %d %d" solve)
  |> Array.iter print_endline