WTBTR May 19 solution debug

Can someone please guide me why this code is not giving correct answer for subtask 2

#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long int
#define r0 return 0
#define test ll T;cin>>T;while(T–)
#define pb push_back
#define int int64_t
#define vi vector
#define si set
#define msi multiset
#define mii map
#define pi pair<int, int>
const int maxn = 1e5 + 42;
using namespace std;
void solve()
{ msi sp;
msi sn;
ll n;
cin>>n;
for(ll i=0;i<n;i++)
{ int x, y, xn, xp;
cin>>x>>y;
xp=x-y;
xn=x+y;
sp.insert(xp);
sn.insert(xn);
}
auto k=sp.begin();
k++;
long double mgp=maxn, mgn=maxn;
for(auto u=sp.begin();k!=sp.end();u++,k++)
{ double g;
g=(*k)-(*u);
if(g<=mgp)
mgp=g;
}
k=sn.begin();
k++;
for(auto u=sn.begin();k!=sn.end();u++,k++)
{ double g;
g=(*k)-(*u);
if(g<=mgn)
mgn=g;
}
long double x=min(mgp,mgn);
x=x/2;
cout<<fixed<<setprecision(7)<<x<<“\n”;
}
signed main()
{ ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
test
{
solve();
}
r0;
}`