#P1326. 足球

足球

Description

Many of us love Chinese football; we all know the rules of the Chinese Super League (CSL):

In a match, if you win (i.e., your goals are strictly greater than your opponent's), you get 33 points; if you draw (i.e., your goals equal your opponent's), you get 11 point; if you lose (i.e., your goals are strictly less than your opponent's), you get 00 points.

This problem is simple: suppose over NN rounds you scored SS goals in total and conceded TT goals. What are the maximum and minimum points you could possibly obtain?

Input Format

Multiple test cases. Each test case contains one line with three integers S,T,NS, T, N (109S,T010^9 \ge S, T \ge 0, 109N110^9 \ge N \ge 1). There are at most 3×1043 \times 10^4 test cases per test point.

Output Format

For each test case, output one line with two integers: the maximum points and the minimum points.

1 1 1
1 1 2
1 1
3 2

Hint

Translated by ChatGPT 5