The Power of the Hero#1893

The Power of the Hero

1 second
64 megabytes
Very easy

In Petryk's game, each hero has combat attributes: attack power, defense power, magic power, and knowledge power. Initially, these attributes are set to random values. As the hero gains experience and levels up, the player can increase any one of these attributes by for each level gained.

Petryk thinks that a hero's effectiveness is the sum of the squares of the attributes. Vasya believes effectiveness is determined by the product of these numbers.

Kolya is confused and asks you to help determine the maximum effectiveness his hero can achieve according to both Petryk's and Vasya's formulas after increasing the level a specified number of times.

Input

The first line contains four numbers , , , — the initial combat attributes of Kolya's hero. The second line contains the number of level-ups. All numbers are non-negative integers not exceeding .

Output

Output two integers — the maximum effectiveness the hero can achieve according to Petryk's formula, and the maximum effectiveness according to Vasya's formula.

Examples

Example 1

Loading
Loading