#include using namespace std; double dist(double a, double b, double c, double d){ return (a - c)*(a - c) + (b -d)*(b - d); } int main(){ ios::sync_with_stdio (false); cin.tie(0); int n; int aa, bb,rr; double a, b, r; vector > inter; double x[n], y[n]; cin >> n >> rr >> aa >> bb; a = aa; b = bb; r = rr; r += 5 * 1e-4; for(int i = 0; i> k >> l; x[i] = k; y[i] = l; if(a < b) swap(x[i], y[i]); } if(a < b) swap(a, b); for(int i = 0; i= 1e-7){ double xx = dist(x[i], y[i], (d + 2*h)/3, (d + 2*h)*b/a/3); double yy = dist(x[i], y[i], (2*d + h)/3, (2*d + h)*b/a/3); if(xx < r*r){ gut = (2*h + d)/3; break; } if(yy < r*r){ gut = (h + 2*d)/3; break; } if(xx > yy){ h = (d + 2*h) / 3; rr = h; } else{ d = (2*d + h) / 3; l = d; } //cout << xx << " " << yy<< endl; } * */ gut = (a*x[i] + b*y[i])/(a + b); if(dist(gut, gut * b / a, x[i], y[i]) > r*r) continue; //cout << gut << endl; double gt = gut; while(h - gt >= 1e-4){ double xx = dist(x[i], y[i], (gt + h)/2, (gt + h)*b/a/2); if(xx > r*r) h = (h + gt) / 2; else gt = (h + gt) / 2; } inter.push_back({ 2*gut - h, 1}); inter.push_back({h, -1}); } //cout << inter.size() << endl; sort(inter.begin(), inter.end()); int cur = 0; int ans = 0; for(auto x: inter){ //cout << x.first << " " << x.second << endl; cur += x.second; ans = max(ans, cur); } cout << ans << endl; }