static long ptToLong(Pt p) { ret p == null ? -1: intPairsToLong(p.x, p.y); }