a = input().split()

n = int(a[0])

m = int(a[1])

qq = int(a[2])



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



for _ in range(m):

    a = input().split()

    x[int(a[0]) - 1][int(a[1]) - 1] += 1



for i in range(n):

    for j in range(1, n):

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



for i in range(1, n):

    for j in range(n):

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



for _ in range(qq):

    r = 0

    a = input().split()

    p = int(a[0])

    q = int(a[1])



    if 0 < q:

        r += x[q - 1][q - 1]



    if 0 < q and 1 < p:

        r -= x[q - 1][p - 2] + x[p - 2][q - 1]



    if 1 < p:

        r += x[p - 2][p - 2]



    print(r)

a = input().split()

n = int(a[0])

m = int(a[1])

qq = int(a[2])

ll = list()

rr = list()



for _ in range(m):

    a = input().split()

    ll.append(int(a[0]))

    rr.append(int(a[1]))



p = list()

q = list()



for _ in range(qq):

    a = input().split()

    p.append(int(a[0]))

    q.append(int(a[1]))



c = [[0 for _ in range(n)] for _ in range(n)]



for i in range(m):

    c[ll[i] - 1][rr[i] - 1] += 1



for i in range(2):

    for j in range(i, n):

        for k in range(1 - i, n):

            c[j][k] += c[j - i][i + k - 1]



for i in range(qq):

    r = 0



    if 0 < q[i]:

        r += c[q[i] - 1][q[i] - 1]



    if 0 < q[i] and 1 < p[i]:

        r -= c[q[i] - 1][p[i] - 2] + c[p[i] - 2][q[i] - 1]



    if 1 < p[i]:

        r += c[p[i] - 2][p[i] - 2]



    print(r)

a = input().split()
n = int(a[0])
m = int(a[1])
qq = int(a[2])
x = [[0] * n for _ in range(n)]
for _ in range(m):
    a = input().split()
    x[int(a[0]) - 1][int(a[1]) - 1] += 1
for i in range(n):
    for j in range(1, n):
        x[i][j] += x[i][j - 1]
for i in range(1, n):
    for j in range(n):
        x[i][j] += x[i - 1][j]
for _ in range(qq):
    r = 0
    a = input().split()
    p = int(a[0])
    q = int(a[1])
    if 0 < q:
        r += x[q - 1][q - 1]
    if 0 < q and 1 < p:
        r -= x[q - 1][p - 2] + x[p - 2][q - 1]
    if 1 < p:
        r += x[p - 2][p - 2]
    print(r)

a = input().split()
n = int(a[0])
m = int(a[1])
qq = int(a[2])
ll = list()
rr = list()
for _ in range(m):
    a = input().split()
    ll.append(int(a[0]))
    rr.append(int(a[1]))
p = list()
q = list()
for _ in range(qq):
    a = input().split()
    p.append(int(a[0]))
    q.append(int(a[1]))
c = [[0 for _ in range(n)] for _ in range(n)]
for i in range(m):
    c[ll[i] - 1][rr[i] - 1] += 1
for i in range(2):
    for j in range(i, n):
        for k in range(1 - i, n):
            c[j][k] += c[j - i][i + k - 1]
for i in range(qq):
    r = 0
    if 0 < q[i]:
        r += c[q[i] - 1][q[i] - 1]
    if 0 < q[i] and 1 < p[i]:
        r -= c[q[i] - 1][p[i] - 2] + c[p[i] - 2][q[i] - 1]
    if 1 < p[i]:
        r += c[p[i] - 2][p[i] - 2]
    print(r)

-x = [[0] * n for _ in range(n)] +ll = list() +rr = list() -    x[int(a[0]) - 1][int(a[1]) - 1] += 1 -for i in range(n): -    for j in range(1, n): -        x[i][j] += x[i][j - 1] -for i in range(1, n): -    for j in range(n): -        x[i][j] += x[i - 1][j] +    ll.append(int(a[0])) +    rr.append(int(a[1])) +p = list() +q = list() +    a = input().split() +    p.append(int(a[0])) +    q.append(int(a[1])) +c = [[0 for _ in range(n)] for _ in range(n)] +for i in range(m): +    c[ll[i] - 1][rr[i] - 1] += 1 +for i in range(2): +    for j in range(i, n): +        for k in range(1 - i, n): +            c[j][k] += c[j - i][i + k - 1] +for i in range(qq): -    a = input().split() -    p = int(a[0]) -    q = int(a[1]) -    if 0 < q: -        r += x[q - 1][q - 1] -    if 0 < q and 1 < p: -        r -= x[q - 1][p - 2] + x[p - 2][q - 1] -    if 1 < p: -        r += x[p - 2][p - 2] +    if 0 < q[i]: +        r += c[q[i] - 1][q[i] - 1] +    if 0 < q[i] and 1 < p[i]: +        r -= c[q[i] - 1][p[i] - 2] + c[p[i] - 2][q[i] - 1] +    if 1 < p[i]: +        r += c[p[i] - 2][p[i] - 2]