#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define X first #define Y second #define pb push_back #define rep(X,Y) for (int (X) = 0;(X) < int(Y);++(X)) #define rrep(X,Y) for (int (X) = int(Y-1);(X) >=0;--(X)) #define repe(X,Y) for ((X) = 0;(X) < int(Y);++(X)) #define peat(X,Y) for (;(X) < int(Y);++(X)) #define all(X) (X).begin(),(X).end() #define rall(X) (X).rbegin(),(X).rend() using namespace std; typedef long long ll; typedef pair pii; typedef pair pll; template ostream& operator<<(ostream &os, const vector &t) { os<<"{"; rep(i,t.size()) {os< ostream& operator<<(ostream &os, const pair &t) { return os<<"("<>x>>y; if(y!=0 && x!=1){ double l=0,r=1; rep(i,100000){ c=(l+r)/2; a=((y-1)*c+x)/y; b=(y-a*x)/(1-x); if(a<0 || 1