Show
Limits: 2 sec., 256 MiB
This statement was translated automatically from Ukrainian. In case of any discrepancy, the Ukrainian version is authoritative.
In Romania after the competition, the Chef organized a grandiose show that attracted almost half of Bucharest. Gluk and Margaritka participated in this show. They took turns performing an energetic belly dance and received scores from the judges. After that, the Chef determined the winner.
Margaritka’s advantage was that she is a girl. And Gluk’s advantage was, of course, the IBM bag on his head. The Chef considered the winner to be the one whose product of scores was the greatest. If the products of Gluk’s and Margaritka’s scores were equal, then the one with the better maximum score won. If the maximum scores are also equal, then the one with the second-best maximum score wins, and so on. If the sets of scores are completely identical, then Margaritka wins. I hope she properly appreciates the Chef’s choice.
Your task is — knowing the judges’ scores, to determine the winner.
Input
The first line contains an integer \(n\) — the number of judges.
The second line contains \(n\) integers \(g_i\) — Gluk’s scores.
The third line contains Margaritka’s scores \(m_i\) in the same format.
Output
Print a single line with the name of the winner — Gluk
or Margaritka.
Constraints
\(1 \le n \le 10^5\),
\(1 \le g_i, m_i \le 10\).
Samples
| Input (stdin) | Output (stdout) |
|---|---|
| 3 3 1 3 2 2 2 | Gluk |
| Input (stdin) | Output (stdout) |
|---|---|
| 5 1 3 10 10 3 10 9 2 5 1 | Gluk |
| Input (stdin) | Output (stdout) |
|---|---|
| 5 1 3 5 7 4 4 5 7 3 1 | Margaritka |
Submit a solution
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|