""" https://atcoder.jp/contests/abc022/tasks/abc022_d 点と点を対応付けるのは厳しいので数値的に出来ないか? 原点中心P倍は、純粋にメモリを小さくしただけなのでどこ中心でも一緒 →部分点は、各星の距離の合計をそのまま出せば終わり 原点は基準点として使えないので重心との距離を考える """ from sys import stdin N = int(stdin.readline()) AG = [0,0] A = [] for i in range(N): x,y = map(int,stdin.readline().split()) AG[0] += x AG[1] += y A.append((x,y)) AG[0] /= N AG[1] /= N Aans = 0 for x,y in A: Aans += ((AG[0]-x)**2 + (AG[1]-y)**2) ** 0.5 BG = [0,0] B = [] for i in range(N): x,y = map(int,stdin.readline().split()) BG[0] += x BG[1] += y B.append((x,y)) BG[0] /= N BG[1] /= N Bans = 0 for x,y in B: Bans += ((BG[0]-x)**2 + (BG[1]-y)**2) ** 0.5 print (Bans / Aans)