{-# LANGUAGE BangPatterns, MagicHash #-}
import Control.Monad
import Control.Applicative
import Data.List
import Data.Maybe
import Data.Bits
import qualified Data.IntMap.Strict as M
import qualified Data.ByteString.Char8 as B
import qualified Data.Vector.Unboxed as V
-- import Data.Vector.Unboxed ((!))
import Data.Tuple
import Data.Ord (Down(..))
import Data.Coerce

query :: Int -> Int -> Int -> Int -> Bool
query a b c d
  = b <= d && a >= b && b <= c - m + g
  where
    g = b `gcd` d
    m = a `mod` g


main :: IO ()
main = do
  getLine
  ans <- map ((\(a:b:c:d:_)->query a b c d)
              . unfoldr (B.readInt . B.dropWhile (== ' '))) 
         . B.lines <$> B.getContents
  mapM_ (\b -> putStrLn $ if b then "Yes" else "No") ans 
