#include using namespace std; typedef pair pdd; typedef pair pdi; #define PB push_back #define ST first #define ND second double det(pdd a, pdd b, pdd c) { return a.ST*b.ND+b.ST*c.ND+c.ST*a.ND-a.ST*c.ND-b.ST*a.ND-c.ST*b.ND; } double ab(double a) { if(a < 0) { return -a; } return a; } double eps = 1e-6; int main() { ios_base::sync_with_stdio(0); int n; double r, a, b; cin >> n >> r >> a >> b; r*=sqrt(a*a+b*b); vector e; for(int i=0; i < n; i++) { double x, y; cin >> x >> y; pdd p = {a*x+b*y, -b*x+a*y}; // cout << p.ST << " " << p.ND << "\n"; double h = ab(det(p, {p.ST, 0}, {p.ST+1, 0})); // cout << r << " " << h << "\n"; if(h < r) { double d = sqrt((r-h)*(r+h)); // cout << d << "\n"; e.PB({p.ST-d, 1}); e.PB({p.ST+d, 2}); } else if(r-h > -eps) { // cout << "IN\n"; e.PB({p.ST, 1}); e.PB({p.ST, 2}); } } sort(e.begin(), e.end()); int num=0; int res=0; for(pdi d : e) { if(d.ND == 1) { num++; } else { num--; } res = max(res, num); } cout << res << "\n"; }