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

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

for i in range(m):

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

    l-=1

    r-=1

    h[n-1-l][r]+=1

ans=0

for i in range(n):

    for j in range(n-1):

        h[i][j+1] += h[i][j]

 

for j in range(n):

    for i in range(n-1):

        h[i+1][j] += h[i][j]

 

for i in range(q):

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

    x-=1

    y-=1

    print((h[n-1-x][y]))
n,m,q=list(map(int,input().split()))

g=[[0]*n for _ in [0]*n]

for i in range(m):

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

    l-=1

    r-=1

    g[n-l-1][r]+=1

for i in range(n):

    for j in range(n-1):

        g[i][j+1]+=g[i][j]



for i in range(n):

    for j in range(n-1):

        g[j+1][i]+=g[j][i]



for i in range(q):

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

    p-=1

    w-=1

    print((g[n-1-p][w]))

    

    

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

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

-h = [[0] * (n) for _ in range(n)] +g = [[0] * n for _ in [0] * n] -    h[n - 1 - l][r] += 1 -ans = 0 +    g[n - l - 1][r] += 1 -        h[i][j + 1] += h[i][j] -for j in range(n): -    for i in range(n - 1): -        h[i + 1][j] += h[i][j] +        g[i][j + 1] += g[i][j] +for i in range(n): +    for j in range(n - 1): +        g[j + 1][i] += g[j][i] -    x, y = list(map(int, input().split())) -    x -= 1 -    y -= 1 -    print((h[n - 1 - x][y])) +    p, w = list(map(int, input().split())) +    p -= 1 +    w -= 1 +    print((g[n - 1 - p][w]))