a, b, c, x, y = tuple(map(lambda i: int(i), input().split()))

print(a+b,c*2)
if a + b > c * 2:
    if a > c or b > c:
        print(c*y*2 if x<y else c*x*2)
    else:
        num_c = (x if x < y else y) * 2
        print((b*(y-x) if x < y else a*(x-y)) + c*num_c)
else:
    print(a*x + b*y)
