#include <bits/stdc++.h>
int main(void) {
  const double eps = 1e-10;
  int i, n, a, d, v, t;
  double res1 = 0;
  double res2 = 0;
  scanf("%d %d %d", &n, &a, &d);
  for (i = 0; i < n; i++) {
    scanf("%d %d", &t, &v);
    if (d + eps - (double)v * v / a / 2.0 < 0) {
      res2 = t + sqrt(2.0 * d / a);
      if (res1 + eps < res2) {
        printf("%lf\n", res2);
        res1 = res2;
      } else
        printf("%lf\n", res1);
    } else {
      res2 = (d - (double)v * v / a / 2.0) / v + (double)v / a + t;
      if (res1 + eps < res2) {
        printf("%lf\n", res2);
        res1 = res2;
      } else
        printf("%lf\n", res1);
    }
  }
  return 0;
}
