#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
struct point {
  double tt, t;
  int id;
};
point pp[101000];
int cmp(point a, point b) { return a.t < b.t; }
int cmp2(point a, point b) { return a.id < b.id; }
int main() {
  int n;
  double a, d;
  scanf("%d%lf%lf", &n, &a, &d);
  for (int i = 0; i < n; i++) {
    double t, v;
    scanf("%lf%lf", &t, &v);
    double jiashi = v / a;
    double x = 1.0 / 2.0 * a * jiashi * jiashi;
    if (x >= d)
      pp[i].tt = sqrt(2.0 * d / a) + t;
    else {
      pp[i].tt = jiashi + (d - x) / v + t;
    }
    pp[i].t = t;
    pp[i].id = i;
  }
  sort(pp, pp + n, cmp);
  double maxx = pp[0].tt;
  for (int i = 1; i < n; i++) {
    pp[i].tt = maxx = max(maxx, pp[i].tt);
  }
  sort(pp, pp + n, cmp2);
  for (int i = 0; i < n; i++) {
    printf("%.4lf\n", pp[i].tt);
  }
  return 0;
}
