package main import . "fmt" const X=5e17 func abs(a int64) int64 { if a<0 { return -a } return a } func max(a,b int64) int64 { if a0&&i<50;i++ { best:=int64(X)*2 t:=-1 for k:=1;k0 { f[t]=true u=append(u,1) v=append(v,t+1) aa:=(a[0]+a[t])/2 bb:=(b[0]+b[t])/2 a[0],b[0]=aa,bb a[t],b[t]=aa,bb break } else { break } } for i:=len(u);i<50;i++ { best :=int64(X+X) t1,t2:=-1,-1 for k:=range a { if f[k] { continue } for h:=range a { if k==h||f[h] { continue } aa:=(a[k]+a[h])/2 bb:=(b[k]+b[h])/2 s:=max(abs(aa-X),abs(bb-X)) if s