#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
double ret[N];
int main() {
  int n, a, L, t, v;
  cin >> n >> a >> L;
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &t, &v);
    double tmp = 1.0 * v * v / (2 * a);
    if (tmp - L > 1e-12) {
      ret[i] = 1.0 * t + sqrt(L * 2.0 / a);
    } else {
      ret[i] = 1.0 * t + 1.0 * v / a + (L * 1.0 - 1.0 * v * v / (2.0 * a)) / v;
    }
  }
  for (int i = 1; i < n; i++) {
    if (ret[i - 1] - ret[i] > 1e-12) {
      ret[i] = ret[i - 1];
    }
  }
  for (int i = 0; i < n; i++) {
    printf("%.8f\n", ret[i]);
  }
  return 0;
}
