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



c = list()



for i in range(n):

    c.append(list())

    for j in range(n):

        a = x[i][j]



        if 0 < j:

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



        c[i].append(a)



z = list()



for i in range(n):

    z.append(list())

    for j in range(n):

        a = c[i][j]



        if 0 < i:

            a += z[i - 1][j]



        z[i].append(a)



for _ in range(qq):

    r = 0

    a = input().split()

    p = int(a[0])

    q = int(a[1])



    if 0 < q:

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



    if 0 < q and 1 < p:

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



    if 1 < p:

        r += z[p - 2][p - 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])
x = [[0] * n for _ in range(n)]
for _ in range(m):
    a = input().split()
    x[int(a[0]) - 1][int(a[1]) - 1] += 1
c = list()
for i in range(n):
    c.append(list())
    for j in range(n):
        a = x[i][j]
        if 0 < j:
            a += c[i][j - 1]
        c[i].append(a)
z = list()
for i in range(n):
    z.append(list())
    for j in range(n):
        a = c[i][j]
        if 0 < i:
            a += z[i - 1][j]
        z[i].append(a)
for _ in range(qq):
    r = 0
    a = input().split()
    p = int(a[0])
    q = int(a[1])
    if 0 < q:
        r += z[q - 1][q - 1]
    if 0 < q and 1 < p:
        r -= z[q - 1][p - 2] + z[p - 2][q - 1]
    if 1 < p:
        r += z[p - 2][p - 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)

-c = list() -    c.append(list()) +    for j in range(1, n): +        x[i][j] += x[i][j - 1] +for i in range(1, n): -        a = x[i][j] -        if 0 < j: -            a += c[i][j - 1] -        c[i].append(a) -z = list() -for i in range(n): -    z.append(list()) -    for j in range(n): -        a = c[i][j] -        if 0 < i: -            a += z[i - 1][j] -        z[i].append(a) +        x[i][j] += x[i - 1][j] -        r += z[q - 1][q - 1] +        r += x[q - 1][q - 1] -        r -= z[q - 1][p - 2] + z[p - 2][q - 1] +        r -= x[q - 1][p - 2] + x[p - 2][q - 1] -        r += z[p - 2][p - 2] +        r += x[p - 2][p - 2]