{"raw_statement":[{"iden":"statement","content":"Two best chess teams in the world are preparing to the match against each other. Both teams have n players. Each player has a rating, and the player with the higher rating always wins. Ratings of the players in the first team are a1, a2, ..., an, and in the second team — b1, b2, ..., bn. There are no players with equal ratings in both teams.\n\nThe chess match between two teams consists of n games, called the games on the first, second, ..., n-th board. Before the match captains of both teams must decide which player will play on which board. When they do that, they don't know the opponent's choice.\n\nAfter that a single game is played on each board. The team with the higher score wins.\n\nFor both teams, determine if it can win the match.\n\nThe first line contains a single integer n (1 ≤ n ≤ 200000) — the number of players in each team.\n\nThe second line contains n space-separated integers ai (1 ≤ ai ≤ 109) — the ratings of the players in the first team.\n\nThe third line contains n space-separated integers bi (1 ≤ bi ≤ 109) — the ratings of the players in the second team.\n\nAll ai and bi are pairwise distinct.\n\nOutput «_First_» if only first team can win, «_Second_» if only second team can win, «_Both_» if both teams can win, and «_None_» if there will be a draw in any case. Don't output quotes.\n\n"},{"iden":"input","content":"The first line contains a single integer n (1 ≤ n ≤ 200000) — the number of players in each team.The second line contains n space-separated integers ai (1 ≤ ai ≤ 109) — the ratings of the players in the first team.The third line contains n space-separated integers bi (1 ≤ bi ≤ 109) — the ratings of the players in the second team.All ai and bi are pairwise distinct."},{"iden":"output","content":"Output «_First_» if only first team can win, «_Second_» if only second team can win, «_Both_» if both teams can win, and «_None_» if there will be a draw in any case. Don't output quotes."},{"iden":"examples","content":"Input51 3 5 7 92 4 6 8 10OutputBothInput51 2 3 4 56 7 8 9 10OutputSecondInput49001 9002 1 38 6 4 2OutputFirstInput21 100000000010000 100000OutputNone"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $, $ A = (a_1, a_2, \\dots, a_n) $, $ B = (b_1, b_2, \\dots, b_n) $ be sequences of distinct positive integers representing the ratings of players in team 1 and team 2, respectively.\n\n**Constraints**  \n$ 1 \\leq n \\leq 200000 $, $ 1 \\leq a_i, b_j \\leq 10^9 $, all elements in $ A \\cup B $ are distinct.\n\n**Objective**  \nDetermine whether team 1 can win (i.e., score > team 2), team 2 can win, both can win, or neither can win (i.e., all match outcomes result in a draw), under optimal and independent assignment of players to boards (i.e., both teams choose bijections $ \\sigma, \\tau: [n] \\to [n] $ independently to assign their players to boards, and the outcome of board $ i $ is determined by comparing $ a_{\\sigma(i)} $ and $ b_{\\tau(i)} $).\n\nLet $ W_1 $ be true if there exists a permutation $ \\sigma $ such that for all permutations $ \\tau $, the number of $ i \\in [n] $ with $ a_{\\sigma(i)} > b_{\\tau(i)} $ is strictly greater than the number with $ a_{\\sigma(i)} < b_{\\tau(i)} $.  \nLet $ W_2 $ be true if there exists a permutation $ \\tau $ such that for all permutations $ \\sigma $, the number of $ i \\in [n] $ with $ b_{\\tau(i)} > a_{\\sigma(i)} $ is strictly greater than the number with $ b_{\\tau(i)} < a_{\\sigma(i)} $.\n\nOutput:  \n- “First” if $ W_1 \\land \\neg W_2 $  \n- “Second” if $ \\neg W_1 \\land W_2 $  \n- “Both” if $ W_1 \\land W_2 $  \n- “None” if $ \\neg W_1 \\land \\neg W_2 $","simple_statement":"Two teams, each with n players, have distinct ratings. In a match, each player plays one game on a board, and higher rating always wins. Teams choose their board assignments without knowing the opponent's choice. Determine which team(s) can win the match (i.e., have more wins). Output: \"First\", \"Second\", \"Both\", or \"None\".","has_page_source":false}