package main import . "fmt" import . "sort" type P struct { x,y,e int } var ps [101][]*P func init() { for x:=-100;x<=100;x++ { for y:=-100;y<=100;y++ { m:=x if m<0 { m=-m } if y<0 { m-=y } else { m+=y } if m>100 { continue } p:=&P{ x,y,x*x+y*y, } ps[m]=append(ps[m],p) } } for _,t:=range ps[:] { Slice(t,func(i,j int)bool{ return t[i].e0;q-- { var d,k int Scan(&d,&k) t:=ps[d][:] if len(t)=0 { z:=t[k-2] if p.e==z.e { Println("No") continue } } Println("Yes") Println(p.x,p.y) } } }