#include <bits/stdc++.h>
int main() {
  int n;
  double preans, ans, a, d, t, v;
  scanf("%d %lf %lf", &n, &a, &d);
  for (int i = 0; i < n; i++) {
    scanf("%lf %lf", &t, &v);
    double dis = (v * v) / (a * 2);
    if (dis > d)
      ans = sqrt(2 * d / a) + t;
    else
      ans = (d - dis) / v + v / a + t;
    if (i && ans < preans) ans = preans;
    printf("%.9lf\n", ans);
    preans = ans;
  }
}
