import Control.Monad

main = do
  [n, w, h] <- fmap (map read . words) getLine
  plates <- replicateM n $ do
    [a, b] <- fmap (map read . words) getLine
    return (a, b)
  print $ (length . filter (check (w, h))) plates

check :: (Int, Int) -> (Int, Int) -> Bool
check (w, h) (a, b) = w <= a && h <= b
