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



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



for i in range(m):

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

  l, r = l-1, r-1

  x[l][r] += 1

  

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

for i in range(n):

  for j in range(n):

    s[i+1][j+1] = s[i+1][j] + s[i][j+1] - s[i][j] + x[i][j]



for _ in range(q):

  a, b = list(map(int, input().split()))

  a, b = a-1, b-1

  print((s[b+1][b+1] - s[b+1][a] - s[a][b+1] + s[a][a]))
n, m, q = list(map(int, input().split()))



A = [[0]*n for i in range(n)]



for i in range(m):

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

    l, r = l-1, r-1

    A[l][r] += 1



#print(A)



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

for i in range(n):

  for j in range(n):

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



#print(s)



for i in range(q):

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

    p, q = p-1, q-1

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

    print(ans)

n, m, q = list(map(int, input().split()))
x = [[0] * n for _ in range(n)]
for i in range(m):
    l, r = list(map(int, input().split()))
    l, r = l - 1, r - 1
    x[l][r] += 1
s = [[0] * (n + 1) for _ in range(n + 1)]
for i in range(n):
    for j in range(n):
        s[i + 1][j + 1] = s[i + 1][j] + s[i][j + 1] - s[i][j] + x[i][j]
for _ in range(q):
    a, b = list(map(int, input().split()))
    a, b = a - 1, b - 1
    print((s[b + 1][b + 1] - s[b + 1][a] - s[a][b + 1] + s[a][a]))

n, m, q = list(map(int, input().split()))
A = [[0] * n for i in range(n)]
for i in range(m):
    l, r = list(map(int, input().split()))
    l, r = l - 1, r - 1
    A[l][r] += 1
# print(A)
s = [[0] * (n + 1) for _ in range(n + 1)]
for i in range(n):
    for j in range(n):
        s[i + 1][j + 1] = s[i + 1][j] + s[i][j + 1] - s[i][j] + A[i][j]
# print(s)
for i in range(q):
    p, q = list(map(int, input().split()))
    p, q = p - 1, q - 1
    ans = s[q + 1][q + 1] - s[p][q + 1] - s[q + 1][p] + s[p][p]
    print(ans)

-x = [[0] * n for _ in range(n)] +A = [[0] * n for i in range(n)] -    x[l][r] += 1 +    A[l][r] += 1 +# print(A) -        s[i + 1][j + 1] = s[i + 1][j] + s[i][j + 1] - s[i][j] + x[i][j] -for _ in range(q): -    a, b = list(map(int, input().split())) -    a, b = a - 1, b - 1 -    print((s[b + 1][b + 1] - s[b + 1][a] - s[a][b + 1] + s[a][a])) +        s[i + 1][j + 1] = s[i + 1][j] + s[i][j + 1] - s[i][j] + A[i][j] +# print(s) +for i in range(q): +    p, q = list(map(int, input().split())) +    p, q = p - 1, q - 1 +    ans = s[q + 1][q + 1] - s[p][q + 1] - s[q + 1][p] + s[p][p] +    print(ans)