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

int main()
{
    int n;
    double sum = 0;
    cin >> n;
    vector<int> x(n);
    vector<int> y(n);
    for (int i = 0; i < n; i++)
    {
        cin >> x[i] >> y[i];
    }
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
        {
            sum += sqrt((x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j]));
        }
    }
    cout << fixed;
    cout << setprecision(7) << sum / n << endl;
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++)

int main(){
    ll N;
    cin >> N;
    vector<ll> A(N), B(N), S(N);
    rep(i, 0, N){
        cin >> A[i] >> B[i];
        S[i] = A[i] + B[i];
    }
    sort(S.begin(), S.end(), greater<ll>());
    ll taka = 0;
    rep(i, 0, N){
        if(i % 2 == 0) taka += S[i];
    }
    
    ll ans = taka - accumulate(B.begin(), B.end(), 0LL);
    cout << ans << endl;
    return 0;
}