from copy import deepcopy



N, M, Q = [int(elem) for elem in input().split(' ')]

lines = [[int(elem) for elem in input().split(' ')] for _ in range(M)]

queries = [[int(elem) for elem in input().split(' ')] for _ in range(Q)]





def cuml_1d(N, lines, queries):

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

    for l, r in lines:

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



    cuml_coords = deepcopy(coords)

    for l in range(N):

        for r in range(1, N):

            cuml_coords[l][r] = cuml_coords[l][r - 1] + coords[l][r]



    for query in queries:

        p, q = query[0] - 1, query[1] - 1

        num_lines = 0

        for l in range(p, max(q + 1, N)):

            if p == 0:

                num_lines += cuml_coords[l][q]

            else:

                num_lines += cuml_coords[l][q] - cuml_coords[l][p - 1]

        print(num_lines)



cuml_1d(N, lines, queries)

from copy import deepcopy



N, M, Q = [int(elem) for elem in input().split(' ')]

lines = [[int(elem) for elem in input().split(' ')] for _ in range(M)]

queries = [[int(elem) for elem in input().split(' ')] for _ in range(Q)]





def cuml_1d(N, lines, queries):

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

    for l, r in lines:

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



    cuml_coords = deepcopy(coords)

    for l in range(N):

        for r in range(1, N):

            cuml_coords[l][r] = cuml_coords[l][r - 1] + coords[l][r]



    for query in queries:

        p, q = query[0] - 1, query[1] - 1

        num_lines = 0

        for l in range(p, max(q + 1, N)):

            if p == 0:

                num_lines += cuml_coords[l][q]

            else:

                num_lines += cuml_coords[l][q] - cuml_coords[l][p - 1]

        print(num_lines)



#cuml_1d(N, lines, queries)





def cuml_2d(N, lines, queries):

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

    for l, r in lines:

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

    cuml_l = deepcopy(coords)

    for r in range(N):

        for l in range(1, N):

            cuml_l[l][r] = cuml_l[l - 1][r] + coords[l][r]

    cuml_2d = deepcopy(cuml_l)

    for l in range(N):

        for r in range(1, N):

            cuml_2d[l][r] = cuml_2d[l][r - 1] + cuml_l[l][r]

    

    for query in queries:

        p, q = query[0] - 1, query[1] - 1

        if p != 0:

            num_lines = cuml_2d[q][q] - cuml_2d[q][p-1] - cuml_2d[p-1][q] + cuml_2d[p-1][p-1]

        else:

            num_lines = cuml_2d[q][q]

        print(num_lines)



cuml_2d(N, lines, queries)

from copy import deepcopy

N, M, Q = [int(elem) for elem in input().split(" ")]
lines = [[int(elem) for elem in input().split(" ")] for _ in range(M)]
queries = [[int(elem) for elem in input().split(" ")] for _ in range(Q)]


def cuml_1d(N, lines, queries):
    coords = [[0] * N for _ in range(N)]
    for l, r in lines:
        coords[l - 1][r - 1] += 1
    cuml_coords = deepcopy(coords)
    for l in range(N):
        for r in range(1, N):
            cuml_coords[l][r] = cuml_coords[l][r - 1] + coords[l][r]
    for query in queries:
        p, q = query[0] - 1, query[1] - 1
        num_lines = 0
        for l in range(p, max(q + 1, N)):
            if p == 0:
                num_lines += cuml_coords[l][q]
            else:
                num_lines += cuml_coords[l][q] - cuml_coords[l][p - 1]
        print(num_lines)


cuml_1d(N, lines, queries)

from copy import deepcopy

N, M, Q = [int(elem) for elem in input().split(" ")]
lines = [[int(elem) for elem in input().split(" ")] for _ in range(M)]
queries = [[int(elem) for elem in input().split(" ")] for _ in range(Q)]


def cuml_1d(N, lines, queries):
    coords = [[0] * N for _ in range(N)]
    for l, r in lines:
        coords[l - 1][r - 1] += 1
    cuml_coords = deepcopy(coords)
    for l in range(N):
        for r in range(1, N):
            cuml_coords[l][r] = cuml_coords[l][r - 1] + coords[l][r]
    for query in queries:
        p, q = query[0] - 1, query[1] - 1
        num_lines = 0
        for l in range(p, max(q + 1, N)):
            if p == 0:
                num_lines += cuml_coords[l][q]
            else:
                num_lines += cuml_coords[l][q] - cuml_coords[l][p - 1]
        print(num_lines)


# cuml_1d(N, lines, queries)
def cuml_2d(N, lines, queries):
    coords = [[0] * N for _ in range(N)]
    for l, r in lines:
        coords[l - 1][r - 1] += 1
    cuml_l = deepcopy(coords)
    for r in range(N):
        for l in range(1, N):
            cuml_l[l][r] = cuml_l[l - 1][r] + coords[l][r]
    cuml_2d = deepcopy(cuml_l)
    for l in range(N):
        for r in range(1, N):
            cuml_2d[l][r] = cuml_2d[l][r - 1] + cuml_l[l][r]
    for query in queries:
        p, q = query[0] - 1, query[1] - 1
        if p != 0:
            num_lines = (
                cuml_2d[q][q]
                - cuml_2d[q][p - 1]
                - cuml_2d[p - 1][q]
                + cuml_2d[p - 1][p - 1]
            )
        else:
            num_lines = cuml_2d[q][q]
        print(num_lines)


cuml_2d(N, lines, queries)

-cuml_1d(N, lines, queries) +# cuml_1d(N, lines, queries) +def cuml_2d(N, lines, queries): +    coords = [[0] * N for _ in range(N)] +    for l, r in lines: +        coords[l - 1][r - 1] += 1 +    cuml_l = deepcopy(coords) +    for r in range(N): +        for l in range(1, N): +            cuml_l[l][r] = cuml_l[l - 1][r] + coords[l][r] +    cuml_2d = deepcopy(cuml_l) +    for l in range(N): +        for r in range(1, N): +            cuml_2d[l][r] = cuml_2d[l][r - 1] + cuml_l[l][r] +    for query in queries: +        p, q = query[0] - 1, query[1] - 1 +        if p != 0: +            num_lines = ( +                cuml_2d[q][q] +                - cuml_2d[q][p - 1] +                - cuml_2d[p - 1][q] +                + cuml_2d[p - 1][p - 1] +            ) +        else: +            num_lines = cuml_2d[q][q] +        print(num_lines) + + +cuml_2d(N, lines, queries)