#include <cstdio> using namespace std; int main() { int n, m, cas; scanf("%d", &cas); while(cas--){ scanf("%d%d", &n, &m); printf("%.08lf\n", 1.0 * (m/2)/(n*n/4)); } return 0; }