# count p<=x<=q and p<=y <=q

# 長方形に含まれる格子点の数

import numpy as np

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



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

for _ in range(M):

  x,y = list(map(int,input().split()))

  cnt[x][y] += 1



cnt = np.cumsum(cnt,axis=0).cumsum(axis=1)



for _ in range(Q):

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

  p -= 1

  x = cnt[q,q]

  x -= cnt[q,p]

  x -= cnt[p,q]

  x += cnt[p,p]

  print(x)
# count p<=x<=q and p<=y <=q

# 長方形に含まれる格子点の数

import numpy as np

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



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

for _ in range(M):

  x,y = list(map(int,input().split()))

  cnt[x][y] += 1



# cumsumだけnumpyを使って、添字アクセスするときはlistの方が速い

cnt = np.cumsum(cnt,axis=0).cumsum(axis=1).tolist()



for _ in range(Q):

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

  p -= 1

  x = cnt[q][q]

  x -= cnt[q][p]

  x -= cnt[p][q]

  x += cnt[p][p]

  print(x)
# count p<=x<=q and p<=y <=q
# 長方形に含まれる格子点の数
import numpy as np

N, M, Q = list(map(int, input().split()))
cnt = [[0] * (N + 1) for _ in range(N + 1)]
for _ in range(M):
    x, y = list(map(int, input().split()))
    cnt[x][y] += 1
cnt = np.cumsum(cnt, axis=0).cumsum(axis=1)
for _ in range(Q):
    p, q = list(map(int, input().split()))
    p -= 1
    x = cnt[q, q]
    x -= cnt[q, p]
    x -= cnt[p, q]
    x += cnt[p, p]
    print(x)

# count p<=x<=q and p<=y <=q
# 長方形に含まれる格子点の数
import numpy as np

N, M, Q = list(map(int, input().split()))
cnt = [[0] * (N + 1) for _ in range(N + 1)]
for _ in range(M):
    x, y = list(map(int, input().split()))
    cnt[x][y] += 1
# cumsumだけnumpyを使って、添字アクセスするときはlistの方が速い
cnt = np.cumsum(cnt, axis=0).cumsum(axis=1).tolist()
for _ in range(Q):
    p, q = list(map(int, input().split()))
    p -= 1
    x = cnt[q][q]
    x -= cnt[q][p]
    x -= cnt[p][q]
    x += cnt[p][p]
    print(x)

-cnt = np.cumsum(cnt, axis=0).cumsum(axis=1) +# cumsumだけnumpyを使って、添字アクセスするときはlistの方が速い +cnt = np.cumsum(cnt, axis=0).cumsum(axis=1).tolist() -    x = cnt[q, q] -    x -= cnt[q, p] -    x -= cnt[p, q] -    x += cnt[p, p] +    x = cnt[q][q] +    x -= cnt[q][p] +    x -= cnt[p][q] +    x += cnt[p][p]