while 1:_=map(int,raw_input().split());print`sorted(x+y for x in _*1for y in-_.pop(0)*_+_)`.replace(' ','')