#include #include #include #include #include using namespace std; #define ll long long #define PRECISENESS 6 int MULT = 1; int main() { for (int i=0; i> ps(n); map, ll> cnts; for (int i=0; i x2) { swap(x1, x2); swap(y1, y2); } double k = ((double)y2 - y1) / (double)(x2 - x1); double _k = -1 / k; double x = ((double)x1 + x2) / 2, y = ((double)y1 + y2) / 2; double p = y - _k*x; // printf("norm 1: %d %d, 2: %d %d: %lf %lf %lf\n", x1, y1, x2, y2, k, p, _k); ll t_k = (ll)(_k * MULT); ll t_p = (ll)(p * MULT); cnts[{t_k, t_p}]++; } } // printf("Comp finished\n"); ll max_cnt = 0; for (auto& [k, v] : cnts) { max_cnt = max(max_cnt, v); } max_cnt *= 2; int _p = ((double)max_cnt / n) * 100; if (_p >= p) { printf("YES"); } else printf("NO"); }