int input for in range int input append for in range len for in range

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
n=int(input())
a=[]
b=[]
for i in range (n):
m=int(input())
a.append(m)
for i in range (len(a)):
for j in range (i+1,len(a)):
if a[i]>a[j] and (a[i]+a[j])%211==0:
b.append(a[i])
b.append(a[j])
b.append(a[i]+a[j])
k=max(b)
c=b.index(k)
print(b[c-2],b[c-1])