import os

import sys



import numpy as np



if os.getenv("LOCAL"):

    sys.stdin = open("_in.txt", "r")



sys.setrecursionlimit(10 ** 9)

INF = float("inf")

IINF = 10 ** 18

MOD = 10 ** 9 + 7

# MOD = 998244353





N, M, Q = list(map(int, sys.stdin.buffer.readline().split()))

LR = [list(map(int, sys.stdin.buffer.readline().split())) for _ in range(M)]

PQ = [list(map(int, sys.stdin.buffer.readline().split())) for _ in range(Q)]



counts = np.zeros((N + 1, N + 1), dtype=int)

for l, r in LR:

    counts[l, r] += 1

cum = counts.cumsum(axis=1).cumsum(axis=0)



for p, q in PQ:

    ans = cum[q, q] - cum[p - 1, q] - cum[q, p - 1] + cum[p - 1, p - 1]

    print(ans)

import os

import sys



import numpy as np



if os.getenv("LOCAL"):

    sys.stdin = open("_in.txt", "r")



sys.setrecursionlimit(10 ** 9)

INF = float("inf")

IINF = 10 ** 18

MOD = 10 ** 9 + 7

# MOD = 998244353





N, M, Q = list(map(int, sys.stdin.buffer.readline().split()))

LR = [list(map(int, sys.stdin.buffer.readline().split())) for _ in range(M)]

P, Q = list(zip(*[map(int, sys.stdin.buffer.readline().split()) for _ in range(Q)]))



P = np.array(P, dtype=int)

Q = np.array(Q, dtype=int)



counts = np.zeros((N + 1, N + 1), dtype=int)

for l, r in LR:

    counts[l, r] += 1

cum = counts.cumsum(axis=1).cumsum(axis=0)



ans = cum[Q, Q] - cum[P - 1, Q] - cum[Q, P - 1] + cum[P - 1, P - 1]

print(*ans, sep='\n')

import os
import sys
import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")
sys.setrecursionlimit(10**9)
INF = float("inf")
IINF = 10**18
MOD = 10**9 + 7
# MOD = 998244353
N, M, Q = list(map(int, sys.stdin.buffer.readline().split()))
LR = [list(map(int, sys.stdin.buffer.readline().split())) for _ in range(M)]
PQ = [list(map(int, sys.stdin.buffer.readline().split())) for _ in range(Q)]
counts = np.zeros((N + 1, N + 1), dtype=int)
for l, r in LR:
    counts[l, r] += 1
cum = counts.cumsum(axis=1).cumsum(axis=0)
for p, q in PQ:
    ans = cum[q, q] - cum[p - 1, q] - cum[q, p - 1] + cum[p - 1, p - 1]
    print(ans)

import os
import sys
import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")
sys.setrecursionlimit(10**9)
INF = float("inf")
IINF = 10**18
MOD = 10**9 + 7
# MOD = 998244353
N, M, Q = list(map(int, sys.stdin.buffer.readline().split()))
LR = [list(map(int, sys.stdin.buffer.readline().split())) for _ in range(M)]
P, Q = list(zip(*[map(int, sys.stdin.buffer.readline().split()) for _ in range(Q)]))
P = np.array(P, dtype=int)
Q = np.array(Q, dtype=int)
counts = np.zeros((N + 1, N + 1), dtype=int)
for l, r in LR:
    counts[l, r] += 1
cum = counts.cumsum(axis=1).cumsum(axis=0)
ans = cum[Q, Q] - cum[P - 1, Q] - cum[Q, P - 1] + cum[P - 1, P - 1]
print(*ans, sep="\n")

-PQ = [list(map(int, sys.stdin.buffer.readline().split())) for _ in range(Q)] +P, Q = list(zip(*[map(int, sys.stdin.buffer.readline().split()) for _ in range(Q)])) +P = np.array(P, dtype=int) +Q = np.array(Q, dtype=int) -for p, q in PQ: -    ans = cum[q, q] - cum[p - 1, q] - cum[q, p - 1] + cum[p - 1, p - 1] -    print(ans) +ans = cum[Q, Q] - cum[P - 1, Q] - cum[Q, P - 1] + cum[P - 1, P - 1] +print(*ans, sep="\n")