N, M, Q = list(map(int, input().split()))

wa = [[0]*(N+1) for _ in range(N+1)]

import numpy as np



for _ in range(M):

    l, r = list(map(int, input().split()))

    wa[l][r] += 1



cwa = np.cumsum(np.cumsum(wa, axis=0), axis=1).tolist()

for i in range(Q):

    p, q = list(map(int, input().split()))

    ans = cwa[N][q]-cwa[p-1][q]

    print(ans)

import sys

def input(): return sys.stdin.readline().strip()

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

sys.setrecursionlimit(10**9)



N, M, Q = mapint()

query = [[0]*(N+1) for _ in range(N+1)]

for _ in range(M):

    l, r = mapint()

    query[l][r] += 1



from itertools import accumulate

for i in range(N+1):

    query[i] = list(accumulate(query[i]))

for i in range(1, N+1):

    for j in range(N+1):

        query[i][j] += query[i-1][j]



for _ in range(Q):

    p, q = mapint()

    print((query[N][q]-query[p-1][q]))
N, M, Q = list(map(int, input().split()))
wa = [[0] * (N + 1) for _ in range(N + 1)]
import numpy as np

for _ in range(M):
    l, r = list(map(int, input().split()))
    wa[l][r] += 1
cwa = np.cumsum(np.cumsum(wa, axis=0), axis=1).tolist()
for i in range(Q):
    p, q = list(map(int, input().split()))
    ans = cwa[N][q] - cwa[p - 1][q]
    print(ans)

import sys


def input():
    return sys.stdin.readline().strip()


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


sys.setrecursionlimit(10**9)
N, M, Q = mapint()
query = [[0] * (N + 1) for _ in range(N + 1)]
for _ in range(M):
    l, r = mapint()
    query[l][r] += 1
from itertools import accumulate

for i in range(N + 1):
    query[i] = list(accumulate(query[i]))
for i in range(1, N + 1):
    for j in range(N + 1):
        query[i][j] += query[i - 1][j]
for _ in range(Q):
    p, q = mapint()
    print((query[N][q] - query[p - 1][q]))

-N, M, Q = list(map(int, input().split())) -wa = [[0] * (N + 1) for _ in range(N + 1)] -import numpy as np +import sys + +def input(): +    return sys.stdin.readline().strip() + + +def mapint(): +    return list(map(int, input().split())) + + +sys.setrecursionlimit(10**9) +N, M, Q = mapint() +query = [[0] * (N + 1) for _ in range(N + 1)] -    l, r = list(map(int, input().split())) -    wa[l][r] += 1 -cwa = np.cumsum(np.cumsum(wa, axis=0), axis=1).tolist() -for i in range(Q): -    p, q = list(map(int, input().split())) -    ans = cwa[N][q] - cwa[p - 1][q] -    print(ans) +    l, r = mapint() +    query[l][r] += 1 +from itertools import accumulate + +for i in range(N + 1): +    query[i] = list(accumulate(query[i])) +for i in range(1, N + 1): +    for j in range(N + 1): +        query[i][j] += query[i - 1][j] +for _ in range(Q): +    p, q = mapint() +    print((query[N][q] - query[p - 1][q]))