using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); public static void Main() { Solve(); } static void Solve() { var n = NN; var map = NArr(n); Array.Sort(map, (l, r) => l[0].CompareTo(r[0])); var dic = new Dictionary(); for (var i = 0; i < n; ++i) { dic[Key(map[i][0], map[i][1])] = i; } var uf = new UnionFindTree(n); for (var i = 0; i < n; ++i) { for (var dx = 0; dx <= 10; ++dx) for (var dy = 0; dy <= 10; ++dy) { if (dx * dx + dy * dy > 100) break; var key = Key(map[i][0] + dx, map[i][1] + dy); if (dic.ContainsKey(key)) uf.Unite(i, dic[key]); key = Key(map[i][0] + dx, map[i][1] - dy); if (dic.ContainsKey(key)) uf.Unite(i, dic[key]); } } var lists = new List[n]; for (var i = 0; i < lists.Length; ++i) lists[i] = new List(); for (var i = 0; i < n; ++i) lists[uf.GetRoot(i)].Add(map[i]); var ans = 0; for (var i = 0; i < n; ++i) { if (lists[i].Count > 1) { var ch = MakeConvexHull(lists[i]); for (var j = 0; j < ch.Count; ++j) for (var k = j + 1; k < ch.Count; ++k) { var p = lists[i][ch[j]]; var q = lists[i][ch[k]]; ans = Math.Max(ans, (p[0] - q[0]) * (p[0] - q[0]) + (p[1] - q[1]) * (p[1] - q[1])); } } } WriteLine(Math.Sqrt(ans) + 2); } static int Key(int x, int y) { return x * 100000 + y; } class UnionFindTree { int[] roots; public UnionFindTree(int size) { roots = new int[size]; for (var i = 0; i < size; ++i) roots[i] = -1; } public int GetRoot(int a) { if (roots[a] < 0) return a; return roots[a] = GetRoot(roots[a]); } public bool IsSameTree(int a, int b) { return GetRoot(a) == GetRoot(b); } public bool Unite(int a, int b) { var x = GetRoot(a); var y = GetRoot(b); if (x == y) return false; if (-roots[x] < -roots[y]) { var tmp = x; x = y; y = tmp; } roots[x] += roots[y]; roots[y] = x; return true; } public int GetSize(int a) { return -roots[GetRoot(a)]; } } static List MakeConvexHull(List _map) { var map = _map.Select((xy, id) => (xy, id)).ToList(); map.Sort((l, r) => { var d = l.xy[0].CompareTo(r.xy[0]); if (d != 0) return d; return l.xy[1].CompareTo(r.xy[1]); }); var dn = new List<(int[] xy, int id)>(); dn.Add(map[0]); for (var i = 1; i < map.Count; ++i) { while (dn.Count > 1) { var p2 = dn[dn.Count - 2].xy; var p1 = dn[dn.Count - 1].xy; if (OuterProduct(p1[0] - p2[0], p1[1] - p2[1], map[i].xy[0] - p1[0], map[i].xy[1] - p1[1]) <= 0) { dn.RemoveAt(dn.Count - 1); } else break; } dn.Add(map[i]); } var up = new List<(int[] xy, int id)>(); up.Add(map[map.Count - 1]); for (var i = map.Count - 2; i >= 0; --i) { while (up.Count > 1) { var p2 = up[up.Count - 2].xy; var p1 = up[up.Count - 1].xy; if (OuterProduct(p1[0] - p2[0], p1[1] - p2[1], map[i].xy[0] - p1[0], map[i].xy[1] - p1[1]) <= 0) { up.RemoveAt(up.Count - 1); } else break; } up.Add(map[i]); } dn.AddRange(up.Skip(1).Take(up.Count - 2)); return dn.Select(li => li.id).ToList(); } static long OuterProduct(int ax, int ay, int bx, int by) { return (long)ax * by - (long)ay * bx; } }