#include <bits/stdc++.h>
#define EPS double(1e-10)
using namespace std;
double factorial(double n)
{
if(n==0)
return 1;
if(n==1)
return 1;
return n*factorial(n-1);
}
double combination(double n,double k)
{
double rpta = factorial(n)/(factorial(k)*factorial(n-k));
// cout << rpta << "\n";
return double(rpta);
}
int main()
{
int n;cin >> n;
for(int i = 0 ; i < n ; ++i)
{
double r,s,x,y,w; cin >> r >> s >> x >> y >> w;
double d = s-r+1;
double prob = d/s;
// cout << prob << "\n";
double rprob = prob;
for(int j = 0 ; j < int(x)-1 ; ++j)
{
rprob*=prob;
}
// cout << rprob << "\n";
double rrprob = double(combination(y,x) * w * rprob);
cout << rrprob << "\n";
// cout << rrprob << "\n";
if(rrprob > double(1) )
{
cout << "yes";
}
else
cout << "no";
cout << "\n";
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgRVBTIGRvdWJsZSgxZS0xMCkKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmRvdWJsZSBmYWN0b3JpYWwoZG91YmxlIG4pCnsKICBpZihuPT0wKQogICAgcmV0dXJuIDE7CiAgaWYobj09MSkKICAgIHJldHVybiAxOwogIHJldHVybiBuKmZhY3RvcmlhbChuLTEpOwp9Cgpkb3VibGUgY29tYmluYXRpb24oZG91YmxlIG4sZG91YmxlIGspCnsKICBkb3VibGUgcnB0YSAgPSBmYWN0b3JpYWwobikvKGZhY3RvcmlhbChrKSpmYWN0b3JpYWwobi1rKSk7CiAgLy8gY291dCA8PCBycHRhIDw8ICJcbiI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICByZXR1cm4gZG91YmxlKHJwdGEpOwp9CgoKaW50IG1haW4oKQp7CiAgaW50IG47Y2luID4+IG47CiAgZm9yKGludCBpID0gMCA7IGkgPCBuIDsgKytpKQogICAgewogICAgICBkb3VibGUgcixzLHgseSx3OyBjaW4gPj4gciA+PiBzID4+IHggPj4geSA+PiB3OwogICAgICBkb3VibGUgZCAgPSBzLXIrMTsKICAgICAgZG91YmxlIHByb2IgPSBkL3M7CiAgICAgIC8vIGNvdXQgPDwgcHJvYiA8PCAiXG4iOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgZG91YmxlIHJwcm9iID0gcHJvYjsKICAgICAgZm9yKGludCBqID0gMCA7IGogPCBpbnQoeCktMSA7ICsraikKICAgICAgICB7CiAgICAgICAgICBycHJvYio9cHJvYjsKICAgICAgICB9CiAgICAgIC8vIGNvdXQgPDwgcnByb2IgPDwgIlxuIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgZG91YmxlIHJycHJvYiA9IGRvdWJsZShjb21iaW5hdGlvbih5LHgpICogdyAqIHJwcm9iKTsKICAgICAgY291dCA8PCBycnByb2IgPDwgIlxuIjsKICAgICAgLy8gY291dCA8PCBycnByb2IgPDwgIlxuIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICBpZihycnByb2IgPiBkb3VibGUoMSkgKQogICAgICAgIHsKICAgICAgICAgIGNvdXQgPDwgInllcyI7CiAgICAgICAgfQogICAgICBlbHNlCiAgICAgICAgY291dCA8PCAibm8iOwogICAgICBjb3V0IDw8ICJcbiI7CiAgICB9CiAgcmV0dXJuIDA7Cn0K