6# -*- coding: utf-8 -*-

import sys

sys.setrecursionlimit(10**9)

INF=10**18

MOD=10**9+7

def input(): return sys.stdin.readline().rstrip()



def main():

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

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

    for i in range(M):

        L,R=[int(x)-1 for x in input().split()]

        x[L][R]+=1

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

    for i in range(N):

        for j in range(N):

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

    for _ in range(Q):

        ans=0

        p,q=[int(x)-1 for x in input().split()]

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

            ans+=S[i][q+1]-S[i][p]

        print(ans)



if __name__ == '__main__':

    main()

6# -*- coding: utf-8 -*-

import sys

sys.setrecursionlimit(10**9)

INF=10**18

MOD=10**9+7

def input(): return sys.stdin.readline().rstrip()



def main():

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

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

    for i in range(M):

        L,R=[int(x)-1 for x in input().split()]

        x[L][R]+=1

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

    for i in range(N):

        for j in range(N):

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

    for _ in range(Q):

        p,q=[int(x)-1 for x in input().split()]

        print((S[q+1][q+1]-S[q+1][p]-S[p][q+1]+S[p][p]))



if __name__ == '__main__':

    main()

6  # -*- coding: utf-8 -*-
import sys

sys.setrecursionlimit(10**9)
INF = 10**18
MOD = 10**9 + 7


def input():
    return sys.stdin.readline().rstrip()


def main():
    N, M, Q = list(map(int, input().split()))
    x = [[0] * N for _ in range(N)]
    for i in range(M):
        L, R = [int(x) - 1 for x in input().split()]
        x[L][R] += 1
    S = [[0] * (N + 1) for _ in range(N)]
    for i in range(N):
        for j in range(N):
            S[i][j + 1] = S[i][j] + x[i][j]
    for _ in range(Q):
        ans = 0
        p, q = [int(x) - 1 for x in input().split()]
        for i in range(p, q + 1):
            ans += S[i][q + 1] - S[i][p]
        print(ans)


if __name__ == "__main__":
    main()

6  # -*- coding: utf-8 -*-
import sys

sys.setrecursionlimit(10**9)
INF = 10**18
MOD = 10**9 + 7


def input():
    return sys.stdin.readline().rstrip()


def main():
    N, M, Q = list(map(int, input().split()))
    x = [[0] * N for _ in range(N)]
    for i in range(M):
        L, R = [int(x) - 1 for x in input().split()]
        x[L][R] += 1
    S = [[0] * (N + 1) for _ in range(N + 1)]
    for i in range(N):
        for j in range(N):
            S[i + 1][j + 1] = S[i + 1][j] + S[i][j + 1] - S[i][j] + x[i][j]
    for _ in range(Q):
        p, q = [int(x) - 1 for x in input().split()]
        print((S[q + 1][q + 1] - S[q + 1][p] - S[p][q + 1] + S[p][p]))


if __name__ == "__main__":
    main()

-    S = [[0] * (N + 1) for _ in range(N)] +    S = [[0] * (N + 1) for _ in range(N + 1)] -            S[i][j + 1] = S[i][j] + x[i][j] +            S[i + 1][j + 1] = S[i + 1][j] + S[i][j + 1] - S[i][j] + x[i][j] -        ans = 0 -        for i in range(p, q + 1): -            ans += S[i][q + 1] - S[i][p] -        print(ans) +        print((S[q + 1][q + 1] - S[q + 1][p] - S[p][q + 1] + S[p][p]))