#include using namespace std; #define rep(i,n) for(int i=0; i<(int)n; i++) #define repi(i,m,n) for(int i=(int)m; i<=(int)n; i++) #define rrep(i,n) for(int i=(int)n-1; i>=0; i--) #define rrepi(i,m,n) for(int i=(int)n; i>=(int)m; i--) #define all(x) x.begin(),x.end() template inline bool chmin(T& a, const T& b) { return a > b ? a = b, true : false; }; template inline bool chmax(T& a, const T& b) { return a < b ? a = b, true : false; }; template void uniq(std::vector &v){ std::sort(v.begin(),v.end()); v.erase(unique(v.begin(),v.end()),v.end()); } using ll = long long; int main(){ int n; cin >> n; vector x(n),y(n); double sx = 0,sy = 0,tx = 0,ty = 0,sd = 0,td = 0; rep(i,n){ cin >> x[i] >> y[i]; sx += x[i]; sy += y[i]; } sx /= n; sy /= n; rep(i,n) sd += hypot(x[i]-sx,y[i]-sy); rep(i,n){ cin >> x[i] >> y[i]; tx += x[i]; ty += y[i]; } tx /= n; ty /= n; rep(i,n) td += hypot(x[i]-tx,y[i]-ty); cout << fixed << setprecision(15) << td/sd << endl; return 0; }