# Bubble in Array

Volumes:   Beginner's problems

This problem provides an exercise for learning core idea of infamous ordering algorithm - bubble sort - which you are supposed to program bit later.

Given integer array, you are to iterate through all pairs of neighbor elements, starting from beginning - and swap members of each pair where first element is greater than second.

For example, let us consider small array of elements `1 4 2 3 6 5`, marking which pairs are swapped and which are not:

``````(1  4) 3  2  6  5  - pass
1 (4  3) 2  6  5  - swap
1  3 (4  2) 6  5  - swap
1  3  2 (4  6) 5  - pass
1  3  2  4 (6  5) - swap
1  3  2  4  5  6  - end
``````

This operation moves some greater elements right (to the end of array) and some smaller elements left (to the beginning).
What is the most important: biggest element in necessarily moved to the last position.

Input data contain sequence of elements of the array terminated by `-1` (which should not be included).
Answer should contain two values - number of performed swaps and checksum of the array after processing (separated by spaces). Checksum should be calculated with exactly the same method as in the task Array Checksum.

Example:

``````input data:
1 4 3 2 6 5 -1