output_description: Print the diameter of g in a line. The output values should be in a decimal
  fraction with an error less than 0.000001.
input_description: n
      x1 y1 
      x2 y2
      :
      xn yn
      
  
  The first integer n is the number of points in g.
  
  In the following lines, the coordinate of the i-th point pi is given by two
  real numbers xi and yi. The coordinates of points are given in the order of
  counter-clockwise visit of them. Each value is a real number with at most 6
  digits after the decimal point.
attempt: from sys import stdin
  
  readline = stdin.readline
  
  
  def cross(a, b):
      return a.real * b.imag - a.imag * b.real
  
  
  def dot(a, b):
      return a.real * b.real + a.imag * b.imag
  
  
  def diff(p, i):
      return p[(i + 1) % len(p)] - p[i]
  
  
  # http://www.prefield.com/algorithm/geometry/convex_diameter.html
  def convex_diameter(p):
      js = ks = 0
      for i in range(1, len(p)):
          if p[i].imag > p[js].imag:
              js = i
          if p[i].imag < p[ks].imag:
              ks = i
  
      maxd = abs(p[js] - p[ks])
      j, k = js, ks
      while True:
          if cross(diff(p, j), diff(p, k)) >= 0:
              k = (k + 1) % len(p)
          else:
              j = (j + 1) % len(p)
          if maxd < abs(p[j] - p[k]):
              maxd = abs(p[j] - p[k])
          if j == js and k == ks:
              break
      return maxd
  
  
  n = int(readline())
  p = [map(float, readline().split()) for _ in range(n)]
  p = [x + y * 1j for x, y in p]
  print("{:.2f}".format(convex_diameter(p)))
  
problem_description: Diameter of a Convex Polygon
  
    
  
  Find the diameter of a convex polygon g. In other words, find a pair of points
  that have maximum distance between them.
samples: [{"input": "3\n    0.0 0.0\n    4.0 0.0\n    2.0 2.0", "output": "4.00"}, {"input": "4\n    0.0 0.0\n    1.0 0.0\n    1.0 1.0\n    0.0 1.0", "output": "1.414213562373"}]