#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  double R, V;
  scanf("%d%lf%lf", &n, &R, &V);
  V = V / R;
  while (n--) {
    double f, s;
    scanf("%lf%lf", &s, &f);
    double d = (f - s) / R / 2, l = 0, r = d / V;
    for (int i = 0; i < 100; i++) {
      double m = (l + r) / 2;
      if (m * V + fabs(sin(V * m)) > d)
        r = m;
      else
        l = m;
    }
    printf("%.10f\n", 2 * l);
  }
  return 0;
}
