import scala.collection.mutable.ArrayBuffer object main{ object Solver extends InputReader{ def solve(){ val n = getInt() val m = 20000 val p = 100 val memo = Array.ofDim[ArrayBuffer[Int]](m / p + 1, m / p + 1) val xys = Array.fill(n){ val x = getInt() val y = getInt() (x, y) } for(i <- 0 until memo.length; j <- 0 until memo(i).length){ memo(i)(j) = ArrayBuffer.empty[Int] } var ans = 0 for(i <- 0 until n){ val xy = xys(i) val x = xy._1 val y = xy._2 val xm = x / p val ym = y / p var put = true for(xmm <- (xm - 1) to (xm + 1); ymm <- (ym - 1) to (ym + 1); if 0 <= xmm && xmm <= m / p; if 0 <= ymm && ymm <= m / p){ for(j <- memo(ymm)(xmm)){ val oxy = xys(j) val dx = x - oxy._1 val dy = y - oxy._2 put &= dx * dx + dy * dy >= 400 } } if(put){ memo(ym)(xm) += i ans += 1 } } println(ans) } } // TEMPLATE ------------------------ def main(args: Array[String]){ Solver.solve() } trait InputReader{ import java.io._ import java.util._ protected val stream = System.in private val reader = new BufferedReader(new InputStreamReader(stream)) private var tokenizer = new StringTokenizer(reader.readLine()) def getStr(): String = { while(!tokenizer.hasMoreTokens()) tokenizer = new StringTokenizer(reader.readLine()) tokenizer.nextToken() } def getInt(): Int = getStr().toInt def getLong(): Long = getStr().toLong def getDouble(): Double = getStr().toDouble } }