Platforms - an additional criterion for optimization#5847

Platforms - an additional criterion for optimization

2 seconds
64 megabytes
Very easy

In many classic 2D games, you may encounter a situation where a hero jumps across platforms (or islands) suspended in the air. The hero must travel from one edge of the screen to the other. When jumping from one platform to the next, the hero spends |y_2 - y_1| units of energy, where y_2 and y_1 are the heights of the respective platforms. Additionally, the hero has a special move that allows skipping one platform, but this costs 3 \cdot |y_2 - y_1| units of energy. Naturally, the hero should conserve as much energy as possible.

Input

The first line contains an integer (2 \leq N \leq 100\,000) — the number of platforms. The second line contains integers, the heights of the platforms. Each height does not exceed in absolute value.

Output

Print two integers separated by a space: the minimum energy required, and the minimum possible number of jumps among all ways to reach the last platform with this energy.

Examples

Example 1

Loading
Loading

Note

In the first example, the second answer is (not ), because the problem asks for the minimum number of jumps among the paths that use the minimum amount of energy. In this case, the minimum energy () is achieved only through a single path that uses jumps.