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



X = [[0 for j in range(510)] for i in range(510)]

C = [[0 for j in range(510)] for i in range(510)]



LR = []

for i in range(M):

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

    X[L][R] += 1



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

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

        C[i][j] = C[i][j-1]+X[i][j]





for i in range(Q):

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

    sum = 0

    for j in range(p, q+1):

        sum += C[j][q]-C[j][p-1]

    print(sum)

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



# 入力

A = [[0 for j in range(N+1)] for i in range(N+1)]

for _ in range(M):

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

    A[L][R] += 1





# 二次元累積和

Cum = [[0 for j in range(N+1)] for i in range(N+1)]

for i in range(N):

    for j in range(N):

        Cum[i+1][j+1] = Cum[i][j+1] + Cum[i+1][j] - Cum[i][j] + A[i+1][j+1]



# クエリ処理

for _ in range(Q):

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

    print((Cum[q][q]-Cum[p-1][q]-Cum[q][p-1]+Cum[p-1][p-1]))

N, M, Q = list(map(int, input().split()))
X = [[0 for j in range(510)] for i in range(510)]
C = [[0 for j in range(510)] for i in range(510)]
LR = []
for i in range(M):
    L, R = list(map(int, input().split()))
    X[L][R] += 1
for i in range(1, N + 1):
    for j in range(1, N + 1):
        C[i][j] = C[i][j - 1] + X[i][j]
for i in range(Q):
    p, q = list(map(int, input().split()))
    sum = 0
    for j in range(p, q + 1):
        sum += C[j][q] - C[j][p - 1]
    print(sum)

N, M, Q = list(map(int, input().split()))
# 入力
A = [[0 for j in range(N + 1)] for i in range(N + 1)]
for _ in range(M):
    L, R = list(map(int, input().split()))
    A[L][R] += 1
# 二次元累積和
Cum = [[0 for j in range(N + 1)] for i in range(N + 1)]
for i in range(N):
    for j in range(N):
        Cum[i + 1][j + 1] = Cum[i][j + 1] + Cum[i + 1][j] - Cum[i][j] + A[i + 1][j + 1]
# クエリ処理
for _ in range(Q):
    p, q = list(map(int, input().split()))
    print((Cum[q][q] - Cum[p - 1][q] - Cum[q][p - 1] + Cum[p - 1][p - 1]))

-X = [[0 for j in range(510)] for i in range(510)] -C = [[0 for j in range(510)] for i in range(510)] -LR = [] -for i in range(M): +# 入力 +A = [[0 for j in range(N + 1)] for i in range(N + 1)] +for _ in range(M): -    X[L][R] += 1 -for i in range(1, N + 1): -    for j in range(1, N + 1): -        C[i][j] = C[i][j - 1] + X[i][j] -for i in range(Q): +    A[L][R] += 1 +# 二次元累積和 +Cum = [[0 for j in range(N + 1)] for i in range(N + 1)] +for i in range(N): +    for j in range(N): +        Cum[i + 1][j + 1] = Cum[i][j + 1] + Cum[i + 1][j] - Cum[i][j] + A[i + 1][j + 1] +# クエリ処理 +for _ in range(Q): -    sum = 0 -    for j in range(p, q + 1): -        sum += C[j][q] - C[j][p - 1] -    print(sum) +    print((Cum[q][q] - Cum[p - 1][q] - Cum[q][p - 1] + Cum[p - 1][p - 1]))