using System; using System.Collections.Generic; using System.Text; using System.Linq; class Program { public void Proc() { Reader.IsDebug = false; int tyukeiCount = int.Parse(Reader.ReadLine()); List tyukeiList = new List(); for (int i = 0; i < tyukeiCount; i++) { tyukeiList.Add(new Pos(Reader.GetInt())); } if (tyukeiList.Count == 0) { Console.WriteLine(1); return; } else if (tyukeiList.Count == 1) { Console.WriteLine(2); return; } long maxLen2 = 0; List> groupList = new List>(); foreach (Pos pos in tyukeiList) { List tmp = new List(tyukeiList.FindAll(a=> ((pos.X - a.X)*(pos.X - a.X)+(pos.Y - a.Y)*(pos.Y - a.Y)) <= 100)); List> mergeList = new List>(); List otherList = new List(); tmp.ForEach((a) => { bool grouped = false; groupList.ForEach((b) => { if (b.Contains(a)) { grouped = true; if (!mergeList.Contains(b)) { mergeList.Add(b); } } }); if (!grouped) { otherList.Add(a); } }); mergeList.ForEach((a) => { groupList.Remove(a); otherList.AddRange(a); }); if (otherList.Count > 0) { groupList.Add(otherList); } } groupList.ForEach(a => maxLen2 = Math.Max(maxLen2, GetLen2(a))); double ans = 2; if (maxLen2 > 0) { ans = Math.Sqrt(maxLen2) + 2; } Console.WriteLine(ans.ToString("#################################0.#############")); } private long GetLen2(List src) { List target = new List(); List work = new List(src.OrderBy(a=>a.X)); for (int i = 0; i < Math.Min(5, work.Count); i++) { if (!target.Contains(work[i])) { target.Add(work[i]); } } work.Reverse(); for (int i = 0; i < Math.Min(5, work.Count); i++) { if (!target.Contains(work[i])) { target.Add(work[i]); } } work = new List(src.OrderBy(a => a.Y)); for (int i = 0; i < Math.Min(5, work.Count); i++) { if (!target.Contains(work[i])) { target.Add(work[i]); } } work.Reverse(); for (int i = 0; i < Math.Min(5, work.Count); i++) { if (!target.Contains(work[i])) { target.Add(work[i]); } } work = new List(src.OrderBy(a => Math.Abs(a.X) + Math.Abs(a.Y))); for (int i = 0; i < Math.Min(5, work.Count); i++) { if (!target.Contains(work[i])) { target.Add(work[i]); } } work.Reverse(); for (int i = 0; i < Math.Min(5, work.Count); i++) { if (!target.Contains(work[i])) { target.Add(work[i]); } } long ans = 0; for (int i = 0; i < target.Count - 1; i++) { for (int j = i + 1; j < target.Count; j++) { long tmp = (target[i].X - target[j].X) * (target[i].X - target[j].X); tmp += (target[i].Y - target[j].Y) * (target[i].Y - target[j].Y); ans = Math.Max(ans, tmp); } } return ans; } public class Pos { public long X; public long Y; public Pos(int[] pos) { this.X = pos[0]; this.Y = pos[1]; } } public class Reader { public static bool IsDebug = true; private static String PlainInput = @" 2 3 3 12 1 "; private static System.IO.StringReader Sr = null; public static string ReadLine() { if (IsDebug) { if (Sr == null) { Sr = new System.IO.StringReader(PlainInput.Trim()); } return Sr.ReadLine(); } else { return Console.ReadLine(); } } public static int[] GetInt(char delimiter = ' ', bool trim = false) { string inptStr = ReadLine(); if (trim) { inptStr = inptStr.Trim(); } string[] inpt = inptStr.Split(delimiter); int[] ret = new int[inpt.Length]; for (int i = 0; i < inpt.Length; i++) { ret[i] = int.Parse(inpt[i]); } return ret; } } static void Main() { Program prg = new Program(); prg.Proc(); } }