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

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

for i in range(M):

    L,R=[int(x)-1 for x in input().split()]

    x[L][R]+=1

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

for l in range(N):

    for r in range(N):

        cum[l][r+1]=cum[l][r]+x[l][r]

for i in range(Q):

    p,q=[int(x)-1 for x in input().split()]

    res=0

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

        res+=cum[l][q+1]-cum[l][p]

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

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

for i in range(M):

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

    x[L][R]+=1

for i in range(N+1):

    for j in range(N):

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

for j in range(N+1):

    for i in range(N):

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

for i in range(Q):

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

    print((x[q][q]-x[p-1][q]-x[q][p-1]+x[p-1][p-1]))
N, M, Q = list(map(int, input().split()))
x = [[0] * N for i in range(N)]
for i in range(M):
    L, R = [int(x) - 1 for x in input().split()]
    x[L][R] += 1
cum = [[0] * (N + 1) for i in range(N + 1)]
for l in range(N):
    for r in range(N):
        cum[l][r + 1] = cum[l][r] + x[l][r]
for i in range(Q):
    p, q = [int(x) - 1 for x in input().split()]
    res = 0
    for l in range(p, q + 1):
        res += cum[l][q + 1] - cum[l][p]
    print(res)

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

-x = [[0] * N for i in range(N)] +x = [[0] * (N + 1) for i in range(N + 1)] -    L, R = [int(x) - 1 for x in input().split()] +    L, R = list(map(int, input().split())) -cum = [[0] * (N + 1) for i in range(N + 1)] -for l in range(N): -    for r in range(N): -        cum[l][r + 1] = cum[l][r] + x[l][r] +for i in range(N + 1): +    for j in range(N): +        x[i][j + 1] += x[i][j] +for j in range(N + 1): +    for i in range(N): +        x[i + 1][j] += x[i][j] -    p, q = [int(x) - 1 for x in input().split()] -    res = 0 -    for l in range(p, q + 1): -        res += cum[l][q + 1] - cum[l][p] -    print(res) +    p, q = list(map(int, input().split())) +    print((x[q][q] - x[p - 1][q] - x[q][p - 1] + x[p - 1][p - 1]))