#include #include #include #include #include using namespace std;struct Point{ int x,y; Point(int x=0,int y=0):x(x),y(y){}};typedef Point Vector;bool cmp(const Point &p,const Point &q){ if(p.x!=q.x) return p.x 1&&Cross(ch[m-1]-ch[m-2],p[i]-ch[m-2])<=0)m--; ch[m++]=p[i];} int k=m; for(int i=n-2;i>=0;i--) { while(m>k&&Cross(ch[m-1]-ch[m-2],p[i]-ch[m-2])<=0)m--; ch[m++]=p[i]; } if(n>1) m--; return m;}int Dot(Vector A,Vector B){return A.x*B.x+A.y*B.y;}int Length(Vector A){return Dot(A,A);}int main(){ int n; while(scanf("%d",&n)!=EOF) { //memset(ch,0,sizeof(ch)); for(int i=0;i ans) ans=Length(ch[i]-ch[j]); //if(Length(ch[i]-ch[j])