from itertools import accumulate



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

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

for _ in range(m):

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

    rails[l - 1][r - 1] += 1

rails = [list(accumulate(s)) for s in rails]

rails = [list(reversed(list(accumulate(reversed(s))))) for s in zip(*rails)]

buf = []

for _ in range(q):

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

    buf.append(rails[q - 1][p - 1])

print(('\n'.join(map(str, buf))))

import sys

from itertools import accumulate



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

ipt = sys.stdin.readlines()

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

for l, r in (list(map(int, line.split())) for line in ipt[:m]):

    rails[l - 1][r - 1] += 1

rails = [list(reversed(list(accumulate(reversed(s))))) for s in zip(*(accumulate(s) for s in rails))]

print(('\n'.join(str(rails[q - 1][p - 1]) for p, q in (list(map(int, line.split())) for line in ipt[m:]))))

from itertools import accumulate

n, m, q = list(map(int, input().split()))
rails = [[0] * n for _ in range(n)]
for _ in range(m):
    l, r = list(map(int, input().split()))
    rails[l - 1][r - 1] += 1
rails = [list(accumulate(s)) for s in rails]
rails = [list(reversed(list(accumulate(reversed(s))))) for s in zip(*rails)]
buf = []
for _ in range(q):
    p, q = list(map(int, input().split()))
    buf.append(rails[q - 1][p - 1])
print(("\n".join(map(str, buf))))

import sys
from itertools import accumulate

n, m, q = list(map(int, input().split()))
ipt = sys.stdin.readlines()
rails = [[0] * n for _ in range(n)]
for l, r in (list(map(int, line.split())) for line in ipt[:m]):
    rails[l - 1][r - 1] += 1
rails = [
    list(reversed(list(accumulate(reversed(s)))))
    for s in zip(*(accumulate(s) for s in rails))
]
print(
    (
        "\n".join(
            str(rails[q - 1][p - 1])
            for p, q in (list(map(int, line.split())) for line in ipt[m:])
        )
    )
)

+import sys +ipt = sys.stdin.readlines() -for _ in range(m): -    l, r = list(map(int, input().split())) +for l, r in (list(map(int, line.split())) for line in ipt[:m]): -rails = [list(accumulate(s)) for s in rails] -rails = [list(reversed(list(accumulate(reversed(s))))) for s in zip(*rails)] -buf = [] -for _ in range(q): -    p, q = list(map(int, input().split())) -    buf.append(rails[q - 1][p - 1]) -print(("\n".join(map(str, buf)))) +rails = [ +    list(reversed(list(accumulate(reversed(s))))) +    for s in zip(*(accumulate(s) for s in rails)) +] +print( +    ( +        "\n".join( +            str(rails[q - 1][p - 1]) +            for p, q in (list(map(int, line.split())) for line in ipt[m:]) +        ) +    ) +)