data class Point(val x: Int, val y: Int) {
    operator fun minus(that: Point): Point = Point(x - that.x, y - that.y)
}
fun dot(a: Point, b: Point): Int {
    return a.x * b.y - a.y * b.x
}

fun main(args:Array<String>?): Unit {

    val (n, k) = readLine()!!.trim().split(' ').map(String::toInt)
    val points = Array(n) {
        val (x, y) = readLine()!!.trim().split(' ').map(String::toInt)
        Point(x, y)
    }.sortedBy { it.x }
    println(
            if (points.indices.drop(1).any { o ->
                val origin = points[o - 1]
                val sorted = (o until n).sortedWith(
                        kotlin.Comparator { o1, o2 ->
                        dot(points[o1] - origin, points[o2] - origin).compareTo(0)
                    }).map{i -> points[i]}
                (0 .. sorted.size - k + 1).any { i ->
                    ((i == 0 || dot(sorted[i] - origin, sorted[i - 1] - origin) != 0) && (i + 1 until i + k - 1).all{j -> dot(sorted[i] - origin, sorted[j] - origin) == 0})
                }
            }) 1 else 0
    )
}
