Georg's new MP3 player has a key-lock feature. The keyboard locks automatically after more than $T$ seconds without any keypress. While the keyboard is locked, no key performs its normal function; the next keypress only unlocks the keyboard and does nothing else. Every keypress — whether it unlocks the keyboard or performs its function — resets the inactivity timer.
For example, suppose $T = 5$ and the keyboard is currently locked. Georg presses key A, waits 3 seconds, presses B, waits 5 seconds, presses C, waits 6 seconds, and presses D. Only B and C perform their normal function: the first press A merely unlocks the keyboard, and the 6-second gap before D exceeds $T$, so the keyboard relocks and D only unlocks it again.
The volume is controlled by the + and - keys, which raise and lower it by one unit respectively. The volume is an integer between $0$ and $V_{max}$. Pressing + while the volume is $V_{max}$, or - while it is $0$, leaves the volume unchanged.
Georg does not know $T$ and wants to find it experimentally. Starting from a locked keyboard, he pressed a sequence of $N$ keys, each + or -, and then read the final volume from the display. He forgot to note the volume before his first keypress. Let $V_1$ denote that unknown initial volume and $V_2$ the known final volume.
You are given $V_2$ together with, for each keypress, its type (+ or -) and the number of seconds from the start of the experiment. Find the largest integer $T$ that is consistent with this outcome.
The first line contains three space-separated integers $N$, $V_{max}$, and $V_2$ ($0 \le V_2 \le V_{max}$).
Each of the next $N$ lines describes one keypress: the character + or -, a space, and an integer $C_i$ ($0 \le C_i \le 2 \cdot 10^9$) giving the time in seconds from the start of the experiment. The keypresses are listed in chronological order and all times are distinct, i.e. $C_i < C_{i+1}$ for every $1 \le i < N$.
If $T$ can be arbitrarily large, print a single line containing the word infinity.
Otherwise, print a single line with two integers $T$ and $V_1$ separated by one space, such that performing the experiment with lock time $T$ starting from volume $V_1$ yields the final volume $V_2$. If several values of $T$ are possible, print the largest one; if several values of $V_1$ still remain, print the largest one.
At least one answer always exists: when $T = 0$ no key ever performs its function, so $V_1 = V_2$ is always valid.
$2 \le N \le 100000$ and $2 \le V_{max} \le 5000$.