Points on a Straight Line

Time Limit : 3 sec, Memory Limit : 262144 KB

̓_

@

w͍NvO~OReXgJÂB쐬[̈ł邠Ȃ́AQWʏɕ̓_zu̓f[^B̃f[^$K$ȏ̓_ɂĂ͂ȂȂBȂ́A쐬̓f[^̏𖞂Ă邩FbN邱ƂɂB

QWʏ̊e_̍WƐ$K$͂ƂA̓_̒$K$ȏ̓_ɑ݂ꍇ邩肷vO쐬B

͈͂ȉ̌ŗ^B

$N$ $K$
$x_1$ $y_1$
$x_2$ $y_2$
$...$
$x_N$ $y_N$


PsڂɍWʏ̓_̐$N$ ($3 \leq N \leq 3000$)Ɛ$K$ ($3 \leq K \leq N$)^B$N$sɁA_̍W$x_i,y_i$ ($0 \leq x_i,y_i \leq 10000$)ŗ^BAW_͗^Ȃ($ij$ɂāA$x_i\ne x_j$܂$y_i \ne y_j$jB

o

$K$ȏ̓_ɑ݂1A݂Ȃ0ƂPsɏo͂B

͗P

5 4
0 0
1 0
1 1
0 1
2 2


o͗P

0


͗Q

7 5
0 0
1 0
1 1
0 1
2 0
3 0
4 0


o͗Q

1