Universal Cup Judging System

Universal Cup

実行時間制限: 2.0 s メモリ制限: 1024 MB 満点: 100 ハック可能 ✓
統計

You have a round wheel. The length of its perimeter along the outer circumference is $k$ meters.

You drew a long straight line on a flat surface and placed the wheel on it, then performed the following action $n$ times: roll the wheel along the line, alternating the direction. That is, if during the $i$-th action the wheel rolled forwards, then during the $(i + 1)$-th action it rolled backwards, and vice versa. During the $i$-th action, the wheel traveled exactly $a_i$ meters.

Now you would like to know the minimum and maximum number of times any point on the outer circumference of the wheel touched the surface.

Input

The first line contains an integer $t$ ($1 \le t \le 10^5$), denoting the number of test cases.

Then, $t$ test case descriptions follow. The first line of a description contains two integers $n$ and $k$ ($1 \le n \le 3 \cdot 10^5$, $1 \le k \le 10^{18}$), denoting the number of actions and the perimeter of the wheel, respectively.

The second line contains $n$ integers $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 10^{12}$), denoting the distances the wheel traveled during the $1, 2, \dots, n$-th actions.

It is guaranteed that the sum of $n$ across all test cases does not exceed $3 \cdot 10^5$.

Output

For each test case, print two integers: the minimum and maximum number of times any point on the outer circumference of the wheel touched the surface.

Examples

Input 1

2
3 4
4 8 4
2 7
6 5

Output 1

4 5
0 2

Note

Note that in this problem, the input and output data can be quite large. It is recommended to use means of speeding up operations with input and output data that are available in your programming language.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.