#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
vector<ll>v1;
void findans(vector<ll>v[],ll n,ll r)
{
    bool visited[n];
    memset(visited,false,sizeof(visited));
    queue<ll>q;
    q.push(r);
    visited[r]=true;
    ll ans=1,i;
    v1.pb(r);
    while(q.empty()!=true)
    {

        ll u=q.front();
        q.pop();
        visited[u]=true;
        for(i=0;i<v[u].size();i++)
        {
            if(visited[v[u][i]]==false)
            {
                q.push(v[u][i]);
                v1.pb(v[u][i]);

            }
        }

    }
    }

main()
{
    ll n,m;
    cin>>n;
    ll i,a,b,j;
    vector<ll>v2[n+1],v[n+1];
    for(i=0;i<n-1;i++)
    {
       cin>>a>>b;
       v2[a].pb(b);
       v2[b].pb(a);
    }
    /*
    ll pos[n+1];
    findans(v2,n,1);
    for(i=0;i<v1.size();i++)
    {
        //cout<<v1[i]<<" "<<endl;
        pos[v1[i]]=i;
    }

    for(i=1;i<=n;i++)
    {
        for(j=0;j<v2[i].size();j++)
        {
            if(pos[v2[i][j]]>pos[i])
            v[i].pb(v2[i][j]);
        }
       // cout<<v[i].size()<<" ";
    }
    */
    bool visited[n+1];
    memset(visited,false,sizeof(visited));
    ll k;
    ll ar[n+1];

    for(i=0;i<n;i++)
    {
        cin>>ar[i];
    }
    ll start=1,flag=0;
    visited[1]=true;
    for(i=0;i<n&&start<n;i++)
    {
        ll l=ar[i];
        set<ll>x,y;

        for(k=0;k<v[l].size();k++)
        {
            if( visited[v[l][k]]=false)
            x.insert(v[l][k]);

            //cout<<v[l][k]<<" ";
        }

        for(j=start;j<=start+v[l].size()-1;j++)
        {
           // cout<<ar[j]<<" ";
            y.insert(ar[j]);
        }
        if(x!=y)
        {
            cout<<"No"<<endl;
            return 0;
        }
        for(auto idx:x)
        {
            visited[idx]=true;
        }
        start=j;

    }

    if(start!=j||ar[0]!=1)
    cout<<"No";
    else
    cout<<"Yes";

}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
main()
{
    ll n,m;
    cin>>n;
    ll i,a,b;
    vector<ll>v[n+1];
    for(i=0;i<n-1;i++)
    {
       cin>>a>>b;
       v[a].pb(b);
    }
    bool visited[n+1];
    memset(visited,false,sizeof(visited));
    ll j,k;
    ll ar[n];
    for(i=0;i<n;i++)
    {
        cin>>ar[i];
    }
    ll start=1,flag=0;
    for(i=0;i<n&&start<n;i++)
    {
        ll l=ar[i];

        for(k=0;k<v[l].size();k++)
        {
            visited[v[l][k]]=true;
            //cout<<v[l][k]<<" ";
        }

        for(j=start;j<=start+v[l].size()-1;j++)
        {
            //cout<<ar[j]<<" ";
            if(visited[ar[j]]==false)
            {
                flag=1;
                break;
            }
        }
        start=j;
        if(flag==1)
        break;
    }

    if(flag==1)
    cout<<"No";
    else
    cout<<"Yes";

}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
vector<ll>v1;
void findans(vector<ll>v[],ll n,ll r)
{
    bool visited[n];
    memset(visited,false,sizeof(visited));
    queue<ll>q;
    q.push(r);
    visited[r]=true;
    ll ans=1,i;
    v1.pb(r);
    while(q.empty()!=true)
    {

        ll u=q.front();
        q.pop();
        visited[u]=true;
        for(i=0;i<v[u].size();i++)
        {
            if(visited[v[u][i]]==false)
            {
                q.push(v[u][i]);
                v1.pb(v[u][i]);

            }
        }

    }
    }

main()
{
    ll n,m;
    cin>>n;
    ll i,a,b,j;
    vector<ll>v2[n+1],v[n+1];
    for(i=0;i<n-1;i++)
    {
       cin>>a>>b;
       v2[a].pb(b);
       v2[b].pb(a);
    }
    ll pos[n+1];
    findans(v2,n,1);
    for(i=0;i<v1.size();i++)
    {
        //cout<<v1[i]<<" "<<endl;
        pos[v1[i]]=i;
    }

    for(i=1;i<=n;i++)
    {
        for(j=0;j<v2[i].size();j++)
        {
            if(pos[v2[i][j]]>pos[i])
            v[i].pb(v2[i][j]);
        }
       // cout<<v[i].size()<<" ";
    }

    bool visited[n+1];
    memset(visited,false,sizeof(visited));
    ll k;
    ll ar[n+1];
    for(i=0;i<n;i++)
    {
        cin>>ar[i];
    }
    ll start=1,flag=0,size;
    visited[1]=true;
    for(i=0;i<n&&start<n;i++)
    {
        ll l=ar[i];
        size=0;

        if(v[l].size()!=0)
        {
        for(k=0;k<v[l].size();k++)
        {

            if(visited[v[l][k]]==false)
            {
            visited[v[l][k]]=true;
            size++;
            }
            //cout<<v[l][k]<<" ";
        }

        for(j=start;j<=start+size-1;j++)
        {
           // cout<<ar[j]<<" ";
            if(visited[ar[j]]==false)
            {
                flag=1;
                break;
            }
        }
        }
        start=j;
        if(flag==1)
        break;
    }

    if(flag==1||ar[0]!=1)
    cout<<"No";
    else
    cout<<"Yes";

}


#include <bits/stdc++.h>
#define pb push_back
#define ll long long
#define fi first
#define se second
using namespace std;

vector<int>v[200005];
vector<int>l(200005,0);

void bfs(){
    queue<int>q;
    q.push(1);
    l[1]=1;
    while(q.size()){
        int f=q.front();
        q.pop();
        for(int i=0;i<v[f].size();i++){
            if(l[v[f][i]]==0){
                q.push(v[f][i]);
                l[v[f][i]]=l[f]+1;
            }
        }
    }

}
int main() {
    int n;
    cin>>n;
    for(int i=0;i<n-1;i++){
        int x,y;
        cin>>x>>y;
        v[x].pb(y);
        v[y].pb(x);
    }

    bfs();
    vector<int>s(n);
    for(int i=0;i<n;i++){
        cin>>s[i];
    }
    vector<int>cnt(200005,0);
    for(int i=1;i<=n;i++){
        cnt[l[i]]++;
    }

    for(int i=1;i<n;i++){
        if(l[s[i]]<l[s[i-1]]){
            cout<<"No";
            return 0;
        }
    }
    vector<int>visit(200005,0);
    queue<int>q;
    visit[1]=1;int k=1;
    for(int i=1;i<n;){
        int le=l[s[i]];
        while(i<n && l[s[i]]==le ){
            visit[s[i]]=1;
            q.push(s[i++]);
        }
        int count=cnt[le];
        k+=count;
        //cout<<k<<" "<<i<<endl;
    while(q.size()){
        int f=q.front();
        q.pop();
        set<int>a,b;
        for(int j=0;j<v[f].size();j++){
            if(visit[v[f][j]]==0){
                //cout<<v[f][j]<<endl;
                a.insert(v[f][j]);
            }
        }
        int kk=k;
        while(k<kk+a.size()){
            //cout<<s[k]<<endl;
            b.insert(s[k++]);
        }
        auto it1=a.begin(),it2=b.begin();
        while(it1!=a.end()){
            if(*it1!=*it2){
                cout<<"No";
                return 0;
            }
            ++it1,++it2;
        }

    }
    }

    cout<<"Yes";

    return 0;
}


#include <bits/stdc++.h>
#define pb push_back
#define ll long long
#define fi first
#define se second
using namespace std;

vector<int>v[200005];
vector<int>l(200005,0);

void bfs(){
    queue<int>q;
    q.push(1);
    l[1]=1;
    while(q.size()){
        int f=q.front();
        q.pop();
        for(int i=0;i<v[f].size();i++){
            if(l[v[f][i]]==0){
                q.push(v[f][i]);
                l[v[f][i]]=l[f]+1;
            }
        }
    }

}
int main() {
    int n;
    cin>>n;
    for(int i=0;i<n-1;i++){
        int x,y;
        cin>>x>>y;
        v[x].pb(y);
        v[y].pb(x);
    }
    bfs();
    vector<int>s(n);
    for(int i=0;i<n;i++){
        cin>>s[i];
        s[i]=l[s[i]];
    }
    vector<int>cnt(200005,0),cnt1(200005,0);
    for(int i=0;i<200005;i++){
        cnt[l[i]]++;
    }
    cnt1[s[0]]++;
    for(int i=1;i<n;i++){
        if(s[i]<s[i-1]){
            cout<<"No";
            return 0;
        }
        cnt1[s[i]]++;
    }
    for(int i=1;i<200005;i++){
        if(cnt[i]!=cnt1[i]){
            //cout<<i<<endl;
            cout<<"No";
            return 0;
        }
    }
    cout<<"Yes";

    return 0;
}


#include <bits/stdc++.h>
#define pb push_back
#define ll long long
#define fi first
#define se second
using namespace std;

vector<int>v[200005];
vector<int>l(200005,0);

void bfs(){
    queue<int>q;
    q.push(1);
    l[1]=1;
    while(q.size()){
        int f=q.front();
        q.pop();
        for(int i=0;i<v[f].size();i++){
            if(l[v[f][i]]==0){
                q.push(v[f][i]);
                l[v[f][i]]=l[f]+1;
            }
        }
    }

}
int main() {
    int n;
    cin>>n;
    for(int i=0;i<n-1;i++){
        int x,y;
        cin>>x>>y;
        v[x].pb(y);
        v[y].pb(x);
    }

    bfs();
    vector<int>s(n);
    for(int i=0;i<n;i++){
        cin>>s[i];
    }
    vector<int>cnt(200005,0);
    for(int i=1;i<=n;i++){
        cnt[l[i]]++;
    }

    for(int i=1;i<n;i++){
        if(l[s[i]]<l[s[i-1]]){
            cout<<"No";
            return 0;
        }
    }
    vector<int>visit(200005,0);
    queue<int>q;
    visit[1]=1;int k=1;
    for(int i=1;i<n;){
        int le=l[s[i]];
        while(i<n && l[s[i]]==le ){
            visit[s[i]]=1;
            q.push(s[i++]);
        }
        int count=cnt[le];
        k+=count;
    while(q.size()){
        int f=q.front();
        q.pop();
        set<int>a,b;
        for(int j=0;j<v[f].size();j++){
            if(visit[v[f][j]]==0){
                a.insert(v[f][j]);
            }
        }
        int kk=k;
        while(k<n && k<kk+a.size()){
            b.insert(s[k++]);
        }
        auto it1=a.begin(),it2=b.begin();
        while(it1!=a.end()){
            if(*it1!=*it2){
                cout<<"No";
                return 0;
            }
            ++it1,++it2;
        }
    }

    }

    cout<<"Yes";

    return 0;
}


#include <bits/stdc++.h>
#define pb push_back
#define ll long long
#define fi first
#define se second
using namespace std;

vector<int>v[200005];
vector<int>l(200005,0);

void bfs(){
    queue<int>q;
    q.push(1);
    l[1]=1;
    while(q.size()){
        int f=q.front();
        q.pop();
        for(int i=0;i<v[f].size();i++){
            if(l[v[f][i]]==0){
                q.push(v[f][i]);
                l[v[f][i]]=l[f]+1;
            }
        }
    }

}
int main() {
    int n;
    cin>>n;
    for(int i=0;i<n-1;i++){
        int x,y;
        cin>>x>>y;
        v[x].pb(y);
        v[y].pb(x);
    }

    bfs();
    vector<int>s(n);
    for(int i=0;i<n;i++){
        cin>>s[i];
    }
    vector<int>cnt(200005,0);
    for(int i=1;i<=n;i++){
        cnt[l[i]]++;
    }

    for(int i=1;i<n;i++){
        if(l[s[i]]<l[s[i-1]]){
            cout<<"No";
            return 0;
        }
    }

    vector<int>visit(200005,0);
    queue<int>q;
    visit[1]=1;int k=1;
    k+=cnt[l[2]];
    //cout<<k<<endl;
    for(int i=1;i<n;){
        int le=l[s[i]];
        while(i<n && l[s[i]]==le ){
            visit[s[i]]=1;
            q.push(s[i++]);
        }
        int count=cnt[le];
        //k+=count
        //cout<<q.size()<<" "<<k<<endl;
    while(q.size()){
        int f=q.front();
        q.pop();
        set<int>a,b;
        for(int j=0;j<v[f].size();j++){
            if(visit[v[f][j]]==0){
                a.insert(v[f][j]);
            }
        }
        //cout<<a.size()<<endl;
        int kk=k;
        while(k<n && k<kk+a.size()){
            //cout<<s[k]<<" ";
            b.insert(s[k++]);
        }
        //cout<<b.size()<<endl;
        if(a!=b){
            //cout<<(*a.begin())<<endl;
            //cout<<a.size()<<" "<<b.size()<<endl;
            cout<<"No";
            return 0;
        }
    }

    }

    cout<<"Yes";

    return 0;
}


#include <bits/stdc++.h>
#define pb push_back
#define ll long long
#define fi first
#define se second
using namespace std;

vector<int>v[200005];
vector<int>l(200005,0);

void bfs(){
    queue<int>q;
    q.push(1);
    l[1]=1;
    while(q.size()){
        int f=q.front();
        q.pop();
        for(int i=0;i<v[f].size();i++){
            if(l[v[f][i]]==0){
                q.push(v[f][i]);
                l[v[f][i]]=l[f]+1;
            }
        }
    }

}
int main() {
    int n;
    cin>>n;
    for(int i=0;i<n-1;i++){
        int x,y;
        cin>>x>>y;
        v[x].pb(y);
        v[y].pb(x);
    }

    bfs();
    vector<int>s(n);
    for(int i=0;i<n;i++){
        cin>>s[i];
    }
    vector<int>cnt(200005,0);
    for(int i=1;i<=n;i++){
        cnt[l[i]]++;
    }

    for(int i=1;i<n;i++){
        if(l[s[i]]<l[s[i-1]]){
            cout<<"No";
            return 0;
        }
    }

    vector<int>visit(200005,0);
    queue<int>q;
    visit[1]=1;int k=1;
    k+=cnt[l[2]];
    //cout<<k<<endl;
    for(int i=1;i<n;){
        int le=l[s[i]];
        while(i<n && l[s[i]]==le ){
            visit[s[i]]=1;
            q.push(s[i++]);
        }
    while(q.size()){
        int f=q.front();
        q.pop();
        set<int>a,b;
        for(int j=0;j<v[f].size();j++){
            if(visit[v[f][j]]==0){
                a.insert(v[f][j]);
            }
        }
        int kk=k;
        while(k<n && k<kk+a.size()){
            b.insert(s[k++]);
        }
        if(a!=b){
            cout<<"No";
            return 0;
        }
    }

    }

    cout<<"Yes";

    return 0;
}


#include <bits/stdc++.h>
#define pb push_back
#define ll long long
#define fi first
#define se second
using namespace std;

vector<int>v[200005];
vector<int>l(200005,0);

void bfs(){
    queue<int>q;
    q.push(1);
    l[1]=1;
    while(q.size()){
        int f=q.front();
        q.pop();
        for(int i=0;i<v[f].size();i++){
            if(l[v[f][i]]==0){
                q.push(v[f][i]);
                l[v[f][i]]=l[f]+1;
            }
        }
    }

}
int main() {
    int n;
    cin>>n;
    for(int i=0;i<n-1;i++){
        int x,y;
        cin>>x>>y;
        v[x].pb(y);
        v[y].pb(x);
    }

    bfs();
    vector<int>s(n);
    for(int i=0;i<n;i++){
        cin>>s[i];
    }
    vector<int>cnt(200005,0);
    for(int i=1;i<=n;i++){
        cnt[l[i]]++;
    }

    for(int i=1;i<n;i++){
        if(l[s[i]]<l[s[i-1]]){
            cout<<"No";
            return 0;
        }
    }
    vector<int>visit(200005,0);
    queue<int>q;
    visit[1]=1;int k=1;
    for(int i=1;i<n;){
        int le=l[s[i]];
        while(i<n && l[s[i]]==le ){
            visit[s[i]]=1;
            q.push(s[i++]);
        }
        int count=cnt[le];
        k+=count;
    while(q.size()){
        int f=q.front();
        q.pop();
        set<int>a,b;
        for(int j=0;j<v[f].size();j++){
            if(visit[v[f][j]]==0){
                a.insert(v[f][j]);
            }
        }
        int kk=k;
        while(k<n && k<kk+a.size()){
            b.insert(s[k++]);
        }
        if(a!=b){
            cout<<"No";
            return 0;
        }
    }

    }

    cout<<"Yes";

    return 0;
}


#include <bits/stdc++.h>
#define pb push_back
#define ll long long
#define fi first
#define se second
using namespace std;

vector<int>v[200005];
vector<int>l(200005,0);

void bfs(){
    queue<int>q;
    q.push(1);
    l[1]=1;
    while(q.size()){
        int f=q.front();
        q.pop();
        for(int u:v[f]){
            if(l[u]==0){
                q.push(u);
                l[u]=l[f]+1;
            }
        }
    }

}
int main() {
    int n;
    cin>>n;
    for(int i=0;i<n-1;i++){
        int x,y;
        cin>>x>>y;
        v[x].pb(y);
        v[y].pb(x);
    }
    bfs();
    vector<int>s(n);
    for(int i=0;i<n;i++){
        cin>>s[i];
        s[i]=l[s[i]];
    }
    int ok=1,le=s[0];
    for(int i=1;i<n;i++){
        if(s[i]<le)
            ok=0;
        le=s[i];
    }
    if(ok)
        cout<<"Yes";
    else cout<<"No";

    return 0;
}


#include <bits/stdc++.h>
#define pb push_back
#define ll long long
#define fi first
#define se second
using namespace std;

vector<int>v[200005];
vector<int>l(200005,0);

void bfs(){
    queue<int>q;
    q.push(1);
    l[1]=1;
    while(q.size()){
        int f=q.front();
        q.pop();
        for(int i=0;i<v[f].size();i++){
            if(l[v[f][i]]==0){
                q.push(v[f][i]);
                l[v[f][i]]=l[f]+1;
            }
        }
    }

}
int main() {
    int n;
    cin>>n;
    for(int i=0;i<n-1;i++){
        int x,y;
        cin>>x>>y;
        v[x].pb(y);
        v[y].pb(x);
    }

    bfs();
    vector<int>s(n);
    for(int i=0;i<n;i++){
        cin>>s[i];
    }
    vector<int>cnt(200005,0);
    for(int i=1;i<=n;i++){
        cnt[l[i]]++;
    }

    for(int i=1;i<n;i++){
        if(l[s[i]]<l[s[i-1]]){
            cout<<"No";
            return 0;
        }
    }
    vector<int>visit(200005,0);
    queue<int>q;
    visit[1]=1;int k=1;
    for(int i=1;i<n;){
        int le=l[s[i]];
        while(i<n && l[s[i]]==le ){
            visit[s[i]]=1;
            q.push(s[i++]);
        }
        int count=cnt[le];
        k+=count;
        //cout<<k<<" "<<i<<endl;
    while(q.size()){
        int f=q.front();
        q.pop();
        set<int>a,b;
        for(int j=0;j<v[f].size();j++){
            if(visit[v[f][j]]==0){
                cout<<v[f][j]<<endl;
                a.insert(v[f][j]);
            }
        }
        int kk=k;
        while(k<kk+a.size()){
            //cout<<s[k]<<endl;
            b.insert(s[k++]);
        }
        auto it1=a.begin(),it2=b.begin();
        while(it1!=a.end()){
            if(*it1!=*it2){
                cout<<"No";
                return 0;
            }
            ++it1,++it2;
        }

    }
    }

    cout<<"Yes";

    return 0;
}


#include <bits/stdc++.h>
#define pb push_back
#define ll long long
#define fi first
#define se second
using namespace std;

vector<int>v[200005];
vector<int>l(200005,0);

void bfs(){
    queue<int>q;
    q.push(1);
    l[1]=1;
    while(q.size()){
        int f=q.front();
        q.pop();
        for(int u:v[f]){
            if(l[u]==0){
                q.push(u);
                l[u]=l[f]+1;
            }
        }
    }

}
int main() {
    int n;
    cin>>n;
    for(int i=0;i<n-1;i++){
        int x,y;
        cin>>x>>y;
        v[x].pb(y);
        v[y].pb(x);
    }
    bfs();
    vector<int>s(n);
    for(int i=0;i<n;i++){
        cin>>s[i];
        s[i]=l[s[i]];
    }
    int ok=1;
    for(int i=1;i<n;i++){
        if(s[i]<s[i-1])
            ok=0;
    }
    if(ok)
        cout<<"Yes";
    else cout<<"No";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

set<int> v[200005];
int arr[200005],n;
void bfs()
{
    queue<int> q;
    if(arr[1]!=1){cout<<"No";return ;}
    q.push(1);
    int ptr=2;
    while(!q.empty()&&ptr<n)
    {
        int node=q.front();
        q.pop();
        int sz;sz=(node==1)?v[node].size():v[node].size()-1;
        for(int i=ptr;i<ptr+sz;i++)
        {
            if(v[node].find(arr[i])==v[node].end()){cout<<"No";return ;}
            else q.push(arr[i]);
        }
        ptr=ptr+sz;
   }
    cout<<"Yes";return ;
}
int main()
{
    cin>>n;
    for(int i=1;i<n;i++){int x,y;cin>>x>>y;v[x].insert(y);v[y].insert(x);}
    for(int i=1;i<=n;i++)cin>>arr[i];
    bfs();
    return 0;
}


//{{{
#include <bits/stdc++.h>
using namespace std;
//types
typedef long long ll;
typedef pair<int,int> pii;
//input
void SR(int &x){scanf("%d",&x);}void SR(ll &x){scanf("%lld",&x);}
void SR(double &x){scanf("%lf",&x);}void SR(char *s){scanf("%s",s);}
void RI(){}
template<typename I,typename... T>void RI(I &x,T&... tail){SR(x);RI(tail...);}
//output
void SP(const int x){printf("%d",x);}void SP(const ll x){printf("%lld",x);}
void SP(const double x){printf("%.16lf",x);}void SP(const char *s){printf(s);}
void PS(){puts("");}
template<typename I,typename... T>void PS(I &x,T&... tail){putchar(' ');SP(x);PS(tail...);}
void PL(){puts("");}
template<typename I,typename... T>void PL(const I x,const T... tail){SP(x);PS(tail...);}
//macro
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x),end(x)
#define REP(i,n) for(int i=0;i<int(n);i++)
#define REP1(i,a,b) for(int i=(a);i<=int(b);i++)
#define pb push_back
#define mkp make_pair
#define F first
#define S second
//debug
#ifdef darry140
template<typename I>
void _DOING(const char *s,I&& x){cerr<<s<<"="<<x<<endl;}//without ','
template<typename I,typename... T>
void _DOING(const char *s,I&& x,T&&... tail)//with ','
{
    int c=0;
    static const char bra[]="({[";
    static const char ket[]=")}]";
    while(*s!=',' || c!=0)//eg. mkp(a,b)
    {
        if(strchr(bra,*s)) c++;
        if(strchr(ket,*s)) c--;
        cerr<<*s++;
    }
    cerr<<"="<<x<<", ";
    _DOING(s+1,tail...);
}
#define debug(...) do{\
    fprintf(stderr,"%s:%d - ",__PRETTY_FUNCTION__,__LINE__);\
    _DOING(#__VA_ARGS__,__VA_ARGS__);\
}while(0);
template<typename It>
ostream& _OUTC(ostream &s,It b,It e)//container
{
    s<<"{";
    for(auto it=b;it!=e;it++) s<<(it==b?"":" ")<<*it;
    s<<"}";
    return s;
}
template<typename A,typename B>
ostream& operator <<(ostream&s, const pair<A,B> &p){return s<<"("<<p.F<<","<<p.S<<")";}
template<typename A,typename B>
ostream& operator <<(ostream&s, const map<A,B> &c){return _OUTC(s,ALL(c));}
template<typename T>
ostream& operator <<(ostream&s, const set<T> &c){return _OUTC(s,ALL(c));}
template<typename T>
ostream& operator <<(ostream&s, const vector<T> &c){return _OUTC(s,ALL(c));}
#else
#define debug(...)
#endif
//}}}
int n;
double r,v;
void read()
{
    RI(n,r,v);
}
double w,d;
void build(){w=v/r;debug(w);}
const double pi=3.141592653589793238;
inline double f(double t){return v*t+r*sin(w*t);}
inline double fm1(double x)
{
    double t=1;
    while(f(t)<x) t*=2;
    double l=t/2,u=t;
    REP(i,50)
    {
        double mid=(l+u)/2;
        if(f(mid)<x) l=mid;
        else u=mid;
    }
    return l;
}
inline double findnext(double t)
{
    t-=pi/w;
    double g=2*pi/w;debug(w,g);
    double k=1;
    while(g*k<t) k*=2;
    double cur=-2*pi/w;k*=2;
    REP(i,100)
    {
        if(cur+g*k<t) cur+=g*k;
        k/=2;
        if(k<0.7) break;
    }
    return cur+g+pi/w;
}
inline double test(double x0)
{
    return fm1(x0+d)-fm1(x0);
}
void sol()
{
    while(n--)
    {
        int s,fi;RI(s,fi);
        d=fi-s;
        double l=f(pi/w);
        double lt=fm1(d+l);
        double rt=findnext(lt);
        double u=f(rt)-d;
        REP(i,50)
        {
            double a=(l+l+u)/3;
            double b=(l+u+u)/3;
            if(test(a)<test(b)) u=b;
            else l=a;
        }
        PL(test((l+u)/2));
    }
}
int main()
{
    read();
    build();
    sol();
    return 0;
}


//{{{
#include <bits/stdc++.h>
using namespace std;
//types
typedef long long ll;
typedef pair<int,int> pii;
//input
void SR(int &x){scanf("%d",&x);}void SR(ll &x){scanf("%lld",&x);}
void SR(double &x){scanf("%lf",&x);}void SR(char *s){scanf("%s",s);}
void RI(){}
template<typename I,typename... T>void RI(I &x,T&... tail){SR(x);RI(tail...);}
//output
void SP(const int x){printf("%d",x);}void SP(const ll x){printf("%lld",x);}
void SP(const double x){printf("%.12lf",x);}void SP(const char *s){printf(s);}
void PS(){puts("");}
template<typename I,typename... T>void PS(I &x,T&... tail){putchar(' ');SP(x);PS(tail...);}
void PL(){puts("");}
template<typename I,typename... T>void PL(const I x,const T... tail){SP(x);PS(tail...);}
//macro
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x),end(x)
#define REP(i,n) for(int i=0;i<int(n);i++)
#define REP1(i,a,b) for(int i=(a);i<=int(b);i++)
#define pb push_back
#define mkp make_pair
#define F first
#define S second
//debug
#ifdef darry140
template<typename I>
void _DOING(const char *s,I&& x){cerr<<s<<"="<<x<<endl;}//without ','
template<typename I,typename... T>
void _DOING(const char *s,I&& x,T&&... tail)//with ','
{
    int c=0;
    static const char bra[]="({[";
    static const char ket[]=")}]";
    while(*s!=',' || c!=0)//eg. mkp(a,b)
    {
        if(strchr(bra,*s)) c++;
        if(strchr(ket,*s)) c--;
        cerr<<*s++;
    }
    cerr<<"="<<x<<", ";
    _DOING(s+1,tail...);
}
#define debug(...) do{\
    fprintf(stderr,"%s:%d - ",__PRETTY_FUNCTION__,__LINE__);\
    _DOING(#__VA_ARGS__,__VA_ARGS__);\
}while(0);
template<typename It>
ostream& _OUTC(ostream &s,It b,It e)//container
{
    s<<"{";
    for(auto it=b;it!=e;it++) s<<(it==b?"":" ")<<*it;
    s<<"}";
    return s;
}
template<typename A,typename B>
ostream& operator <<(ostream&s, const pair<A,B> &p){return s<<"("<<p.F<<","<<p.S<<")";}
template<typename A,typename B>
ostream& operator <<(ostream&s, const map<A,B> &c){return _OUTC(s,ALL(c));}
template<typename T>
ostream& operator <<(ostream&s, const set<T> &c){return _OUTC(s,ALL(c));}
template<typename T>
ostream& operator <<(ostream&s, const vector<T> &c){return _OUTC(s,ALL(c));}
#else
#define debug(...)
#endif
//}}}
int n;
double r,v;
void read()
{
    RI(n,r,v);
}
double d;
bool test(double x)
{
    double k=x+2*r*abs(sin(x/2/r));
    return k>d;
}
void sol()
{
    while(n--)
    {
        int s,fi;RI(s,fi);
        d=fi-s;
        double lo=0,hi=1e20;
        REP(i,100)
        {
            double mid=(lo+hi)/2;
            if(test(mid)) hi=mid;
            else lo=mid;
        }
        PL(lo/v);
    }
}
int main()
{
    read();
    sol();
    return 0;
}


//{{{
#include <bits/stdc++.h>
using namespace std;
//types
typedef long long ll;
typedef pair<int,int> pii;
//input
void SR(int &x){scanf("%d",&x);}void SR(ll &x){scanf("%lld",&x);}
void SR(double &x){scanf("%lf",&x);}void SR(char *s){scanf("%s",s);}
void RI(){}
template<typename I,typename... T>void RI(I &x,T&... tail){SR(x);RI(tail...);}
//output
void SP(const int x){printf("%d",x);}void SP(const ll x){printf("%lld",x);}
void SP(const double x){printf("%.12lf",x);}void SP(const char *s){printf(s);}
void PS(){puts("");}
template<typename I,typename... T>void PS(I &x,T&... tail){putchar(' ');SP(x);PS(tail...);}
void PL(){puts("");}
template<typename I,typename... T>void PL(const I x,const T... tail){SP(x);PS(tail...);}
//macro
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x),end(x)
#define REP(i,n) for(int i=0;i<int(n);i++)
#define REP1(i,a,b) for(int i=(a);i<=int(b);i++)
#define pb push_back
#define mkp make_pair
#define F first
#define S second
//debug
#ifdef darry140
template<typename I>
void _DOING(const char *s,I&& x){cerr<<s<<"="<<x<<endl;}//without ','
template<typename I,typename... T>
void _DOING(const char *s,I&& x,T&&... tail)//with ','
{
    int c=0;
    static const char bra[]="({[";
    static const char ket[]=")}]";
    while(*s!=',' || c!=0)//eg. mkp(a,b)
    {
        if(strchr(bra,*s)) c++;
        if(strchr(ket,*s)) c--;
        cerr<<*s++;
    }
    cerr<<"="<<x<<", ";
    _DOING(s+1,tail...);
}
#define debug(...) do{\
    fprintf(stderr,"%s:%d - ",__PRETTY_FUNCTION__,__LINE__);\
    _DOING(#__VA_ARGS__,__VA_ARGS__);\
}while(0);
template<typename It>
ostream& _OUTC(ostream &s,It b,It e)//container
{
    s<<"{";
    for(auto it=b;it!=e;it++) s<<(it==b?"":" ")<<*it;
    s<<"}";
    return s;
}
template<typename A,typename B>
ostream& operator <<(ostream&s, const pair<A,B> &p){return s<<"("<<p.F<<","<<p.S<<")";}
template<typename A,typename B>
ostream& operator <<(ostream&s, const map<A,B> &c){return _OUTC(s,ALL(c));}
template<typename T>
ostream& operator <<(ostream&s, const set<T> &c){return _OUTC(s,ALL(c));}
template<typename T>
ostream& operator <<(ostream&s, const vector<T> &c){return _OUTC(s,ALL(c));}
#else
#define debug(...)
#endif
//}}}
int n;
double r,v;
void read()
{
    RI(n,r,v);
}
double w,d;
void build(){w=v/r;}
const double pi=3.141592653589793238;
double mysin(double x)
{
    int a=1;
    double b=1,c=x;
    double ans=0;
    REP(i,15)
    {
        ans+=a*c/b;
        a=-a;
        b*=(2*i+2)*(2*i+3);
        c*=x*x;
    }
    return ans;
}
inline double f(double t){return v*t+r*mysin(w*t);}
inline double fm1(double x)
{
    double t=1;
    while(f(t)<x) t*=2;
    double l=t/2,u=t;
    REP(i,50)
    {
        double mid=(l+u)/2;
        if(f(mid)<x) l=mid;
        else u=mid;
    }
    return l;
}
inline double findnext(double t)
{
    t-=pi/w;
    double g=2*pi/w;//debug(w,g);
    double k=1;
    while(g*k<t) k*=2;
    double cur=-2*pi/w;k*=2;
    REP(i,100)
    {
        if(cur+g*k<t) cur+=g*k;
        k/=2;
        if(k<0.7) break;
    }
    return cur+g+pi/w;
}
inline double test(double x0)
{
    return fm1(x0+d)-fm1(x0);
}
void sol()
{
    while(n--)
    {
        int s,fi;RI(s,fi);
        d=fi-s;
        double l=f(pi/w);
        double lt=fm1(d+l);
        double rt=findnext(lt);
        double u=f(rt)-d;
        REP(i,50)
        {
            double a=(l+l+u)/3;
            double b=(l+u+u)/3;
            if(test(a)<test(b)) u=b;
            else l=a;
        }
        PL(test((l+u)/2));
    }
}
int main()
{
    read();
    build();
    sol();
    return 0;
}


//{{{
#include <bits/stdc++.h>
using namespace std;
//types
typedef long long ll;
typedef pair<int,int> pii;
//input
void SR(int &x){scanf("%d",&x);}void SR(ll &x){scanf("%lld",&x);}
void SR(double &x){scanf("%lf",&x);}void SR(char *s){scanf("%s",s);}
void RI(){}
template<typename I,typename... T>void RI(I &x,T&... tail){SR(x);RI(tail...);}
//output
void SP(const int x){printf("%d",x);}void SP(const ll x){printf("%lld",x);}
void SP(const double x){printf("%.12lf",x);}void SP(const char *s){printf(s);}
void PS(){puts("");}
template<typename I,typename... T>void PS(I &x,T&... tail){putchar(' ');SP(x);PS(tail...);}
void PL(){puts("");}
template<typename I,typename... T>void PL(const I x,const T... tail){SP(x);PS(tail...);}
//macro
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x),end(x)
#define REP(i,n) for(int i=0;i<int(n);i++)
#define REP1(i,a,b) for(int i=(a);i<=int(b);i++)
#define pb push_back
#define mkp make_pair
#define F first
#define S second
//debug
#ifdef darry140
template<typename I>
void _DOING(const char *s,I&& x){cerr<<s<<"="<<x<<endl;}//without ','
template<typename I,typename... T>
void _DOING(const char *s,I&& x,T&&... tail)//with ','
{
    int c=0;
    static const char bra[]="({[";
    static const char ket[]=")}]";
    while(*s!=',' || c!=0)//eg. mkp(a,b)
    {
        if(strchr(bra,*s)) c++;
        if(strchr(ket,*s)) c--;
        cerr<<*s++;
    }
    cerr<<"="<<x<<", ";
    _DOING(s+1,tail...);
}
#define debug(...) do{\
    fprintf(stderr,"%s:%d - ",__PRETTY_FUNCTION__,__LINE__);\
    _DOING(#__VA_ARGS__,__VA_ARGS__);\
}while(0);
template<typename It>
ostream& _OUTC(ostream &s,It b,It e)//container
{
    s<<"{";
    for(auto it=b;it!=e;it++) s<<(it==b?"":" ")<<*it;
    s<<"}";
    return s;
}
template<typename A,typename B>
ostream& operator <<(ostream&s, const pair<A,B> &p){return s<<"("<<p.F<<","<<p.S<<")";}
template<typename A,typename B>
ostream& operator <<(ostream&s, const map<A,B> &c){return _OUTC(s,ALL(c));}
template<typename T>
ostream& operator <<(ostream&s, const set<T> &c){return _OUTC(s,ALL(c));}
template<typename T>
ostream& operator <<(ostream&s, const vector<T> &c){return _OUTC(s,ALL(c));}
#else
#define debug(...)
#endif
//}}}
int n;
double r,v;
void read()
{
    RI(n,r,v);
}
double w,d;
void build(){w=v/r;}
const double pi=3.141592653589793238;
double mysin(double x)
{
    int a=1;
    double b=1,c=x;
    double ans=0;
    REP(i,30)
    {
        ans+=a*c/b;
        a=-a;
        b*=(2*i+2)*(2*i+3);
        c*=x*x;
    }
    return ans;
}
inline double f(double t){return v*t+r*sin(w*t);}
inline double fm1(double x)
{
    double t=1;
    while(f(t)<x) t*=2;
    double l=t/2,u=t;
    REP(i,25)
    {
        double mid=(l+u)/2;
        if(f(mid)<x) l=mid;
        else u=mid;
    }
    return l;
}
inline double findnext(double t)
{
    t-=pi/w;
    double g=2*pi/w;//debug(w,g);
    double k=1;
    while(g*k<t) k*=2;
    double cur=-2*pi/w;k*=2;
    REP(i,100)
    {
        if(cur+g*k<t) cur+=g*k;
        k/=2;
        if(k<0.7) break;
    }
    return cur+g+pi/w;
}
inline double test(double x0)
{
    return fm1(x0+d)-fm1(x0);
}
void sol()
{
    while(n--)
    {
        int s,fi;RI(s,fi);
        d=fi-s;
        double l=f(pi/w);
        double lt=fm1(d+l);
        double rt=findnext(lt);
        double u=f(rt)-d;
        REP(i,25)
        {
            double a=(l+l+u)/3;
            double b=(l+u+u)/3;
            if(test(a)<test(b)) u=b;
            else l=a;
        }
        PL(test((l+u)/2));
    }
}
int main()
{
    read();
    build();
    sol();
    return 0;
}


//{{{
#include <bits/stdc++.h>
using namespace std;
//types
typedef long long ll;
typedef pair<int,int> pii;
//input
void SR(int &x){scanf("%d",&x);}void SR(ll &x){scanf("%lld",&x);}
void SR(double &x){scanf("%lf",&x);}void SR(char *s){scanf("%s",s);}
void RI(){}
template<typename I,typename... T>void RI(I &x,T&... tail){SR(x);RI(tail...);}
//output
void SP(const int x){printf("%d",x);}void SP(const ll x){printf("%lld",x);}
void SP(const double x){printf("%.16lf",x);}void SP(const char *s){printf(s);}
void PS(){puts("");}
template<typename I,typename... T>void PS(I &x,T&... tail){putchar(' ');SP(x);PS(tail...);}
void PL(){puts("");}
template<typename I,typename... T>void PL(const I x,const T... tail){SP(x);PS(tail...);}
//macro
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x),end(x)
#define REP(i,n) for(int i=0;i<int(n);i++)
#define REP1(i,a,b) for(int i=(a);i<=int(b);i++)
#define pb push_back
#define mkp make_pair
#define F first
#define S second
//debug
#ifdef darry140
template<typename I>
void _DOING(const char *s,I&& x){cerr<<s<<"="<<x<<endl;}//without ','
template<typename I,typename... T>
void _DOING(const char *s,I&& x,T&&... tail)//with ','
{
    int c=0;
    static const char bra[]="({[";
    static const char ket[]=")}]";
    while(*s!=',' || c!=0)//eg. mkp(a,b)
    {
        if(strchr(bra,*s)) c++;
        if(strchr(ket,*s)) c--;
        cerr<<*s++;
    }
    cerr<<"="<<x<<", ";
    _DOING(s+1,tail...);
}
#define debug(...) do{\
    fprintf(stderr,"%s:%d - ",__PRETTY_FUNCTION__,__LINE__);\
    _DOING(#__VA_ARGS__,__VA_ARGS__);\
}while(0);
template<typename It>
ostream& _OUTC(ostream &s,It b,It e)//container
{
    s<<"{";
    for(auto it=b;it!=e;it++) s<<(it==b?"":" ")<<*it;
    s<<"}";
    return s;
}
template<typename A,typename B>
ostream& operator <<(ostream&s, const pair<A,B> &p){return s<<"("<<p.F<<","<<p.S<<")";}
template<typename A,typename B>
ostream& operator <<(ostream&s, const map<A,B> &c){return _OUTC(s,ALL(c));}
template<typename T>
ostream& operator <<(ostream&s, const set<T> &c){return _OUTC(s,ALL(c));}
template<typename T>
ostream& operator <<(ostream&s, const vector<T> &c){return _OUTC(s,ALL(c));}
#else
#define debug(...)
#endif
//}}}
int n;
double r,v;
void read()
{
    RI(n,r,v);
}
double w,d;
void build(){w=v/r;debug(w);}
const double pi=3.141592653589793238;
inline double f(double t){return v*t+r*sin(w*t);}
double fm1(double x)
{
    double t=1;
    while(f(t)<x) t*=2;
    double l=t/2,u=t;
    REP(i,100)
    {
        double mid=(l+u)/2;
        if(f(mid)<x) l=mid;
        else u=mid;
    }
    return l;
}
double findnext(double t)
{
    t-=pi/w;
    double g=2*pi/w;debug(w,g);
    double k=1;
    while(g*k<t) k*=2;
    double cur=-2*pi/w;k*=2;
    REP(i,100)
    {
        if(cur+g*k<t) cur+=g*k;
        k/=2;
        if(k<0.7) break;
    }
    return cur+g+pi/w;
}
double test(double x0)
{
    return fm1(x0+d)-fm1(x0);
}
void sol()
{
    while(n--)
    {
        int s,fi;RI(s,fi);
        d=fi-s;
        double l=f(pi/w);
        double lt=fm1(d+l);
        double rt=findnext(lt);
        double u=f(rt)-d;
        debug(l,lt,f(lt),rt,f(rt),u);
        REP(i,100)
        {
            double a=(l+l+u)/3;
            double b=(l+u+u)/3;
            if(test(a)<test(b)) u=b;
            else l=a;
        }
        PL(test((l+u)/2));
    }
}
int main()
{
    read();
    build();
    sol();
    return 0;
}


//{{{
#include <bits/stdc++.h>
using namespace std;
//types
typedef long long ll;
typedef pair<int,int> pii;
//input
void SR(int &x){scanf("%d",&x);}void SR(ll &x){scanf("%lld",&x);}
void SR(double &x){scanf("%lf",&x);}void SR(char *s){scanf("%s",s);}
void RI(){}
template<typename I,typename... T>void RI(I &x,T&... tail){SR(x);RI(tail...);}
//output
void SP(const int x){printf("%d",x);}void SP(const ll x){printf("%lld",x);}
void SP(const double x){printf("%.12lf",x);}void SP(const char *s){printf(s);}
void PS(){puts("");}
template<typename I,typename... T>void PS(I &x,T&... tail){putchar(' ');SP(x);PS(tail...);}
void PL(){puts("");}
template<typename I,typename... T>void PL(const I x,const T... tail){SP(x);PS(tail...);}
//macro
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x),end(x)
#define REP(i,n) for(int i=0;i<int(n);i++)
#define REP1(i,a,b) for(int i=(a);i<=int(b);i++)
#define pb push_back
#define mkp make_pair
#define F first
#define S second
//debug
#ifdef darry140
template<typename I>
void _DOING(const char *s,I&& x){cerr<<s<<"="<<x<<endl;}//without ','
template<typename I,typename... T>
void _DOING(const char *s,I&& x,T&&... tail)//with ','
{
    int c=0;
    static const char bra[]="({[";
    static const char ket[]=")}]";
    while(*s!=',' || c!=0)//eg. mkp(a,b)
    {
        if(strchr(bra,*s)) c++;
        if(strchr(ket,*s)) c--;
        cerr<<*s++;
    }
    cerr<<"="<<x<<", ";
    _DOING(s+1,tail...);
}
#define debug(...) do{\
    fprintf(stderr,"%s:%d - ",__PRETTY_FUNCTION__,__LINE__);\
    _DOING(#__VA_ARGS__,__VA_ARGS__);\
}while(0);
template<typename It>
ostream& _OUTC(ostream &s,It b,It e)//container
{
    s<<"{";
    for(auto it=b;it!=e;it++) s<<(it==b?"":" ")<<*it;
    s<<"}";
    return s;
}
template<typename A,typename B>
ostream& operator <<(ostream&s, const pair<A,B> &p){return s<<"("<<p.F<<","<<p.S<<")";}
template<typename A,typename B>
ostream& operator <<(ostream&s, const map<A,B> &c){return _OUTC(s,ALL(c));}
template<typename T>
ostream& operator <<(ostream&s, const set<T> &c){return _OUTC(s,ALL(c));}
template<typename T>
ostream& operator <<(ostream&s, const vector<T> &c){return _OUTC(s,ALL(c));}
#else
#define debug(...)
#endif
//}}}
int n;
double r,v;
void read()
{
    RI(n,r,v);
}
double w,d;
void build(){w=v/r;}
const double pi=3.141592653589793238;
double mysin(double x)
{
    int a=1;
    double b=1,c=x;
    double ans=0;
    REP(i,30)
    {
        ans+=a*c/b;
        a=-a;
        b*=(2*i+2)*(2*i+3);
        c*=x*x;
    }
    return ans;
}
inline double f(double t){return v*t+r*sin(w*t);}
inline double fm1(double x)
{
    double t=1;
    while(f(t)<x) t*=2;
    double l=t/2,u=t;
    REP(i,25)
    {
        double mid=(l+u)/2;
        if(f(mid)<x) l=mid;
        else u=mid;
    }
    return l;
}
inline double findnext(double t)
{
    t-=pi/w;
    double g=2*pi/w;//debug(w,g);
    double cur=ceil(t*w/2*pi);
    return cur+g+pi/w;
}
inline double test(double x0)
{
    return fm1(x0+d)-fm1(x0);
}
void sol()
{
    while(n--)
    {
        int s,fi;RI(s,fi);
        d=fi-s;
        double l=f(pi/w);//1
        double lt=fm1(d+l);//25
        double rt=findnext(lt);//25
        double u=f(rt)-d;
        REP(i,25)//100
        {
            double a=(l+l+u)/3;
            double b=(l+u+u)/3;
            if(test(a)<test(b)) u=b;
            else l=a;
        }
        PL(test((l+u)/2));
    }
}
int main()
{
    read();
    build();
    sol();
    return 0;
}


//{{{
#include <bits/stdc++.h>
using namespace std;
//types
typedef long long ll;
typedef pair<int,int> pii;
//input
void SR(int &x){scanf("%d",&x);}void SR(ll &x){scanf("%lld",&x);}
void SR(double &x){scanf("%lf",&x);}void SR(char *s){scanf("%s",s);}
void RI(){}
template<typename I,typename... T>void RI(I &x,T&... tail){SR(x);RI(tail...);}
//output
void SP(const int x){printf("%d",x);}void SP(const ll x){printf("%lld",x);}
void SP(const double x){printf("%.12lf",x);}void SP(const char *s){printf(s);}
void PS(){puts("");}
template<typename I,typename... T>void PS(I &x,T&... tail){putchar(' ');SP(x);PS(tail...);}
void PL(){puts("");}
template<typename I,typename... T>void PL(const I x,const T... tail){SP(x);PS(tail...);}
//macro
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x),end(x)
#define REP(i,n) for(int i=0;i<int(n);i++)
#define REP1(i,a,b) for(int i=(a);i<=int(b);i++)
#define pb push_back
#define mkp make_pair
#define F first
#define S second
//debug
#ifdef darry140
template<typename I>
void _DOING(const char *s,I&& x){cerr<<s<<"="<<x<<endl;}//without ','
template<typename I,typename... T>
void _DOING(const char *s,I&& x,T&&... tail)//with ','
{
    int c=0;
    static const char bra[]="({[";
    static const char ket[]=")}]";
    while(*s!=',' || c!=0)//eg. mkp(a,b)
    {
        if(strchr(bra,*s)) c++;
        if(strchr(ket,*s)) c--;
        cerr<<*s++;
    }
    cerr<<"="<<x<<", ";
    _DOING(s+1,tail...);
}
#define debug(...) do{\
    fprintf(stderr,"%s:%d - ",__PRETTY_FUNCTION__,__LINE__);\
    _DOING(#__VA_ARGS__,__VA_ARGS__);\
}while(0);
template<typename It>
ostream& _OUTC(ostream &s,It b,It e)//container
{
    s<<"{";
    for(auto it=b;it!=e;it++) s<<(it==b?"":" ")<<*it;
    s<<"}";
    return s;
}
template<typename A,typename B>
ostream& operator <<(ostream&s, const pair<A,B> &p){return s<<"("<<p.F<<","<<p.S<<")";}
template<typename A,typename B>
ostream& operator <<(ostream&s, const map<A,B> &c){return _OUTC(s,ALL(c));}
template<typename T>
ostream& operator <<(ostream&s, const set<T> &c){return _OUTC(s,ALL(c));}
template<typename T>
ostream& operator <<(ostream&s, const vector<T> &c){return _OUTC(s,ALL(c));}
#else
#define debug(...)
#endif
//}}}
int n;
double r,v;
void read()
{
    RI(n,r,v);
}
double w,d;
void build(){w=v/r;}
const double pi=3.141592653589793238;
double mysin(double x)
{
    int a=1;
    double b=1,c=x;
    double ans=0;
    REP(i,30)
    {
        ans+=a*c/b;
        a=-a;
        b*=(2*i+2)*(2*i+3);
        c*=x*x;
    }
    return ans;
}
inline double f(double t){return v*t+r*mysin(w*t);}
inline double fm1(double x)
{
    double t=1;
    while(f(t)<x) t*=2;
    double l=t/2,u=t;
    REP(i,50)
    {
        double mid=(l+u)/2;
        if(f(mid)<x) l=mid;
        else u=mid;
    }
    return l;
}
inline double findnext(double t)
{
    t-=pi/w;
    double g=2*pi/w;//debug(w,g);
    double k=1;
    while(g*k<t) k*=2;
    double cur=-2*pi/w;k*=2;
    REP(i,100)
    {
        if(cur+g*k<t) cur+=g*k;
        k/=2;
        if(k<0.7) break;
    }
    return cur+g+pi/w;
}
inline double test(double x0)
{
    return fm1(x0+d)-fm1(x0);
}
void sol()
{
    while(n--)
    {
        int s,fi;RI(s,fi);
        d=fi-s;
        double l=f(pi/w);
        double lt=fm1(d+l);
        double rt=findnext(lt);
        double u=f(rt)-d;
        REP(i,50)
        {
            double a=(l+l+u)/3;
            double b=(l+u+u)/3;
            if(test(a)<test(b)) u=b;
            else l=a;
        }
        PL(test((l+u)/2));
    }
}
int main()
{
    read();
    build();
    sol();
    return 0;
}


#include <iostream>
#include <cmath>
#include <iomanip>

#define ld double
const ld PI=3.14159265359;

using namespace std;

int n;
ld r,v;
ld dis;

int check(ld t) {
	if (t<=0) return 0;
	ld tmp=floor(t/(2*PI*r));
	tmp*=2*PI*r;
	ld hlp=t-tmp;
	hlp/=2*r;
	hlp=r*sin(hlp);
	hlp*=2;
//	cout<<t<<": ";
	if (t+hlp>=dis) return 1;
//	cout<<2<<endl;
	return 0;
}

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cin>>n>>r>>v;
	cout<<setprecision(15);
	for (int i=0;i<n;i++) {
		ld s,f;
		cin>>s>>f;
		dis=f-s;
//		cout<<dis<<"::"<<endl;
		ld yla=dis;
		ld ala=dis-2*r;
		for (int j=0;j<50;j++) {
			ld mid=(ala+yla)/2;
			if (check(mid)) yla=mid;
			else ala=mid;
		}
		cout<<ala/v<<"\n";
	}
}


#include <iostream>
#include <cmath>
#include <iomanip>

#define ld long double
const ld PI=asin(1)*2;

using namespace std;

int n;
ld r,v;
ld dis;

int check(ld t) {
	if (t<=0) return 0;
	ld tmp=floor(t/(PI*r));
	tmp*=PI*r;
	ld hlp=t-tmp;
	hlp/=2*r;
	hlp=r*sin(hlp);
	hlp*=2;
//	cout<<t<<": ";
	if (t+hlp>=dis) return 1;
//	cout<<2<<endl;
	return 0;
}

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cin>>n>>r>>v;
	cout<<setprecision(15);
	for (int i=0;i<n;i++) {
		ld s,f;
		cin>>s>>f;
		dis=f-s;
//		cout<<dis<<"::"<<endl;
		ld yla=dis;
		ld ala=dis-2*r;
		for (int j=0;j<100;j++) {
			ld mid=(ala+yla)/2;
			if (check(mid)) yla=mid;
			else ala=mid;
		}
		cout<<ala/v<<"\n";
	}
}


#include <iostream>
#include <cmath>
#include <iomanip>

#define ld long double
const ld PI=3.14159265359;

using namespace std;

int n;
ld r,v;
ld dis;

int check(ld t) {
	if (t<=0) return 0;
	ld tmp=floor(t/(2*PI*r));
	tmp*=2*PI*r;
	ld hlp=t-tmp;
	hlp/=2*r;
	hlp=r*sin(hlp);
	hlp*=2;
//	cout<<t<<": ";
	if (t+hlp>=dis) return 1;
//	cout<<2<<endl;
	return 0;
}

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cin>>n>>r>>v;
	cout<<setprecision(15);
	for (int i=0;i<n;i++) {
		ld s,f;
		cin>>s>>f;
		dis=f-s;
//		cout<<dis<<"::"<<endl;
		ld yla=dis;
		ld ala=dis-2*r;
		for (int j=0;j<60;j++) {
			ld mid=(ala+yla)/2;
			if (check(mid)) yla=mid;
			else ala=mid;
		}
		cout<<ala/v<<"\n";
	}
}


#include <iostream>
#include <cmath>
#include <iomanip>

#define ld long double
const ld PI=asin(1)*2;

using namespace std;

int n;
ld r,v;
ld dis;

int check(ld t) {
	if (t<=0) return 0;
	ld tmp=floor(t/(PI*r));
	tmp*=PI*r;
	ld hlp=t-tmp;
	hlp/=2*r;
	hlp=r*sin(hlp);
	hlp*=2;
//	cout<<t<<": ";
	if (t+hlp>=dis) return 1;
//	cout<<2<<endl;
	return 0;
}

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cin>>n>>r>>v;
	cout<<setprecision(15);
	for (int i=0;i<n;i++) {
		ld s,f;
		cin>>s>>f;
		dis=f-s;
//		cout<<dis<<"::"<<endl;
		ld yla=dis;
		ld ala=dis-2*r;
		for (int j=0;j<60;j++) {
			ld mid=(ala+yla)/2;
			if (check(mid)) yla=mid;
			else ala=mid;
		}
		cout<<ala/v<<"\n";
	}
}


#include <iostream>
#include <cmath>
#include <iomanip>

#define ld long double
const ld PI=3.14159265359;

using namespace std;

int n;
ld r,v;
ld dis;

int check(ld t) {
	if (t<=0) return 0;
	ld tmp=floor(t/(PI*r));
	tmp*=PI*r;
	ld hlp=t-tmp;
	hlp/=2*r;
	hlp=r*sin(hlp);
	hlp*=2;
//	cout<<t<<": ";
	if (t+hlp>=dis) return 1;
//	cout<<2<<endl;
	return 0;
}

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cin>>n>>r>>v;
	cout<<setprecision(15);
	for (int i=0;i<n;i++) {
		ld s,f;
		cin>>s>>f;
		dis=f-s;
//		cout<<dis<<"::"<<endl;
		ld yla=dis;
		ld ala=dis-2*r;
		for (int j=0;j<100;j++) {
			ld mid=(ala+yla)/2;
			if (check(mid)) yla=mid;
			else ala=mid;
		}
		cout<<ala/v<<"\n";
	}
}


#include <iostream>
#include <cmath>
#include <iomanip>

#define ld float
const ld PI=3.14159265359;

using namespace std;

int n;
ld r,v;
ld dis;

int check(ld t) {
	if (t<=0) return 0;
	ld tmp=floor(t/(2*PI*r));
	tmp*=2*PI*r;
	ld hlp=t-tmp;
	hlp/=2*r;
	hlp=r*sin(hlp);
	hlp*=2;
//	cout<<t<<": ";
	if (t+hlp>=dis) return 1;
//	cout<<2<<endl;
	return 0;
}

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cin>>n>>r>>v;
	cout<<setprecision(15);
	for (int i=0;i<n;i++) {
		ld s,f;
		cin>>s>>f;
		dis=f-s;
//		cout<<dis<<"::"<<endl;
		ld yla=dis;
		ld ala=dis-2*r;
		for (int j=0;j<50;j++) {
			ld mid=(ala+yla)/2;
			if (check(mid)) yla=mid;
			else ala=mid;
		}
		cout<<ala/v<<"\n";
	}
}


#include <iostream>
#include <cmath>
#include <iomanip>

#define ld long double
const ld PI=3.14159265359;

using namespace std;

int n;
ld r,v;
ld dis;

int check(ld t) {
	if (t<=0) return 0;
	ld tmp=floor(t/(2*PI*r));
	tmp*=2*PI*r;
	ld hlp=t-tmp;
	hlp/=2*r;
	hlp=r*sin(hlp);
	hlp*=2;
//	cout<<t<<": ";
	if (t+hlp>=dis) return 1;
//	cout<<2<<endl;
	return 0;
}

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cin>>n>>r>>v;
	cout<<setprecision(15);
	for (int i=0;i<n;i++) {
		ld s,f;
		cin>>s>>f;
		dis=f-s;
//		cout<<dis<<"::"<<endl;
		ld yla=dis;
		ld ala=dis-2*r;
		for (int j=0;j<50;j++) {
			ld mid=(ala+yla)/2;
			if (check(mid)) yla=mid;
			else ala=mid;
		}
		cout<<ala/v<<"\n";
	}
}


#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
using namespace std;
int N,r,v,x,y;

long double abss(long double x) {
    if(x < 0) return -x;
    return x;
}

int main() {
	#ifndef ONLINE_JUDGE
	freopen("input.in","r",stdin);
	#endif
    long double eps = 1e-12;
    scanf("%d%d%d",&N,&r,&v);
    for(int i=1;i<=N;++i) {
        scanf("%d%d",&x,&y);
        long double z = 1.0*(y-x)/r;
        long double st = 0.0, dr = z, ret = z;
        while(dr - st >= eps) {
            long double mij = (st+dr)/2;
            long double a = abss(2*sin(mij/2));
            if(a >= z - mij) {
                ret = mij;
                dr = mij-eps;
            } else {
                st = mij+eps;
            }
        }
        double meh = r*ret/v;
        printf("%.12lf\n",meh);
    }
    return 0;
}


#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
using namespace std;
int N,r,v,x,y;

long double abss(long double x) {
    if(x < 0) return -x;
    return x;
}

int main() {
	#ifndef ONLINE_JUDGE
	freopen("input.in","r",stdin);
	#endif
    long double eps = 1e-12;
    scanf("%d%d%d",&N,&r,&v);
    for(int i=1;i<=N;++i) {
        scanf("%d%d",&x,&y);
        long double z = 1.0*(y-x)/r;
        long double st = 0.0, dr = z, ret = z;
        while(dr - st >= eps) {
            long double mij = (st+dr)/2;
            long double a = abss(2*sin(mij/2));
            if(a >= z - mij) {
                ret = mij;
                dr = mij;
            } else {
                st = mij;
            }
        }
        double meh = r*ret/v;
        printf("%.12lf\n",meh);
    }
    return 0;
}


#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
using namespace std;
int N,r,v,x,y;

long double abss(long double x) {
    if(x < 0) return -x;
    return x;
}

int main() {
    #ifndef ONLINE_JUDGE
    freopen("input.in","r",stdin);
    #endif
    long double eps = 1e-12;
    scanf("%d%d%d",&N,&r,&v);
    for(int i=1;i<=N;++i) {
        scanf("%d%d",&x,&y);
        long double z = 1.0*(y-x)/r;
        long double st = 0.0, dr = z, ret = z;
        while(dr - st >= eps) {
            long double mij = (st+dr)/2;
            long double a = abss(2*sin(mij/2));
            if(a >= z - mij) {
                ret = mij;
                dr = mij;
            } else {
                st = mij;
            }
        }
        double meh = ret/v;
        printf("%.12lf\n",meh);
    }
    return 0;
}


#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
using namespace std;
int N,r,v,x,y;

long double abss(long double x) {
    if(x < 0) return -x;
    return x;
}

int main() {
	#ifndef ONLINE_JUDGE
	freopen("input.in","r",stdin);
	#endif
    long double eps = 1e-10;
    scanf("%d%d%d",&N,&r,&v);
    for(int i=1;i<=N;++i) {
        scanf("%d%d",&x,&y);
        long double z = 1.0*(y-x)/r;
        long double st = 0.0, dr = z, ret = z;
        while(dr - st >= eps) {
            long double mij = (st+dr)/2;
            long double a = abss(2*sin(mij/2));
            if(a >= z - mij) {
                ret = mij;
                dr = mij-eps/10;
            } else {
                st = mij+eps/10;
            }
        }
        double meh = r*ret/v;
        printf("%.12lf\n",meh);
    }
    return 0;
}


#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
using namespace std;
int N,r,v,x,y;

long double abss(long double x) {
    if(x < 0) return -x;
    return x;
}

int main() {
	#ifndef ONLINE_JUDGE
	freopen("input.in","r",stdin);
	#endif
    long double eps = 1e-12;
    scanf("%d%d%d",&N,&r,&v);
    for(int i=1;i<=N;++i) {
        scanf("%d%d",&x,&y);
        long double z = 1.0*(y-x)/r;
        long double st = 0.0, dr = z, ret = z;
        while(dr - st >= eps) {
            long double mij = (st+dr)/2;
            long double a = abss(2*sin(mij/2));
            if(a >= z - mij) {
                ret = mij;
                dr = mij;
            } else {
                st = mij;
            }
        }
        printf("%.12Lf\n",ret/v);
    }
    return 0;
}


// #define DEBUG
//#define USEPB_DS
#define USETR1
#define CPPELEVEN
#define GPP

/*
 * temp.cpp
 *
 *  Created on: 2012-7-18
 *      Author: BSBandme
 */
//#pragma comment(linker, "/STACK:1024000000,1024000000")

#include <iostream>
#include <fstream>
#include <string.h>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <cassert>
#include <list>
#include <iomanip>
#include <math.h>
#include <deque>
#include <utility>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <climits>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <functional>
#include <sstream>

using namespace std;

#ifndef CPPELEVEN
#ifdef USETR1
#include <tr1/unordered_map>
#include <tr1/unordered_set>
using namespace tr1;
#endif
#else
#include <unordered_map>
#include <unordered_set>
#endif

#ifdef USEPB_DS
#include <ext/pb_ds/priority_queue.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
// binomial_heap_tag, rc_binomial_heap_tag, thin_heap_tag, binary_heap_tag
typedef __gnu_pbds::priority_queue<int, greater<int>, pairing_heap_tag> pq_type;
// splay_tree_tag, ov_tree_tag
typedef tree <int, null_type, less <int>, rb_tree_tag, tree_order_statistics_node_update> tree_type;
#endif

#define mpr make_pair
typedef unsigned int ui;
typedef unsigned long long ull;
typedef long long ll;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <double, double> pdd;
typedef vector <int> vi;
typedef vector <ll> vll;
typedef vector <double> vd;
typedef vector <string> vs;
typedef map <string, int> mpsi;
typedef map <double, int> mpdi;
typedef map <int, int> mpii;

const double pi = acos(0.0) * 2.0;
const long double eps = 1e-10;
const int step[8][2] = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}, {-1, 1}, {1, 1}, {1, -1}, {-1, -1}};

template <class T> inline T abs1(T a) {return a < 0 ? -a : a;}

#ifndef CPPELEVEN
template <class T> inline T max1(T a, T b) { return b < a ? a : b; }
template <class T> inline T max1(T a, T b, T c) { return max1(max1(a, b), c); }
template <class T> inline T max1(T a, T b, T c, T d) { return max1(max1(a, b, c), d); }
template <class T> inline T max1(T a, T b, T c, T d, T e) { return max1(max1(a, b, c, d), e); }
template <class T> inline T min1(T a, T b) { return a < b ? a : b; }
template <class T> inline T min1(T a, T b, T c) { return min1(min1(a, b), c); }
template <class T> inline T min1(T a, T b, T c, T d) { return min1(min1(a, b, c), d); }
template <class T> inline T min1(T a, T b, T c, T d, T e) { return min1(min1(a, b, c, d), e); }
#else
template <typename t, typename t1>
t min1(t a, t1 b) { return a < b ? a : b; }
template <typename t, typename... arg>
t min1(t a, arg... arr) { return min1(a, min1(arr...)); }
template <typename t, typename t1>
t max1(t a, t1 b) { return a > b ? a : b; }
template <typename t, typename... arg>
t max1(t a, arg... arr) { return max1(a, max1(arr...)); }
#endif

inline int jud(double a, double b){
	if(abs(a) < eps && abs(b) < eps) return 0;
	else if(abs1(a - b) / abs1(a) < eps) return 0;
	if(a < b) return -1;
	return 1;
}
template <typename t> inline int jud(t a, t b){
	if(a < b) return -1;
	if(a == b) return 0;
	return 1;
}

// f_lb == 1代表返回相同的一串的左边界，f_small == 1代表返回如果没有寻找的值返回小的数
template <typename it, typename t1>
inline int find(t1 val, it a, int na, bool f_small = 1, bool f_lb = 1){
	if(na == 0) return 0;
	int be = 0, en = na - 1;
	if(*a <= *(a + na - 1)){
		if(f_lb == 0) while(be < en){
			int mid = (be + en + 1) / 2;
			if(jud(*(a + mid), val) != 1) be = mid;
			else en = mid - 1;
		}else while(be < en){
			int mid = (be + en) / 2;
			if(jud(*(a + mid), val) != -1) en = mid;
			else be = mid + 1;
		}
		if(f_small && jud(*(a + be), val) == 1) be--;
		if(!f_small && jud(*(a + be), val) == -1) be++;
	} else {
		if(f_lb) while(be < en){
			int mid = (be + en + 1) / 2;
			if(jud(*(a + mid), val) != -1) be = mid;
			else en = mid - 1;
		}else while(be < en){
			int mid = (be + en) / 2;
			if(jud(*(a + mid), val) != 1) en = mid;
			else be = mid + 1;
		}
		if(!f_small && jud(*(a + be), val) == -1) be--;
		if(f_small && jud(*(a + be), val) == 1) be++;
	}
	return be;
}

template <class T> inline T lowb(T num) {return num & (-num); }
#ifdef GPP
inline int bitnum(ui nValue) { return __builtin_popcount(nValue); }
inline int bitnum(int nValue) { return __builtin_popcount(nValue); }
inline int bitnum(ull nValue) { return __builtin_popcount(nValue) + __builtin_popcount(nValue >> 32); }
inline int bitnum(ll nValue) { return __builtin_popcount(nValue) + __builtin_popcount(nValue >> 32); }
inline int bitmaxl(ui a) { if(a == 0) return 0; return 32 - __builtin_clz(a); }
inline int bitmaxl(int a) { if(a == 0) return 0; return 32 - __builtin_clz(a); }
inline int bitmaxl(ull a) { int temp = a >> 32; if(temp) return 32 - __builtin_clz(temp) + 32; return bitmaxl(int(a)); }
inline int bitmaxl(ll a) { int temp = a >> 32; if(temp) return 32 - __builtin_clz(temp) + 32; return bitmaxl(int(a)); }
#else
#endif

long long pow(long long n, long long m, long long mod = 0){
	if(m < 0) return 0;
	long long ans = 1;
	long long k = n;
	while(m){
		if(m & 1) {
			ans *= k;
			if(mod) ans %= mod;
		}
		k *= k;
		if(mod) k %= mod;
		m >>= 1;
	}
	return ans;
}

#define  MOD 1000000007
template <class t1, class t2>
inline void add(t1 &a, t2 b, int mod = -1) {
	if(mod == -1) mod = MOD;
	a += b;
	while(a >= mod) a -= mod;
	while(a < 0) a += mod;
}
template <class t>
void output1(t arr) {
	for(int i = 0; i < (int)arr.size(); i++)
		cerr << arr[i] << ' ';
	cerr << endl;
}
template <class t>
void output2(t arr) {
	for(int i = 0; i < (int)arr.size(); i++)
		output1(arr[i]);
}

//....................密..........封..........线..........下..........禁..........止..........hack...............................................

int ncase, r, v;
double st, en;

double getang(double ratio) {
	double be = pi, en = pi * 2;
	while(fabs(be - en) > 1e-15) {
		double mid = (be + en) / 2;
		double rr = (mid + sin(mid - pi)) / pi / 2;
		if(rr > ratio) en = mid;
		else be = mid;
	}
	return be;
}

int main() {

//............................不要再忘了检查maxn大小了！！！！BSBandme你个SB！！！！...................................................

	ios_base::sync_with_stdio(0);
	#ifdef DEBUG //......................................................................................................
	freopen("input.txt", "r", stdin);
	int __size__ = 256 << 20; // 256MB
	char *__p__ = (char*)malloc(__size__) + __size__;
	__asm__("movl %0, %%esp\n" :: "r"(__p__));
	#endif //...........................................................................................................

	cin >> ncase >> r >> v;
	for(int i = 0; i < ncase; i++) {
		cin >> st >> en;
		en -= st;
		double delta = en - floor(en / 2 / pi / r) * 2 * pi * r;
		delta /= 2;
		if(delta < pi * r)
			delta += pi * r;
		double ang = getang(delta / r / pi / 2);
		printf("%.10f\n", (en - r * sin(ang - pi) * 2) / v);
	}

    return 0;
}


// #define DEBUG
//#define USEPB_DS
#define USETR1
#define CPPELEVEN
#define GPP

/*
 * temp.cpp
 *
 *  Created on: 2012-7-18
 *      Author: BSBandme
 */
//#pragma comment(linker, "/STACK:1024000000,1024000000")

#include <iostream>
#include <fstream>
#include <string.h>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <cassert>
#include <list>
#include <iomanip>
#include <math.h>
#include <deque>
#include <utility>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <climits>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <functional>
#include <sstream>

using namespace std;

#ifndef CPPELEVEN
#ifdef USETR1
#include <tr1/unordered_map>
#include <tr1/unordered_set>
using namespace tr1;
#endif
#else
#include <unordered_map>
#include <unordered_set>
#endif

#ifdef USEPB_DS
#include <ext/pb_ds/priority_queue.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
// binomial_heap_tag, rc_binomial_heap_tag, thin_heap_tag, binary_heap_tag
typedef __gnu_pbds::priority_queue<int, greater<int>, pairing_heap_tag> pq_type;
// splay_tree_tag, ov_tree_tag
typedef tree <int, null_type, less <int>, rb_tree_tag, tree_order_statistics_node_update> tree_type;
#endif

#define mpr make_pair
typedef unsigned int ui;
typedef unsigned long long ull;
typedef long long ll;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <double, double> pdd;
typedef vector <int> vi;
typedef vector <ll> vll;
typedef vector <double> vd;
typedef vector <string> vs;
typedef map <string, int> mpsi;
typedef map <double, int> mpdi;
typedef map <int, int> mpii;

const double pi = acos(0.0) * 2.0;
const long double eps = 1e-10;
const int step[8][2] = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}, {-1, 1}, {1, 1}, {1, -1}, {-1, -1}};

template <class T> inline T abs1(T a) {return a < 0 ? -a : a;}

#ifndef CPPELEVEN
template <class T> inline T max1(T a, T b) { return b < a ? a : b; }
template <class T> inline T max1(T a, T b, T c) { return max1(max1(a, b), c); }
template <class T> inline T max1(T a, T b, T c, T d) { return max1(max1(a, b, c), d); }
template <class T> inline T max1(T a, T b, T c, T d, T e) { return max1(max1(a, b, c, d), e); }
template <class T> inline T min1(T a, T b) { return a < b ? a : b; }
template <class T> inline T min1(T a, T b, T c) { return min1(min1(a, b), c); }
template <class T> inline T min1(T a, T b, T c, T d) { return min1(min1(a, b, c), d); }
template <class T> inline T min1(T a, T b, T c, T d, T e) { return min1(min1(a, b, c, d), e); }
#else
template <typename t, typename t1>
t min1(t a, t1 b) { return a < b ? a : b; }
template <typename t, typename... arg>
t min1(t a, arg... arr) { return min1(a, min1(arr...)); }
template <typename t, typename t1>
t max1(t a, t1 b) { return a > b ? a : b; }
template <typename t, typename... arg>
t max1(t a, arg... arr) { return max1(a, max1(arr...)); }
#endif

inline int jud(double a, double b){
	if(abs(a) < eps && abs(b) < eps) return 0;
	else if(abs1(a - b) / abs1(a) < eps) return 0;
	if(a < b) return -1;
	return 1;
}
template <typename t> inline int jud(t a, t b){
	if(a < b) return -1;
	if(a == b) return 0;
	return 1;
}

// f_lb == 1代表返回相同的一串的左边界，f_small == 1代表返回如果没有寻找的值返回小的数
template <typename it, typename t1>
inline int find(t1 val, it a, int na, bool f_small = 1, bool f_lb = 1){
	if(na == 0) return 0;
	int be = 0, en = na - 1;
	if(*a <= *(a + na - 1)){
		if(f_lb == 0) while(be < en){
			int mid = (be + en + 1) / 2;
			if(jud(*(a + mid), val) != 1) be = mid;
			else en = mid - 1;
		}else while(be < en){
			int mid = (be + en) / 2;
			if(jud(*(a + mid), val) != -1) en = mid;
			else be = mid + 1;
		}
		if(f_small && jud(*(a + be), val) == 1) be--;
		if(!f_small && jud(*(a + be), val) == -1) be++;
	} else {
		if(f_lb) while(be < en){
			int mid = (be + en + 1) / 2;
			if(jud(*(a + mid), val) != -1) be = mid;
			else en = mid - 1;
		}else while(be < en){
			int mid = (be + en) / 2;
			if(jud(*(a + mid), val) != 1) en = mid;
			else be = mid + 1;
		}
		if(!f_small && jud(*(a + be), val) == -1) be--;
		if(f_small && jud(*(a + be), val) == 1) be++;
	}
	return be;
}

template <class T> inline T lowb(T num) {return num & (-num); }
#ifdef GPP
inline int bitnum(ui nValue) { return __builtin_popcount(nValue); }
inline int bitnum(int nValue) { return __builtin_popcount(nValue); }
inline int bitnum(ull nValue) { return __builtin_popcount(nValue) + __builtin_popcount(nValue >> 32); }
inline int bitnum(ll nValue) { return __builtin_popcount(nValue) + __builtin_popcount(nValue >> 32); }
inline int bitmaxl(ui a) { if(a == 0) return 0; return 32 - __builtin_clz(a); }
inline int bitmaxl(int a) { if(a == 0) return 0; return 32 - __builtin_clz(a); }
inline int bitmaxl(ull a) { int temp = a >> 32; if(temp) return 32 - __builtin_clz(temp) + 32; return bitmaxl(int(a)); }
inline int bitmaxl(ll a) { int temp = a >> 32; if(temp) return 32 - __builtin_clz(temp) + 32; return bitmaxl(int(a)); }
#else
#endif

long long pow(long long n, long long m, long long mod = 0){
	if(m < 0) return 0;
	long long ans = 1;
	long long k = n;
	while(m){
		if(m & 1) {
			ans *= k;
			if(mod) ans %= mod;
		}
		k *= k;
		if(mod) k %= mod;
		m >>= 1;
	}
	return ans;
}

#define  MOD 1000000007
template <class t1, class t2>
inline void add(t1 &a, t2 b, int mod = -1) {
	if(mod == -1) mod = MOD;
	a += b;
	while(a >= mod) a -= mod;
	while(a < 0) a += mod;
}
template <class t>
void output1(t arr) {
	for(int i = 0; i < (int)arr.size(); i++)
		cerr << arr[i] << ' ';
	cerr << endl;
}
template <class t>
void output2(t arr) {
	for(int i = 0; i < (int)arr.size(); i++)
		output1(arr[i]);
}

//....................密..........封..........线..........下..........禁..........止..........hack...............................................

int ncase, r, v;
double st, en;

double getang(double ratio) {
	double be = pi, en = pi * 2;
	while(fabs(be - en) > eps) {
		double mid = (be + en) / 2;
		double rr = (mid + sin(mid - pi)) / pi / 2;
		if(rr > ratio) en = mid;
		else be = mid;
	}
	return be;
}

int main() {

//............................不要再忘了检查maxn大小了！！！！BSBandme你个SB！！！！...................................................

	ios_base::sync_with_stdio(0);
	#ifdef DEBUG //......................................................................................................
	freopen("input.txt", "r", stdin);
	int __size__ = 256 << 20; // 256MB
	char *__p__ = (char*)malloc(__size__) + __size__;
	__asm__("movl %0, %%esp\n" :: "r"(__p__));
	#endif //...........................................................................................................

	cin >> ncase >> r >> v;
	for(int i = 0; i < ncase; i++) {
		cin >> st >> en;
		en -= st;
		double delta = en - floor(en / 2 / pi / r) * 2 * pi * r;
		delta /= 2;
		if(delta < pi * r)
			delta += pi * r;
		double ang = getang(delta / r / pi / 2);
		printf("%.10f\n", (en - r * sin(ang - pi) * 2) / v);
	}

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const ld PI = (ld)3.1415926535897932, dwa = 2.0;

int tab[200005];

ld dist(double r, double lo)
{

    ld cC;
    ld cU = modf( lo, & cC);
    cC = lo*dwa * PI * r;
    //if (cU <= 0.5)
    //{
        cU *= PI;
        cU = sin(cU)*r*dwa;
        //cout << "A" << cU << endl;
/*  }
    else
    {
        cU *= 2*PI;
        cU = sin(cU);
        cU = abs(cU);
        cU *= r*dwa
    }*/
    return cU + cC;
}

int main()
{
    ll n, rr, vv;
    cin>>n>>rr>>vv;
    double r = rr, v = vv;
    double pocz, kon;
    cout<<setprecision(30)<<fixed;
//  cout<<dist(r, 0.74)<<" " << dwa*PI*r/v<<endl;
    while(n--)
    {
        double a, b;
        cin>>a>>b;
        b-=a;
        double p = 0, k = 200000000, s;//s - liczba obrotow
        for(int i=0; i<70; i++)
        {
            s = (p+k)/(ld)dwa;
            double pom = dist(r, s);
            if (pom > b)
                k = s;
            else
            {
        //      cout << s << " " << dist(r, s)<<endl;
                p = s;
            }
        }
        cout << dwa*PI*r*p/v << "\n";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const ld PI = (ld)3.1415926535897932, dwa = 2.0;

int tab[200005];

ld dist(double r, double lo)
{

    ld cC;
    ld cU = modf( lo, & cC);
    cC = lo*dwa * PI * r;
    //if (cU <= 0.5)
    //{
        cU *= PI;
        cU = sin(cU)*r*dwa;
        //cout << "A" << cU << endl;
/*  }
    else
    {
        cU *= 2*PI;
        cU = sin(cU);
        cU = abs(cU);
        cU *= r*dwa
    }*/
    return cU + cC;
}

int main()
{
    ll n, rr, vv;
    cin>>n>>rr>>vv;
    double r = rr, v = vv;
    double pocz, kon;
    cout<<setprecision(30)<<fixed;
//  cout<<dist(r, 0.74)<<" " << dwa*PI*r/v<<endl;
    while(n--)
    {
        double a, b;
        cin>>a>>b;
        b-=a;
        double p = 0, k = 200000000, s;//s - liczba obrotow
        for(int i=0; i<50; i++)
        {
            s = (p+k)/(ld)dwa;
            double pom = dist(r, s);
            if (pom > b)
                k = s;
            else
            {
        //      cout << s << " " << dist(r, s)<<endl;
                p = s;
            }
        }
        cout << dwa*PI*r*p/v << "\n";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef double ld;

const ld PI = (ld)3.1415926535897932, dwa = 2.0;

int tab[200005];

ld dist(double r, double lo)
{

    ld cC, pom = dwa*r;
    ld cU = modf( lo, & cC);
    cC = lo*pom* PI;
    //if (cU <= 0.5)
    //{
        cU *= PI;
        cU = sin(cU)*pom;
        //cout << "A" << cU << endl;
/*  }
    else
    {
        cU *= 2*PI;
        cU = sin(cU);
        cU = abs(cU);
        cU *= r*dwa
    }*/
    return cU + cC;
}

int main()
{
//    ios_base::sync_with_stdio(0);
    ll n, rr, vv;
  scanf("%lld%lld%lld", &n, &rr, &vv);
  //  cin>>n>>rr>>vv;
    double r = rr, v = vv;
    double pocz, kon;
   // cout<<setprecision(7)<<fixed;
//  cout<<dist(r, 0.74)<<" " << dwa*PI*r/v<<endl;
    while(n--)
    {
        double a, b;
     scanf("%lf%lf", &a, &b);
     //   cin>>a>>b;
        b-=a;
        double p = 0, k = 200000000, s;//s - liczba obrotow
        for(int i=0; i<80; i++)
        {
            s = (p+k)/(ld)dwa;
            double pom = dist(r, s);
            if (pom > b)
                k = s;
            else
            {
        //      cout << s << " " << dist(r, s)<<endl;
                p = s;
            }
        }
        printf("%.10lf\n", dwa*PI*r*p/v);
        //cout << dwa*PI*r*p/v << "\n";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const ld PI = (ld)3.1415926535897932, dwa = 2.0;

int tab[200005];

ld dist(double r, double lo)
{

    ld cC;
    ld cU = modf( lo, & cC);
    cC = lo*dwa * PI * r;
    //if (cU <= 0.5)
    //{
        cU *= PI;
        cU = sin(cU)*r*dwa;
        //cout << "A" << cU << endl;
/*  }
    else
    {
        cU *= 2*PI;
        cU = sin(cU);
        cU = abs(cU);
        cU *= r*dwa
    }*/
    return cU + cC;
}

int main()
{
    ll n, rr, vv;
    cin>>n>>rr>>vv;
    double r = rr, v = vv;
    double pocz, kon;
    cout<<setprecision(30)<<fixed;
//  cout<<dist(r, 0.74)<<" " << dwa*PI*r/v<<endl;
    while(n--)
    {
        double a, b;
        cin>>a>>b;
        b-=a;
        double p = 0, k = 200000000, s;//s - liczba obrotow
        for(int i=0; i<75; i++)
        {
            s = (p+k)/(ld)dwa;
            double pom = dist(r, s);
            if (pom > b)
                k = s;
            else
            {
        //      cout << s << " " << dist(r, s)<<endl;
                p = s;
            }
        }
        cout << dwa*PI*r*p/v << "\n";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const ld PI = (ld)3.1415926535897932, dwa = 2.0;

int tab[200005];

ld dist(double r, double lo)
{

    ld cC, pom = dwa*r;
    ld cU = modf( lo, & cC);
    cC = lo*pom* PI;
    //if (cU <= 0.5)
    //{
        cU *= PI;
        cU = sin(cU)*pom;
        //cout << "A" << cU << endl;
/*  }
    else
    {
        cU *= 2*PI;
        cU = sin(cU);
        cU = abs(cU);
        cU *= r*dwa
    }*/
    return cU + cC;
}

int main()
{
//    ios_base::sync_with_stdio(0);
    ll n, rr, vv;
  scanf("%lld%lld%lld", &n, &rr, &vv);
  //  cin>>n>>rr>>vv;
    double r = rr, v = vv;
    double pocz, kon;
   // cout<<setprecision(7)<<fixed;
//  cout<<dist(r, 0.74)<<" " << dwa*PI*r/v<<endl;
    while(n--)
    {
        double a, b;
     scanf("%lf%lf", &a, &b);
     //   cin>>a>>b;
        b-=a;
        double p = 0, k = 200000000, s;//s - liczba obrotow
        for(int i=0; i<80; i++)
        {
            s = (p+k)/(ld)dwa;
            double pom = dist(r, s);
            if (pom > b)
                k = s;
            else
            {
        //      cout << s << " " << dist(r, s)<<endl;
                p = s;
            }
        }
        printf("%.10Lf\n", dwa*PI*r*p/v);
        //cout << dwa*PI*r*p/v << "\n";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long lll;
typedef long double ld;

const ld PI = (ld)3.1415926535897932, dwa = 2.0;

int tab[200005];

ld dist(double r, double lo)
{

    ld cC, pom = dwa*r;
    ld cU = modf( lo, & cC);
    cC = lo*pom* PI;
    //if (cU <= 0.5)
    //{
        cU *= PI;
        cU = sin(cU)*pom;
        //cout << "A" << cU << endl;
/*  }
    else
    {
        cU *= 2*PI;
        cU = sin(cU);
        cU = abs(cU);
        cU *= r*dwa
    }*/
    return cU + cC;
}

int main()
{
   // ios_base::sync_with_stdio(0);
    lll n, rr, vv;
   scanf("%lld%lld%lld", &n, &rr, &vv);
   // cin>>n>>rr>>vv;
    long double r = rr, v = vv;
    long double pocz, kon;
 //   cout<<setprecision(10)<<fixed;
//  cout<<dist(r, 0.74)<<" " << dwa*PI*r/v<<endl;
    while(n--)
    {
        long double a, b;
        scanf("%Lf%Lf", &a, &b);
   //     cin>>a>>b;
        b-=a;
        double p = 0, k = 200000000, s;//s - liczba obrotow
        for(int i=0; i<80; i++)
        {
            s = (p+k)/(ld)dwa;
            double pom = dist(r, s);
            if (pom > b)
                k = s;
            else
            {
        //      cout << s << " " << dist(r, s)<<endl;
                p = s;
            }
        }
        printf("%.9Lf\n", dwa*PI*r*p/v);
      //  cout << dwa*PI*r*p/v << "\n";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const ld PI = (ld)3.1415926535897932, dwa = 2.0;

int tab[200005];

ld dist(double r, double lo)
{

    ld cC;
    ld cU = modf( lo, & cC);
    cC = lo*dwa * PI * r;
    //if (cU <= 0.5)
    //{
        cU *= PI;
        cU = sin(cU)*r*dwa;
        //cout << "A" << cU << endl;
/*  }
    else
    {
        cU *= 2*PI;
        cU = sin(cU);
        cU = abs(cU);
        cU *= r*dwa
    }*/
    return cU + cC;
}

int main()
{
    ll n, rr, vv;
    cin>>n>>rr>>vv;
    double r = rr, v = vv;
    double pocz, kon;
    cout<<setprecision(20)<<fixed;
//  cout<<dist(r, 0.74)<<" " << dwa*PI*r/v<<endl;
    while(n--)
    {
        double a, b;
        cin>>a>>b;
        b-=a;
        double p = 0, k = 200000000, s;//s - liczba obrotow
        for(int i=0; i<80; i++)
        {
            s = (p+k)/(ld)dwa;
            double pom = dist(r, s);
            if (pom > b)
                k = s;
            else
            {
        //      cout << s << " " << dist(r, s)<<endl;
                p = s;
            }
        }
        cout << dwa*PI*r*p/v << "\n";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const ld PI = (ld)3.1415926535897932, dwa = 2.0;

int tab[200005];

ld dist(double r, double lo)
{

    ld cC;
    ld cU = modf( lo, & cC);
    cC = lo*dwa * PI * r;
    //if (cU <= 0.5)
    //{
        cU *= PI;
        cU = sin(cU)*r*dwa;
        //cout << "A" << cU << endl;
/*  }
    else
    {
        cU *= 2*PI;
        cU = sin(cU);
        cU = abs(cU);
        cU *= r*dwa
    }*/
    return cU + cC;
}

int main()
{
    ll n, rr, vv;
    cin>>n>>rr>>vv;
    double r = rr, v = vv;
    double pocz, kon;
    cout<<setprecision(30)<<fixed;
//  cout<<dist(r, 0.74)<<" " << dwa*PI*r/v<<endl;
    while(n--)
    {
        double a, b;
        cin>>a>>b;
        b-=a;
        double p = 0, k = 200000000, s;//s - liczba obrotow
        for(int i=0; i<100; i++)
        {
            s = (p+k)/(ld)dwa;
            double pom = dist(r, s);
            if (pom > b)
                k = s;
            else
            {
        //      cout << s << " " << dist(r, s)<<endl;
                p = s;
            }
        }
        cout << dwa*PI*r*p/v << "\n";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef double ld;

const ld PI = (ld)3.1415926535897932, dwa = 2.0;

int tab[200005];

ld dist(double r, double lo)
{

    ld cC, pom = dwa*r;
    ld cU = modf( lo, & cC);
    cC = lo*pom* PI;
    //if (cU <= 0.5)
    //{
        cU *= PI;
        cU = sin(cU)*pom;
        //cout << "A" << cU << endl;
/*  }
    else
    {
        cU *= 2*PI;
        cU = sin(cU);
        cU = abs(cU);
        cU *= r*dwa
    }*/
    return cU + cC;
}

int main()
{
    ios_base::sync_with_stdio(0);
    ll n, rr, vv;
    cin>>n>>rr>>vv;
    double r = rr, v = vv;
    double pocz, kon;
    cout<<setprecision(10)<<fixed;
//  cout<<dist(r, 0.74)<<" " << dwa*PI*r/v<<endl;
    while(n--)
    {
        double a, b;
        cin>>a>>b;
        b-=a;
        double p = 0, k = 200000000, s;//s - liczba obrotow
        for(int i=0; i<80; i++)
        {
            s = (p+k)/(ld)dwa;
            double pom = dist(r, s);
            if (pom > b)
                k = s;
            else
            {
        //      cout << s << " " << dist(r, s)<<endl;
                p = s;
            }
        }
        cout << dwa*PI*r*p/v << "\n";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const ld PI = (ld)3.1415926535897932, dwa = 2.0;

int tab[200005];

ld dist(double r, double lo)
{

    ld cC;
    ld cU = modf( lo, & cC);
    cC = lo*dwa * PI * r;
    //if (cU <= 0.5)
    //{
        cU *= PI;
        cU = sin(cU)*r*dwa;
        //cout << "A" << cU << endl;
/*  }
    else
    {
        cU *= 2*PI;
        cU = sin(cU);
        cU = abs(cU);
        cU *= r*dwa
    }*/
    return cU + cC;
}

int main()
{
    ll n, rr, vv;
    cin>>n>>rr>>vv;
    double r = rr, v = vv;
    double pocz, kon;
    cout<<setprecision(30)<<fixed;
//  cout<<dist(r, 0.74)<<" " << dwa*PI*r/v<<endl;
    while(n--)
    {
        double a, b;
        cin>>a>>b;
        b-=a;
        double p = 0, k = 200000000, s;//s - liczba obrotow
        for(int i=0; i<60; i++)
        {
            s = (p+k)/(ld)dwa;
            double pom = dist(r, s);
            if (pom > b)
                k = s;
            else
            {
        //      cout << s << " " << dist(r, s)<<endl;
                p = s;
            }
        }
        cout << dwa*PI*r*p/v << "\n";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const ld PI = (ld)3.1415926535897932, dwa = 2.0;

int tab[200005];

ld dist(double r, double lo)
{

    ld cC;
    ld cU = modf( lo, & cC);
    cC = lo*dwa * PI * r;
    //if (cU <= 0.5)
    //{
        cU *= PI;
        cU = sin(cU)*r*dwa;
        //cout << "A" << cU << endl;
/*  }
    else
    {
        cU *= 2*PI;
        cU = sin(cU);
        cU = abs(cU);
        cU *= r*dwa
    }*/
    return cU + cC;
}

int main()
{
    ll n, rr, vv;
    cin>>n>>rr>>vv;
    double r = rr, v = vv;
    double pocz, kon;
    cout<<setprecision(30)<<fixed;
//  cout<<dist(r, 0.74)<<" " << dwa*PI*r/v<<endl;
    while(n--)
    {
        double a, b;
        cin>>a>>b;
        b-=a;
        double p = 0, k = 200000000, s;//s - liczba obrotow
        for(int i=0; i<80; i++)
        {
            s = (p+k)/(ld)dwa;
            double pom = dist(r, s);
            if (pom > b)
                k = s;
            else
            {
        //      cout << s << " " << dist(r, s)<<endl;
                p = s;
            }
        }
        cout << dwa*PI*r*p/v << "\n";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const ld PI = (ld)3.1415926535897932, dwa = 2.0;

int tab[200005];

ld dist(double r, double lo)
{

    ld cC, pom = dwa*r;
    ld cU = modf( lo, & cC);
    cC = lo*pom* PI;
    //if (cU <= 0.5)
    //{
        cU *= PI;
        cU = sin(cU)*pom;
        //cout << "A" << cU << endl;
/*  }
    else
    {
        cU *= 2*PI;
        cU = sin(cU);
        cU = abs(cU);
        cU *= r*dwa
    }*/
    return cU + cC;
}

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    ll n, rr, vv;
    cin>>n>>rr>>vv;
    double r = rr, v = vv;
    double pocz, kon;
    cout<<setprecision(7)<<fixed;
//  cout<<dist(r, 0.74)<<" " << dwa*PI*r/v<<endl;
    while(n--)
    {
        double a, b;
        cin>>a>>b;
        b-=a;
        double p = 0, k = 200000000, s;//s - liczba obrotow
        for(int i=0; i<80; i++)
        {
            s = (p+k)/(ld)dwa;
            double pom = dist(r, s);
            if (pom > b)
                k = s;
            else
            {
        //      cout << s << " " << dist(r, s)<<endl;
                p = s;
            }
        }
        cout << dwa*PI*r*p/v << "\n";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const ld PI = (ld)3.1415926535897932, dwa = 2.0;

int tab[200005];

ld dist(double r, double lo)
{

    ld cC, pom = dwa*r;
    ld cU = modf( lo, & cC);
    cC = lo*pom* PI;
    //if (cU <= 0.5)
    //{
        cU *= PI;
        cU = sin(cU)*pom;
        //cout << "A" << cU << endl;
/*  }
    else
    {
        cU *= 2*PI;
        cU = sin(cU);
        cU = abs(cU);
        cU *= r*dwa
    }*/
    return cU + cC;
}

int main()
{
    ios_base::sync_with_stdio(0);
    ll n, rr, vv;
    cin>>n>>rr>>vv;
    double r = rr, v = vv;
    double pocz, kon;
    cout<<setprecision(10)<<fixed;
//  cout<<dist(r, 0.74)<<" " << dwa*PI*r/v<<endl;
    while(n--)
    {
        double a, b;
        cin>>a>>b;
        b-=a;
        double p = 0, k = 200000000, s;//s - liczba obrotow
        for(int i=0; i<80; i++)
        {
            s = (p+k)/(ld)dwa;
            double pom = dist(r, s);
            if (pom > b)
                k = s;
            else
            {
        //      cout << s << " " << dist(r, s)<<endl;
                p = s;
            }
        }
        cout << dwa*PI*r*p/v << "\n";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const ld PI = (ld)3.1415926535897932, dwa = 2.0;

int tab[200005];

ld dist(double r, double lo)
{

    ld cC, pom = dwa*r;
    ld cU = modf( lo, & cC);
    cC = lo*pom* PI;
    //if (cU <= 0.5)
    //{
        cU *= PI;
        cU = sin(cU)*pom;
        //cout << "A" << cU << endl;
/*  }
    else
    {
        cU *= 2*PI;
        cU = sin(cU);
        cU = abs(cU);
        cU *= r*dwa
    }*/
    return cU + cC;
}

int main()
{
    ios_base::sync_with_stdio(0);
    ll n, rr, vv;
    cin>>n>>rr>>vv;
    double r = rr, v = vv;
    double pocz, kon;
    cout<<setprecision(7)<<fixed;
//  cout<<dist(r, 0.74)<<" " << dwa*PI*r/v<<endl;
    while(n--)
    {
        double a, b;
        cin>>a>>b;
        b-=a;
        double p = 0, k = 200000000, s;//s - liczba obrotow
        for(int i=0; i<80; i++)
        {
            s = (p+k)/(ld)dwa;
            double pom = dist(r, s);
            if (pom > b)
                k = s;
            else
            {
        //      cout << s << " " << dist(r, s)<<endl;
                p = s;
            }
        }
        cout << dwa*PI*r*p/v << "\n";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const ld PI = (ld)3.1415926535897932, dwa = 2.0;

int tab[200005];

ld dist(double r, double lo)
{

    ld cC;
    ld cU = modf( lo, & cC);
    cC = lo*dwa * PI * r;
    //if (cU <= 0.5)
    //{
        cU *= PI;
        cU = sin(cU)*r*dwa;
        //cout << "A" << cU << endl;
/*  }
    else
    {
        cU *= 2*PI;
        cU = sin(cU);
        cU = abs(cU);
        cU *= r*dwa
    }*/
    return cU + cC;
}

int main()
{
    ll n, rr, vv;
    cin>>n>>rr>>vv;
    double r = rr, v = vv;
    double pocz, kon;
    cout<<setprecision(10)<<fixed;
//  cout<<dist(r, 0.74)<<" " << dwa*PI*r/v<<endl;
    while(n--)
    {
        double a, b;
        cin>>a>>b;
        b-=a;
        double p = 0, k = 200000000, s;//s - liczba obrotow
        for(int i=0; i<80; i++)
        {
            s = (p+k)/(ld)dwa;
            double pom = dist(r, s);
            if (pom > b)
                k = s;
            else
            {
        //      cout << s << " " << dist(r, s)<<endl;
                p = s;
            }
        }
        cout << dwa*PI*r*p/v << "\n";
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cmath>

using namespace std;

int n, R, v;

int main()
{
    scanf("%d %d %d", &n, &R, &v);

    for (int ni = 0; ni < n; ni++)
    {
        int s, f;
        scanf("%d %d", &s, &f);

        double y = (f-s)/2.0/R;

        double l = 0, r = y+1;
        for (int i = 0; i < 50; i++)
        {
            double mid = (l+r)/2;

            if ( mid+abs(sin(mid) ) < y ) l = mid;
            else r = mid;
        }

        printf("%.9f\n", l*2*R/v);
    }
}


#include <iostream>
#include <cstdio>
#include <cmath>

using namespace std;

int n, R, v;

int main()
{
    scanf("%d %d %d", &n, &R, &v);

    for (int ni = 0; ni < n; ni++)
    {
        int s, f;
        scanf("%d %d", &s, &f);

        double y = (f-s)/2.0/R;

        double l = 0, r = y+1;
        for (int i = 0; i < 60; i++)
        {
            double mid = (l+r)/2;

            if ( mid+abs(sin(mid) ) < y ) l = mid;
            else r = mid;
        }

        printf("%.9f\n", l*2*R/v);
    }
}


#include <bits/stdc++.h>
using namespace std;

using ll = long long;
double r, v;
double eps = 1e-8;
const double mpi = acos(-1.0);

double dist(double theta, long long ni) {
	double res =  2.0 * r * (mpi * ni + sin(theta) + theta);
	return res;
}

double ti(double theta, long long ni) {
	double d = 2.0 * r * (mpi * ni + theta);
	double res = d / v;
	return res;
}

void solve() {
	double si, fi;
	cin >> si >> fi;
	double d = fi - si;
	double n = d / (2.0 * mpi * r);
	long long ni = n;
	double left = 0;
	double right = mpi;
	double dleft = dist(left, ni);
	double dright = dist(right, ni);
	double e = eps * v;
	while(dright-dleft>e) {
		double mid = (right + left) / 2.0;
		double dmid = dist(mid, ni);
		if(dmid>d) {
			right = mid;
			dright = dmid;
		} else {
			left = mid;
			dleft = dmid;
		}
	}
	double res = ti(right, ni);
	cout << res << '\n';
	return;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.precision(10);
	cout << fixed;
	int n;
	cin >> n >> r >> v;
	while(n--) {
		solve();
	}
	cout.flush();
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

using ll = long long;
long double r, v;
long double eps = 1e-7;
const long double mpi = acos(-1.0);

inline long double dist(long double theta) {
	return 2.0L * r * (sin(theta) + theta);
}

inline long double ti(long double theta, long long ni) {
	return 2.0L * r * (mpi * ni + theta) / v;
}

void solve() {
	int si, fi;
	scanf("%d%d", &si, &fi);
	long double d = fi - si;
	long long ni = d / (2.0L * mpi * r);
	long double left = 0;
	long double right = mpi;
	d = fi - si - 2.0L * r * mpi * ni;
	long double dleft = dist(left);
	long double dright = dist(right);
	long double e = eps * v;
	while(dright-dleft>e) {
		long double mid = (right + left) / 2.0L;
		long double dmid = dist(mid);
		if(dmid>d) {
			right = mid;
			dright = dmid;
		} else {
			left = mid;
			dleft = dmid;
		}
	}
	double res = ti(right, ni);
	printf("%.10f\n", res);
	return;
}

int main()
{
	int n, ri, vi;
	scanf("%d%d%d", &n, &ri, &vi);
	r = ri;
	v = vi;
	while(n--) {
		solve();
	}
	cout.flush();
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

using ll = long long;
long double r, v;
long double eps = 1e-8;
const long double mpi = acos(-1.0L);

long double dist(long double theta, long long ni) {
	long double res =  r * 2.0L * (
		1.0L * mpi * ni + sin(theta) + theta
	);
	return res;
}

long double ti(long double theta, long long ni) {
	long double d = r * 2.0L * (1.0L * mpi * ni + theta);
	long double res = d / v;
	return res;
}

void solve() {
	int si, fi;
	cin >> si >> fi;
	long double d = fi - si;
	long double n = d / (2.0L * mpi * r);
	long long ni = n;
	long double left = 0;
	long double right = mpi;
	long double dleft = dist(left, ni);
	long double dright = dist(right, ni);
	while(dright-dleft>eps) {
		long double mid = (right + left) / 2;
		long double dmid = dist(mid, ni);
		if(dmid>d) {
			right = mid;
			dright = dmid;
		} else {
			left = mid;
			dleft = dmid;
		}
	}
	long double res = ti(right, ni);
	cout << res << '\n';
	return;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.precision(10);
	cout << fixed;
	int n;
	cin >> n >> r >> v;
	while(n--) {
		solve();
	}
	cout.flush();
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

using ll = long long;
long double r, v;
long double eps = 1e-7;
const long double mpi = acos(-1.0);

inline long double dist(long double theta) {
	return 2.0L * r * (sin(theta) + theta);
}

inline long double ti(long double theta, long long ni) {
	return 2.0L * r * (mpi * ni + theta) / v;
}

void solve() {
	long double si, fi;
	cin >> si >> fi;
	long double d = fi - si;
	long long ni = d / (2.0L * mpi * r);
	long double left = 0;
	long double right = mpi;
	d = fi - si - 2.0L * r * mpi * ni;
	long double dleft = dist(left);
	long double dright = dist(right);
	long double e = eps * v;
	while(dright-dleft>e) {
		long double mid = (right + left) / 2.0L;
		long double dmid = dist(mid);
		if(dmid>d) {
			right = mid;
			dright = dmid;
		} else {
			left = mid;
			dleft = dmid;
		}
	}
	long double res = ti(right, ni);
	cout << res << '\n';
	return;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.precision(10);
	cout << fixed;
	int n;
	cin >> n >> r >> v;
	while(n--) {
		solve();
	}
	cout.flush();
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

using ll = long long;
long double r, v;
long double eps = 5e-7;
const long double mpi = acos(-1.0);

inline long double dist(long double theta) {
	return 2.0L * r * (sin(theta) + theta);
}

inline double ti(long double theta, long long ni) {
	return 2.0L * r * (mpi * ni + theta) / v;
}

void solve() {
	int si, fi;
	scanf("%d%d", &si, &fi);
	long double d = fi - si;
	long long ni = d / (2.0L * mpi * r);
	long double left = 0;
	long double right = mpi;
	d -= 2.0L * r * mpi * ni;
	long double dleft = dist(left);
	long double dright = dist(right);
	long double e = eps * v;
	while(dright-dleft>e) {
		long double mid = (right + left) / 2.0L;
		long double dmid = dist(mid);
		if(dmid>d) {
			right = mid;
			dright = dmid;
		} else {
			left = mid;
			dleft = dmid;
		}
	}
	double res = ti(right, ni);
	printf("%.10f\n", res);
	return;
}

int main()
{
	int n, ri, vi;
	scanf("%d%d%d", &n, &ri, &vi);
	r = ri;
	v = vi;
	while(n--) {
		solve();
	}
	cout.flush();
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

using ll = long long;
long double r, v;
long double eps = 1e-8;
const long double mpi = acos(-1.0L);

long double dist(long double theta, long long ni) {
	long double res =  r * 2.0L * (
		1.0L * mpi * ni + sin(theta) + theta
	);
	return res;
}

long double ti(long double theta, long long ni) {
	long double d = r * 2.0L * (1.0L * mpi * ni + theta);
	long double res = d / v;
	return res;
}

void solve() {
	long double si, fi;
	cin >> si >> fi;
	long double d = fi - si;
	long double n = d / (2.0L * mpi * r);

	long long ni = n;
	long double left = 0;
	long double right = mpi;
	long double dleft = dist(left, ni);
	long double dright = dist(right, ni);
	while(dright-dleft>eps) {
		long double mid = (right + left) / 2;
		long double dmid = dist(mid, ni);
		if(dmid>d) {
			right = mid;
			dright = dmid;
		} else {
			left = mid;
			dleft = dmid;
		}
	}
	long double res = ti(right, ni);
	cout << res << endl;
	return;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.precision(10);
	cout << fixed;
	int n;
	cin >> n >> r >> v;
	while(n--) {
		solve();
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

using ll = long long;
long double r, v;
long double eps = 1e-7;
const long double mpi = acos(-1.0);

inline long double dist(long double theta) {
	return 2.0L * r * (sin(theta) + theta);
}

inline long double ti(long double theta, long long ni) {
	return 2.0L * r * (mpi * ni + theta) / v;
}

void solve() {
	int si, fi;
	scanf("%d%d", &si, &fi);
	long double d = fi - si;
	long long ni = d / (2.0L * mpi * r);
	long double left = 0;
	long double right = mpi;
	d = fi - si - 2.0L * r * mpi * ni;
	long double dleft = dist(left);
	long double dright = dist(right);
	long double e = eps * v;
	while(dright-dleft>e) {
		long double mid = (right + left) / 2.0L;
		long double dmid = dist(mid);
		if(dmid>d) {
			right = mid;
			dright = dmid;
		} else {
			left = mid;
			dleft = dmid;
		}
	}
	long double res = ti(right, ni);
	printf("%.10Lf\n", res);
	return;
}

int main()
{
	int n, ri, vi;
	scanf("%d%d%d", &n, &ri, &vi);
	r = ri;
	v = vi;
	while(n--) {
		solve();
	}
	cout.flush();
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

using ll = long long;
long double r, v;
long double eps = 1e-8;
const long double mpi = acos(-1.0);

inline long double dist(long double theta) {
	return 2.0L * r * (sin(theta) + theta);
}

inline double ti(long double theta, long long ni) {
	return 2.0L * r * (mpi * ni + theta) / v;
}

void solve() {
	int si, fi;
	scanf("%d%d", &si, &fi);
	long double d = fi - si;
	long long ni = d / (2.0L * mpi * r);
	long double left = 0;
	long double right = mpi;
	d -= 2.0L * r * mpi * ni;
	long double dleft = dist(left);
	long double dright = dist(right);
	long double e = eps * v;
	while(dright-dleft>e) {
		long double mid = (right + left) / 2.0L;
		long double dmid = dist(mid);
		if(dmid>d) {
			right = mid;
			dright = dmid;
		} else {
			left = mid;
			dleft = dmid;
		}
	}
	double res = ti(right, ni);
	printf("%.10f\n", res);
	return;
}

int main()
{
	int n, ri, vi;
	scanf("%d%d%d", &n, &ri, &vi);
	r = ri;
	v = vi;
	while(n--) {
		solve();
	}
	cout.flush();
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

using ll = long long;
long double r, v;
long double eps = 1e-8;
const long double mpi = acos(-1.0L);

long double dist(long double theta, long long ni) {
	long double res =  2.0L * r * (mpi * ni + sin(theta) + theta);
	return res;
}

long double ti(long double theta, long long ni) {
	long double d = 2.0L * r * (mpi * ni + theta);
	long double res = d / v;
	return res;
}

void solve() {
	long double si, fi;
	cin >> si >> fi;
	long double d = fi - si;
	long double n = d / (2.0L * mpi * r);
	long long ni = n;
	long double left = 0;
	long double right = mpi;
	long double dleft = dist(left, ni);
	long double dright = dist(right, ni);
	long double e = eps * v;
	while(dright-dleft>e) {
		long double mid = (right + left) / 2;
		long double dmid = dist(mid, ni);
		if(dmid>d) {
			right = mid;
			dright = dmid;
		} else {
			left = mid;
			dleft = dmid;
		}
	}
	long double res = ti(right, ni);
	cout << res << '\n';
	return;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.precision(10);
	cout << fixed;
	int n;
	cin >> n >> r >> v;
	while(n--) {
		solve();
	}
	cout.flush();
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

using ll = long long;
long double r, v;
long double eps = 1e-8;
const long double mpi = acos(-1.0L);

long double dist(long double theta, long long ni) {
	long double res =  r * 2.0L * (
		1.0L * mpi * ni + sin(theta) + theta
	);
	return res;
}

long double ti(long double theta, long long ni) {
	long double d = r * 2.0L * (1.0L * mpi * ni + theta);
	long double res = d / v;
	return res;
}

void solve() {
	long double si, fi;
	cin >> si >> fi;
	long double d = fi - si;
	long double n = d / (2.0L * mpi * r);

	long long ni = n;
	long double left = 0;
	long double right = M_PI;
	long double dleft = dist(left, ni);
	long double dright = dist(right, ni);
	while(dright-dleft>eps) {
		long double mid = (right + left) / 2;
		long double dmid = dist(mid, ni);
		if(dmid>d) {
			right = mid;
			dright = dmid;
		} else {
			left = mid;
			dleft = dmid;
		}
	}
	long double res = ti(right, ni);
	cout << res << endl;
	return;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.precision(10);
	cout << fixed;
	int n;
	cin >> n >> r >> v;
	while(n--) {
		solve();
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

using ll = long long;
long double r, v;
long double eps = 1e-8;

long double dist(long double theta, long long ni) {
	long double res =  r * 2.0L * (
		1.0L * M_PI * ni + sin(theta) + theta
	);
	return res;
}

long double ti(long double theta, long long ni) {
	long double d = r * 2.0L * (1.0L * M_PI * ni + theta);
	long double res = d / v;
	return res;
}

void solve() {
	long double si, fi;
	cin >> si >> fi;
	long double d = fi - si;
	long double n = d / (2.0L * M_PI * r);

	long long ni = n;
	long double left = 0;
	long double right = M_PI;
	long double dleft = dist(left, ni);
	long double dright = dist(right, ni);
	while(dright-dleft>eps) {
		long double mid = (right + left) / 2;
		long double dmid = dist(mid, ni);
		if(dmid>d) {
			right = mid;
			dright = dmid;
		} else {
			left = mid;
			dleft = dmid;
		}
	}
	long double res = ti(right, ni);
	cout << res << endl;
	return;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.precision(12);
	cout << fixed;
	int n;
	cin >> n >> r >> v;
	while(n--) {
		solve();
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

using ll = long long;
long double r, v;
long double eps = 1e-8;
const long double mpi = acos(-1.0L);

long double dist(long double theta, long long ni) {
	long double res =  r * 2.0L * (
		1.0L * mpi * ni + sin(theta) + theta
	);
	return res;
}

long double ti(long double theta, long long ni) {
	long double d = r * 2.0L * (1.0L * mpi * ni + theta);
	long double res = d / v;
	return res;
}

void solve() {
	long double si, fi;
	cin >> si >> fi;
	long double d = fi - si;
	long double n = d / (2.0L * mpi * r);
	long long ni = n;
	long double left = 0;
	long double right = mpi;
	long double dleft = dist(left, ni);
	long double dright = dist(right, ni);
	while(dright-dleft>eps) {
		long double mid = (right + left) / 2;
		long double dmid = dist(mid, ni);
		if(dmid>d) {
			right = mid;
			dright = dmid;
		} else {
			left = mid;
			dleft = dmid;
		}
	}
	long double res = ti(right, ni);
	cout << res << '\n';
	return;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.precision(10);
	cout << fixed;
	int n;
	cin >> n >> r >> v;
	while(n--) {
		solve();
	}
	cout.flush();
	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <vector>
#include <set>
#include <queue>
#include <map>
#include <bitset>
#include <algorithm>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

const int maxN = 200500;

const ld PI = acos(-1.0);
const ld acos0 = acos(0.0);
const ld acos02 = acos(0.0) + PI / 2;
const ld acos03 = acos(0.0) + PI;

int n, r, v;

bool can(ld sf, ld c) {
    ld t = (acos0 / v) + c / 2;
    ld tmp = r * (cos(t * v) - cos((t - c) * v)) + c * v;
    t = (acos02 / v) + c / 2;
    tmp = max(tmp, r * (cos(t * v) - cos((t - c) * v)) + c * v);
    t = (acos03 / v) + c / 2;
    tmp = max(tmp, r * (cos(t * v) - cos((t - c) * v)) + c * v);
    return tmp >= sf;
}

double solve(ld sf) {
    ld l = 0, r = sf + 10;

    int it = 60;

    while (it--) {
        ld mid = (l + r) / 2;
        if (can(sf, mid)) r = mid;
        else l = mid;
    }
    can(sf, 3.849644710502);
    return l;
}

int main() {
    //freopen("input.txt", "r", stdin);

    scanf("%d%d%d", &n, &r, &v);

    while (n--) {
        double s, f;
        scanf("%lf%lf", &s, &f);
        printf("%.10f\n", solve(f - s));
    }
}