#include <bits/stdc++.h>
using namespace std;
struct node {
  double t, v;
  int id;
};
struct node bus[100009];
double ans[100009];
bool cmp(struct node lhs, struct node rhs) { return lhs.t < rhs.t; }
int main() {
  int n;
  double a, d;
  scanf("%d", &n);
  scanf("%lf%lf", &a, &d);
  for (int i = int(0); i <= int(n - 1); i++) {
    scanf("%lf%lf", &bus[i].t, &bus[i].v);
    bus[i].id = i;
  }
  sort(bus, bus + n, cmp);
  double prev = -1 * 2000000000;
  for (int i = int(0); i <= int(n - 1); i++) {
    double dist = (bus[i].v * bus[i].v) / (2 * a), tim;
    if (dist >= d) {
      tim = 2 * d;
      tim /= a;
      tim = sqrt(tim);
    } else {
      tim = 2 * dist;
      tim /= a;
      tim = sqrt(tim);
      dist = d - dist;
      tim += (dist / bus[i].v);
    }
    tim += bus[i].t;
    ans[bus[i].id] = max(tim, prev);
    prev = ans[bus[i].id];
  }
  for (int i = int(0); i <= int(n - 1); i++) {
    printf("%0.9lf\n", ans[i]);
  }
  return 0;
}
