module Main where import Control.Monad import Data.List (sortBy) expNeeded = 30000 * 100 desupena = 30000 exp_h :: [Int] -> Int exp_h [g, d] = g - d * desupena by (_, a) (_, b) = b `compare` a main :: IO () main = do n <- readLn ds <- fmap (zip [1..]) . replicateM n $ exp_h . fmap read . words <$> getLine let (no, eff) = head $ sortBy by ds if eff * 6 < expNeeded then putStrLn "NO" else do putStrLn "YES" replicateM_ 6 (print no)