import numpy as np



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

a=[list(map(int, input().split())) for i in range(m)]

b=[list(map(int, input().split())) for i in range(q)]



x=np.zeros((501, 501), dtype=np.int)



for i in range(m):

    x[a[i][0], a[i][1]]+=1



np.cumsum(x, axis=0, out=x)

np.cumsum(x, axis=1, out=x)



for i in range(q):

    v1=b[i][0]

    v2=b[i][1]

    

    a1=x[v2, v2]

    a2=x[v2, v1-1]

    a3=x[v1-1, v2]

    a4=x[v1-1, v1-1]

    print((a1-a2-a3+a4))

import numpy as np



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

a=np.array([list(map(int, input().split())) for i in range(m)])

b=[list(map(int, input().split())) for i in range(q)]



x=np.zeros((501, 501), dtype=np.int)



np.add.at(x, (a[:, 0], a[:, 1]), 1)



np.cumsum(x, axis=0, out=x)

np.cumsum(x, axis=1, out=x)



for i in range(q):

    v1=b[i][0]

    v2=b[i][1]

    

    a1=x[v2, v2]

    a2=x[v2, v1-1]

    a3=x[v1-1, v2]

    a4=x[v1-1, v1-1]

    print((a1-a2-a3+a4))

import numpy as np

n, m, q = list(map(int, input().split()))
a = [list(map(int, input().split())) for i in range(m)]
b = [list(map(int, input().split())) for i in range(q)]
x = np.zeros((501, 501), dtype=np.int)
for i in range(m):
    x[a[i][0], a[i][1]] += 1
np.cumsum(x, axis=0, out=x)
np.cumsum(x, axis=1, out=x)
for i in range(q):
    v1 = b[i][0]
    v2 = b[i][1]
    a1 = x[v2, v2]
    a2 = x[v2, v1 - 1]
    a3 = x[v1 - 1, v2]
    a4 = x[v1 - 1, v1 - 1]
    print((a1 - a2 - a3 + a4))

import numpy as np

n, m, q = list(map(int, input().split()))
a = np.array([list(map(int, input().split())) for i in range(m)])
b = [list(map(int, input().split())) for i in range(q)]
x = np.zeros((501, 501), dtype=np.int)
np.add.at(x, (a[:, 0], a[:, 1]), 1)
np.cumsum(x, axis=0, out=x)
np.cumsum(x, axis=1, out=x)
for i in range(q):
    v1 = b[i][0]
    v2 = b[i][1]
    a1 = x[v2, v2]
    a2 = x[v2, v1 - 1]
    a3 = x[v1 - 1, v2]
    a4 = x[v1 - 1, v1 - 1]
    print((a1 - a2 - a3 + a4))

-a = [list(map(int, input().split())) for i in range(m)] +a = np.array([list(map(int, input().split())) for i in range(m)]) -for i in range(m): -    x[a[i][0], a[i][1]] += 1 +np.add.at(x, (a[:, 0], a[:, 1]), 1)