#include #include #include #include using namespace std; using i64 = long long; struct Wagon { int x; int y; }; struct Line { double x; double y; double b; Line normalize() const { double magnitude = hypot(x, y); Line w; w.x = x / magnitude; w.y = y / magnitude; w.b = b; return w; } }; constexpr double TOLERANCE = 0.00001; struct VectorLess { bool operator()(const Line& a, const Line& b) const { if (abs(b.b - a.b) > TOLERANCE) { return a.b < b.b; } if (abs(b.x - a.x) > TOLERANCE) { return a.x < b.x; } if (abs(b.y - a.y) > TOLERANCE) { return a.y < b.y; } return false; } }; int main() { cin.tie(NULL); std::ios::sync_with_stdio(false); int n, p; cin >> n >> p; vector wagons; wagons.reserve(n); for (int i = 0; i < n; i++) { Wagon w; cin >> w.x >> w.y; wagons.push_back(w); } map counts; for (int wi = 0; wi < n; wi++) { for (int wj = wi+1; wj < n; wj++) { const Wagon& w1 = wagons[wi]; const Wagon& w2 = wagons[wj]; Line v; double x = w1.x - w2.x; double y = w1.y - w2.y; v.x = y; v.y = -x; if (w1.x == w2.x) { v.b = (w1.y + w2.y) / 2.; } else if (w1.y == w2.y) { v.b = (w1.x + w2.x) / 2.; } else { double a = (double)(w1.y - w2.y) / (w1.x - w2.x); a = -1/a; double wx = (w1.x + w2.x) / 2.; double wy = (w1.y + w2.y) / 2.; v.b = wy - a * wx; } Line w = v.normalize(); if (w.y < 0) { w.x = -w.x; w.y = -w.y; } else if (w.y == 0) { w.x = abs(w.x); } counts[w] += 2; } } int bestVal = -1; for (const auto& entry : counts) { bestVal = max(bestVal, entry.second); } double requiredPercentage = p / 100.; double actualPercentage = (double) bestVal / n; if (abs(requiredPercentage - actualPercentage) <= TOLERANCE) { cout << "YES\n"; } else if (requiredPercentage < actualPercentage) { cout << "YES\n"; } else { cout << "NO\n"; } return 0; }