Route

No attempts yetTime limit2sMemory limit1024 MB

Problem

A jogging route in the countryside is a loop, so the starting point is also the finishing point. Poles stand along the route at intervals of 11 metre, and the height of the ground at each pole is measured in centimetres above sea level.

The poles are numbered 11 to NN in the jogging direction. A jogger starts at pole 11, passes poles 2,3,,N2, 3, \ldots, N in order, then comes back to pole 11 and stops. The ground between two neighbouring poles is a straight line.

The 11 metre section between two neighbouring poles is level, uphill, or downhill. It is level when the two heights are equal, uphill when the later pole is higher, downhill when the later pole is lower.

A plain, an up-slope, and a down-slope are the longest continuous stretches of level, uphill, and downhill sections in the jogging direction. The jogger stops at pole 11, so a stretch never continues past the starting point. A stretch that ends at pole 11 and a stretch that begins at pole 11 are counted separately even when they are of the same kind.

Count the plains, the up-slopes, and the down-slopes on the route.

Input

The first line contains the length of the route in metres, NN. (3N300003 \le N \le 30000)

Each of the next NN lines contains one pole height in the jogging direction. The ii-th of these lines holds HiH_i, the height of pole ii in centimetres above sea level, a positive integer. (1Hi300001 \le H_i \le 30000)

Output

Print three numbers on one line in this order: the number of plains, the number of up-slopes, the number of down-slopes. Put one space between two adjacent numbers.