#include <bits/stdc++.h>
using namespace std;
struct point{
int x, y;
point(){}
point(int x, int y) : x(x), y(y){}
long long d(const point& p) const{
return 1LL * (p.x - x) * (p.x - x) +
1LL * (p.y - y) * (p.y - y);
}
};
const long long N = 1 << 20;
const long long LINF = 1e18;
set<pair<int, int>> t[2 * N];
void upd(int v, int tl, int tr, int x, int y, bool del){
if(del)
t[v].erase({y, x});
else
t[v].insert({y, x});
if(tl == tr)
return;
int tm = (tl + tr) / 2;
if(x <= tm)
upd(2 * v, tl, tm, x, y, del);
else
upd(2 * v + 1, tm + 1, tr, x, y, del);
}
long long mn(int v, int tl, int tr, int xl, int xr, int yl, int yr, point p){
if(xl > xr)
return LINF;
if(tl == xl && tr == xr){
long long res = LINF;
auto it = t[v].lower_bound({yl, -1});
while(it != t[v].end() && it->first <= yr){
res = min(res, p.d(point(it->second, it->first)));
it++;
}
return res;
}
int tm = (tl + tr) / 2;
return min(mn(2 * v, tl, tm, xl, min(tm, xr), yl, yr, p),
mn(2 * v + 1, tm + 1, tr, max(xl, tm + 1), xr, yl, yr, p));
}
int main()
{
int n, q;
cin >> n >> q;
vector<point> p(n);
for(int i = 0; i < n; i++)
cin >> p[i].x >> p[i].y;
cout << fixed << setprecision(9);
vector<long long> ds;
ds.push_back(p[0].d(p[1]));
upd(1, 0, N - 1, p[0].x, p[0].y, 0);
upd(1, 0, N - 1, p[1].x, p[1].y, 0);
for(int i = 2; i < n; i++){
long long d = sqrt(ds.back()) + 1;
long long nans = mn(1, 0, N - 1, max(p[i].x - d, 0LL), min(p[i].x + d, N - 1), p[i].y - d, p[i].y + d, p[i]);
ds.push_back(min(ds.back(), nans));
upd(1, 0, N - 1, p[i].x, p[i].y, 0);
}
for(int j = 0; j < q; j++){
int type;
cin >> type;
if(type == 0){
upd(1, 0, N - 1, p.back().x, p.back().y, 1);
p.pop_back();
ds.pop_back();
cout << sqrt(ds.back()) << "\n";
continue;
}
point pi;
cin >> pi.x >> pi.y;
long long d = sqrt(ds.back()) + 1;
long long nans = mn(1, 0, N - 1, max(pi.x - d, 0LL), min(pi.x + d, N - 1), pi.y - d, pi.y + d, pi);
ds.push_back(min(ds.back(), nans));
p.push_back(pi);
upd(1, 0, N - 1, p.back().x, p.back().y, 0);
cout << sqrt(ds.back()) << "\n";
}
return 0;
}