#include <bits/stdc++.h>
using namespace std;
const int INF = 2e6;
const long long LINF = 8e18;
const int MOD = 1e9 + 7;
const long double EPS = 1e-9;
pair<long double, long double> pairs[INF];
vector<int> pr;
int n;
long double a, d;
bool comp(int a1, int a2) {
  if (pairs[a1].first == pairs[a2].first)
    return pairs[a1].second < pairs[a2].second;
  return pairs[a1].first < pairs[a2].first;
}
int main() {
  scanf("%d", &n);
  scanf("%Lf %Lf", &a, &d);
  for (int i = 0; i < n; i++) {
    long double tin, v, tout;
    scanf("%Lf %Lf", &tin, &v);
    long double tmp = v / a;
    long double s = a * tmp * tmp / 2.0;
    if (s < d)
      tout = tin + tmp + (d - s) / v;
    else
      tout = tin + sqrt((2.0 * d) / a);
    pairs[i] = {tin, tout};
    pr.push_back(i);
  }
  sort(pr.begin(), pr.end(), comp);
  long double se = pairs[pr[0]].second;
  for (int i = 0; i < n; i++) {
    if (pairs[pr[i]].second + EPS < se)
      pairs[pr[i]].second = se;
    else
      se = pairs[pr[i]].second;
  }
  for (int i = 0; i < n; i++) {
    printf("%0.50Lf\n", pairs[i].second);
  }
  return 0;
}
