import sys

input = sys.stdin.buffer.readline



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



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

for _ in range(m):

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

    counts[l][r] += 1



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

# 横方向

for i in range(n+1):

    v = 0

    for j in range(n+1):

        v += counts[i][j]

        s[i][j] = v

# 縦方向

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

for i in range(n+1):

    v = 0

    for j in range(n+1):

        v += s[j][i]

        cs[j][i] = v





ans = []

for i in range(q):

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

    t = 0

    for i in range(p, q+1):

        t += s[i][q] - s[i][p-1]

    ans.append(str(t))

print(("\n".join(ans)))
import sys

input = sys.stdin.buffer.readline



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



class TwoDimSum():

    def __init__(self, h, w):

        self.h = h

        self.w = w

        self.counts = [[0 for _ in range(w+1)] for _ in range(h+1)]

        self.s = [[0 for _ in range(w+1)] for _ in range(h+1)]



    def add_count(self, x, y):

        # 1-indexed

        self.counts[y][x] += 1



    def build(self):

        for i in range(self.h):

            for j in range(self.w):

                self.s[i+1][j+1] = self.s[i][j+1] + self.s[i+1][j] - self.s[i][j] + self.counts[i+1][j+1]



    def solve(self, x1, y1, x2, y2):

        # 1-indexed

        # (x1, y1): left up

        # (x2, y2): right down

        return self.s[x2][y2] - self.s[x1-1][y2] - self.s[x2][y1-1] + self.s[x1-1][y1-1]



counts = TwoDimSum(n, n)

for _ in range(m):

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

    counts.add_count(l, r)

counts.build()



ans = []

for i in range(q):

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

    ans.append(str(counts.solve(x, x, y, y)))

print(("\n".join(ans)))
import sys

input = sys.stdin.buffer.readline
n, m, q = list(map(int, input().split()))
counts = [[0 for _ in range(n + 1)] for _ in range(n + 1)]
for _ in range(m):
    l, r = list(map(int, input().split()))
    counts[l][r] += 1
s = [[0 for _ in range(n + 1)] for _ in range(n + 1)]
# 横方向
for i in range(n + 1):
    v = 0
    for j in range(n + 1):
        v += counts[i][j]
        s[i][j] = v
# 縦方向
cs = [[0 for _ in range(n + 1)] for _ in range(n + 1)]
for i in range(n + 1):
    v = 0
    for j in range(n + 1):
        v += s[j][i]
        cs[j][i] = v
ans = []
for i in range(q):
    p, q = list(map(int, input().split()))
    t = 0
    for i in range(p, q + 1):
        t += s[i][q] - s[i][p - 1]
    ans.append(str(t))
print(("\n".join(ans)))

import sys

input = sys.stdin.buffer.readline
n, m, q = list(map(int, input().split()))


class TwoDimSum:
    def __init__(self, h, w):
        self.h = h
        self.w = w
        self.counts = [[0 for _ in range(w + 1)] for _ in range(h + 1)]
        self.s = [[0 for _ in range(w + 1)] for _ in range(h + 1)]

    def add_count(self, x, y):
        # 1-indexed
        self.counts[y][x] += 1

    def build(self):
        for i in range(self.h):
            for j in range(self.w):
                self.s[i + 1][j + 1] = (
                    self.s[i][j + 1]
                    + self.s[i + 1][j]
                    - self.s[i][j]
                    + self.counts[i + 1][j + 1]
                )

    def solve(self, x1, y1, x2, y2):
        # 1-indexed
        # (x1, y1): left up
        # (x2, y2): right down
        return (
            self.s[x2][y2]
            - self.s[x1 - 1][y2]
            - self.s[x2][y1 - 1]
            + self.s[x1 - 1][y1 - 1]
        )


counts = TwoDimSum(n, n)
for _ in range(m):
    l, r = list(map(int, input().split()))
    counts.add_count(l, r)
counts.build()
ans = []
for i in range(q):
    x, y = list(map(int, input().split()))
    ans.append(str(counts.solve(x, x, y, y)))
print(("\n".join(ans)))

-counts = [[0 for _ in range(n + 1)] for _ in range(n + 1)] + + +class TwoDimSum: +    def __init__(self, h, w): +        self.h = h +        self.w = w +        self.counts = [[0 for _ in range(w + 1)] for _ in range(h + 1)] +        self.s = [[0 for _ in range(w + 1)] for _ in range(h + 1)] + +    def add_count(self, x, y): +        # 1-indexed +        self.counts[y][x] += 1 + +    def build(self): +        for i in range(self.h): +            for j in range(self.w): +                self.s[i + 1][j + 1] = ( +                    self.s[i][j + 1] +                    + self.s[i + 1][j] +                    - self.s[i][j] +                    + self.counts[i + 1][j + 1] +                ) + +    def solve(self, x1, y1, x2, y2): +        # 1-indexed +        # (x1, y1): left up +        # (x2, y2): right down +        return ( +            self.s[x2][y2] +            - self.s[x1 - 1][y2] +            - self.s[x2][y1 - 1] +            + self.s[x1 - 1][y1 - 1] +        ) + + +counts = TwoDimSum(n, n) -    counts[l][r] += 1 -s = [[0 for _ in range(n + 1)] for _ in range(n + 1)] -# 横方向 -for i in range(n + 1): -    v = 0 -    for j in range(n + 1): -        v += counts[i][j] -        s[i][j] = v -# 縦方向 -cs = [[0 for _ in range(n + 1)] for _ in range(n + 1)] -for i in range(n + 1): -    v = 0 -    for j in range(n + 1): -        v += s[j][i] -        cs[j][i] = v +    counts.add_count(l, r) +counts.build() -    p, q = list(map(int, input().split())) -    t = 0 -    for i in range(p, q + 1): -        t += s[i][q] - s[i][p - 1] -    ans.append(str(t)) +    x, y = list(map(int, input().split())) +    ans.append(str(counts.solve(x, x, y, y)))