#include using namespace std; #include using namespace atcoder; // #include // using namespace boost; // using rat = rational; #define ll long long #define ld long double #define ull uint64_t #define pll pair #define vll vector #define vvll vector #define vvvll vector #define vpll vector #define v(T) vector #define vv(T) vector> #define vvv(T) vector>> using mint = modint998244353; template using pqg = priority_queue, greater>; #define maxseg(T) segtree #define minseg(T) segtree #define sumseg(T) segtree // template using maxseg = segtree; // template using minseg = segtree; // template using sumseg = segtree; // template struct v : vector { using vector :: vector; }; // template struct vv : vector> { using vector> :: vector; }; // template struct vvv : vector> { using vector> :: vector; }; template inline bool chmin(T& a, T b) {if(a > b){a = b; return true;} else {return false;}}; template inline bool chmax(T& a, T b) {if(a < b){a = b; return true;} else {return false;}}; #define rep(i,n) for(ll i = 0; i < (ll)(n); i++) #define repr(i,n) for(ll i = (ll)(n) - 1; i >= 0; i--) #define REP(i, l, r) for(ll i = (ll)l; i <= (ll)(r); i++) #define REPR(i, l, r) for(ll i = (ll)r; i >= (ll)(l); i--) const ll inf = (1 << 30); const ll INF = ((ll)1 << 60); const vector> DIJ = {{1, 0}, {0, -1}, {-1, 0}, {0, 1}}; template void out(T a){cout << a << endl;} void out1(mint a){cout << a.val();} template void out1(T a){cout << a;} template void out2(T a, U b){cout << a << " " << b << endl;} template void out3(T a, U b, V c) {cout << a << " " << b << " " << c << endl;} template void outp(pair a){ out1(a.first); out1(" "); out1(a.second); cout << endl; } template void outv(T a){rep(i, a.size()){ cout << a.at(i) << " "; } cout << endl;} template void outvmint(T a) {rep(i, a.size()) { cout << a.at(i).val() << " "; } cout << endl;} template void outvL(T a){rep(i, a.size()){out(a.at(i));}} template void outvLmint(T a) {rep(i, a.size()){out(a.at(i).val());}} template void outvv(T a){rep(i, a.size()){ rep(j, a.at(i).size()){cout << a.at(i).at(j) << " "; } cout << endl; }} template void outvp(T a){rep(i, a.size()){ out2(a.at(i).first, a.at(i).second); }} void setpre(int a){cout << fixed << setprecision(a);} #define outN out("No") #define outY out("Yes") #define outL cout << endl #define dame(a) {out(a);return 0;} #define All(a) (a).begin(), (a).end() template inline void sortr(T& v){sort(All(v)); reverse(All(v));} template inline vector argsort(T V, bool rev = false){vector res(V.size()); iota(res.begin(), res.end(), 0); sort(res.begin(), res.end(), [&](int x, int y){if(!rev){return V.at(x) < V.at(y);}else{return V.at(x) > V.at(y);}}); return res;} template inline void sort_by_idx(T& V, vector& I){assert(V.size() == I.size()); T tmpv = V; for(int loopi = 0; loopi < (int)I.size(); loopi++){V.at(loopi) = tmpv.at(I.at(loopi));}} template inline void sortp(vector& v1, vector& v2, bool rev1 = false, int rev2 = false){assert(v1.size() == v2.size()); vector I(v1.size()); iota(I.begin(), I.end(), 0); sort(I.begin(), I.end(), [&](const int x, const int y){if(v1.at(x) != v1.at(y)){return (bool)(rev1 ^ (v1.at(x) < v1.at(y)));}else{if(v2.at(x)==v2.at(y)){return false;} return (bool)(rev2 ^ (v2.at(x) < v2.at(y)));}}); sort_by_idx(v1, I); sort_by_idx(v2, I);} template T POW(T x, ll n) {T ret = 1; while(n > 0){if(n & 1) ret *= x; x *= x; n >>= 1;} return ret;} ll powll(ll x, ll n){ll ret = 1; while(n > 0){if(n & 1) ret *= x; x *= x; n >>= 1;} return ret;} #define cin1(n) cin >> (n) #define cin2(n, m) cin >> (n) >> (m) #define cin3(n, m, k) cin >> (n) >> (m) >> (k) #define cin4(n, m, k, l) cin >> (n) >> (m) >> (k) >> (l) #define cinv(a) rep(lopi, a.size()) cin >> (a).at(lopi) #define cinll1(n) ll n; cin >> (n) #define cinll2(n, m) ll n, m; cin >> (n) >> (m) #define cinll3(n, m, k) ll n, m, k; cin >> (n) >> (m) >> (k) #define cinll4(n, m, k, l) ll n, m, k, l; cin >> (n) >> (m) >> (k) >> (l) #define cinvll(a, n) vll a(n); rep(lopi, (n)) cin >> (a).at(lopi) #define cinstr(S) string S; cin >> (S) #define cinvt(type, a, n) v(type) a(n); rep(lopi, n) cin >> (a).at(lopi) #define cinvll2(a, b, n) vll a(n), b(n); rep(lopi, n) cin >> (a).at(lopi) >> (b).at(lopi) #define cinvll3(a, b, c, n) vll a(n), b(n), c(n); rep(lopi, n) cin >> (a).at(lopi) >> (b).at(lopi) >> (c).at(lopi) #define makeundirGll(G, N, M) G = vvll(N); rep(lopi, M) {ll a, b; cin >> a >> b; G.at(a-1).push_back(b-1); G.at(b-1).push_back(a-1);} #define makedirGll(G, N, M) G = vvll(N); rep(lopi, M) {ll a, b; cin >> a >> b; G.at(a-1).push_back(b-1);} #define makeundirwghGll(G, N, M) G = vv(pll)(N); rep(lopi, M) {ll a, b, c; cin >> a >> b >> c; G.at(a-1).push_back({b-1,c}); G.at(b-1).push_back({a-1, c});} #define makedirwghGll (G, N, M) G = vv(pll)(N); rep(lopi, M) {ll a, b, c; cin >> a >> b >> c; G.at(a-1).push_back({b-1, c});} ll llceil(ll x, ll y) { if(x >= 0) {return(x / y + (ll)(x % y != 0)); } else { return -((-x) / y); } } inline bool inLR(ll x, ll L, ll R){ return (L <= x && x < R); } inline bool is_in_Rect(ll pos_x, ll pos_y, ll rect_H, ll rect_W, ll rect_h = 0, ll rect_w = 0){ return (rect_h <= pos_x && pos_x < rect_H && rect_w <= pos_y && pos_y < rect_W); } template vector &operator++(vector &v) {for(auto &e : v){e++;} return v;} template vector operator++(vector &v, signed) {auto res=v; for(auto &e : v){e++;} return res;} template vector &operator--(vector &v) {for(auto &e : v){e--;} return v;} template vector operator--(vector &v, signed) {auto res=v; for(auto &e : v){e--;} return res;} template pair operator+(pair &x, pair &y) { return make_pair(x.first + y.first, x.second + y.second); } template void operator+=(pair &x, pair &y) { x = x + y; } using P = pair; P diff_pair( P p1, P p2 ){ // caculate difference of p1 from p2 ld a = p1.first - p2.first; ld b = p1.second - p2.second; return P{a, b}; } ld signed_area( P p1, P p2, P p3 ){ // to chech relativistic position of 3 poins P v1 = diff_pair( p2,p1 ); P v2 = diff_pair( p3,p1 ); return v1.first*v2.second - v1.second*v2.first; // calc area as z-component of v1 x v2 } // partation for quick sort int partition (vector

&node, int l, int r, P p_minx) { P pivot = node[r]; int i = (l - 1); for (int j = l; j <= r - 1; j++) { // compare func : signed_area ~ Declination from p with min x // signed_area < 0 => clockwise if ( signed_area( p_minx, node[j], pivot ) >= 0 ) { i++; iter_swap(node.begin()+i, node.begin()+j); } } iter_swap(node.begin()+i+1, node.begin()+r); return (i + 1); } // sort points counter-clockwise void qsort_c_clockwise( vector

&node, int l, int r, P p_minx) { if (l < r) { int pivot = partition(node, l, r, p_minx); qsort_c_clockwise(node, l, pivot - 1,p_minx); qsort_c_clockwise(node, pivot + 1, r,p_minx); } return; } void remove_concave( vector

&node ){ int max_step = node.size()*node.size()*node.size(); // all combination of triangle = nC3 int step = 0; int i = 0; while( i line graph of these points dents // => remove concave point // => check for new set again if( area <= 0 ) { node.erase( node.begin()+i+1 ); i=0; }else{ ++i; } ++step; } return; } void graham_scan( vector

&node ){ // iterator of the node with min x components vector

::iterator itr_minx = min_element(node.begin(), node.end(), [](const P &l, const P &r) { return r.first > l.first; }); // move min element to head iter_swap( node.begin(), itr_minx ); qsort_c_clockwise ( node, 0, node.size()-1, node[0] ); remove_concave( node ); return; } int main() { std::cin.tie(nullptr), std::ios_base::sync_with_stdio(false); cinll1(N); vector

xy, zw; rep(i, N) { ld x, y; cin2(x, y); xy.emplace_back(x, y); } rep(i, N) { ld z, w; cin2(z, w); zw.emplace_back(z, w); } setpre(15); if(N == 2) { ld sxy = hypotl(xy.back().first - xy.front().first, xy.back().second - xy.front().second), szw = hypotl(zw.back().first - zw.front().first, zw.back().second - zw.front().second); out(szw/sxy); return 0; } graham_scan(xy); graham_scan(zw); ld sxy = hypotl(xy.back().first - xy.front().first, xy.back().second - xy.front().second), szw = hypotl(zw.back().first - zw.front().first, zw.back().second - zw.front().second); rep(i, xy.size() - 1) { sxy += hypotl(xy[i].first - xy[i+1].first, xy[i].second - xy[i+1].second); } rep(i, zw.size() - 1) { szw += hypotl(zw[i].first - zw[i+1].first, zw[i].second - zw[i+1].second); } out(szw/sxy); }