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]]))
# ABC105D



import sys

input = lambda : sys.stdin.readline().rstrip()

sys.setrecursionlimit(max(1000, 10**9))

write = lambda x: sys.stdout.write(x+"\n")



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

lr = [None] * m

qs = [None] * q



for i in range(m):

    lr[i] = tuple([int(x)-1 for x in input().split()])

    

t = [[0]*(n+1) for _ in range(n+1)]



for x,y in lr:

    t[y][x] += 1

    

for i in range(n):

    for j in range(i,n):

        t[j][j-i] += t[j-1][j-i] + t[j][j-i+1] - t[j-1][j-i+1]

        

ans = [None] * q

for i in range(q):

    l, r = tuple([int(x)-1 for x in input().split()])

    ans[i] = t[r][l]

write("\n".join(map(str, ans)))
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]]))

# ABC105D
import sys

input = lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x + "\n")
n, m, q = list(map(int, input().split()))
lr = [None] * m
qs = [None] * q
for i in range(m):
    lr[i] = tuple([int(x) - 1 for x in input().split()])
t = [[0] * (n + 1) for _ in range(n + 1)]
for x, y in lr:
    t[y][x] += 1
for i in range(n):
    for j in range(i, n):
        t[j][j - i] += t[j - 1][j - i] + t[j][j - i + 1] - t[j - 1][j - i + 1]
ans = [None] * q
for i in range(q):
    l, r = tuple([int(x) - 1 for x in input().split()])
    ans[i] = t[r][l]
write("\n".join(map(str, ans)))

-import numpy as np +# ABC105D +import sys -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) +input = lambda: sys.stdin.readline().rstrip() +sys.setrecursionlimit(max(1000, 10**9)) +write = lambda x: sys.stdout.write(x + "\n") +n, m, q = list(map(int, input().split())) +lr = [None] * m +qs = [None] * q -    end[i] = [int(item) for item in input().split(" ")] -#     end[i] = [int(item) for item in lines[1+i].split(" ")] +    lr[i] = tuple([int(x) - 1 for x in input().split()]) +t = [[0] * (n + 1) for _ in range(n + 1)] +for x, y in lr: +    t[y][x] += 1 +for i in range(n): +    for j in range(i, n): +        t[j][j - i] += t[j - 1][j - i] + t[j][j - i + 1] - t[j - 1][j - i + 1] +ans = [None] * 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]])) +    l, r = tuple([int(x) - 1 for x in input().split()]) +    ans[i] = t[r][l] +write("\n".join(map(str, ans)))