#include<bits/stdc++.h>
#define Gc() getchar()
#define Me(x,y) memset(x,y,sizeof(x))
#define Mc(x,y) memcpy(x,y,sizeof(x))
#define d(x,y) ((m)*(x-1)+(y))
#define R(n) (rnd()%(n)+1)
#define Pc(x) putchar(x)
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
#define eb emplace_back
#define all(x) x.begin(),x.end()
using namespace std;using ll=long long;using db=double;using lb=long db;using ui=unsigned;using ull=unsigned long long;using pii=pair<int,int>;
const int N=5e5+5,M=N*4+5,K=1000+5,mod=998244353,Mod=mod-1;const db eps=1e-9;const int INF=1e9+7;mt19937 rnd(28382);
#define Tp template<typename T>
#define Ts template<typename T,typename... Ar>
namespace Debug{
Tp void _debug(char* f,T t){cerr<<f<<'='<<t<<endl;}
Ts void _debug(char* f,T x,Ar... y){while(*f!=',') cerr<<*f++;cerr<<'='<<x<<",";_debug(f+1,y...);}
#ifdef LOCAL
#define gdb(...) _debug((char*)#__VA_ARGS__,__VA_ARGS__)
#else
#define gdb(...) void()
#endif
}using namespace Debug;
using cp=complex<db>;
int k,n;
cp A[N],st[N];int sh;
db cross(cp x,cp y){return x.real()*y.imag()-x.imag()*y.real();}
db w[N];
// auto is=fopen("1.ans","r");
void Solve(){
// int as=0;fscanf(is,"%d",&as);
scanf("%d%d",&k,&n);
for(int i=1;i<=k;i++){
db x,y;scanf("%lf%lf",&x,&y);
A[i]=cp(x,y);
}
sort(A+1,A+k+1,[](cp x,cp y){return make_pair(x.real(),x.imag())<make_pair(y.real(),y.imag());});
sh=0;
for(int i=1;i<=k;i++){
while(sh>1&&cross(st[sh]-st[sh-1],A[i]-st[sh])<0) sh--;
st[++sh]=A[i];
}
db tot=0;
for(int i=1;i<sh;i++) tot+=cross(st[i],st[i+1])/*,cerr<<st[i].real()<<' '<<st[i].imag()<<'\n'*/;
sh=0;
for(int i=k;i;i--){
while(sh>1&&cross(st[sh]-st[sh-1],A[i]-st[sh])<0) sh--;
st[++sh]=A[i];
}
for(int i=1;i<sh;i++) tot+=cross(st[i],st[i+1]),/*cerr<<st[i].real()<<' '<<st[i].imag()<<'\n'*/;
tot/=2;
cout<<tot<<'\n';
// if(as==4) gdb(tot);
if(tot<2.7){
puts("3");
}else{
puts("4");
}
return;
// gdb(tot);
for(int i=max(3,n-5);i<=n;i++){
db ap=acos(-1)/i;
w[i]=sin(ap)*cos(ap)*i;
w[i]=sqrt(tot/w[i]);
// gdb(i,w[i]);
}
int mi=n;
for(int i=max(n-5,3);i<=n;i++) if(abs(w[i]-1.35)<=abs(w[mi]-1.35)) mi=i;
printf("%d\n",mi);
}
int main(){
int t=1;
scanf("%d",&t);
while(t--) Solve();
cerr<<clock()*1.0/CLOCKS_PER_SEC<<'\n';
}