import Control.Monad (replicateM_)

main :: IO ()
main = do
  t <- readLn
  let
    h = do
      line <- getLine
      let
        answer = (\(a:b:c:d:_) -> if f a b c d then "Yes" else "No") . map read . words $ line
      putStrLn answer
  replicateM_ t h

f :: Int -> Int -> Int -> Int -> Bool
f initial buy criterion add = g (initial - buy) criterion (add - buy) (- buy)

g :: Int -> Int -> Int -> Int -> Bool
g initial criterion plus minus
  | initial < 0 = False
  | otherwise = go initial
  where
    go current
      | current < 0 = False
      | current == initial = True
      | otherwise = go $ current + (if current <= criterion then plus else minus)
