#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int t;
double r, v, f, s;
int check(double t) {
  double dis = v * t;
  double len = fmod(dis, 2 * pi * r);
  double k = len / r / 2.0;
  double dis2 = 2.0 * abs(sin(k)) * r;
  if (dis + dis2 > f - s) return 1;
  return 0;
}
int main() {
  scanf("%d", &t);
  cin >> r >> v;
  while (t--) {
    scanf("%lf%lf", &s, &f);
    double l = 0.0, r = 1999999999.0;
    for (int i = 0; i < 100; i++) {
      double mid = (l + r) / 2.0;
      if (check(mid))
        r = mid;
      else
        l = mid;
    }
    printf("%.15f\n", l);
  }
}
