{-# OPTIONS_GHC -O #-}
{-# LANGUAGE BangPatterns #-}

import Control.Monad
import Control.Monad.ST
import Data.List
import qualified Data.ByteString.Char8 as B
import Data.Array.Unboxed
import Data.Array.ST

main=do
  (n:m:q:_)<-map read.words<$>getLine::IO[Int]
  lrs<-replicateM m $ unfoldr(B.readInt.B.dropWhile(==' '))<$>B.getLine::IO[[Int]]
  pqs<-replicateM q $ unfoldr(B.readInt.B.dropWhile(==' '))<$>B.getLine::IO[[Int]]
  --
  let !ar = f n lrs
  putStr.unlines $ map (\(p:q:_)->show $ ar ! (p,q)) pqs
--
f n lrs = runSTUArray $ do
  ar <- newArray ((1,1),(n+1,n)) 0 :: ST s (STUArray s (Int,Int) Int)
  forM_ lrs $ \(l:r:_) -> do
    writeArray ar (1,r) =<< succ <$> readArray ar (1,r)
    writeArray ar (l+1,r) =<< pred <$> readArray ar (l+1,r)
  forM_ [(l,r)|l<-[2..n],r<-[1..n]] $ \(l,r) -> do
    writeArray ar (l,r) =<< (+) <$> readArray ar (l,r) <*> readArray ar (l-1,r)
  forM_ [(l,r)|l<-[1..n],r<-[2..n]] $ \(l,r) -> do
    writeArray ar (l,r) =<< (+) <$> readArray ar (l,r) <*> readArray ar (l,r-1)
  pure ar
