#include using namespace std; int N; int points[100005][2]; int dist[100005][2]; double P; int a0, b0, c0; int a1, b1, c1; int m1, m2; map map0; map map1; int main(){ a0 = 1; b0 = 1; c0 = 0; a1 = 1; b1 = -1; c1 = 0; while(scanf("%d", &N) && !feof(stdin)){ memset(points,0,sizeof(points)); P = 0; map0.clear(); map1.clear(); for(int i = 0;isecond)++; } auto it1 = map1.find(dist[i][1]); if(it1 == map1.end()){ map1.insert({dist[i][1],1}); } else { (it1->second)++; } } for(int i = 0;isecond; int cnt1 = it1->second; double pi = (double)(cnt0+cnt1-2)/(N); P+=pi; } P/=N; printf("%g\n",P); } return 0; }