#include #include #include #include #include #include #include #include #include using namespace std; typedef long long LL; double x0[300008]; double y00[300008]; vector< pair< pair, int> > v; double eps = 1e-9; int main() { int n; double r,a,b; scanf("%d %lf %lf %lf", &n, &r, &a, &b); for (int i = 0; i < n; i++){ scanf("%lf %lf", &x0[i], &y00[i]); if (a==0) { double rhs = r*r - x0[i]*x0[i]; if (rhs >= 0) { v.push_back(make_pair( make_pair( 0., y00[i] - sqrt(rhs) - eps ), 0 )); v.push_back(make_pair( make_pair( 0., y00[i] + sqrt(rhs) ), 1 )); } } else { double A = 1; double B = -2*x0[i] -2*(b/a)*y00[i]; double C = x0[i]*x0[i] + y00[i]*y00[i] - r*r; double D = B*B - 4*A*C; if (D >= 0) { v.push_back(make_pair( make_pair( (-B-sqrt(D))/2/A - eps , (b/a)*((-B-sqrt(D))/2/A) ), 0 )); v.push_back(make_pair( make_pair( (-B+sqrt(D))/2/A , (b/a)*((-B+sqrt(D))/2/A) ), 1 )); } } } sort(v.begin(), v.end()); int ans = 0; int mxans = 0; for (auto& pt : v) { if (pt.second == 0) { ans++; } else { ans--; } mxans = max(mxans, ans); } printf("%d\n", mxans); return 0; }