import numpy as np

n, m, q = [int(item) for item in input().split(" ")]

# n, m, q = [int(item) for item in lines[0].split(" ")]



end = np.zeros((m,2),dtype=int)

query = np.zeros((q,2),dtype=int)

for i in range(m):

    end[i] = [int(item) for item in input().split(" ")]

#     end[i] = [int(item) for item in lines[1+i].split(" ")]



for i in range(q):

    query[i] = [int(item) for item in input().split(" ")]

#     query[i] = [int(item) for item in lines[1+m+i].split(" ")]



a = np.zeros((n,n), dtype=int)

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

b = np.cumsum(a[::-1,:], axis=0)[::-1,:]

c = np.cumsum(b, axis=1)

for item in query:

    print((c[item[0]-1, item[1]-1]))

    # print(np.sum(a[(item[0]-1):, :item[1]]))
import numpy as np

n, m, q = [int(item) for item in input().split(" ")]

# n, m, q = [int(item) for item in lines[0].split(" ")]



end = np.zeros((m,2),dtype=int)

query = np.zeros((q,2),dtype=int)

for i in range(m):

    end[i] = [int(item) for item in input().split(" ")]

#     end[i] = [int(item) for item in lines[1+i].split(" ")]



for i in range(q):

    query[i] = [int(item) for item in input().split(" ")]

#     query[i] = [int(item) for item in lines[1+m+i].split(" ")]



a = np.zeros((n,n), dtype=int)

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

b = np.cumsum(a[::-1,:], axis=0)[::-1,:]

c = np.cumsum(b, axis=1)



result = c[query[:,0]-1, query[:,1]-1]

for i in range(q):

    print((result[i]))

# for item in query:

#     print(c[item[0]-1, item[1]-1])

    # print(np.sum(a[(item[0]-1):, :item[1]]))
import numpy as np

n, m, q = [int(item) for item in input().split(" ")]
# n, m, q = [int(item) for item in lines[0].split(" ")]
end = np.zeros((m, 2), dtype=int)
query = np.zeros((q, 2), dtype=int)
for i in range(m):
    end[i] = [int(item) for item in input().split(" ")]
#     end[i] = [int(item) for item in lines[1+i].split(" ")]
for i in range(q):
    query[i] = [int(item) for item in input().split(" ")]
#     query[i] = [int(item) for item in lines[1+m+i].split(" ")]
a = np.zeros((n, n), dtype=int)
np.add.at(a, [end[:, 0] - 1, end[:, 1] - 1], 1)
b = np.cumsum(a[::-1, :], axis=0)[::-1, :]
c = np.cumsum(b, axis=1)
for item in query:
    print((c[item[0] - 1, item[1] - 1]))
    # print(np.sum(a[(item[0]-1):, :item[1]]))

import numpy as np

n, m, q = [int(item) for item in input().split(" ")]
# n, m, q = [int(item) for item in lines[0].split(" ")]
end = np.zeros((m, 2), dtype=int)
query = np.zeros((q, 2), dtype=int)
for i in range(m):
    end[i] = [int(item) for item in input().split(" ")]
#     end[i] = [int(item) for item in lines[1+i].split(" ")]
for i in range(q):
    query[i] = [int(item) for item in input().split(" ")]
#     query[i] = [int(item) for item in lines[1+m+i].split(" ")]
a = np.zeros((n, n), dtype=int)
np.add.at(a, [end[:, 0] - 1, end[:, 1] - 1], 1)
b = np.cumsum(a[::-1, :], axis=0)[::-1, :]
c = np.cumsum(b, axis=1)
result = c[query[:, 0] - 1, query[:, 1] - 1]
for i in range(q):
    print((result[i]))
# for item in query:
#     print(c[item[0]-1, item[1]-1])
# print(np.sum(a[(item[0]-1):, :item[1]]))

-for item in query: -    print((c[item[0] - 1, item[1] - 1])) -    # print(np.sum(a[(item[0]-1):, :item[1]])) +result = c[query[:, 0] - 1, query[:, 1] - 1] +for i in range(q): +    print((result[i])) +# for item in query: +#     print(c[item[0]-1, item[1]-1]) +# print(np.sum(a[(item[0]-1):, :item[1]]))