#include using namespace std; typedef long long ll; typedef long double ld; #define rep(i, a, n) for (int i = (a); i < (n); i++) #define per(i, a, n) for (int i = (n) - 1; i >= (a); i--) #define FOR(i, n) rep(i, a, (n)) template struct Point { typedef Point P; T x, y; explicit Point(T _x=0, T _y=0) : x(_x), y(_y) {} T dist2() const { return x*x + y*y; } }; using P = Point; vector quad(double a, double b, double c) { double D = b*b - 4*a*c; if (D < 0) { return {}; } else { return { (-b - sqrt(D)) / (2*a), (-b + sqrt(D)) / (2*a) }; } } double EPS = 1e-5; int main(void) { ios_base::sync_with_stdio(false); int n; double r; P l; cin >> n >> r >> l.x >> l.y; vector

a(n); rep(i,0,n) cin >> a[i].x >> a[i].y; r += EPS; vector> events; rep(i,0,n) { vector sols = quad( l.dist2(), -2 * (l.x * a[i].x + l.y * a[i].y), a[i].dist2() - r*r ); if (!sols.empty()) { events.push_back({sols[0] - EPS, +1}); events.push_back({sols[1] + EPS, -1}); } } sort(events.begin(), events.end()); int res = 0; int cur = 0; for (auto& e : events) { res = max(res,cur); cur += e.second; res = max(res,cur); } cout << res << endl; return 0; }