시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB168524932.450%

문제

Petya was bored during the lockdown, so he came up with a new single player game that uses random numbers generator.

The game consists of several rounds, each round consists of one or more moves. Throughout the game Petya keeps track of his current score.

At the beginning of every round Petya has the score equal to $n$. Every move the generator outputs a non-negative integer and Petya tries to subtract it from his current score. If the result is non-negative, he changes his score to the result of the subtracation, otherwise, the result is ignored and the score does not change. For example, if the current score is $3$, and the generator outputs $2$, Petya does the subtraction and the score changes to $1$. If the generator output is $5$, the result is ignored and the score remains $3$.

If the score after the current move is $0$, the round ends, and at the beginning of the next move Petya is back to the score of $n$.

Lockdown had ended long ago, but Petya has suddenly came across a sheet of paper that contains a sequence of $k$ integers ---generator output throughout the game. The boy wonders how many rounds had he played and what was his current score when he stopped the game. Help him find it out using the notes on the sheet.

입력

The first line of input contains two integers: $k$ --- the number of moves Petya made, $n$ --- the score at the beginning of every round ($1 \le k \le 100\,000$, $1 \le n \le 10^8$).

The second line contains $k$ integers --- output of random numbers generator ($0 \le a_i \le 10^8$).

출력

The first line must contain one integer --- the amount of played rounds.

The second line must contain one integer --- the score at the end of the game. 

If the last move of the game had ended the round, Petya didn't not begin a new round and his score was $0$.

예제 입력 1

4 3
1 2 4 1

예제 출력 1

1
2