while true do
    ary = gets.split(" ").map(&:to_i)
    
    x = ary.max
    y = ary.min
    sum = 0
    a.each{ |z| sum += z }
    i = 0
    i = i + 1
    new = [x, y, sum]
    
    if i == 2 then
        puts new.join(" ")
    end
end