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

coordinate = [[0 for _ in range(N+1)] for i in range(N+1)]

for m in range(M):

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

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



for i in range(N):

    for j in range(1, N):

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





for i in range(Q):

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

    ans = 0

    for i in range(p-1, q):

        ans += coordinate[i][q-1] - coordinate[i][p-2]

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



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

for _ in range(M):

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

    l, r = l - 1, r - 1

    coordinate[l][r] += 1



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

for i in range(N):

    for j in range(N):

        acc[i + 1][j + 1] = acc[i][j + 1] + acc[i + 1][j] - acc[i][j] + coordinate[i][j]



for _ in range(Q):

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

    p, q = p - 1, q - 1

    ans = acc[N][q + 1] - acc[p][q + 1]

    print(ans)
N, M, Q = list(map(int, input().split()))
coordinate = [[0 for _ in range(N + 1)] for i in range(N + 1)]
for m in range(M):
    l, r = list(map(int, input().split()))
    coordinate[l - 1][r - 1] += 1
for i in range(N):
    for j in range(1, N):
        coordinate[i][j] += coordinate[i][j - 1]
for i in range(Q):
    p, q = list(map(int, input().split()))
    ans = 0
    for i in range(p - 1, q):
        ans += coordinate[i][q - 1] - coordinate[i][p - 2]
    print(ans)

N, M, Q = list(map(int, input().split()))
coordinate = [[0] * N for _ in range(N)]
for _ in range(M):
    l, r = list(map(int, input().split()))
    l, r = l - 1, r - 1
    coordinate[l][r] += 1
acc = [[0] * (N + 1) for _ in range(N + 1)]
for i in range(N):
    for j in range(N):
        acc[i + 1][j + 1] = acc[i][j + 1] + acc[i + 1][j] - acc[i][j] + coordinate[i][j]
for _ in range(Q):
    p, q = list(map(int, input().split()))
    p, q = p - 1, q - 1
    ans = acc[N][q + 1] - acc[p][q + 1]
    print(ans)

-coordinate = [[0 for _ in range(N + 1)] for i in range(N + 1)] -for m in range(M): +coordinate = [[0] * N for _ in range(N)] +for _ in range(M): -    coordinate[l - 1][r - 1] += 1 +    l, r = l - 1, r - 1 +    coordinate[l][r] += 1 +acc = [[0] * (N + 1) for _ in range(N + 1)] -    for j in range(1, N): -        coordinate[i][j] += coordinate[i][j - 1] -for i in range(Q): +    for j in range(N): +        acc[i + 1][j + 1] = acc[i][j + 1] + acc[i + 1][j] - acc[i][j] + coordinate[i][j] +for _ in range(Q): -    ans = 0 -    for i in range(p - 1, q): -        ans += coordinate[i][q - 1] - coordinate[i][p - 2] +    p, q = p - 1, q - 1 +    ans = acc[N][q + 1] - acc[p][q + 1]