這邊是py程式碼~
character = int(input())
temp = float("-inf")
secondtemp = float("-inf")
tempatk = float("-inf")
tempdef = float("-inf")
secondatk = float("-inf")
seconddef = float("-inf")
for i in range(character):
attack,defense = [int(i) for i in input().split()]
if attack**2 + defense**2 > temp:
secondtemp = temp
secondatk = tempatk
seconddef = tempdef
temp = attack**2 + defense**2
tempatk = attack
tempdef = defense
if attack**2 + defense**2 > secondtemp and attack**2 + defense**2 < temp:
secondtemp = attack**2 + defense**2
secondatk = attack
seconddef = defense
print(secondatk,seconddef)