#include <bits/stdc++.h>
using namespace std;
const double pi = 3.14159265358979323;
int n;
double rad, v;
double func(double t, double theta) {
  return -rad * cos(theta) + v * t + rad * cos(v / rad * t + theta);
}
double query(double d) {
  double l = 0, r = 1000000000;
  int lim = 0;
  double m = (l + r) / 2;
  while (lim < 55) {
    m = (l + r) / 2;
    int k = v * m / (rad * pi) / 2 - 1;
    double maxx = -1e9;
    for (int i = k; i <= k + 1; i++) {
      maxx = max(maxx, func(m, ((2 * i + 1) * pi - v * m / rad) / 2));
    }
    if (maxx <= d)
      l = m;
    else
      r = m;
    lim++;
  }
  return l;
}
int main() {
  scanf("%d", &n);
  scanf("%lf%lf", &rad, &v);
  for (int i = 0; i < n; i++) {
    double s, f;
    scanf("%lf%lf", &s, &f);
    printf("%.6lf\n", query(f - s));
  }
  return 0;
}
