#include <bits/stdc++.h>
using namespace std;
long long v[100005], t[100005];
int main() {
  long long n, a, d;
  cin >> n >> a >> d;
  for (int i = 0; i < n; i++) cin >> t[i] >> v[i];
  double lastAns = -1;
  for (int i = 0; i < n; i++) {
    double ans = t[i];
    double x = double(v[i] * v[i]) / double((2 * a));
    if (x <= d) {
      ans += sqrt((double(2 * x) / double(a)));
      if (x < d) ans += double((d - x)) / double(v[i]);
    } else
      ans += sqrt((double(2 * d) / a));
    if (lastAns != -1 && lastAns > ans)
      printf("%0.10f\n", lastAns);
    else {
      printf("%0.10f\n", ans);
      lastAns = ans;
    }
  }
  return 0;
}
