# 旋转卡壳

#include<cmath>
#include<cstdio>
#include<cstring>
#include<algorithm>
#define N 50005
#define F friend
#define eps 1e-8
#define sqr(x) ((x)*(x))
#define abs(x) ((x)>0?(x):-(x))
using namespace std;
typedef double DB;
struct P{
DB x,y;
F bool operator < (P a,P b){
return abs(a.y-b.y)<eps?a.x<b.x:a.y<b.y;
}
F P operator * (P a,DB b){ return (P){a.x*b,a.y*b}; }
F P operator + (P a,P b){ return (P){a.x+b.x,a.y+b.y}; }
F P operator - (P a,P b){ return (P){a.x-b.x,a.y-b.y}; }
F DB dis(P a,P b){ return sqrt(sqr(a.x-b.x)+sqr(a.y-b.y)); }
F DB cs(P a,P b,P c){
return (b.x-a.x)*(c.y-a.y)-(c.x-a.x)*(b.y-a.y);
}
F DB dt(P a,P b,P c){
return (b.x-a.x)*(c.x-a.x)+(b.y-a.y)*(c.y-a.y);
}
}t[N],s[N],v[4];
int n,tp,f; DB S=1e50;
inline bool cmp(P a,P b){
double f=cs(t[1],a,b);
if (abs(f)>eps) return f>0;
return dis(a,t[1])-dis(b,t[1])<eps;
}
inline void GR(){
sort(t+1,t+n+1),s[tp=1]=t[1],sort(t+2,t+n+1,cmp);
for (int i=2;i<=n;s[++tp]=t[i++])
while (tp>1&&cs(s[tp-1],s[tp],t[i])<eps) tp--;
}
inline void RC(){
int l=1,r=1,h=1; s[0]=s[tp];
for (int i=0;i<tp;i++){
DB L,R,H,d=dis(s[i],s[i+1]);
while (cs(s[i],s[i+1],s[h])-cs(s[i],s[i+1],s[h+1])<eps)
h=(h+1)%tp; H=abs(cs(s[i],s[i+1],s[h])/d);
while (dt(s[i],s[i+1],s[r])-dt(s[i],s[i+1],s[r+1])<eps)
r=(r+1)%tp; R=dt(s[i],s[i+1],s[r])/d;
if (!i) l=r;
while (dt(s[i],s[i+1],s[l+1])-dt(s[i],s[i+1],s[l])<eps)
l=(l+1)%tp; L=dt(s[i],s[i+1],s[l])/d;
if ((R-L)*H<S){
S=(R-L)*H;
v[0]=s[i]+(s[i+1]-s[i])*(R/d);
v[1]=v[0]+(s[r]-v[0])*(H/dis(v[0],s[r]));
v[2]=v[1]-(v[0]-s[i])*((R-L)/dis(v[0],s[i]));
v[3]=v[2]-(v[1]-v[0]);
}
}
}
int main(){
scanf("%d",&n);
for (int i=1;i<=n;i++)
scanf("%lf%lf",&t[i].x,&t[i].y);
GR(),RC(),printf("%.5f\n",S+eps);
for (int i=1;i<=3;i++)
if (v[i]<v[f]) f=i;
for (int j=0;j<4;j++,f=(f+1)%4)
printf("%.5f %.5f\n",v[f].x+eps,v[f].y+eps);
return 0;
}

• 广告
• 抄袭
• 版权
• 政治
• 色情
• 无意义
• 其他

120