#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
typedef pair<ld,ld> pt;

ld x[10005],y[10005];
int main(){
    ios::sync_with_stdio(0);
    int t; cin>>t;
    while (t--){
        ld r; int n; cin>>r>>n;
        for (int i=0;i<n;i++) cin>>x[i]>>y[i];
        ld p=0; x[n]=x[0],y[n]=y[0];
        for (int i=0;i<n;i++) p+=sqrt((x[i]-x[i+1])*(x[i]-x[i+1])+(y[i]-y[i+1])*(y[i]-y[i+1]));
        ld s=(p-2*acos(-1.0)*r)/p;
        if (s<1e-6) cout<<"Not possible"<<endl;
        else cout<<fixed<<setprecision(10)<<s<<endl;
    }
    return 0;
}