#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.14159265359;
const long double INF = 1e10;
int n;
double R, V, s, f, l, r, m;
double getDist(double t) {
  double dist = t * V;
  double am = fmod(dist / 2, 2 * pi * R);
  double dir = am / R;
  double cen = sin(dir);
  return dist + fabs(cen) * R * 2;
}
int main() {
  scanf("%d %lf %lf", &n, &R, &V);
  for (int i = 0; i < n; i++) {
    scanf("%lf %lf", &s, &f);
    l = 0;
    r = INF;
    for (int i = 0; i < 100; i++) {
      m = (l + r) / 2;
      if (getDist(m) >= f - s)
        r = m;
      else
        l = m;
    }
    printf("%.15f\n", r);
  }
  return 0;
}
