SecondMax/Stephan
SecondMax/abrivan
n1x_max = int(input())n1f_max = int(input())
2y_max = int(input())2s_max = int(input())
33
n4if x_max == y_max == 0:n4if f_max == s_max == 0:
5    print('Error')5    print('Error')
n6elif y_max == 0:n6elif s_max == 0:
7    print('NO')7    print('NO')
8else:8else:
n9    if x_max < y_max:n9    if f_max < s_max:
10        x_max, y_max = y_max, x_max10        f_max, s_max = s_max, f_max
11    elem = int(input())11    elem = int(input())
12    while elem != 0:12    while elem != 0:
n13        if elem > x_max:n13        if elem > f_max:
14            y_max, x_max = x_max, elem14            s_max, f_max = f_max, elem
15        elif (elem > y_max) and (elem != x_max):15        elif (elem > s_max) and (elem != f_max):
16            y_max = elem16            s_max = elem
17        elem = int(input())17        elem = int(input())
n18    if x_max == y_max:n18    if f_max == s_max:
19        print('NO')19        print('NO')
20    else:20    else:
t21        print(y_max)t21        print(s_max)
2222
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op