Buggy python submission (verdict: Runtime Error):
# Cross product
def cross(p1, p2, q1, q2):
    p = p2 - p1
    q = q2 - q1
    return p.real * q.imag - p.imag * q.real

# Rotating calipers
def convex_diameter(points, n):
    points.append(points[0])
    p0 = points[0]
    p1 = points[1]
    for i, (q1, q2) in enumerate(zip(points[1:], points[2:]), start=1):
        if cross(p0, p1, q1, q2) <= 0:
            break
    
    max_d = abs(points[i] - points[0])

    points.append(points[1])
    side1 = zip(points[0:i+1], points[1:i+2])
    side2 = zip(points[i:n+1], points[i+1:])
    p1, p2 = side1.__next__()
    q1, q2 = side2.__next__()
    
    for i in range(n - 1):
        if cross(p1, p2, q1, q2) > 0:
            q1, q2 = side2.__next__()
        else:
            p1, p2 = side1.__next__()
        max_d = max(max_d, abs(p1 - q1))

    return max_d

# Acceptance of input
def string_to_complex(s):
    x, y = map(float, s.split())
    return x + y * 1j

import sys

file_input = sys.stdin

n = int(file_input.readline())

P = [string_to_complex(line) for line in file_input]

# Output
ans = convex_diameter(P, n)
print('{:f}'.format(ans))

Fixed submission:
# Cross product
def cross(p1, p2, q1, q2):
    p = p2 - p1
    q = q2 - q1
    return p.real * q.imag - p.imag * q.real

# Rotating calipers
er = 1e-16

def convex_diameter(points, n):
    points.append(points[0])
    p0 = points[0]
    p1 = points[1]
    for i, (q1, q2) in enumerate(zip(points[1:], points[2:]), start=1):
        if cross(p0, p1, q1, q2) < -er:
            break
    
    max_d = abs(points[i] - points[0])

    points.append(points[1])
    side1 = zip(points[0:i+1], points[1:i+2])
    side2 = zip(points[i:n+1], points[i+1:])
    p1, p2 = side1.__next__()
    q1, q2 = side2.__next__()
    
    for i in range(n - 1):
        if cross(p1, p2, q1, q2) > er:
            q1, q2 = side2.__next__()
        else:
            p1, p2 = side1.__next__()
        max_d = max(max_d, abs(p1 - q1))

    return max_d

# Acceptance of input
def string_to_complex(s):
    x, y = map(float, s.split())
    return x + y * 1j

import sys

file_input = sys.stdin

n = int(file_input.readline())

P = [string_to_complex(line) for line in file_input]

# Output
ans = convex_diameter(P, n)
print('{:f}'.format(ans))

Buggy python submission (verdict: Runtime Error):
# Cross product
def cross(p1, p2, q1, q2):
    p = p2 - p1
    q = q2 - q1
    return p.real * q.imag - p.imag * q.real

# Rotating calipers
def convex_diameter(points, n):
    points.append(points[0])
    p0 = points[0]
    p1 = points[1]
    for i, (q1, q2) in enumerate(zip(points[1:], points[2:]), start=1):
        if cross(p0, p1, q1, q2) < 0:
            break
    
    max_d = abs(points[i] - points[0])

    points.append(points[1])
    side1 = zip(points[0:i+1], points[1:i+2])
    side2 = zip(points[i:n+1], points[i+1:])
    p1, p2 = side1.__next__()
    q1, q2 = side2.__next__()
    
    for i in range(n - 1):
        if cross(p1, p2, q1, q2) > 0:
            q1, q2 = side2.__next__()
        else:
            p1, p2 = side1.__next__()
        max_d = max(max_d, abs(p1 - q1))

    return max_d

# Acceptance of input
def string_to_complex(s):
    x, y = map(float, s.split())
    return x + y * 1j

import sys

file_input = sys.stdin

n = int(file_input.readline())

P = [string_to_complex(line) for line in file_input]

# Output
ans = convex_diameter(P, n)
print('{:f}'.format(ans))

Fixed submission:
# Cross product
def cross(p1, p2, q1, q2):
    p = p2 - p1
    q = q2 - q1
    return p.real * q.imag - p.imag * q.real

# Rotating calipers
er = 1e-16

def convex_diameter(points, n):
    points.append(points[0])
    p0 = points[0]
    p1 = points[1]
    for i, (q1, q2) in enumerate(zip(points[1:], points[2:]), start=1):
        if cross(p0, p1, q1, q2) < -er:
            break
    
    max_d = abs(points[i] - points[0])

    points.append(points[1])
    side1 = zip(points[0:i+1], points[1:i+2])
    side2 = zip(points[i:n+1], points[i+1:])
    p1, p2 = side1.__next__()
    q1, q2 = side2.__next__()
    
    for i in range(n - 1):
        if cross(p1, p2, q1, q2) > er:
            q1, q2 = side2.__next__()
        else:
            p1, p2 = side1.__next__()
        max_d = max(max_d, abs(p1 - q1))

    return max_d

# Acceptance of input
def string_to_complex(s):
    x, y = map(float, s.split())
    return x + y * 1j

import sys

file_input = sys.stdin

n = int(file_input.readline())

P = [string_to_complex(line) for line in file_input]

# Output
ans = convex_diameter(P, n)
print('{:f}'.format(ans))