N,M,Q = [ int(it) for it in input().split()]



grid = [ [0]*N for i in range(N) ]

gridsml = [ [0]*N for i in range(N) ]



for i in range(M):

  s,g = [ int(it)-1 for it in input().split()]

  grid[s][g]+=1



for i in range(N):

  gridsml[i][0]=grid[i][0]

  for j in range(1,N):

    gridsml[i][j]+=gridsml[i][j-1]+grid[i][j]





for i in range(Q):

  s,g = [ int(it)-1 for it in input().split()]

  m = 0

  for i in range(s,N):

    m += gridsml[i][g]

  print (m)
N,M,Q = [ int(it) for it in input().split() ]

lit = [ [ int(it)-1 for it in input().split() ] for i in range(M) ]

liq = [ [ int(it)-1 for it in input().split() ] for i in range(Q) ]



li = [[0]*(N+1) for i in range(N+1)]

for p,q in lit:

  li[p+1][q+1]+=1



for i in range(N+1):

  for j in range(N):

    li[i][j+1] += li[i][j]



for p,q in liq:

  s = 0

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

    s += li[i][q+1]

  print  (s)

    

  

  

N, M, Q = [int(it) for it in input().split()]
grid = [[0] * N for i in range(N)]
gridsml = [[0] * N for i in range(N)]
for i in range(M):
    s, g = [int(it) - 1 for it in input().split()]
    grid[s][g] += 1
for i in range(N):
    gridsml[i][0] = grid[i][0]
    for j in range(1, N):
        gridsml[i][j] += gridsml[i][j - 1] + grid[i][j]
for i in range(Q):
    s, g = [int(it) - 1 for it in input().split()]
    m = 0
    for i in range(s, N):
        m += gridsml[i][g]
    print(m)

N, M, Q = [int(it) for it in input().split()]
lit = [[int(it) - 1 for it in input().split()] for i in range(M)]
liq = [[int(it) - 1 for it in input().split()] for i in range(Q)]
li = [[0] * (N + 1) for i in range(N + 1)]
for p, q in lit:
    li[p + 1][q + 1] += 1
for i in range(N + 1):
    for j in range(N):
        li[i][j + 1] += li[i][j]
for p, q in liq:
    s = 0
    for i in range(p + 1, N + 1):
        s += li[i][q + 1]
    print(s)

-grid = [[0] * N for i in range(N)] -gridsml = [[0] * N for i in range(N)] -for i in range(M): -    s, g = [int(it) - 1 for it in input().split()] -    grid[s][g] += 1 -for i in range(N): -    gridsml[i][0] = grid[i][0] -    for j in range(1, N): -        gridsml[i][j] += gridsml[i][j - 1] + grid[i][j] -for i in range(Q): -    s, g = [int(it) - 1 for it in input().split()] -    m = 0 -    for i in range(s, N): -        m += gridsml[i][g] -    print(m) +lit = [[int(it) - 1 for it in input().split()] for i in range(M)] +liq = [[int(it) - 1 for it in input().split()] for i in range(Q)] +li = [[0] * (N + 1) for i in range(N + 1)] +for p, q in lit: +    li[p + 1][q + 1] += 1 +for i in range(N + 1): +    for j in range(N): +        li[i][j + 1] += li[i][j] +for p, q in liq: +    s = 0 +    for i in range(p + 1, N + 1): +        s += li[i][q + 1] +    print(s)