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



xmat,cmat=[],[]

for i in range(N+1):

  xmat.append([0]*(N+1))

  cmat.append([0]*(N+1))



for i in range(M):

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

  xmat[l][r]+=1

#print(xmat)



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

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

    cmat[i][j]=xmat[i][j]+cmat[i][j-1]

#print(cmat)



for i in range(Q):

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

  ans=0

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

    ans+=cmat[k][q]-cmat[k][p-1]

  print(ans)

import sys

input=sys.stdin.readline

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



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

for i in range(M):

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

  xmat[l][r]+=1

#print(xmat)



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

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

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

    smat[i][j]=xmat[i][j]+smat[i][j-1]+smat[i-1][j]-smat[i-1][j-1]

#print(smat)



for i in range(Q):

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

  print((smat[q][q]-smat[p-1][q]-smat[q][p-1]+smat[p-1][p-1]))
N, M, Q = list(map(int, input().split()))
xmat, cmat = [], []
for i in range(N + 1):
    xmat.append([0] * (N + 1))
    cmat.append([0] * (N + 1))
for i in range(M):
    l, r = list(map(int, input().split()))
    xmat[l][r] += 1
# print(xmat)
for i in range(1, N + 1):
    for j in range(1, N + 1):
        cmat[i][j] = xmat[i][j] + cmat[i][j - 1]
# print(cmat)
for i in range(Q):
    p, q = list(map(int, input().split()))
    ans = 0
    for k in range(p, q + 1):
        ans += cmat[k][q] - cmat[k][p - 1]
    print(ans)

import sys

input = sys.stdin.readline
N, M, Q = list(map(int, input().split()))
xmat = [[0] * (N + 1) for _ in range(N + 1)]
for i in range(M):
    l, r = list(map(int, input().split()))
    xmat[l][r] += 1
# print(xmat)
smat = [[0] * (N + 1) for _ in range(N + 1)]
for i in range(1, N + 1):
    for j in range(1, N + 1):
        smat[i][j] = xmat[i][j] + smat[i][j - 1] + smat[i - 1][j] - smat[i - 1][j - 1]
# print(smat)
for i in range(Q):
    p, q = list(map(int, input().split()))
    print((smat[q][q] - smat[p - 1][q] - smat[q][p - 1] + smat[p - 1][p - 1]))

+import sys + +input = sys.stdin.readline -xmat, cmat = [], [] -for i in range(N + 1): -    xmat.append([0] * (N + 1)) -    cmat.append([0] * (N + 1)) +xmat = [[0] * (N + 1) for _ in range(N + 1)] +smat = [[0] * (N + 1) for _ in range(N + 1)] -        cmat[i][j] = xmat[i][j] + cmat[i][j - 1] -# print(cmat) +        smat[i][j] = xmat[i][j] + smat[i][j - 1] + smat[i - 1][j] - smat[i - 1][j - 1] +# print(smat) -    ans = 0 -    for k in range(p, q + 1): -        ans += cmat[k][q] - cmat[k][p - 1] -    print(ans) +    print((smat[q][q] - smat[p - 1][q] - smat[q][p - 1] + smat[p - 1][p - 1]))