QOJ.ac

QOJ

実行時間制限: 1 s メモリ制限: 128 MB 満点: 100

#4854. Virus

統計

The secret organization K has recently created a computer virus so powerful that it can break into any computer in the world. They placed the virus on a memory card and locked the card in a safe that opens with a combination of three real numbers, $X$, $Y$, and $Z$. The combination is not necessarily unique. Since the virus is very dangerous, organization K does not want all secret agents to have access to the secret combination. To this end, they gave each agent a piece of information in such a way that no single agent can open the safe on their own, but only by using information from all the others. The information is encoded using four numbers $A$, $B$, $C$, and $D$, and it signifies that for the safe combination, the following holds:

$$A \cdot X + B \cdot Y + C \cdot Z \le D$$

Mirko is afraid that organization K might use the virus to destroy the servers of his favorite computer game, where he and his neighbor Slavko raise chickens and plant carrots. He has stolen the information from all of organization K's secret agents and wants to break into the safe and destroy the virus. However, a problem has arisen. Mirko does not know how to construct the safe combination from a set of inequalities. Help Mirko and find one combination of $X$, $Y$, and $Z$ that satisfies all the inequalities.

Input

The first line contains an integer $N$ ($1 \le N \le 100$), the number of agents.

The next $N$ lines contain four integers $A_i$, $B_i$, $C_i$, and $D_i$ ($-1000 \le A_i, B_i, C_i, D_i \le 1000$).

Output

In the first and only line, print three real numbers separated by a space, $X$, $Y$, and $Z$, that satisfy all the inequalities. The solution is not necessarily unique. An absolute deviation of $10^{-3}$ from each inequality is allowed. In other words, the solution will be accepted if the following holds:

$$A_i \cdot X + B_i \cdot Y + C_i \cdot Z - 10^{-3} \le D_i$$

for all $i$ from $1$ to $N$.

In case no solution exists, print "banana" (without quotes).

Examples

Input 1

4 
1 1 0 4 
0 1 2 -3 
1 0 0 2 
-1 0 0 -1

Output 1

1.5 2.0 -5.0

Input 2

2 
4 -5 -1 2 
-1 -2 1 -4

Output 2

3.0 5.0 2.0

Input 3

3 
1 0 0 5 
0 1 0 3 
-1 -1 0 -10

Output 3

banana

Note

Explanation of the first test example: The information we know about the safe combination is: $X + Y \le 4$, $Y + 2 \cdot Z \le -3$, $X \le 2$, $-X \le -1$. It is easy to verify that the combination $(1.5, 2, -5)$ indeed satisfies all the inequalities.

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.