import sys

input = lambda: sys.stdin.readline().rstrip() 



def resolve():

    N, M, Q = list(map(int, input().split()))

    L = [0]*M

    R = [0]*M

    p = [0]*Q

    q = [0]*Q

    for i in range(M):

        L[i], R[i] = list(map(int, input().split()))

    for i in range(Q):

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



    temp = [[0]*N for _ in range(N)]

    #s[i][j]: 左がi、右が0からjまでのものの累積個数

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

    for m in range(M):

        temp[L[m]-1][R[m]-1] += 1

    for i in range(N):

        for j in range(N):

            s[i][j+1] = s[i][j] + temp[i][j]



    for i in range(Q):

        ans = 0

        for j in range(p[i]-1, q[i]):

            ans += s[j][q[i]]-s[j][p[i]-1]

        print(ans)



if __name__ == '__main__':

    resolve()

import sys

input = lambda: sys.stdin.readline().rstrip() 

sys.setrecursionlimit(10**7)

INF = 10**20

def I(): return int(eval(input()))

def F(): return float(eval(input()))

def S(): return eval(input())

def LI(): return [int(x) for x in input().split()]

def LI_(): return [int(x)-1 for x in input().split()]

def LF(): return [float(x) for x in input().split()]

def LS(): return input().split()



def resolve():

    N, M, Q = list(map(int, input().split()))

    LR = [LI_() for _ in range(M)]

    pq = [LI_() for _ in range(Q)]



    cnt = [[0]*N for _ in range(N)]

    for i in LR:

        cnt[i[0]][i[1]] += 1



    acc = [[0]*(N+1) for _ in range(N+1)]

    for i in range(N):

        for j in range(N):

            acc[i+1][j+1] = acc[i+1][j] + cnt[i][j]

    for i in range(N):

        for j in range(N):

            acc[i+1][j+1] += acc[i][j+1]



    for i in pq:

        p = i[0]

        q = i[1]

        ans = acc[q+1][q+1] - acc[p][q+1] - acc[q+1][p] + acc[p][p]

        print(ans)



if __name__ == '__main__':

    resolve()

import sys

input = lambda: sys.stdin.readline().rstrip()


def resolve():
    N, M, Q = list(map(int, input().split()))
    L = [0] * M
    R = [0] * M
    p = [0] * Q
    q = [0] * Q
    for i in range(M):
        L[i], R[i] = list(map(int, input().split()))
    for i in range(Q):
        p[i], q[i] = list(map(int, input().split()))
    temp = [[0] * N for _ in range(N)]
    # s[i][j]: 左がi、右が0からjまでのものの累積個数
    s = [[0] * (N + 1) for _ in range(N)]
    for m in range(M):
        temp[L[m] - 1][R[m] - 1] += 1
    for i in range(N):
        for j in range(N):
            s[i][j + 1] = s[i][j] + temp[i][j]
    for i in range(Q):
        ans = 0
        for j in range(p[i] - 1, q[i]):
            ans += s[j][q[i]] - s[j][p[i] - 1]
        print(ans)


if __name__ == "__main__":
    resolve()

import sys

input = lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**7)
INF = 10**20


def I():
    return int(eval(input()))


def F():
    return float(eval(input()))


def S():
    return eval(input())


def LI():
    return [int(x) for x in input().split()]


def LI_():
    return [int(x) - 1 for x in input().split()]


def LF():
    return [float(x) for x in input().split()]


def LS():
    return input().split()


def resolve():
    N, M, Q = list(map(int, input().split()))
    LR = [LI_() for _ in range(M)]
    pq = [LI_() for _ in range(Q)]
    cnt = [[0] * N for _ in range(N)]
    for i in LR:
        cnt[i[0]][i[1]] += 1
    acc = [[0] * (N + 1) for _ in range(N + 1)]
    for i in range(N):
        for j in range(N):
            acc[i + 1][j + 1] = acc[i + 1][j] + cnt[i][j]
    for i in range(N):
        for j in range(N):
            acc[i + 1][j + 1] += acc[i][j + 1]
    for i in pq:
        p = i[0]
        q = i[1]
        ans = acc[q + 1][q + 1] - acc[p][q + 1] - acc[q + 1][p] + acc[p][p]
        print(ans)


if __name__ == "__main__":
    resolve()

+sys.setrecursionlimit(10**7) +INF = 10**20 + + +def I(): +    return int(eval(input())) + + +def F(): +    return float(eval(input())) + + +def S(): +    return eval(input()) + + +def LI(): +    return [int(x) for x in input().split()] + + +def LI_(): +    return [int(x) - 1 for x in input().split()] + + +def LF(): +    return [float(x) for x in input().split()] + + +def LS(): +    return input().split() -    L = [0] * M -    R = [0] * M -    p = [0] * Q -    q = [0] * Q -    for i in range(M): -        L[i], R[i] = list(map(int, input().split())) -    for i in range(Q): -        p[i], q[i] = list(map(int, input().split())) -    temp = [[0] * N for _ in range(N)] -    # s[i][j]: 左がi、右が0からjまでのものの累積個数 -    s = [[0] * (N + 1) for _ in range(N)] -    for m in range(M): -        temp[L[m] - 1][R[m] - 1] += 1 +    LR = [LI_() for _ in range(M)] +    pq = [LI_() for _ in range(Q)] +    cnt = [[0] * N for _ in range(N)] +    for i in LR: +        cnt[i[0]][i[1]] += 1 +    acc = [[0] * (N + 1) for _ in range(N + 1)] -            s[i][j + 1] = s[i][j] + temp[i][j] -    for i in range(Q): -        ans = 0 -        for j in range(p[i] - 1, q[i]): -            ans += s[j][q[i]] - s[j][p[i] - 1] +            acc[i + 1][j + 1] = acc[i + 1][j] + cnt[i][j] +    for i in range(N): +        for j in range(N): +            acc[i + 1][j + 1] += acc[i][j + 1] +    for i in pq: +        p = i[0] +        q = i[1] +        ans = acc[q + 1][q + 1] - acc[p][q + 1] - acc[q + 1][p] + acc[p][p]