fun main(args: Array<String>) {
    val (n,m,z) = readLine()!!.split(" ").map { it.toInt() }
    val lr = (1..m).map { readLine()!!.split(" ").map { it.toInt() } }
    val pq = (1..z).map { readLine()!!.split(" ").map { it.toInt() } }

    val train = Array(n+1){ IntArray(n+1) }
    lr.forEach { train[it[0]][it[1]]++ }
    for (i in 1..n)for(j in 2..n) train[i][j]+=train[i][j-1]
    for (i in 2..n)for(j in 1..n) train[i][j]+=train[i-1][j]

    val ans = pq.map {
        val (p,q) = it
        train[q][q]-train[p-1][q]-train[q][p-1]+train[p-1][p-1]
    }.joinToString("\n")

    println(ans)
}