#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
const double eps = 1e-6;
int n;
double a, dd;
double vv;
double tt;
double deallen(double vc, double maxv, double t, double &tv) {
  double temp = (maxv - vc) / a;
  if (t < temp) {
    tv = a * t + vc;
    return 0.5 * a * t * t + vc * t;
  }
  tv = maxv;
  return 0.5 * temp * (maxv - vc) + (t - temp) * maxv;
}
double dealtime(double vc, double maxv, double dd, double &tv) {
  double temp = (maxv - vc) * (maxv - vc) / a / 2;
  if (temp > dd) {
    tv = vc + sqrt(2 * a * dd);
    return (tv - vc) / a;
  }
  tv = maxv;
  return (dd - temp) / maxv + (maxv - vc) / a;
}
int main() {
  while (scanf("%d%lf%lf", &n, &a, &dd) != EOF) {
    int i;
    double last = -1000000000;
    for (i = 0; i < n; i++) {
      scanf("%lf%lf", &tt, &vv);
      double tv;
      double temp = dealtime(0, vv, dd, tv);
      if (temp + tt > last) {
        last = temp + tt;
        printf("%.6lf\n", last);
      } else {
        printf("%6lf\n", last);
      }
    }
  }
}
