from itertools import accumulate as acc



def LI(): return list(map(int, input().split()))

def LI_(): return list([int(x) - 1 for x in input().split()])





if __name__ == "__main__":

    N, M, Q = LI()

    LR = [[0]*N for _ in range(N)]

    for i in range(M):

        l, r = LI_()

        LR[l][r] += 1



    # 二次元累積和

    S = [tuple(acc(reversed(s))) for s in zip(*(acc(x) for x in LR))]

    for _ in range(Q):

        p, q = LI()

        # 必ず正方形だから、

        print((S[q-1][N-p]))

from itertools import accumulate as acc

import sys



if __name__ == "__main__":

    s = sys.stdin.readlines()

    N, M, Q = list(map(int, s[0].split()))

    LR = [[0]*N for _ in range(N)]

    for l, r in (list(map(int, e.split())) for e in s[1:M + 1]):

        LR[l - 1][r - 1] += 1



    S = [tuple(acc(reversed(s))) for s in zip(*(acc(x) for x in LR))]

    for p, q in (list(map(int, e.split())) for e in s[M+1:]):

        print((S[q-1][N-p]))

from itertools import accumulate as acc


def LI():
    return list(map(int, input().split()))


def LI_():
    return list([int(x) - 1 for x in input().split()])


if __name__ == "__main__":
    N, M, Q = LI()
    LR = [[0] * N for _ in range(N)]
    for i in range(M):
        l, r = LI_()
        LR[l][r] += 1
    # 二次元累積和
    S = [tuple(acc(reversed(s))) for s in zip(*(acc(x) for x in LR))]
    for _ in range(Q):
        p, q = LI()
        # 必ず正方形だから、
        print((S[q - 1][N - p]))

from itertools import accumulate as acc
import sys

if __name__ == "__main__":
    s = sys.stdin.readlines()
    N, M, Q = list(map(int, s[0].split()))
    LR = [[0] * N for _ in range(N)]
    for l, r in (list(map(int, e.split())) for e in s[1 : M + 1]):
        LR[l - 1][r - 1] += 1
    S = [tuple(acc(reversed(s))) for s in zip(*(acc(x) for x in LR))]
    for p, q in (list(map(int, e.split())) for e in s[M + 1 :]):
        print((S[q - 1][N - p]))

- - -def LI(): -    return list(map(int, input().split())) - - -def LI_(): -    return list([int(x) - 1 for x in input().split()]) - +import sys -    N, M, Q = LI() +    s = sys.stdin.readlines() +    N, M, Q = list(map(int, s[0].split())) -    for i in range(M): -        l, r = LI_() -        LR[l][r] += 1 -    # 二次元累積和 +    for l, r in (list(map(int, e.split())) for e in s[1 : M + 1]): +        LR[l - 1][r - 1] += 1 -    for _ in range(Q): -        p, q = LI() -        # 必ず正方形だから、 +    for p, q in (list(map(int, e.split())) for e in s[M + 1 :]):