In recent years, the ICPC community has expanded its global presence, with annual participation encompassing 111 countries, involving 3,450 universities, and engaging 75,000 team members, coaches, and volunteers. However, it is important to note that only approximately 130 teams earn the opportunity to advance to the annual ICPC World Finals. Specifically, for the 2023 ICPC World Finals, only 16 teams from the Asia Pacific Region have qualified. In the 2022 ICPC Asia Pacific Regional Contests, an impressive turnout saw over 1,800 teams representing 283 universities. Regrettably, the vast majority of these teams, more than $$$99\%$$$, were unable to progress beyond the regional contests.
The ICPC Asia Pacific Region has introduced the Asia Pacific playoff as a new tier in the selection process for teams to participate in the 2024 ICPC World Finals. This playoff represents a higher level of competition compared to the regional contests. In 2024, the first Asia Pacific playoff will take place in Hanoi, Vietnam. Approximately 66 teams will earn their spots in this playoff based on the rules outlined in the ICPC Asia Pacific Rules section. This expansion ensures that a greater number of teams will have opportunities to engage in higher-level contests in the coming years.
Due to the introduction of ICPC Asia Pacific Playoff contest, the ICPC Asia Pacific Rules have been changed greatly. After reading the new rules, you find that you are allowed to participate two regional contests in 2023 to have a better chance to advance to the playoff. Your team plans to participate the ICPC Taoyuan Regional Contest and the ICPC Jakarta Regional Contest in 2023. Assume that your team's recomputed team ranks and the site scores of both regional contests are given. Please write a program to determine in which regional contest your team has a better chance of advancing.
(Note: The definition of recomputed team rank and site score can be found in the ICPC Asia Pacific Rules section.)
The first line of the input contains four space-separated numbers $$$R_T,R_J,S_T,S_J$$$. $$$R_T$$$ and $$$R_J$$$ are your team's recomputed team ranks of Taoyuan Regional and Jakarta Regional, respectively. $$$S_T$$$ and $$$S_J$$$ are the site scores of Taoyuan Regional and Jakarta Regional, respectively.
If your team has a better chance of advancing in Taoyuan Regional, output TAOYUAN. If your team has a better chance of advancing in Jakarta Regional, output JAKARTA. If the chances are equally good, output SAME.
1 2 34.56 56.78
TAOYUAN
2 3 45.67 98.01
JAKARTA
4 5 33.33 44.44
SAME
The following rules do not apply to teams from South Pacific (Australia, New Zealand, etc.). World Finals teams will be selected from the South Pacific Independent Regional Contest independently of the other Asia Pacific regionals.
Basic rules of Asia Pacific regionals
Selection rules for the World Finals (part 1)
Site scores of regionals
(Note) The above formula is copied from the World Finals team selection rules in Asia Pacific since 2020.
Selection rules for the playoff
(Note) From the winner universities, only the winner teams can compete in the playoff. Other teams (second or lower in the regional ranking) are not allowed to compete.
(Note) Winner teams are included in the playoff ranking, but are removed in E1(1) below, not affecting the qualification of teams from other universities.
(Note) The intent of step (3) is to never allow teams in the lower half ranking of a regional to compete in the playoff. This step is effective only in rare cases. For example, teams from under- represented countries will not be qualified unless it gets a rank in the top half. See D3(3).
(Note) The maximum number of teams from a single university competing in the playoff is 3. See D3(2).
(Note) This definition and the following steps are based on Shieh-Ishihata formula. It was the main part of the World Finals team selection rules in Asia Pacific, before COVID-19.
(Note) The fourth or lower teams are already removed in D2(5), but this step is necessary.
(Note) This is a wild-card rule for under-represented countries. At least one team is qualified from every country. However, there is a condition. The team must be in the top half rank of a regional. See D2(3).
(Note) In the case of D4, site scores are not recomputed.
(Note) There will be no penalty to the teams declining to compete in the playoff.
Selection rules for the World Finals (part 2)
| Name |
|---|


