import Control.Monad
import Data.List

solve [] _ acc = acc
solve ((a,b):abs) cds acc =
  case filter (\y-> compare a (fst y) == LT && compare b (snd y) == LT ) cds of
    [] -> solve abs cds acc
    xs -> solve abs cds (1+acc)
    --(delete (snd $ minimum $ map (\(x,y) -> ((x-a)^2+(y-b)^2,(x,y))) xs) cds) (acc+1)

readInt = read :: String -> Int  

main = do
  n <- read <$> getLine
  abs <- replicateM n $ (\[a,b] -> (readInt a,readInt b)) . words <$> getLine 
  cds <- replicateM n $ (\[a,b] -> (readInt a,readInt b)) . words <$> getLine
  print $ solve abs cds 0