#include <bits/stdc++.h>
using namespace std;
typedef struct {
  double t, v;
  int i;
} trolley;
bool cmp(trolley a, trolley b) { return a.t < b.t; }
int main() {
  int n, i, j;
  vector<trolley> v;
  trolley temp;
  double a, d;
  cin >> n >> a >> d;
  for (i = 0; i < n; i++) {
    cin >> temp.t >> temp.v;
    temp.i = i;
    v.push_back(temp);
  }
  sort(v.begin(), v.end(), cmp);
  double prevTime = 0.0, currTime = 0.0, t, x;
  vector<double> Time(n + 1);
  for (i = 0; i < n; i++) {
    currTime = 0.0;
    t = v[i].v / a;
    x = (1.0 / 2.0) * a * (t * t);
    if (x < d) {
      currTime += t;
      x = d - x;
      currTime += x / v[i].v;
    } else if (x >= d) {
      currTime = sqrt((2.0 * d) / a);
    }
    currTime += v[i].t;
    if (currTime < prevTime) currTime = prevTime;
    Time[v[i].i] = currTime;
    prevTime = currTime;
  }
  for (i = 0; i < n; i++) printf("%.5lf\n", Time[i]);
}
