#include <bits/stdc++.h>
using namespace std;

#define F first
#define S second

typedef double D;
typedef complex<D> P;
typedef pair<P, P> L;
typedef vector<P> VP;
const D EPS = 1e-7;
#define X real()
#define Y imag()
#define LE(n,m) ((n) < (m) + EPS)
#define GE(n,m) ((n) + EPS > (m))
#define EQ(n,m) (abs((n)-(m)) < EPS)
D dot(P a, P b) {return (conj(a)*b).X; }
D cross(P a, P b) {  return (conj(a)*b).Y;}

int ccw(P a, P b, P c) {
  b -= a;  c -= a;
  if (cross(b,c) >  EPS) return +1; //L
  if (cross(b,c) < -EPS) return -1; //R
  if (dot(b,c)   < -EPS) return +2;
  if (norm(b) < norm(c)) return -2;
  return 0;
}

P proj(P a1, P a2, P p) { return a1 + dot(a2-a1, p-a1)/norm(a2-a1) * (a2-a1); }

P crosspointLL(P a1, P a2, P b1, P b2) {
  D d1 = cross(b2-b1, b1-a1);
  D d2 = cross(b2-b1, a2-a1);
  if (EQ(d1, 0) && EQ(d2, 0)) return a1;
  if (EQ(d2, 0)) throw "HiGYAAAAA!!!!!";
  return a1 + d1/d2 * (a2-a1);
}

// p1を基準にpをa度回転
L rot(P p,double a,P p1){
  a=a*M_PI/180.0;  p-=p1;
  D x=p.X*cos(a)+p.Y*(-sin(a))+p1.X;
  D y=p.X*sin(a)+p.Y*cos(a)+p1.Y;
  return L(p1,P(x,y));
}

// segをpにぶつける
L segdon(P p,L seg){
  P a=seg.F , b=seg.S;
  P c=proj(a,b,p);
  P z=crosspointLL(a,b,p,c);
  p-=z; a+=p; b+=p;
  return L(a,b);
}

int n;
VP v;

// off L = 1,R = -1  : zu 回す向き  
bool check(L seg,int id,int off,int zu){
  L p=segdon(v[id],seg);
  return ccw(v[(id+zu+n)%n],p.F,p.S) == off;
}

double calc(L a,L b,L c){
  P x=crosspointLL(a.F,a.S,b.F,b.S);
  P y=crosspointLL(a.F,a.S,c.F,c.S);
  return abs(x-y);
}

signed main(){
  cin>>n;
  for(int i=0;i<n;i++){
    D x,y;
    scanf("%lf%lf",&x,&y);
    v.push_back(P(x,y));
  }
  L ls=rot(v[1],60,v[0]);
  L rs=rot(v[0],-60,v[1]);

  int l=0,r=1;
  while(check(ls,l,1,-1))  l=(l-1+n)%n;
  while(check(rs,r,-1,1)) r=(r+1+n)%n;

  double ans=calc(segdon(v[l],ls),segdon(v[r],rs),L(v[1],v[0]));

  for(int i=n-1;i>0;i--){
    int nex=(i+1)%n;
    ls=rot(v[nex],60,v[i]);
    rs=rot(v[i],-60,v[nex]);

    while(check(ls,l,1,-1))  l=(l-1+n)%n;
    while(check(rs,r,-1,-1)) r=(r-1+n)%n;

    ans=min(ans,calc(segdon(v[l],ls),segdon(v[r],rs),L(v[i],v[nex])));
  }
  printf("%.9f\n",ans);
}

### Prompt

Create a solution in Cpp for the following problem:

Problem

Given a convex polygon consisting of $ N $ vertices.

When considering an equilateral triangle that includes all the vertices of the convex polygon, find the minimum value of the length of one side of the equilateral triangle.

Constraints

The input satisfies the following conditions.

* $ 3 \ le N \ le 10000 $
* $ -10 ^ 9 \ le px_i, py_i \ le 10 ^ 9 $
* No matter which of the three vertices of the convex polygon is selected, they do not exist on the same straight line.

Input

All inputs are given as integers in the following format:


$ N $
$ px_1 $ $ py_1 $
$ px_2 $ $ py_2 $
$ \ vdots $
$ px_N $ $ py_N $


The $ 1 $ line is given an integer $ N $ that represents the number of vertices of the convex polygon.
In the following $ N $ line, the information of each vertex of the convex polygon is given in the counterclockwise order.
In the $ 1 + i $ line, $ px_i $ and $ py_i $ representing the coordinates of the $ i $ th vertex are given separated by blanks.

Output

Output the minimum value of the length of one side of an equilateral triangle that satisfies the condition.
However, absolute or relative errors up to $ 10 ^ {-5} $ are acceptable.

Examples

Input

4
2 3
1 2
2 1
3 2


Output

3.04720672


Input

7
-96469 25422
-55204 -45592
-29140 -72981
98837 -86795
92303 63297
19059 96012
-67980 70342


Output

310622.35426197

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;

#define F first
#define S second

typedef double D;
typedef complex<D> P;
typedef pair<P, P> L;
typedef vector<P> VP;
const D EPS = 1e-7;
#define X real()
#define Y imag()
#define LE(n,m) ((n) < (m) + EPS)
#define GE(n,m) ((n) + EPS > (m))
#define EQ(n,m) (abs((n)-(m)) < EPS)
D dot(P a, P b) {return (conj(a)*b).X; }
D cross(P a, P b) {  return (conj(a)*b).Y;}

int ccw(P a, P b, P c) {
  b -= a;  c -= a;
  if (cross(b,c) >  EPS) return +1; //L
  if (cross(b,c) < -EPS) return -1; //R
  if (dot(b,c)   < -EPS) return +2;
  if (norm(b) < norm(c)) return -2;
  return 0;
}

P proj(P a1, P a2, P p) { return a1 + dot(a2-a1, p-a1)/norm(a2-a1) * (a2-a1); }

P crosspointLL(P a1, P a2, P b1, P b2) {
  D d1 = cross(b2-b1, b1-a1);
  D d2 = cross(b2-b1, a2-a1);
  if (EQ(d1, 0) && EQ(d2, 0)) return a1;
  if (EQ(d2, 0)) throw "HiGYAAAAA!!!!!";
  return a1 + d1/d2 * (a2-a1);
}

// p1を基準にpをa度回転
L rot(P p,double a,P p1){
  a=a*M_PI/180.0;  p-=p1;
  D x=p.X*cos(a)+p.Y*(-sin(a))+p1.X;
  D y=p.X*sin(a)+p.Y*cos(a)+p1.Y;
  return L(p1,P(x,y));
}

// segをpにぶつける
L segdon(P p,L seg){
  P a=seg.F , b=seg.S;
  P c=proj(a,b,p);
  P z=crosspointLL(a,b,p,c);
  p-=z; a+=p; b+=p;
  return L(a,b);
}

int n;
VP v;

// off L = 1,R = -1  : zu 回す向き  
bool check(L seg,int id,int off,int zu){
  L p=segdon(v[id],seg);
  return ccw(v[(id+zu+n)%n],p.F,p.S) == off;
}

double calc(L a,L b,L c){
  P x=crosspointLL(a.F,a.S,b.F,b.S);
  P y=crosspointLL(a.F,a.S,c.F,c.S);
  return abs(x-y);
}

signed main(){
  cin>>n;
  for(int i=0;i<n;i++){
    D x,y;
    scanf("%lf%lf",&x,&y);
    v.push_back(P(x,y));
  }
  L ls=rot(v[1],60,v[0]);
  L rs=rot(v[0],-60,v[1]);

  int l=0,r=1;
  while(check(ls,l,1,-1))  l=(l-1+n)%n;
  while(check(rs,r,-1,1)) r=(r+1+n)%n;

  double ans=calc(segdon(v[l],ls),segdon(v[r],rs),L(v[1],v[0]));

  for(int i=n-1;i>0;i--){
    int nex=(i+1)%n;
    ls=rot(v[nex],60,v[i]);
    rs=rot(v[i],-60,v[nex]);

    while(check(ls,l,1,-1))  l=(l-1+n)%n;
    while(check(rs,r,-1,-1)) r=(r-1+n)%n;

    ans=min(ans,calc(segdon(v[l],ls),segdon(v[r],rs),L(v[i],v[nex])));
  }
  printf("%.9f\n",ans);
}

```