import Control.Monad
import Data.Array
import Data.Array.ST

main = do
  [n,m,q] <- (map read . words) <$> getLine
  lrlist <- replicateM m (getLine >>= return . (\l -> (head l, head $ tail l)) . map read . words)
  pqlist <- replicateM q (getLine >>= return . (\l -> (head l, head $ tail l)) . map read . words)
  let train2dimsum = train_number_array_from n lrlist
  forM_ pqlist (query train2dimsum)

query train2dimsum (p, q) =
  print answer
  where answer =
          train2dimsum!(q,q) -
            if p == 1 then
              0
            else
              train2dimsum!(q,p-1) + train2dimsum!(p-1,q) - train2dimsum!(p-1,p-1)

train_number_array_from n lrlist = runSTArray $ do
  tstarray <- newArray ((1,1), (n,n)) 0
  forM_ lrlist (update_train_number_array tstarray)
  forM_ [1 .. n] $ \x -> do
    forM_ [1 .. n] $ \y -> do
      v <- readArray tstarray (x,y)
      s <- if x == 1 then return 0 else readArray tstarray (x-1,y)
      writeArray tstarray (x,y) (s+v)
  forM_ [1 .. n] $ \x -> do
    forM_ [1 .. n] $ \y -> do
      v <- readArray tstarray (x,y)
      s <- if y == 1 then return 0 else readArray tstarray (x,y-1)
      writeArray tstarray (x,y) (s+v)
  return tstarray

update_train_number_array tstarray lr = do
  num <- readArray tstarray lr
  writeArray tstarray lr (num + 1)
