def solve(string):

    n, m, q, *lrpq = list(map(int, string.split()))

    lr, pq = lrpq[:2 * m], lrpq[2 * m:]

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

    for l, r in zip(lr[::2], lr[1::2]):

        t[l][r] += 1

    for i in range(n + 1):

        for j in range(n + 1):

            if j > 0:

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



    ans = [

        str(sum([t[i][q] - t[i][p - 1]

                 for i in range(p, q + 1)]))

        for p, q in zip(pq[::2], pq[1::2])

    ]

    return "\n".join(ans)





if __name__ == '__main__':

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

    print((solve('{} {} {}\n'.format(n, m, q) + '\n'.join([eval(input()) for _ in range(m + q)]))))

def solve(string):

    n, m, q, *lrpq = list(map(int, string.split()))

    lr, pq = lrpq[:2 * m], lrpq[2 * m:]

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

    for l, r in zip(lr[::2], lr[1::2]):

        t[l][r] += 1

    for i in range(n + 1):

        for j in range(n + 1):

            if j > 0:

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

    for i in range(n + 1):

        for j in range(n + 1):

            if i > 0:

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



    ans = [

        str(t[q][q] - t[p - 1][q] - t[q][p - 1] + t[p - 1][p - 1])

        for p, q in zip(pq[::2], pq[1::2])

    ]

    return "\n".join(ans)





if __name__ == '__main__':

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

    print((solve('{} {} {}\n'.format(n, m, q) + '\n'.join([eval(input()) for _ in range(m + q)]))))

def solve(string):
    n, m, q, *lrpq = list(map(int, string.split()))
    lr, pq = lrpq[: 2 * m], lrpq[2 * m :]
    t = [[0] * (n + 1) for _ in range(n + 1)]
    for l, r in zip(lr[::2], lr[1::2]):
        t[l][r] += 1
    for i in range(n + 1):
        for j in range(n + 1):
            if j > 0:
                t[i][j] += t[i][j - 1]
    ans = [
        str(sum([t[i][q] - t[i][p - 1] for i in range(p, q + 1)]))
        for p, q in zip(pq[::2], pq[1::2])
    ]
    return "\n".join(ans)


if __name__ == "__main__":
    n, m, q = list(map(int, input().split()))
    print(
        (
            solve(
                "{} {} {}\n".format(n, m, q)
                + "\n".join([eval(input()) for _ in range(m + q)])
            )
        )
    )

def solve(string):
    n, m, q, *lrpq = list(map(int, string.split()))
    lr, pq = lrpq[: 2 * m], lrpq[2 * m :]
    t = [[0] * (n + 1) for _ in range(n + 1)]
    for l, r in zip(lr[::2], lr[1::2]):
        t[l][r] += 1
    for i in range(n + 1):
        for j in range(n + 1):
            if j > 0:
                t[i][j] += t[i][j - 1]
    for i in range(n + 1):
        for j in range(n + 1):
            if i > 0:
                t[i][j] += t[i - 1][j]
    ans = [
        str(t[q][q] - t[p - 1][q] - t[q][p - 1] + t[p - 1][p - 1])
        for p, q in zip(pq[::2], pq[1::2])
    ]
    return "\n".join(ans)


if __name__ == "__main__":
    n, m, q = list(map(int, input().split()))
    print(
        (
            solve(
                "{} {} {}\n".format(n, m, q)
                + "\n".join([eval(input()) for _ in range(m + q)])
            )
        )
    )

+    for i in range(n + 1): +        for j in range(n + 1): +            if i > 0: +                t[i][j] += t[i - 1][j] -        str(sum([t[i][q] - t[i][p - 1] for i in range(p, q + 1)])) +        str(t[q][q] - t[p - 1][q] - t[q][p - 1] + t[p - 1][p - 1])