-- yukicoder My Practice -- author: Leonardone @ NEETSDKASU main = print . snd . foldl f (0, 0) . map read . tail . words =<< (getLine >> getLine) where f tp nm = if nm > fst tp then (nm, snd tp) else if nm > snd tp then (fst tp, nm) else tp