import Control.Monad

main = do
    [n,h,w] <- map read . words <$> getLine
    ms <- map (map read . words) <$> replicateM n getLine :: IO [[Int]]
    print $ sum [ isOk h w m | m <- ms]

isOk :: Int -> Int -> [Int] -> Int
isOk h w m = 
    let
        a = m !! 0
        b = m !! 1 
    in if h <= a && w <= b then 1 else 0
