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