why my solution is getting TLE

question link: https://www.codechef.com/ZCOPRAC/problems/ZCO16002/

my solution:

```
`count = 0
arr = list(map(int, input().split()))
n = arr[0]
l = []
height = arr[1:]
height.sort()
z = []
if n <= 2:
print(2)
exit()
for i in range(n):
for h in range(i+1, n):
z.append(height[h]-height[i])
for m in set(z):
l.append(z.count(m))
print(max(l))`
```