#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

//template
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(a);i>(b);i--)
#define ALL(v) (v).begin(),(v).end()
typedef long long int ll; typedef pair<ll, ll> P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<typename A,size_t N,typename T>void Fill(A(&array)[N],const T &val){fill((T*)array, (T*)(array+N), val);}
const int inf = INT_MAX / 2; const ll INF = LLONG_MAX / 2;
//template end

#define pd pair<double,double>

int main(){
    int n,k; scanf("%d%d",&n,&k);
    vector<P> p(n);
    rep(i,0,n)scanf("%lld%lld",&p[i].first,&p[i].second);
    vector<pd> a; int cnt[10010]={};
    rep(i,0,n)rep(j,i+1,n){
        int xa=p[i].first,xb=p[j].first;
        int ya=p[i].second,yb=p[j].second;
        if(xa==xb){
            cnt[xa]++; continue;
        }
        double x=(ya-yb)*1.0/(xa-xb),y=(xa*yb-xb*ya)*1.0/(xa-xb);
        a.push_back({x,y});
    }
    sort(ALL(a));
    int maxx=0,pre=1;
    rep(i,0,a.size()-1){
        if(a[i]==a[i+1]){
            pre++; chmax(maxx,pre);
        }
        else pre=1;
    }
    chmax(maxx,pre);
    rep(i,0,10010)chmax(maxx,cnt[i]);
    printf(maxx>=k*(k-1)/2?"1\n":"0\n");
    return 0;
}
