can u tell me whats wrong in my code…most of the ans are right at spojtoolkit.com…however am getting WA…plxz help
n=int(input())
def tbeam(m):
x=[]
y=[]
ymax=0
ymin=0
xmax=0
xmin=0
for i in range(m):
a,b=input().split()
x.append(float(a))
y.append(float(b))
ymax=max(y)
ymax_x=x[y.index(ymax)]
ymin=min(y)
xmax=max(x)
xmax_y=y[x.index(xmax)]
xmin=min(x)
if len(x)==1:
xmin=0
if len(y)==1:
ymin=0
x1=float(xmax+xmin)/2
y1=float(ymax+ymin)/2
rd_x=float(((x1-xmax)**2+((y1-xmax_y)**2))**0.5)
rd_y=float(((x1-ymax_x)**2+((y1-ymax)**2))**0.5)
if rd_x>rd_y:
print("{0:.2f}".format(round(rd_x,2)))
else:
print("{0:.2f}".format(round(rd_y,2)))
print("{0:.2f}".format(round(x1,2)),"{0:.2f}".format(round(y1,2)))
for i in range(n):
m=int(input())
tbeam(m)