#include using namespace std; #define int long long #define double long double void foo(pair &perp) { if (perp.first < 0 && perp.second < 0) { perp.first = -perp.first; perp.second = -perp.second; } if (perp.first == 0) { perp.second = 1; } if (perp.second == 0) { perp.first = 1; } if (perp.first != 0 && perp.second != 0) { int g = __gcd(abs(perp.first), abs(perp.second)); perp.first /= g; perp.second /= g; } } pair getMid(double a, double b, double c, double d) { return {(a + c)/2.0, (b + d)/2.0}; } bool sim(pair midPrev, pair midNow) { double eps = 0.00000001; if (abs(midNow.first - midPrev.first) <= eps && abs(midNow.second - midPrev.second) <= eps) return true; return false; } int n, p; pair t[1510]; signed main() { cin.tie(0); ios::sync_with_stdio(0); cin >> n >> p; for (int i = 1; i <= n; i++) { cin >> t[i].first >> t[i].second; } if (n == 1) { if (p == 0) cout << "YES\n"; else cout << "NO\n"; return 0; } vector, pair > > have; for (int i = 1; i <= n; i++) { for (int j = i + 1; j <= n; j++) { pair vecDir = {t[j].first - t[i].first, t[j].second - t[i].second}; pair perp = {vecDir.second, -vecDir.first}; foo(perp); pair midPoint = getMid(t[i].first, t[i].second, t[j].first, t[j].second); double canUse = 0; if (perp.first != 0) canUse = midPoint.first / perp.first; else if (perp.second != 0) canUse = midPoint.second / perp.second; midPoint.first -= canUse*perp.first; midPoint.second -= canUse*perp.second; have.push_back({perp, midPoint}); // cout << "TRYING " << i << " " << j << " " << midPoint.first << " " << midPoint.second << " -> " << perp.first << " " << perp.second << endl; } // cout << endl; } sort(have.begin(), have.end()); pair lastVec; pair lastMid; int cntUse = 2; int mx = 2; for (int i = 1; i < (int)have.size(); i++) { if (have[i].first == have[i - 1].first && sim(have[i - 1].second, have[i].second)) { cntUse += 2; mx = max(mx, cntUse); } else { mx = max(mx, cntUse); cntUse = 2; } } // cout << mx << " <<<< " << endl; if (mx * 100 >= p * n) cout << "YES\n"; else cout << "NO\n"; return 0; }