static double pointDistance(Pt a, Pt b) { ret sqrt(sqr(a.x-b.x) + sqr(a.y-b.y)); }