#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
double ans[maxn];
struct node {
  int t, v, i;
} a[maxn];
bool cmp(node a, node b) { return a.t < b.t; }
double cal(int x, double aa, double d) {
  double v = a[x].v;
  double l = v * v / 2 / aa;
  if (l <= d) {
    double t = v / aa;
    double l2 = d - l;
    return a[x].t + t + l2 / v;
  } else {
    return a[x].t + sqrt(2 * d / aa);
  }
}
int main() {
  int n, aa, d;
  scanf("%d %d %d", &n, &aa, &d);
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &a[i].t, &a[i].v);
    a[i].i = i;
  }
  sort(a, a + n, cmp);
  double tt;
  for (int i = 0; i < n; i++) {
    double t = cal(i, aa, d);
    if (i == 0)
      tt = t;
    else if (tt < t)
      tt = t;
    ans[a[i].i] = tt;
  }
  for (int i = 0; i < n; i++) printf("%.10lf\n", ans[i]);
  return 0;
}
