#include <bits/stdc++.h>
using namespace std;
struct car {
  int N, speed, tim;
} C[400000];
int m, n, j, k, l, i, o, add, def;
double ans[400000], final[400000];
bool cmp(car a, car b) { return a.tim < b.tim; }
double sqr(double a) { return a * a; }
double calc(int speed) {
  double ret = 0, max_ = (0.5 * add) * sqr(((1.0 * speed) / add));
  if (max_ - def >= 1e-8) {
    return sqrt(2.0 * def / (1.0 * add));
  } else
    return ((1.0 * speed) / add) + ((1.0 * def - max_) / (1.0 * speed));
}
int main() {
  scanf("%d%d%d", &m, &add, &def);
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &C[i].tim, &C[i].speed);
    C[i].N = i;
  }
  sort(C + 1, C + 1 + m, cmp);
  for (int i = 1; i <= m; i++) ans[i] = C[i].tim + calc(C[i].speed);
  for (int i = 2; i <= m; i++)
    if (ans[i] < ans[i - 1]) ans[i] = ans[i - 1];
  for (int i = 1; i <= m; i++) final[C[i].N] = ans[i];
  for (int i = 1; i <= m; i++) printf("%.7lf\n", final[i]);
}
