#include using namespace std; #define int long long struct rt { rt(int x, int y) { a = x; b = y; simpl(); } rt(int n) { a = n; b = 1; simpl(); } rt operator*(rt other) { int x = a * other.a; int y = b * other.b; return rt(x, y);; } rt operator+(rt other) { return rt(a * other.b + other.a * b, b * other.b); } rt neg() { return rt(-a, b); } rt inv() { return rt(b, a); } rt operator-(rt other) { return *this + other.neg(); } rt operator/(rt other) { return *this * other.inv(); } void simpl() { if(a == 0) { a = 0; b = 1; return; } if(b < 0) { a *= -1; b *= -1; } int g = __gcd(abs(a), b); a /= g; b /= g; } int a; int b; }; ostream& operator<<(ostream& os, const rt r) { return os << r.a << '/' << r.b; } void solvexd() { rt a(10); rt b(35, -14); //cout << a << endl; //cout << b << endl; //cout << c << endl; //cout << d << endl; //cout << e << endl; //cout << f << endl; } ostream& operator<<(ostream& os, const tuple& p) { return os << '(' << get<0>(p) << ", " << get<1>(p) << ", " << get<2>(p) << ", " << get<3>(p) << ", " << get<4>(p) << ", " << get<5>(p) << ')'; } template ostream& operator<<(ostream& os, const pair& p) { return os << '{' << p.first << ", " << p.second << '}'; } void solve() { int n, p; cin >> n >> p; vector> points(n); for(int i =0 ; i < n; i++) { int x, y; cin >> x >> y; points[i] = {x, y}; } map, int> cetnosti; // x.a, x.b, y.a, y.b, dx, dy for(int i = 0; i < n - 1; i++) { for(int j = i + 1; j < n; j++) { auto [x1, y1] = points[i]; auto [x2, y2] = points[j]; int _dx = x2 - x1; int _dy = y2 - y1; int dx = -_dy; int dy = _dx; if(dx != 0 && dy != 0) { int g = __gcd(abs(dx), abs(dy)); dx /= g; dy /= g; } else if(dx == 0) { dy = 1; } else // dy == 0 { dx = 1; } // TODO: znaminka nebo dvakrat do mapy // int sx = x1; // int sy = y1; rt rdx(dx); rt rdy(dy); // rt rsx(sx); // rt rsy(sy); rt rsx = (rt(x1) + rt(x2)) / rt(2); rt rsy = (rt(y1) + rt(y2)) / rt(2); rt ry(1); rt rx(1); if(y1 == y2) { //cout << "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" << endl; } //cout << "sx: " << rsx << endl; //cout << "sy: " << rsy << endl; //cout << "dx: " << rdx << endl; //cout << "dy: " << rdy << endl; if(rdx.a != 0) { //cout << "AAAAAA" << endl; ry = (rsy * rdx - rsx * rdy) / (rdx + (rdy / rdx)); rx = ry.neg() * (rdy / rdx); } else { //cout << "BBBBBB" << endl; ry = rt(0); rx = (rt(x1) + rt(x2)) / rt(2); } //cout << "A: " << points[i] << endl; //cout << "B: " << points[j] << endl; //cout << ":" << endl; //cout << "dx: " << dx << endl; //cout << "dy: " << dy << endl; //cout << "rx: " << rx << endl; //cout << "ry: " << ry << endl; //cout << tuple{rx.a, rx.b, ry.a, ry.b, dx, dy} << endl; //cout << tuple{rx.a, rx.b, ry.a, ry.b, -dx, -dy} << endl; //cout << "---------" << endl; //cout << endl << endl; cetnosti[{rx.a, rx.b, ry.a, ry.b, dx, dy}]++; cetnosti[{rx.a, rx.b, ry.a, ry.b, -dx, -dy}]++; } } //cout << "===========" << endl; //cout << endl << endl; int mx = 0; for(auto x : cetnosti) { mx = max(mx, x.second); //cout << x.first << ": " << x.second << endl; } if(n * p <= mx * 2 * 100) { cout << "YES" << endl; } else cout << "NO" << endl; } int32_t main() { ios::sync_with_stdio(false); cin.tie(0); solve(); return 0; }