n, m, q = list(map(int, input().split()))

edges = [[0]*n for _ in range(n)]



for _ in range(m):

    L, R = [int(x)-1 for x in input().split()]

    edges[L][R] += 1





S = [[0]*(n+1)for _ in range(n+1)]

for i in range(n):

    for j in range(n):

        S[i][j+1] = S[i][j] + edges[i][j]



for _ in range(q):

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

    lines = S[p-1:q]

    ans = 0

    for row in lines:

        ans += row[q]-row[p-1]

    print(ans)
n, m, q = list(map(int, input().split()))

edges = [[0]*(n+1) for _ in range(n+1)]



for _ in range(m):

    L, R = list(map(int, input().split()))

    edges[L][R] += 1



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

    for j in range(n):

        edges[i][j+1] += edges[i][j]



for i in range(n):

    for j in range(1, n+1):

        edges[i+1][j] += edges[i][j]





for _ in range(q):

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

    ans = edges[q][q]-edges[q][p-1]-edges[p-1][q]+edges[p-1][p-1]

    print(ans)
n, m, q = list(map(int, input().split()))
edges = [[0] * n for _ in range(n)]
for _ in range(m):
    L, R = [int(x) - 1 for x in input().split()]
    edges[L][R] += 1
S = [[0] * (n + 1) for _ in range(n + 1)]
for i in range(n):
    for j in range(n):
        S[i][j + 1] = S[i][j] + edges[i][j]
for _ in range(q):
    p, q = list(map(int, input().split()))
    lines = S[p - 1 : q]
    ans = 0
    for row in lines:
        ans += row[q] - row[p - 1]
    print(ans)

n, m, q = list(map(int, input().split()))
edges = [[0] * (n + 1) for _ in range(n + 1)]
for _ in range(m):
    L, R = list(map(int, input().split()))
    edges[L][R] += 1
for i in range(1, n + 1):
    for j in range(n):
        edges[i][j + 1] += edges[i][j]
for i in range(n):
    for j in range(1, n + 1):
        edges[i + 1][j] += edges[i][j]
for _ in range(q):
    p, q = list(map(int, input().split()))
    ans = edges[q][q] - edges[q][p - 1] - edges[p - 1][q] + edges[p - 1][p - 1]
    print(ans)

-edges = [[0] * n for _ in range(n)] +edges = [[0] * (n + 1) for _ in range(n + 1)] -    L, R = [int(x) - 1 for x in input().split()] +    L, R = list(map(int, input().split())) -S = [[0] * (n + 1) for _ in range(n + 1)] +for i in range(1, n + 1): +    for j in range(n): +        edges[i][j + 1] += edges[i][j] -    for j in range(n): -        S[i][j + 1] = S[i][j] + edges[i][j] +    for j in range(1, n + 1): +        edges[i + 1][j] += edges[i][j] -    lines = S[p - 1 : q] -    ans = 0 -    for row in lines: -        ans += row[q] - row[p - 1] +    ans = edges[q][q] - edges[q][p - 1] - edges[p - 1][q] + edges[p - 1][p - 1]