#include #include int main(){ int test; scanf("%d", &test); for(;test > 0; test--){ double res = 0; int n; scanf("%d", &n); while(n--){ int b; double c; scanf("%d%lf", &b, &c); double tmp = (1-c)/(b+1-c); //printf("tmp=%f c=%f b=%d\n", tmp, c, b); if(res < tmp){ res = tmp; } } printf("%.5f\n", res); } return 0; }