n,m,q = list(map(int,input().split()))



lr = [[0 for i in range(n+1)] for j in range(n+1)]

#lr = [[int(i) for i in input().split()]for j in range(m)]



st = [0] * (n+1)

ed = [0] * (n+1)



for i in range(m):

    l,r = list(map(int,input().split()))

    lr[l][r] += 1



pq = [[int(i) for i in input().split()]for j in range(q)]



dp = [[0 for i in range(n+1)] for j in range(n+1)]



#print(lr)



for i in range(1,n+1):

    #print(i)

    for j in range(i,n+1):

        #print(i,j)

        dp[i][j] = dp[i][j-1]+lr[i][j]



for i in range(q):

    st = pq[i][0]

    ed = pq[i][1]

    tmp = 0

    for j in range(ed-st+1):

        tmp += dp[st+j][ed]

    print(tmp)

#print(dp)
n,m,q = list(map(int,input().split()))



lr = [[0 for i in range(n+1)] for j in range(n+1)]





for i in range(m):

    l,r = list(map(int,input().split()))

    lr[l][r] += 1



pq = [[int(i) for i in input().split()]for j in range(q)]



dp = [[0 for i in range(n+1)] for j in range(n+1)]



for i in range(1,n+1):

    for j in range(i,n+1):

        dp[i][j] = dp[i][j-1]+lr[i][j]



ans_dp = [[0 for i in range(n+1)] for j in range(n+1)]



for i in range(1,n+1):

    for j in range(i,n+1):

        tmp = 0

        for k in range(j-i+1):

            tmp += dp[i+k][j]

        ans_dp[i][j] = tmp



for i in range(q):

    print((ans_dp[pq[i][0]][pq[i][1]]))

n, m, q = list(map(int, input().split()))
lr = [[0 for i in range(n + 1)] for j in range(n + 1)]
# lr = [[int(i) for i in input().split()]for j in range(m)]
st = [0] * (n + 1)
ed = [0] * (n + 1)
for i in range(m):
    l, r = list(map(int, input().split()))
    lr[l][r] += 1
pq = [[int(i) for i in input().split()] for j in range(q)]
dp = [[0 for i in range(n + 1)] for j in range(n + 1)]
# print(lr)
for i in range(1, n + 1):
    # print(i)
    for j in range(i, n + 1):
        # print(i,j)
        dp[i][j] = dp[i][j - 1] + lr[i][j]
for i in range(q):
    st = pq[i][0]
    ed = pq[i][1]
    tmp = 0
    for j in range(ed - st + 1):
        tmp += dp[st + j][ed]
    print(tmp)
# print(dp)

n, m, q = list(map(int, input().split()))
lr = [[0 for i in range(n + 1)] for j in range(n + 1)]
for i in range(m):
    l, r = list(map(int, input().split()))
    lr[l][r] += 1
pq = [[int(i) for i in input().split()] for j in range(q)]
dp = [[0 for i in range(n + 1)] for j in range(n + 1)]
for i in range(1, n + 1):
    for j in range(i, n + 1):
        dp[i][j] = dp[i][j - 1] + lr[i][j]
ans_dp = [[0 for i in range(n + 1)] for j in range(n + 1)]
for i in range(1, n + 1):
    for j in range(i, n + 1):
        tmp = 0
        for k in range(j - i + 1):
            tmp += dp[i + k][j]
        ans_dp[i][j] = tmp
for i in range(q):
    print((ans_dp[pq[i][0]][pq[i][1]]))

-# lr = [[int(i) for i in input().split()]for j in range(m)] -st = [0] * (n + 1) -ed = [0] * (n + 1) -# print(lr) -    # print(i) -        # print(i,j) +ans_dp = [[0 for i in range(n + 1)] for j in range(n + 1)] +for i in range(1, n + 1): +    for j in range(i, n + 1): +        tmp = 0 +        for k in range(j - i + 1): +            tmp += dp[i + k][j] +        ans_dp[i][j] = tmp -    st = pq[i][0] -    ed = pq[i][1] -    tmp = 0 -    for j in range(ed - st + 1): -        tmp += dp[st + j][ed] -    print(tmp) -# print(dp) +    print((ans_dp[pq[i][0]][pq[i][1]]))