#include <bits/stdc++.h>
using namespace std;
int main() {
  double a, t, v, d;
  int n;
  cin >> n >> a >> d;
  double x, time, last = -1.0;
  for (int i = 0; i < n; i++) {
    scanf("%lf %lf", &t, &v);
    time = v / a;
    x = 0.5 * a * time * time;
    if (x < d) {
      time += (d - x) / v + t;
      time = max(time, last);
    } else {
      time = sqrt(2 * d / a) + t;
      time = max(time, last);
    }
    printf("%.10lf\n", time);
    last = time;
  }
}
