context
stringlengths
88
7.54k
groundtruth
stringlengths
9
28.8k
groundtruth_language
stringclasses
3 values
type
stringclasses
2 values
code_test_cases
listlengths
1
565
dataset
stringclasses
6 values
code_language
stringclasses
1 value
difficulty
float64
0
1
mid
stringlengths
32
32
There are n cities and m roads in Berland. Each road connects a pair of cities. The roads in Berland are one-way. What is the minimum number of new roads that need to be built to make all the cities reachable from the capital? New roads will also be one-way. Input The first line of input consists of three integers n, m and s (1 ≤ n ≤ 5000, 0 ≤ m ≤ 5000, 1 ≤ s ≤ n) — the number of cities, the number of roads and the index of the capital. Cities are indexed from 1 to n. The following m lines contain roads: road i is given as a pair of cities u_i, v_i (1 ≤ u_i, v_i ≤ n, u_i ≠ v_i). For each pair of cities (u, v), there can be at most one road from u to v. Roads in opposite directions between a pair of cities are allowed (i.e. from u to v and from v to u). Output Print one integer — the minimum number of extra roads needed to make all the cities reachable from city s. If all the cities are already reachable from s, print 0. Examples Input 9 9 1 1 2 1 3 2 3 1 5 5 6 6 1 1 8 9 8 7 1 Output 3 Input 5 4 5 1 2 2 3 3 4 4 1 Output 1 Note The first example is illustrated by the following: <image> For example, you can add roads (6, 4), (7, 9), (1, 7) to make all the cities reachable from s = 1. The second example is illustrated by the following: <image> In this example, you can add any one of the roads (5, 1), (5, 2), (5, 3), (5, 4) to make all the cities reachable from s = 5. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
def main(): import sys sys.setrecursionlimit(10**5) from collections import deque n, m, s = map(int, input().split()) s -= 1 graph = [[] for _ in range(n)] for _ in range(m): u, v = map(int, input().split()) graph[u-1].append(v-1) seen = [False]*n li = deque() def visit(node): if not seen[node]: seen[node] = True for c_node in graph[node]: visit(c_node) li.appendleft(node) def visit2(node): if not seen[node]: seen[node] = True for c_node in graph[node]: visit2(c_node) for i in range(n): visit(i) seen = [False]*n cnt = 0 visit2(s) for i in li: if seen[i]: continue visit2(i) cnt += 1 print(cnt) if __name__ == "__main__": try: main() except: print('error!') exit(0)
python
code_algorithm
[ { "input": "5 4 5\n1 2\n2 3\n3 4\n4 1\n", "output": "1\n" }, { "input": "9 9 1\n1 2\n1 3\n2 3\n1 5\n5 6\n6 1\n1 8\n9 8\n7 1\n", "output": "3\n" }, { "input": "2333 1 1\n1 2\n", "output": "2331\n" }, { "input": "1 0 1\n", "output": "0\n" }, { "input": "30 30 28\n16 28\n5 30\n7 17\n6 1\n12 28\n15 28\n14 30\n25 11\n25 10\n25 8\n12 30\n27 5\n30 10\n22 14\n30 13\n20 27\n15 25\n24 20\n20 15\n1 30\n3 10\n3 4\n3 18\n15 14\n18 22\n20 26\n10 3\n15 27\n23 29\n10 24\n", "output": "9\n" }, { "input": "8 8 1\n3 2\n3 4\n4 5\n5 3\n6 4\n6 7\n7 8\n8 6\n", "output": "1\n" }, { "input": "100 1 30\n69 81\n", "output": "98\n" }, { "input": "30 30 29\n29 9\n1 3\n15 5\n14 24\n7 18\n17 12\n5 9\n22 7\n26 20\n7 29\n8 2\n10 12\n17 18\n17 24\n8 12\n23 28\n10 15\n18 2\n29 13\n25 29\n9 2\n7 13\n11 5\n19 26\n10 5\n25 5\n20 10\n5 26\n24 23\n22 8\n", "output": "13\n" }, { "input": "2 0 2\n", "output": "1\n" }, { "input": "7 4 2\n1 2\n3 4\n5 6\n7 1\n", "output": "3\n" }, { "input": "39 40 38\n4 8\n24 28\n16 17\n7 25\n4 29\n34 35\n16 24\n21 10\n23 36\n36 14\n28 16\n34 19\n15 21\n22 38\n22 37\n37 27\n28 33\n3 29\n32 22\n12 30\n9 15\n5 19\n23 27\n19 17\n25 17\n24 11\n39 10\n6 20\n16 6\n3 18\n34 21\n15 38\n11 19\n11 3\n32 4\n15 13\n16 11\n11 7\n33 7\n3 33\n", "output": "12\n" }, { "input": "500 1 209\n183 107\n", "output": "498\n" }, { "input": "2 1 2\n1 2\n", "output": "1\n" }, { "input": "5000 2 238\n3212 238\n238 3212\n", "output": "4998\n" }, { "input": "7 7 1\n2 3\n4 2\n7 4\n5 7\n4 5\n4 6\n6 4\n", "output": "1\n" }, { "input": "9 9 1\n2 3\n3 4\n4 5\n6 2\n7 6\n8 7\n6 8\n5 9\n9 2\n", "output": "1\n" }, { "input": "5000 2 3810\n3225 1137\n1137 3225\n", "output": "4998\n" }, { "input": "1000 1 712\n542 916\n", "output": "998\n" }, { "input": "2 1 1\n1 2\n", "output": "0\n" }, { "input": "5000 0 2956\n", "output": "4999\n" }, { "input": "2 2 2\n1 2\n2 1\n", "output": "0\n" } ]
code_contests
python
0
e8e30322261841dc504dd0dd909b8c65
Little C loves number «3» very much. He loves all things about it. Now he is playing a game on a chessboard of size n × m. The cell in the x-th row and in the y-th column is called (x,y). Initially, The chessboard is empty. Each time, he places two chessmen on two different empty cells, the Manhattan distance between which is exactly 3. The Manhattan distance between two cells (x_i,y_i) and (x_j,y_j) is defined as |x_i-x_j|+|y_i-y_j|. He want to place as many chessmen as possible on the chessboard. Please help him find the maximum number of chessmen he can place. Input A single line contains two integers n and m (1 ≤ n,m ≤ 10^9) — the number of rows and the number of columns of the chessboard. Output Print one integer — the maximum number of chessmen Little C can place. Examples Input 2 2 Output 0 Input 3 3 Output 8 Note In the first example, the Manhattan distance between any two cells is smaller than 3, so the answer is 0. In the second example, a possible solution is (1,1)(3,2), (1,2)(3,3), (2,1)(1,3), (3,1)(2,3). Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
known = [ [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2, 4], [0, 0, 0, 4, 8, 10], [0, 0, 4, 8, 12, 14], [0, 2, 8, 12, 16, 20], [0, 4, 10, 14, 20, 24] ] n,m = map(int,input().split(" ")) if n>m: n,m = m,n if n<=5 and m<=5: print(known[m][n]) elif n==1: print(6*(m//6)+ [0,0,0,0,2,4][m%6]) elif n==2: if m==7: print(12) else: print(2*m) else: print(2*int((m*n)//2))
python
code_algorithm
[ { "input": "3 3\n", "output": "8\n" }, { "input": "2 2\n", "output": "0\n" }, { "input": "7 1\n", "output": "6\n" }, { "input": "1000000000 1000000000\n", "output": "1000000000000000000\n" }, { "input": "66666666 66668888\n", "output": "4444592488887408\n" }, { "input": "5 5\n", "output": "24\n" }, { "input": "1 8\n", "output": "6\n" }, { "input": "2 1\n", "output": "0\n" }, { "input": "1 1\n", "output": "0\n" }, { "input": "2 756870405\n", "output": "1513740810\n" }, { "input": "2 8\n", "output": "16\n" }, { "input": "2 7\n", "output": "12\n" }, { "input": "3 1\n", "output": "0\n" }, { "input": "2 4\n", "output": "8\n" }, { "input": "809324398 78797988\n", "output": "63773134201711224\n" }, { "input": "32 32\n", "output": "1024\n" }, { "input": "2 11\n", "output": "22\n" }, { "input": "1 6\n", "output": "6\n" }, { "input": "639986533 2\n", "output": "1279973066\n" }, { "input": "1 765615965\n", "output": "765615964\n" }, { "input": "11111111 77777777\n", "output": "864197513580246\n" }, { "input": "4 3\n", "output": "12\n" }, { "input": "666666666 1\n", "output": "666666666\n" }, { "input": "1 10\n", "output": "8\n" }, { "input": "2 19\n", "output": "38\n" }, { "input": "2 9\n", "output": "18\n" }, { "input": "3 233\n", "output": "698\n" }, { "input": "109806926 905318956\n", "output": "99410291607889256\n" }, { "input": "1 74074073\n", "output": "74074072\n" }, { "input": "19260817 19260817\n", "output": "370979071507488\n" }, { "input": "2 66666666\n", "output": "133333332\n" }, { "input": "233 233\n", "output": "54288\n" }, { "input": "7 2\n", "output": "12\n" }, { "input": "3 6\n", "output": "18\n" }, { "input": "11111111 66666666\n", "output": "740740725925926\n" }, { "input": "523102661 2\n", "output": "1046205322\n" }, { "input": "459312207 226690798\n", "output": "104121850735971186\n" }, { "input": "2 5\n", "output": "10\n" }, { "input": "3 5\n", "output": "14\n" }, { "input": "6 2\n", "output": "12\n" }, { "input": "2 3\n", "output": "4\n" }, { "input": "692440526 524804736\n", "output": "363396067443131136\n" }, { "input": "1 6144668\n", "output": "6144666\n" }, { "input": "23333 66666\n", "output": "1555517778\n" }, { "input": "3 7\n", "output": "20\n" }, { "input": "409449117 1\n", "output": "409449114\n" }, { "input": "567298709 870523950\n", "output": "493847112988580550\n" }, { "input": "1 882499837\n", "output": "882499836\n" }, { "input": "1 4\n", "output": "2\n" }, { "input": "13305459 753640078\n", "output": "10027527158585802\n" }, { "input": "9 1\n", "output": "6\n" }, { "input": "998244353 19260817\n", "output": "19227001804416400\n" } ]
code_contests
python
0
09aca64126e3a53a42653ff1dd2864c0
You are a coach of a group consisting of n students. The i-th student has programming skill a_i. All students have distinct programming skills. You want to divide them into teams in such a way that: * No two students i and j such that |a_i - a_j| = 1 belong to the same team (i.e. skills of each pair of students in the same team have the difference strictly greater than 1); * the number of teams is the minimum possible. You have to answer q independent queries. Input The first line of the input contains one integer q (1 ≤ q ≤ 100) — the number of queries. Then q queries follow. The first line of the query contains one integer n (1 ≤ n ≤ 100) — the number of students in the query. The second line of the query contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 100, all a_i are distinct), where a_i is the programming skill of the i-th student. Output For each query, print the answer on it — the minimum number of teams you can form if no two students i and j such that |a_i - a_j| = 1 may belong to the same team (i.e. skills of each pair of students in the same team has the difference strictly greater than 1) Example Input 4 4 2 10 1 20 2 3 6 5 2 3 4 99 100 1 42 Output 2 1 2 1 Note In the first query of the example, there are n=4 students with the skills a=[2, 10, 1, 20]. There is only one restriction here: the 1-st and the 3-th students can't be in the same team (because of |a_1 - a_3|=|2-1|=1). It is possible to divide them into 2 teams: for example, students 1, 2 and 4 are in the first team and the student 3 in the second team. In the second query of the example, there are n=2 students with the skills a=[3, 6]. It is possible to compose just a single team containing both students. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
from itertools import * q = int(input()) for _ in range(q): n = int(input()) a = list(map(int, input().split())) a.sort() cnt = 1 while len(a) > 1: a = list(a) b = [] for i in range(1, len(a)): if a[i] - a[i - 1] <= 1: b.append(a[i]) if not b: break else: cnt += 1 a = set(a) - set(b) print(cnt)
python
code_algorithm
[ { "input": "4\n4\n2 10 1 20\n2\n3 6\n5\n2 3 4 99 100\n1\n42\n", "output": "2\n1\n2\n1\n" }, { "input": "10\n1\n1\n1\n1\n1\n1\n4\n2 1 4 3\n3\n1 3 2\n1\n1\n3\n1 2 3\n5\n1 4 2 5 3\n5\n4 5 2 3 1\n4\n4 2 3 1\n", "output": "1\n1\n1\n2\n2\n1\n2\n2\n2\n2\n" }, { "input": "1\n1\n100\n", "output": "1\n" }, { "input": "1\n2\n1 31\n", "output": "1\n" }, { "input": "1\n2\n99 97\n", "output": "1\n" }, { "input": "10\n5\n3 4 1 5 2\n2\n2 1\n4\n4 1 3 2\n5\n2 3 1 5 4\n2\n1 2\n4\n1 2 3 4\n2\n1 2\n4\n3 4 2 1\n3\n3 2 1\n1\n1\n", "output": "2\n2\n2\n2\n2\n2\n2\n2\n2\n1\n" }, { "input": "1\n3\n3 5 7\n", "output": "1\n" } ]
code_contests
python
0.1
fc86770ff3b8537558f679a17abde36f
Patrick likes to play baseball, but sometimes he will spend so many hours hitting home runs that his mind starts to get foggy! Patrick is sure that his scores across n sessions follow the identity permutation (ie. in the first game he scores 1 point, in the second game he scores 2 points and so on). However, when he checks back to his record, he sees that all the numbers are mixed up! Define a special exchange as the following: choose any subarray of the scores and permute elements such that no element of subarray gets to the same position as it was before the exchange. For example, performing a special exchange on [1,2,3] can yield [3,1,2] but it cannot yield [3,2,1] since the 2 is in the same position. Given a permutation of n integers, please help Patrick find the minimum number of special exchanges needed to make the permutation sorted! It can be proved that under given constraints this number doesn't exceed 10^{18}. An array a is a subarray of an array b if a can be obtained from b by deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end. Input Each test contains multiple test cases. The first line contains the number of test cases t (1 ≤ t ≤ 100). Description of the test cases follows. The first line of each test case contains integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the length of the given permutation. The second line of each test case contains n integers a_{1},a_{2},...,a_{n} (1 ≤ a_{i} ≤ n) — the initial permutation. It is guaranteed that the sum of n over all test cases does not exceed 2 ⋅ 10^5. Output For each test case, output one integer: the minimum number of special exchanges needed to sort the permutation. Example Input 2 5 1 2 3 4 5 7 3 2 4 5 1 6 7 Output 0 2 Note In the first permutation, it is already sorted so no exchanges are needed. It can be shown that you need at least 2 exchanges to sort the second permutation. [3, 2, 4, 5, 1, 6, 7] Perform special exchange on range (1, 5) [4, 1, 2, 3, 5, 6, 7] Perform special exchange on range (1, 4) [1, 2, 3, 4, 5, 6, 7] Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
import sys import math import heapq import collections def inputnum(): return(int(input())) def inputnums(): return(map(int,input().split())) def inputlist(): return(list(map(int,input().split()))) def inputstring(): return([x for x in input()]) def inputmatrixchar(rows): arr2d = [[j for j in input().strip()] for i in range(rows)] return arr2d def inputmatrixint(rows): arr2d = [] for _ in range(rows): arr2d.append([int(i) for i in input().split()]) return arr2d t=int(input()) for q in range(t): n = inputnum() a = inputlist() wrong = 0 firstwrong = False secondwrong = False for i in range(n): if i+1 != a[i]: if not firstwrong: firstwrong = True elif firstwrong and a[i-1] == i and i > 1: secondwrong = True wrong += 1 if wrong == 0: print(0) elif not secondwrong: print(1) else: print(2)
python
code_algorithm
[ { "input": "2\n5\n1 2 3 4 5\n7\n3 2 4 5 1 6 7\n", "output": "0\n2\n" }, { "input": "1\n2\n1 2\n", "output": "0\n" }, { "input": "1\n5\n1 3 4 2 5\n", "output": "1\n" }, { "input": "4\n6\n1 5 3 4 2 6\n6\n5 1 3 4 2 6\n6\n1 5 3 4 6 2\n6\n5 1 3 4 6 2\n", "output": "2\n2\n2\n2\n" }, { "input": "3\n3\n1 2 3\n4\n3 1 2 4\n7\n6 4 1 7 3 5 2\n", "output": "0\n1\n1\n" }, { "input": "1\n7\n3 2 4 1 7 6 5\n", "output": "2\n" }, { "input": "1\n4\n2 1 3 4\n", "output": "1\n" }, { "input": "1\n6\n2 1 3 5 4 6\n", "output": "2\n" }, { "input": "5\n5\n1 3 4 2 5\n4\n2 1 3 4\n5\n2 1 3 5 4\n7\n3 2 4 1 5 7 6\n6\n3 2 1 6 5 4\n", "output": "1\n1\n2\n2\n2\n" }, { "input": "1\n6\n3 2 1 6 5 4\n", "output": "2\n" }, { "input": "1\n5\n2 1 3 5 4\n", "output": "2\n" }, { "input": "3\n6\n6 2 5 1 4 3\n6\n3 5 1 4 2 6\n2\n1 2\n", "output": "2\n2\n0\n" } ]
code_contests
python
0
a8a9d220df17e21ac52c74bbfc5e32cd
You are given an array of n integers a_1, a_2, ..., a_n, and a set b of k distinct integers from 1 to n. In one operation, you may choose two integers i and x (1 ≤ i ≤ n, x can be any integer) and assign a_i := x. This operation can be done only if i does not belong to the set b. Calculate the minimum number of operations you should perform so the array a is increasing (that is, a_1 < a_2 < a_3 < ... < a_n), or report that it is impossible. Input The first line contains two integers n and k (1 ≤ n ≤ 5 ⋅ 10^5, 0 ≤ k ≤ n) — the size of the array a and the set b, respectively. The second line contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 10^9). Then, if k ≠ 0, the third line follows, containing k integers b_1, b_2, ..., b_k (1 ≤ b_1 < b_2 < ... < b_k ≤ n). If k = 0, this line is skipped. Output If it is impossible to make the array a increasing using the given operations, print -1. Otherwise, print one integer — the minimum number of operations you have to perform. Examples Input 7 2 1 2 1 1 3 5 1 3 5 Output 4 Input 3 3 1 3 2 1 2 3 Output -1 Input 5 0 4 3 1 2 3 Output 2 Input 10 3 1 3 5 6 12 9 8 10 13 15 2 4 9 Output 3 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
import bisect def stablesort(s,l6): l3 = [] l4 = [0] for i in range(len(s)): if l6[0] == -1: if s[i]<=l[l6[1]]: k = bisect.bisect(l3,s[i]) if len(l3) == 0 or l3[-1]<=s[i]: l3.append(s[i]) l4.append(l4[-1] + 1) else: l3[k] = s[i] else: if l[l6[1]]>=s[i]>=l[l6[0]]: k = bisect.bisect(l3,s[i]) if len(l3) == 0 or l3[-1]<=s[i]: l3.append(s[i]) l4.append(l4[-1] + 1) else: l3[k] = s[i] return(len(l3)) n,k = map(int,input().split()) l = list(map(int,input().split())) + [float('inf')] l2 = [] tt = 0 for i in range(n): l[i] -=i if k>0: kk = list(map(int,input().split())) if k>0: for i in range(k-1): if l[kk[i] - 1]>l[kk[i+1] - 1]: tt = 1 break if tt == 1: print(-1) exit(0) else: ans = 0 w = 0 c = 0 l5 = [] for i in range(0,k): l1 = [] for j in range(c,kk[i]-1): l1.append(l[j]) if len(l1)>0: l2.append(l1) l5.append([c-1,kk[i] - 1]) w = l[kk[i] - 1] c = kk[i] l1 = [] for i in range(c,n): l1.append(l[i]) if len(l1)>0: l2.append(l1) l5.append([c-1,n]) else: l3 = [] for i in range(n): k = bisect.bisect(l3,l[i]) if len(l3) == 0 or l3[-1]<=l[i]: l3.append(l[i]) else: l3[k] = l[i] print(n-len(l3)) exit(0) if len(l2)>0: for i in range(len(l2)): c = stablesort(l2[i],l5[i]) ans+=c print(n-(ans+k)) else: print(n-k)
python
code_algorithm
[ { "input": "7 2\n1 2 1 1 3 5 1\n3 5\n", "output": "4\n" }, { "input": "5 0\n4 3 1 2 3\n", "output": "2\n" }, { "input": "3 3\n1 3 2\n1 2 3\n", "output": "-1\n" }, { "input": "10 3\n1 3 5 6 12 9 8 10 13 15\n2 4 9\n", "output": "3\n" }, { "input": "4 2\n1 1 2 2\n2 4\n", "output": "-1\n" }, { "input": "50 35\n69 2 3 15 16 18 18 20 21 22 33 31 38 47 50 42 50 13 1 58 58 59 60 67 61 52 61 61 64 65 33 28 66 4 8 96 32 68 69 74 83 84 85 87 87 88 64 89 89 93\n2 3 4 5 6 7 8 9 10 11 13 14 15 17 20 21 22 23 27 28 29 30 33 38 39 40 41 42 43 44 45 46 48 49 50\n", "output": "-1\n" }, { "input": "100 2\n96 58 6 51 50 14 42 14 8 23 50 87 18 38 66 12 60 34 67 79 73 79 100 94 89 73 4 13 30 3 34 26 41 65 18 71 29 3 40 65 77 83 51 20 38 45 43 64 7 12 97 42 88 32 62 61 92 17 83 14 3 23 5 58 3 64 17 35 23 86 65 22 44 81 30 95 62 63 17 85 3 3 17 56 26 94 59 84 3 88 70 53 52 74 12 47 79 96 72 30\n4 21\n", "output": "94\n" }, { "input": "50 15\n1 2 3 5 9 10 14 15 17 16 18 19 21 23 22 27 27 36 26 23 23 32 27 38 40 41 42 46 51 56 55 52 55 59 60 62 66 68 69 76 83 84 89 90 29 92 94 95 98 99\n1 3 4 8 12 24 27 29 34 35 36 41 43 48 49\n", "output": "13\n" }, { "input": "1 1\n1337\n1\n", "output": "0\n" }, { "input": "100 0\n4 20 52 2 7 36 8 73 9 99 13 19 14 89 32 2 6 2 16 21 47 22 66 23 25 95 28 4 29 64 30 31 7 48 32 51 35 37 77 57 40 42 56 40 43 44 46 13 47 12 48 49 24 51 69 53 54 98 21 57 59 61 62 52 63 30 68 32 69 39 8 67 71 59 72 81 76 77 11 82 85 14 83 33 86 89 89 90 43 96 91 31 93 69 58 94 45 96 2 99\n", "output": "80\n" }, { "input": "1 0\n1337\n", "output": "0\n" }, { "input": "50 40\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50\n1 2 4 5 6 7 8 10 11 12 13 14 15 17 18 19 21 22 23 24 25 26 28 29 30 31 33 35 36 37 38 40 41 42 45 46 47 48 49 50\n", "output": "0\n" }, { "input": "20 5\n19 4 11 10 7 18 7 10 12 13 14 15 16 17 22 26 29 23 30 22\n2 9 11 12 14\n", "output": "8\n" } ]
code_contests
python
0
4549e2ab8b61e173f1bca073c299fec4
One day Vasya painted a Cartesian coordinate system on a piece of paper and marked some set of points (x1, y1), (x2, y2), ..., (xn, yn). Let's define neighbors for some fixed point from the given set (x, y): * point (x', y') is (x, y)'s right neighbor, if x' > x and y' = y * point (x', y') is (x, y)'s left neighbor, if x' < x and y' = y * point (x', y') is (x, y)'s lower neighbor, if x' = x and y' < y * point (x', y') is (x, y)'s upper neighbor, if x' = x and y' > y We'll consider point (x, y) from the given set supercentral, if it has at least one upper, at least one lower, at least one left and at least one right neighbor among this set's points. Vasya marked quite many points on the paper. Analyzing the picture manually is rather a challenge, so Vasya asked you to help him. Your task is to find the number of supercentral points in the given set. Input The first input line contains the only integer n (1 ≤ n ≤ 200) — the number of points in the given set. Next n lines contain the coordinates of the points written as "x y" (without the quotes) (|x|, |y| ≤ 1000), all coordinates are integers. The numbers in the line are separated by exactly one space. It is guaranteed that all points are different. Output Print the only number — the number of supercentral points of the given set. Examples Input 8 1 1 4 2 3 1 1 2 0 2 0 1 1 0 1 3 Output 2 Input 5 0 0 0 1 1 0 0 -1 -1 0 Output 1 Note In the first sample the supercentral points are only points (1, 1) and (1, 2). In the second sample there is one supercental point — point (0, 0). Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n=int(input()) a=[] for i in range(0,n): a.append([int(i) for i in input().split()]) ans=0 for i in range(0,n): c1=0 c2=0 c3=0 c4=0 for j in range(0,n): if a[i][0]>a[j][0] and a[i][1]==a[j][1]: c1+=1 elif a[i][0]<a[j][0] and a[i][1]==a[j][1]: c2+= 1 elif a[i][0]==a[j][0] and a[i][1]<a[j][1]: c3+= 1 elif a[i][0]==a[j][0] and a[i][1]>a[j][1]: c4+= 1 if c1>=1 and c2>=1 and c3>=1 and c4>=1: ans+=1 print(ans)
python
code_algorithm
[ { "input": "8\n1 1\n4 2\n3 1\n1 2\n0 2\n0 1\n1 0\n1 3\n", "output": "2\n" }, { "input": "5\n0 0\n0 1\n1 0\n0 -1\n-1 0\n", "output": "1\n" }, { "input": "1\n487 550\n", "output": "0\n" }, { "input": "25\n-651 897\n916 897\n-651 -808\n-748 301\n-734 414\n-651 -973\n-734 897\n916 -550\n-758 414\n916 180\n-758 -808\n-758 -973\n125 -550\n125 -973\n125 301\n916 414\n-748 -808\n-651 301\n-734 301\n-307 897\n-651 -550\n-651 414\n125 -808\n-748 -550\n916 -808\n", "output": "7\n" }, { "input": "9\n-565 -752\n-184 723\n-184 -752\n-184 1\n950 723\n-565 723\n950 -752\n950 1\n-565 1\n", "output": "1\n" }, { "input": "21\n-813 -11\n486 254\n685 254\n-708 254\n-55 -11\n-671 -191\n486 -11\n-671 -11\n685 -11\n685 -191\n486 -191\n-55 254\n-708 -11\n-813 254\n-708 -191\n41 -11\n-671 254\n-813 -191\n41 254\n-55 -191\n41 -191\n", "output": "5\n" }, { "input": "4\n1 0\n2 0\n1 1\n1 -1\n", "output": "0\n" }, { "input": "10\n990 -396\n990 736\n990 646\n990 -102\n990 -570\n990 155\n990 528\n990 489\n990 268\n990 676\n", "output": "0\n" }, { "input": "30\n507 836\n525 836\n-779 196\n507 -814\n525 -814\n525 42\n525 196\n525 -136\n-779 311\n507 -360\n525 300\n507 578\n507 311\n-779 836\n507 300\n525 -360\n525 311\n-779 -360\n-779 578\n-779 300\n507 42\n525 578\n-779 379\n507 196\n525 379\n507 379\n-779 -814\n-779 42\n-779 -136\n507 -136\n", "output": "8\n" }, { "input": "25\n890 -756\n890 -188\n-37 -756\n-37 853\n523 998\n-261 853\n-351 853\n-351 -188\n523 -756\n-261 -188\n-37 998\n523 -212\n-351 998\n-37 -188\n-351 -756\n-37 -212\n890 998\n890 -212\n523 853\n-351 -212\n-261 -212\n-261 998\n-261 -756\n890 853\n523 -188\n", "output": "9\n" } ]
code_contests
python
0
52c42bc754225f1ef3159764d515118a
Each year in the castle of Dwarven King there is a competition in growing mushrooms among the dwarves. The competition is one of the most prestigious ones, and the winner gets a wooden salad bowl. This year's event brought together the best mushroom growers from around the world, so we had to slightly change the rules so that the event gets more interesting to watch. Each mushroom grower has a mushroom that he will grow on the competition. Under the new rules, the competition consists of two parts. The first part lasts t1 seconds and the second part lasts t2 seconds. The first and the second part are separated by a little break. After the starting whistle the first part of the contest starts, and all mushroom growers start growing mushrooms at once, each at his individual speed of vi meters per second. After t1 seconds, the mushroom growers stop growing mushrooms and go to have a break. During the break, for unexplained reasons, the growth of all mushrooms is reduced by k percent. After the break the second part of the contest starts and all mushrooms growers at the same time continue to grow mushrooms, each at his individual speed of ui meters per second. After a t2 seconds after the end of the break, the competition ends. Note that the speeds before and after the break may vary. Before the match dwarf Pasha learned from all participants, what two speeds they have chosen. However, the participants did not want to disclose to him all their strategy and therefore, did not say in what order they will be using these speeds. That is, if a participant chose speeds ai and bi, then there are two strategies: he either uses speed ai before the break and speed bi after it, or vice versa. Dwarf Pasha really wants to win the totalizer. He knows that each participant chooses the strategy that maximizes the height of the mushroom. Help Dwarf Pasha make the final table of competition results. The participants are sorted in the result table by the mushroom height (the participants with higher mushrooms follow earlier in the table). In case of equal mushroom heights, the participants are sorted by their numbers (the participants with a smaller number follow earlier). Input The first input line contains four integer numbers n, t1, t2, k (1 ≤ n, t1, t2 ≤ 1000; 1 ≤ k ≤ 100) — the number of participants, the time before the break, the time after the break and the percentage, by which the mushroom growth drops during the break, correspondingly. Each of the following n lines contains two integers. The i-th (1 ≤ i ≤ n) line contains space-separated integers ai, bi (1 ≤ ai, bi ≤ 1000) — the speeds which the participant number i chose. Output Print the final results' table: n lines, each line should contain the number of the corresponding dwarf and the final maximum height of his mushroom with exactly two digits after the decimal point. The answer will be considered correct if it is absolutely accurate. Examples Input 2 3 3 50 2 4 4 2 Output 1 15.00 2 15.00 Input 4 1 1 1 544 397 280 101 280 101 693 970 Output 4 1656.07 1 937.03 2 379.99 3 379.99 Note * First example: for each contestant it is optimal to use firstly speed 2 and afterwards speed 4, because 2·3·0.5 + 4·3 > 4·3·0.5 + 2·3. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n, t1, t2, k = map(int, input().split()) a = n * [0] list_indexes = [] for i in range(n): x = list(map(int, input().split())) x.sort() a[i] = x for j in range(n): a[j] = max((a[j][0] * t1 * ((100 - k) / 100) + a[j][1] * t2), (a[j][1] * t1 * ((100 - k) / 100) + a[j][0] * t2)) list_indexes.append(j + 1) v = a.copy() a.sort(reverse=True) for _ in range(n): if v.count(a[_]) == 1: print(v.index(a[_]) + 1, '%.2f' % a[_]) else: print(v.index(a[_]) + 1, '%.2f' % a[_]) v[v.index(a[_])] = 0
python
code_algorithm
[ { "input": "4 1 1 1\n544 397\n280 101\n280 101\n693 970\n", "output": "4 1656.07\n1 937.03\n2 379.99\n3 379.99\n" }, { "input": "2 3 3 50\n2 4\n4 2\n", "output": "1 15.00\n2 15.00\n" }, { "input": "2 1 1 1\n2 2\n2 2\n", "output": "1 3.98\n2 3.98\n" }, { "input": "2 1 1 100\n3 4\n4 3\n", "output": "1 4.00\n2 4.00\n" }, { "input": "8 1 4 55\n507 82\n681 492\n602 849\n367 557\n438 320\n798 699\n338 302\n391 814\n", "output": "3 3666.90\n6 3506.55\n8 3431.95\n2 2945.40\n4 2393.15\n1 2064.90\n5 1896.00\n7 1487.90\n" }, { "input": "7 1 8 25\n98 713\n876 112\n990 771\n57 395\n171 899\n86 600\n459 320\n", "output": "3 8498.25\n5 7320.25\n2 7092.00\n1 5777.50\n6 4864.50\n7 3912.00\n4 3202.75\n" }, { "input": "10 1 1 25\n981 1\n352 276\n164 691\n203 853\n599 97\n901 688\n934 579\n910 959\n317 624\n440 737\n", "output": "8 1641.50\n6 1417.00\n7 1368.25\n10 1067.00\n4 1005.25\n1 981.75\n9 861.75\n3 814.00\n5 671.75\n2 559.00\n" }, { "input": "1 1 1 1\n1 1\n", "output": "1 1.99\n" }, { "input": "6 2 2 78\n942 465\n593 600\n480 359\n733 648\n995 55\n526 538\n", "output": "1 2088.60\n5 2014.20\n4 1751.12\n2 1460.92\n6 1307.44\n3 1117.96\n" }, { "input": "10 6 1 48\n239 632\n976 315\n797 112\n1 835\n938 862\n531 884\n422 607\n152 331\n413 677\n622 978\n", "output": "5 3788.56\n10 3673.36\n2 3360.12\n6 3289.08\n4 2606.20\n3 2598.64\n9 2525.24\n7 2315.84\n1 2210.84\n8 1184.72\n" }, { "input": "9 6 4 80\n95 269\n95 269\n781 724\n22 269\n173 655\n972 850\n22 269\n95 269\n642 666\n", "output": "6 4908.00\n3 3992.80\n9 3434.40\n5 2827.60\n1 1190.00\n2 1190.00\n8 1190.00\n4 1102.40\n7 1102.40\n" }, { "input": "6 1 5 9\n105 771\n105 771\n105 771\n557 985\n105 771\n105 771\n", "output": "4 5431.87\n1 3950.55\n2 3950.55\n3 3950.55\n5 3950.55\n6 3950.55\n" } ]
code_contests
python
0.8
e11f6636d28fb3edcce43dd5648b4e91
You are given three positive integers x, y, n. Your task is to find the nearest fraction to fraction <image> whose denominator is no more than n. Formally, you should find such pair of integers a, b (1 ≤ b ≤ n; 0 ≤ a) that the value <image> is as minimal as possible. If there are multiple "nearest" fractions, choose the one with the minimum denominator. If there are multiple "nearest" fractions with the minimum denominator, choose the one with the minimum numerator. Input A single line contains three integers x, y, n (1 ≤ x, y, n ≤ 105). Output Print the required fraction in the format "a/b" (without quotes). Examples Input 3 7 6 Output 2/5 Input 7 2 4 Output 7/2 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
import sys from fractions import Fraction def input(): return sys.stdin.readline().strip() def iinput(): return int(input()) def rinput(): return map(int, sys.stdin.readline().strip().split()) def get_list(): return list(map(int, sys.stdin.readline().strip().split())) mod = int(1e9)+7 x, y, n = rinput() ans = Fraction(x, y).limit_denominator(n) print(str(ans.numerator)+'/'+str(ans.denominator))
python
code_algorithm
[ { "input": "7 2 4\n", "output": "7/2\n" }, { "input": "3 7 6\n", "output": "2/5\n" }, { "input": "6243 60593 42244\n", "output": "3565/34601\n" }, { "input": "7487 17563 1102\n", "output": "107/251\n" }, { "input": "1 2 2\n", "output": "1/2\n" }, { "input": "43003 70913 71178\n", "output": "43003/70913\n" }, { "input": "46084 75979 30535\n", "output": "11637/19186\n" }, { "input": "60489 34395 34632\n", "output": "20163/11465\n" }, { "input": "100000 10 10\n", "output": "10000/1\n" }, { "input": "38133 49787 9840\n", "output": "3295/4302\n" }, { "input": "76730 91851 71438\n", "output": "49039/58703\n" }, { "input": "28598 12497 10464\n", "output": "23710/10361\n" }, { "input": "72657 93778 50943\n", "output": "38236/49351\n" }, { "input": "75486 2177 1983\n", "output": "58877/1698\n" }, { "input": "99999 2 1\n", "output": "49999/1\n" }, { "input": "100000 2 100000\n", "output": "50000/1\n" }, { "input": "89781 34400 19222\n", "output": "49972/19147\n" }, { "input": "14304 96625 53803\n", "output": "7934/53595\n" }, { "input": "36890 92817 22772\n", "output": "5951/14973\n" }, { "input": "7 6 3\n", "output": "1/1\n" }, { "input": "44247 27883 24673\n", "output": "34667/21846\n" }, { "input": "1 1 1\n", "output": "1/1\n" }, { "input": "90002 86785 57380\n", "output": "23109/22283\n" }, { "input": "1000 7 3\n", "output": "143/1\n" }, { "input": "91245 43755 27191\n", "output": "6083/2917\n" }, { "input": "99997 99999 99996\n", "output": "49999/50000\n" }, { "input": "29842 2171 245\n", "output": "811/59\n" }, { "input": "17708 35362 1558\n", "output": "328/655\n" }, { "input": "59245 44721 45425\n", "output": "59245/44721\n" }, { "input": "1000 11 20\n", "output": "1000/11\n" }, { "input": "1 2 1\n", "output": "0/1\n" }, { "input": "35646 27334 23417\n", "output": "17823/13667\n" }, { "input": "20648 86305 73795\n", "output": "15543/64967\n" } ]
code_contests
python
0
05b20a8c9597f34d3aa7d160706ebac7
DZY loves collecting special strings which only contain lowercase letters. For each lowercase letter c DZY knows its value wc. For each special string s = s1s2... s|s| (|s| is the length of the string) he represents its value with a function f(s), where <image> Now DZY has a string s. He wants to insert k lowercase letters into this string in order to get the largest possible value of the resulting string. Can you help him calculate the largest possible value he could get? Input The first line contains a single string s (1 ≤ |s| ≤ 103). The second line contains a single integer k (0 ≤ k ≤ 103). The third line contains twenty-six integers from wa to wz. Each such number is non-negative and doesn't exceed 1000. Output Print a single integer — the largest possible value of the resulting string DZY could get. Examples Input abc 3 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Output 41 Note In the test sample DZY can obtain "abcbbc", value = 1·1 + 2·2 + 3·2 + 4·2 + 5·2 + 6·2 = 41. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
s = input() k = int(input()) w = list(map(int, input().split())) value = 0 for i in range(len(s)): value += (i + 1) * w[ord(s[i]) - ord('a')] for i in range(len(s) + 1, len(s) + k + 1): value += max(w) * i print(value)
python
code_algorithm
[ { "input": "abc\n3\n1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "41\n" }, { "input": "pplkqmluhfympkjfjnfdkwrkpumgdmbkfbbldpepicbbmdgafttpopzdxsevlqbtywzkoxyviglbbxsohycbdqksrhlumsldiwzjmednbkcjishkiekfrchzuztkcxnvuykhuenqojrmzaxlaoxnljnvqgnabtmcftisaazzgbmubmpsorygyusmeonrhrgphnfhlaxrvyhuxsnnezjxmdoklpquzpvjbxgbywppmegzxknhfzyygrmejleesoqfwheulmqhonqaukyuejtwxskjldplripyihbfpookxkuehiwqthbfafyrgmykuxglpplozycgydyecqkgfjljfqvigqhuxssqqtfanwszduwbsoytnrtgc\n464\n838 95 473 955 690 84 436 19 179 437 674 626 377 365 781 4 733 776 462 203 119 256 381 668 855 686\n", "output": "301124161\n" }, { "input": "tghyxqfmhz\n8\n191 893 426 203 780 326 148 259 182 140 847 636 778 97 167 773 219 891 758 993 695 603 223 779 368 165\n", "output": "136422\n" }, { "input": "pylrnkrbcjgoytvdnhmlvnkknijkdgdhworlvtwuonrkhrilkewcnofodaumgvnsisxooswgrgtvdeauyxhkipfoxrrtysuepjcf\n60\n894 206 704 179 272 337 413 828 119 182 330 46 440 102 250 191 242 539 678 783 843 431 612 567 33 338\n", "output": "9168707\n" }, { "input": "mmzhr\n3\n443 497 867 471 195 670 453 413 579 466 553 881 847 642 269 996 666 702 487 209 257 741 974 133 519 453\n", "output": "29978\n" }, { "input": "gsaddmezrnttfalbwlqbnedumvikplfosw\n12\n290 850 872 361 483 895 152 118 974 619 701 154 899 285 328 712 669 984 407 340 851 775 324 892 554 860\n", "output": "809931\n" }, { "input": "qkautnuilwlhjsldfcuwhiqtgtoihifszlyvfaygrnivzgvwthkrzzdtfjcirrjjlrmjtbjlzmjeqmuffsjorjyggzefwgvmblvotvzffnwjhqxorpowzdcnfksdibezdtfjjxfozaghieksbmowrbeehuxlesmvqjsphlvauxiijm\n98\n121 622 0 691 616 959 838 161 581 862 876 830 267 812 598 106 337 73 588 323 999 17 522 399 657 495\n", "output": "30125295\n" }, { "input": "ajeeseerqnpaujubmajpibxrccazaawetywxmifzehojf\n23\n359 813 772 413 733 654 33 87 890 433 395 311 801 852 376 148 914 420 636 695 583 733 664 394 407 314\n", "output": "1762894\n" }, { "input": "uahngxejpomhbsebcxvelfsojbaouynnlsogjyvktpwwtcyddkcdqcqs\n34\n530 709 150 660 947 830 487 142 208 276 885 542 138 214 76 184 273 753 30 195 722 236 82 691 572 585\n", "output": "2960349\n" }, { "input": "vhjnkrxbyhjhnjrxvwxmhxwoxttbtqosfxtcuvhfjlkyfspeypthsdkkwnqdpxdlnxsgtzvkrgqosgfjrwetqbxgoarkjhrjbspzgblsapifltkfxbfdbxqwoohlgyzijmiwnpmveybyzvasoctxsmgjehpyysmqblwnmkappbecklqjfmxhlyceordroflnposohfplrvijxbwvqdtvzhobtrumiujnyrfbwthvciinuveoizkccelxtaveiiagryqnyvsgfnipnavrtmdqlcnldepocbpzmqnarkdvykds\n276\n364 244 798 82 582 9 309 950 286 547 892 371 569 159 705 975 740 845 655 179 130 993 255 552 882 657\n", "output": "144901921\n" }, { "input": "a\n0\n5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "5\n" }, { "input": "lol\n3\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "21\n" }, { "input": "nyawbfjxnxjiyhwkydaruozobpphgjqdpfdqzezcsoyvurnapu\n30\n65 682 543 533 990 148 815 821 315 916 632 771 332 513 472 864 12 73 548 687 660 572 507 192 226 348\n", "output": "2578628\n" }, { "input": "xnzeqmouqyzvblcidmhbkqmtusszuczadpooslqxegldanwopilmdwzbczvrwgnwaireykwpugvpnpafbxlyggkgawghysufuegvmzvpgcqyjkoadcreaguzepbendwnowsuekxxivkziibxvxfoilofxcgnxvfefyezfhevfvtetsuhwtyxdlkccdkvqjl\n282\n170 117 627 886 751 147 414 187 150 960 410 70 576 681 641 729 798 877 611 108 772 643 683 166 305 933\n", "output": "99140444\n" } ]
code_contests
python
0.8
8e628bfd2485f1e416ca591ae43af07f
Think of New York as a rectangular grid consisting of N vertical avenues numerated from 1 to N and M horizontal streets numerated 1 to M. C friends are staying at C hotels located at some street-avenue crossings. They are going to celebrate birthday of one of them in the one of H restaurants also located at some street-avenue crossings. They also want that the maximum distance covered by one of them while traveling to the restaurant to be minimum possible. Help friends choose optimal restaurant for a celebration. Suppose that the distance between neighboring crossings are all the same equal to one kilometer. Input The first line contains two integers N и M — size of the city (1 ≤ N, M ≤ 109). In the next line there is a single integer C (1 ≤ C ≤ 105) — the number of hotels friends stayed at. Following C lines contain descriptions of hotels, each consisting of two coordinates x and y (1 ≤ x ≤ N, 1 ≤ y ≤ M). The next line contains an integer H — the number of restaurants (1 ≤ H ≤ 105). Following H lines contain descriptions of restaurants in the same format. Several restaurants and hotels may be located near the same crossing. Output In the first line output the optimal distance. In the next line output index of a restaurant that produces this optimal distance. If there are several possibilities, you are allowed to output any of them. Examples Input 10 10 2 1 1 3 3 2 1 10 4 4 Output 6 2 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
N, M = input().split() a, b, c, d = [int(1e10) for _ in range(4)] for i in range(int(input())): x, y = list(map(int, input().split())) a, b, c, d = min(a, x + y), min(b, x - y), min(c, - x + y), min(d, - x - y) res, pos = int(1e10), 0 for i in range(int(input())): x, y = list(map(int, input().split())) ans = max(max(x + y - a, x - y - b), max( - x + y - c, - x - y - d)) if ans < res: pos = i + 1 res = ans print(res, pos, sep = '\n')
python
code_algorithm
[ { "input": "10 10\n2\n1 1\n3 3\n2\n1 10\n4 4\n", "output": "6\n2\n" }, { "input": "1000000000 1000000000\n2\n1 1\n3 3\n2\n1 10\n4 4\n", "output": "6\n2\n" }, { "input": "1000000000 1000000000\n1\n1 1\n1\n1000000000 1000000000\n", "output": "1999999998\n1\n" }, { "input": "1 1\n1\n1 1\n1\n1 1\n", "output": "0\n1\n" }, { "input": "100 100\n10\n53 20\n97 6\n12 74\n48 92\n97 13\n47 96\n75 32\n69 21\n95 75\n1 54\n10\n36 97\n41 1\n1 87\n39 23\n27 44\n73 97\n1 1\n6 26\n48 3\n5 69\n", "output": "108\n4\n" }, { "input": "100 100\n1\n66 77\n10\n70 11\n76 69\n79 39\n90 3\n38 87\n61 81\n98 66\n63 68\n62 93\n53 36\n", "output": "9\n6\n" }, { "input": "100 100\n10\n86 72\n25 73\n29 84\n34 33\n29 20\n84 83\n41 80\n22 22\n16 89\n77 49\n1\n4 23\n", "output": "140\n1\n" }, { "input": "100 100\n1\n1 100\n1\n1 100\n", "output": "0\n1\n" }, { "input": "923456789 987654321\n1\n443943901 132319791\n1\n1354 560\n", "output": "576261778\n1\n" }, { "input": "123456789 987654321\n1\n312 987654321\n1\n123456789 213\n", "output": "1111110585\n1\n" }, { "input": "453456789 987654321\n1\n443943901 1\n1\n1354 213389832\n", "output": "657332378\n1\n" } ]
code_contests
python
1
362a9bc521692b8b20b0b98e2fd52853
The famous global economic crisis is approaching rapidly, so the states of Berman, Berance and Bertaly formed an alliance and allowed the residents of all member states to freely pass through the territory of any of them. In addition, it was decided that a road between the states should be built to guarantee so that one could any point of any country can be reached from any point of any other State. Since roads are always expensive, the governments of the states of the newly formed alliance asked you to help them assess the costs. To do this, you have been issued a map that can be represented as a rectangle table consisting of n rows and m columns. Any cell of the map either belongs to one of three states, or is an area where it is allowed to build a road, or is an area where the construction of the road is not allowed. A cell is called passable, if it belongs to one of the states, or the road was built in this cell. From any passable cells you can move up, down, right and left, if the cell that corresponds to the movement exists and is passable. Your task is to construct a road inside a minimum number of cells, so that it would be possible to get from any cell of any state to any cell of any other state using only passable cells. It is guaranteed that initially it is possible to reach any cell of any state from any cell of this state, moving only along its cells. It is also guaranteed that for any state there is at least one cell that belongs to it. Input The first line of the input contains the dimensions of the map n and m (1 ≤ n, m ≤ 1000) — the number of rows and columns respectively. Each of the next n lines contain m characters, describing the rows of the map. Digits from 1 to 3 represent the accessory to the corresponding state. The character '.' corresponds to the cell where it is allowed to build a road and the character '#' means no construction is allowed in this cell. Output Print a single integer — the minimum number of cells you need to build a road inside in order to connect all the cells of all states. If such a goal is unachievable, print -1. Examples Input 4 5 11..2 #..22 #.323 .#333 Output 2 Input 1 5 1#2#3 Output -1 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
# lista doble enlazada o(1) operaciones en los bordes es mejor que si se implementa en el propio lenguaje from collections import deque n, m = input().split() n = int(n) m = int(m) def idx(i, j): return i*m + j max = n*m*2 graph = "" virtDist = [[], [], []] virtVertex = [deque(), deque(), deque()] virtNodesDst = [max, max, max] code = ord("1") for i in range(0, n): s = input() graph += s for j in range(0, m): virtDist[0].append(max) virtDist[1].append(max) virtDist[2].append(max) indx = ord(s[j])-code if 0 > indx or indx > 2: continue virtVertex[indx].append((i, j)) i2 = idx(i, j) virtDist[indx][-1] = 0 def bfs01(queue, distance): while queue: pi, pj = queue.popleft() for i, j in [(pi, pj-1), (pi, pj+1), (pi-1, pj), (pi+1, pj)]: indx = idx(i, j) if 0 > i or i >= n or 0 > j or j >= m or graph[indx] == '#': continue isRoad = graph[indx] == "." newDistance = distance[idx(pi, pj)] + (1 if isRoad else 0) if distance[indx] > newDistance: # relax distance[indx] = newDistance if isRoad: queue.append((i, j)) else: queue.appendleft((i, j)) bfs01(virtVertex[0], virtDist[0]) bfs01(virtVertex[1], virtDist[1]) bfs01(virtVertex[2], virtDist[2]) output = max for i in range(0, n*m): output = min(virtDist[0][i] + virtDist[1][i] + virtDist[2] [i] - (2 if graph[i] == "."else 0), output) print(output if output < max else -1)
python
code_algorithm
[ { "input": "1 5\n1#2#3\n", "output": "-1\n" }, { "input": "4 5\n11..2\n#..22\n#.323\n.#333", "output": "2\n" }, { "input": "10 10\n###..#.#.#\n#....####.\n##1###.#.#\n#.11######\n##11#####.\n..#####..#\n####...#.3\n.#.#..2223\n#####..#33\n#.########\n", "output": "-1\n" }, { "input": "3 1\n3\n1\n2\n", "output": "0\n" }, { "input": "10 10\n##.#.##.##\n#.#..####.\n#.###.333.\n..#..#3.2#\n...###3..#\n..#.#..#.#\n...#.#.#..\n...##.1..#\n.##.#.1#.#\n..#.#.11..\n", "output": "2\n" }, { "input": "1 15\n111112222233333\n", "output": "0\n" }, { "input": "3 4\n.2..\n...3\n.1#.\n", "output": "2\n" }, { "input": "10 1\n1\n.\n2\n2\n2\n2\n2\n.\n3\n.\n", "output": "2\n" }, { "input": "10 10\n..#.....#.\n.#.##...#.\n..#.......\n..111.....\n#..#.....#\n.#...2....\n.....2....\n.....222..\n..........\n#.3....#..\n", "output": "6\n" }, { "input": "1 10\n111222333.\n", "output": "0\n" }, { "input": "1 9\n111222333\n", "output": "0\n" }, { "input": "3 3\n##3\n1..\n222\n", "output": "1\n" }, { "input": "1 4\n12#3\n", "output": "-1\n" }, { "input": "3 10\n........2.\n......1...\n.........3\n", "output": "3\n" }, { "input": "4 7\n2..1..3\n2##.##3\n2##.##3\n2.....3\n", "output": "4\n" }, { "input": "10 10\n##.#..#.#2\n...###....\n#..#....##\n.....#....\n.#........\n.....#####\n...#..#...\n....###...\n###.##...#\n.#...1#.3.\n", "output": "-1\n" }, { "input": "10 10\n#...33.#.#\n#.#.33.#1.\n2.....#.11\n222#.#.#..\n####...#.#\n#.........\n.#....#...\n..#..#.##.\n##.....#.#\n#..#....#.\n", "output": "12\n" }, { "input": "4 4\n3###\n.222\n.#.2\n1222\n", "output": "1\n" }, { "input": "5 4\n2..3\n2..3\n....\n1..1\n1111\n", "output": "2\n" }, { "input": "3 3\n#2#\n1.3\n1.#\n", "output": "1\n" }, { "input": "1 3\n231\n", "output": "0\n" }, { "input": "4 3\n..#\n.3.\n..2\n..1\n", "output": "1\n" }, { "input": "3 3\n1.2\n1.2\n333\n", "output": "0\n" }, { "input": "10 10\n1111.22222\n1111.22222\n11......22\n11......22\n..........\n3333333333\n3333333333\n3333333333\n3333333333\n3333333333\n", "output": "2\n" }, { "input": "10 10\n..#..###.#\n..##......\n#...#..#..\n.....##...\n2...#.#.##\n#..1.#....\n#.....3...\n#.###.##..\n...#..##.#\n.#........\n", "output": "6\n" }, { "input": "1 9\n1.22222.3\n", "output": "2\n" }, { "input": "5 5\n.2...\n#2.3.\n.#..#\n.#.11\n#..#.\n", "output": "2\n" }, { "input": "4 4\n1...\n.222\n....\n...3\n", "output": "2\n" } ]
code_contests
python
0
c533aa12eae2390b299f32303f840d4f
HDD hard drives group data by sectors. All files are split to fragments and each of them are written in some sector of hard drive. Note the fragments can be written in sectors in arbitrary order. One of the problems of HDD hard drives is the following: the magnetic head should move from one sector to another to read some file. Find the time need to read file split to n fragments. The i-th sector contains the fi-th fragment of the file (1 ≤ fi ≤ n). Note different sectors contains the different fragments. At the start the magnetic head is in the position that contains the first fragment. The file are reading in the following manner: at first the first fragment is read, then the magnetic head moves to the sector that contains the second fragment, then the second fragment is read and so on until the n-th fragment is read. The fragments are read in the order from the first to the n-th. It takes |a - b| time units to move the magnetic head from the sector a to the sector b. Reading a fragment takes no time. Input The first line contains a positive integer n (1 ≤ n ≤ 2·105) — the number of fragments. The second line contains n different integers fi (1 ≤ fi ≤ n) — the number of the fragment written in the i-th sector. Output Print the only integer — the number of time units needed to read the file. Examples Input 3 3 1 2 Output 3 Input 5 1 3 5 4 2 Output 10 Note In the second example the head moves in the following way: * 1->2 means movement from the sector 1 to the sector 5, i.e. it takes 4 time units * 2->3 means movement from the sector 5 to the sector 2, i.e. it takes 3 time units * 3->4 means movement from the sector 2 to the sector 4, i.e. it takes 2 time units * 4->5 means movement from the sector 4 to the sector 3, i.e. it takes 1 time units So the answer to the second example is 4 + 3 + 2 + 1 = 10. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n = int(input()) fi = list(map(int, input().split())) fi2 = list(range(n)) i = 0 while i < n: fi2[fi[i] - 1] = i i += 1 pos = fi2[0] i = 1 d = 0 while i < n: d += abs(fi2[i] - pos) pos = fi2[i] i += 1 print(d)
python
code_algorithm
[ { "input": "5\n1 3 5 4 2\n", "output": "10\n" }, { "input": "3\n3 1 2\n", "output": "3\n" }, { "input": "100\n11 9 35 34 51 74 16 67 26 21 14 80 84 79 7 61 28 3 53 43 42 5 56 36 69 30 22 88 1 27 65 91 46 31 59 50 17 96 25 18 64 55 78 2 63 24 95 48 93 13 38 76 89 94 15 90 45 81 52 87 83 73 44 49 23 82 85 75 86 33 47 19 58 97 37 20 40 10 92 4 6 68 77 54 71 12 62 60 100 39 41 99 72 29 57 8 70 32 66 98\n", "output": "3580\n" }, { "input": "10\n8 2 10 3 4 6 1 7 9 5\n", "output": "40\n" }, { "input": "1\n1\n", "output": "0\n" }, { "input": "10\n1 2 3 4 5 6 7 8 9 10\n", "output": "9\n" }, { "input": "100\n1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 100 98 96 94 92 90 88 86 84 82 80 78 76 74 72 70 68 66 64 62 60 58 56 54 52 50 48 46 44 42 40 38 36 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2\n", "output": "4950\n" }, { "input": "10\n1 3 5 7 9 10 8 6 4 2\n", "output": "45\n" }, { "input": "100\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\n", "output": "99\n" } ]
code_contests
python
0.6
c8a0e600d433344f60d43a02d5cd8e1f
Alice and Bob are playing a game. The game involves splitting up game pieces into two teams. There are n pieces, and the i-th piece has a strength pi. The way to split up game pieces is split into several steps: 1. First, Alice will split the pieces into two different groups A and B. This can be seen as writing the assignment of teams of a piece in an n character string, where each character is A or B. 2. Bob will then choose an arbitrary prefix or suffix of the string, and flip each character in that suffix (i.e. change A to B and B to A). He can do this step at most once. 3. Alice will get all the pieces marked A and Bob will get all the pieces marked B. The strength of a player is then the sum of strengths of the pieces in the group. Given Alice's initial split into two teams, help Bob determine an optimal strategy. Return the maximum strength he can achieve. Input The first line contains integer n (1 ≤ n ≤ 5·105) — the number of game pieces. The second line contains n integers pi (1 ≤ pi ≤ 109) — the strength of the i-th piece. The third line contains n characters A or B — the assignment of teams after the first step (after Alice's step). Output Print the only integer a — the maximum strength Bob can achieve. Examples Input 5 1 2 3 4 5 ABABA Output 11 Input 5 1 2 3 4 5 AAAAA Output 15 Input 1 1 B Output 1 Note In the first sample Bob should flip the suffix of length one. In the second sample Bob should flip the prefix or the suffix (here it is the same) of length 5. In the third sample Bob should do nothing. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
read = lambda: map(int, input().split()) n = int(input()) p = list(read()) a = [{'B': 1, 'A': 0}[i] for i in input()] cur = sum(p[i] for i in range(n) if a[i]) ans = cur b = a[:] for i in range(n): b[i] = int(not a[i]) if b[i]: cur += p[i] else: cur -= p[i] ans = max(ans, cur) cur = sum(p[i] for i in range(n) if a[i]) b = a[:] for i in range(n - 1, -1, -1): b[i] = int(not a[i]) if b[i]: cur += p[i] else: cur -= p[i] ans = max(ans, cur) print(ans)
python
code_algorithm
[ { "input": "1\n1\nB\n", "output": "1\n" }, { "input": "5\n1 2 3 4 5\nAAAAA\n", "output": "15\n" }, { "input": "5\n1 2 3 4 5\nABABA\n", "output": "11\n" }, { "input": "2\n1 1\nBB\n", "output": "2\n" }, { "input": "1\n1\nA\n", "output": "1\n" }, { "input": "3\n2 1 2\nBAB\n", "output": "4\n" }, { "input": "100\n591 417 888 251 792 847 685 3 182 461 102 348 555 956 771 901 712 878 580 631 342 333 285 899 525 725 537 718 929 653 84 788 104 355 624 803 253 853 201 995 536 184 65 205 540 652 549 777 248 405 677 950 431 580 600 846 328 429 134 983 526 103 500 963 400 23 276 704 570 757 410 658 507 620 984 244 486 454 802 411 985 303 635 283 96 597 855 775 139 839 839 61 219 986 776 72 729 69 20 917\nBBBAAABBBABAAABBBBAAABABBBBAAABAAABBABABAAABABABBABBABABAAAABAABABBBBBBBABBAAAABAABABABAABABABAABBAB\n", "output": "30928\n" }, { "input": "2\n1 1\nAB\n", "output": "2\n" }, { "input": "3\n1 1 1\nBAA\n", "output": "3\n" }, { "input": "10\n1 9 7 6 2 4 7 8 1 3\nABBABAABBB\n", "output": "33\n" } ]
code_contests
python
0.8
208349be6896abf6e9d439a7a8fe3de6
For a sequence a of n integers between 1 and m, inclusive, denote f(a) as the number of distinct subsequences of a (including the empty subsequence). You are given two positive integers n and m. Let S be the set of all sequences of length n consisting of numbers from 1 to m. Compute the sum f(a) over all a in S modulo 109 + 7. Input The only line contains two integers n and m (1 ≤ n, m ≤ 106) — the number of elements in arrays and the upper bound for elements. Output Print the only integer c — the desired sum modulo 109 + 7. Examples Input 1 3 Output 6 Input 2 2 Output 14 Input 3 3 Output 174 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
import sys from array import array n, m = map(int, input().split()) dp = [array('i', [0])*(n+1) for _ in range(2)] dp[0][0] = dp[1][0] = 1 mod = 10**9 + 7 for i in range(1, n+1): dp[0][i] = (dp[0][i-1] * m + dp[0][i-1] * (m-1)) % mod dp[1][i] = (dp[0][i-1] * m + dp[1][i-1] * m) % mod print(dp[1][-1])
python
code_algorithm
[ { "input": "2 2\n", "output": "14\n" }, { "input": "1 3\n", "output": "6\n" }, { "input": "3 3\n", "output": "174\n" }, { "input": "500 500\n", "output": "383255233\n" }, { "input": "1000000 1\n", "output": "1000001\n" }, { "input": "1 1000000\n", "output": "2000000\n" }, { "input": "1000000 1000000\n", "output": "247171672\n" } ]
code_contests
python
0
8f890a038c9ed3a38cef6d27ede599dd
Limak is going to participate in a contest on the last day of the 2016. The contest will start at 20:00 and will last four hours, exactly until midnight. There will be n problems, sorted by difficulty, i.e. problem 1 is the easiest and problem n is the hardest. Limak knows it will take him 5·i minutes to solve the i-th problem. Limak's friends organize a New Year's Eve party and Limak wants to be there at midnight or earlier. He needs k minutes to get there from his house, where he will participate in the contest first. How many problems can Limak solve if he wants to make it to the party? Input The only line of the input contains two integers n and k (1 ≤ n ≤ 10, 1 ≤ k ≤ 240) — the number of the problems in the contest and the number of minutes Limak needs to get to the party from his house. Output Print one integer, denoting the maximum possible number of problems Limak can solve so that he could get to the party at midnight or earlier. Examples Input 3 222 Output 2 Input 4 190 Output 4 Input 7 1 Output 7 Note In the first sample, there are 3 problems and Limak needs 222 minutes to get to the party. The three problems require 5, 10 and 15 minutes respectively. Limak can spend 5 + 10 = 15 minutes to solve first two problems. Then, at 20:15 he can leave his house to get to the party at 23:57 (after 222 minutes). In this scenario Limak would solve 2 problems. He doesn't have enough time to solve 3 problems so the answer is 2. In the second sample, Limak can solve all 4 problems in 5 + 10 + 15 + 20 = 50 minutes. At 20:50 he will leave the house and go to the party. He will get there exactly at midnight. In the third sample, Limak needs only 1 minute to get to the party. He has enough time to solve all 7 problems. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
def main(): n,m = [int(v) for v in input().split()] e = 4*60-m d = 0 i = 1 while d<=e: d+=5*(i) if d>e: break i+=1 print(min(n,i-1)) if __name__ == "__main__": main()
python
code_algorithm
[ { "input": "7 1\n", "output": "7\n" }, { "input": "4 190\n", "output": "4\n" }, { "input": "3 222\n", "output": "2\n" }, { "input": "9 170\n", "output": "4\n" }, { "input": "1 55\n", "output": "1\n" }, { "input": "2 99\n", "output": "2\n" }, { "input": "10 166\n", "output": "4\n" }, { "input": "8 60\n", "output": "8\n" }, { "input": "1 1\n", "output": "1\n" }, { "input": "9 235\n", "output": "1\n" }, { "input": "3 239\n", "output": "0\n" }, { "input": "5 226\n", "output": "1\n" }, { "input": "10 15\n", "output": "9\n" }, { "input": "3 240\n", "output": "0\n" }, { "input": "2 240\n", "output": "0\n" }, { "input": "1 235\n", "output": "1\n" }, { "input": "10 135\n", "output": "6\n" }, { "input": "5 225\n", "output": "2\n" }, { "input": "7 8\n", "output": "7\n" }, { "input": "2 236\n", "output": "0\n" }, { "input": "10 16\n", "output": "8\n" }, { "input": "10 165\n", "output": "5\n" }, { "input": "10 1\n", "output": "9\n" }, { "input": "7 167\n", "output": "4\n" }, { "input": "1 237\n", "output": "0\n" }, { "input": "9 1\n", "output": "9\n" }, { "input": "4 191\n", "output": "3\n" }, { "input": "1 240\n", "output": "0\n" }, { "input": "10 88\n", "output": "7\n" }, { "input": "10 136\n", "output": "5\n" }, { "input": "10 2\n", "output": "9\n" }, { "input": "8 100\n", "output": "7\n" }, { "input": "4 240\n", "output": "0\n" }, { "input": "4 211\n", "output": "2\n" }, { "input": "10 164\n", "output": "5\n" }, { "input": "8 61\n", "output": "7\n" }, { "input": "4 101\n", "output": "4\n" }, { "input": "10 240\n", "output": "0\n" }, { "input": "8 160\n", "output": "5\n" }, { "input": "4 210\n", "output": "3\n" }, { "input": "1 100\n", "output": "1\n" }, { "input": "9 240\n", "output": "0\n" }, { "input": "8 123\n", "output": "6\n" }, { "input": "8 101\n", "output": "6\n" }, { "input": "9 236\n", "output": "0\n" }, { "input": "10 235\n", "output": "1\n" }, { "input": "4 100\n", "output": "4\n" } ]
code_contests
python
0.9
96b9191a989283f286da4147a3a02cdd
Ivan is developing his own computer game. Now he tries to create some levels for his game. But firstly for each level he needs to draw a graph representing the structure of the level. Ivan decided that there should be exactly ni vertices in the graph representing level i, and the edges have to be bidirectional. When constructing the graph, Ivan is interested in special edges called bridges. An edge between two vertices u and v is called a bridge if this edge belongs to every path between u and v (and these vertices will belong to different connected components if we delete this edge). For each level Ivan wants to construct a graph where at least half of the edges are bridges. He also wants to maximize the number of edges in each constructed graph. So the task Ivan gave you is: given q numbers n1, n2, ..., nq, for each i tell the maximum number of edges in a graph with ni vertices, if at least half of the edges are bridges. Note that the graphs cannot contain multiple edges or self-loops. Input The first line of input file contains a positive integer q (1 ≤ q ≤ 100 000) — the number of graphs Ivan needs to construct. Then q lines follow, i-th line contains one positive integer ni (1 ≤ ni ≤ 2·109) — the number of vertices in i-th graph. Note that in hacks you have to use q = 1. Output Output q numbers, i-th of them must be equal to the maximum number of edges in i-th graph. Example Input 3 3 4 6 Output 2 3 6 Note In the first example it is possible to construct these graphs: 1. 1 - 2, 1 - 3; 2. 1 - 2, 1 - 3, 2 - 4; 3. 1 - 2, 1 - 3, 2 - 3, 1 - 4, 2 - 5, 3 - 6. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
#! /usr/bin/env python # http://codeforces.com/problemset/problem/818/F # Problem name ::: F. Level Generation # submission number #212055293 #508427854 def newest_approach(n): from math import floor, ceil, sqrt quad_solv = sqrt(2*n+1/4)-1/2 x = floor(quad_solv) y = ceil(quad_solv) xed = int(x*(x-1)/2 + n - x) xbr = n - x ybr = n - y yed = 2*ybr if xed > yed: print(xed) # print("nodes = %s :: edges = %s :: bridges = %s" % (n, xed, xbr)) else: print(yed) # print("nodes = %s :: edges = %s :: bridges = %s" % (n, yed, ybr)) return def main(): import sys data = [line.rstrip() for line in sys.stdin.readlines()] num_graphs = data[0] graph_sizes = [int(x) for x in data[1:]] for val in graph_sizes: # binary_search(val) # new_approach(val) newest_approach(val) if __name__ == '__main__': main()
python
code_algorithm
[ { "input": "3\n3\n4\n6\n", "output": "2\n3\n6\n" }, { "input": "1\n508427854\n", "output": "1016791932\n" }, { "input": "1\n827388716\n", "output": "1654696074\n" }, { "input": "1\n596007358\n", "output": "1191945664\n" }, { "input": "10\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n", "output": "0\n1\n2\n3\n4\n6\n7\n8\n10\n12\n" }, { "input": "1\n322647200\n", "output": "645243594\n" }, { "input": "1\n398561321\n", "output": "797066176\n" }, { "input": "1\n212055293\n", "output": "424069398\n" } ]
code_contests
python
0
6b4dde59333a27b5c860715142a467a8
You are given n × m table. Each cell of the table is colored white or black. Find the number of non-empty sets of cells such that: 1. All cells in a set have the same color. 2. Every two cells in a set share row or column. Input The first line of input contains integers n and m (1 ≤ n, m ≤ 50) — the number of rows and the number of columns correspondingly. The next n lines of input contain descriptions of rows. There are m integers, separated by spaces, in each line. The number equals 0 if the corresponding cell is colored white and equals 1 if the corresponding cell is colored black. Output Output single integer — the number of non-empty sets from the problem description. Examples Input 1 1 0 Output 1 Input 2 3 1 0 1 0 1 0 Output 8 Note In the second example, there are six one-element sets. Additionally, there are two two-element sets, the first one consists of the first and the third cells of the first row, the second one consists of the first and the third cells of the second row. To sum up, there are 8 sets. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
from math import factorial def count(n, k): return factorial(n) // (factorial(k) * factorial(n - k)) n, m = map(int, input().split()) table = [] for i in range(n): table.append(list(map(int, input().split()))) ans = 0 for i in range(n): c0 = table[i].count(0) c1 = table[i].count(1) for j in range(1, c0 + 1): ans += count(c0, j) for j in range(1, c1 + 1): ans += count(c1, j) for j in range(m): c0 = 0 c1 = 0 for i in range(n): if table[i][j] == 0: c0 += 1 else: c1 += 1 for i in range(2, c0 + 1): ans += count(c0, i) for i in range(2, c1 + 1): ans += count(c1, i) print(ans)
python
code_algorithm
[ { "input": "2 3\n1 0 1\n0 1 0\n", "output": "8\n" }, { "input": "1 1\n0\n", "output": "1\n" }, { "input": "32 2\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n", "output": "8589934622\n" }, { "input": "1 35\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "34359738367\n" }, { "input": "1 50\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "1125899906842623\n" }, { "input": "3 15\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 1 0 1 0 0 0 0 0 1 0\n1 0 0 1 0 0 0 0 0 0 0 0 1 0 1\n", "output": "22587\n" }, { "input": "10 11\n0 1 0 0 0 0 0 0 0 0 0\n0 1 0 1 0 0 1 0 0 0 0\n0 0 0 0 0 0 1 1 1 0 0\n0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 1 0 0 0 0 1 0\n0 0 0 0 0 0 1 0 0 0 0\n0 0 0 0 0 0 0 0 0 1 0\n0 0 1 0 0 0 1 1 0 0 0\n0 0 0 0 0 0 0 0 1 0 0\n0 0 1 0 1 0 0 0 0 1 1\n", "output": "12047\n" }, { "input": "11 1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n", "output": "2047\n" }, { "input": "14 15\n0 1 0 0 0 0 0 0 1 0 0 0 1 0 1\n0 0 0 1 1 1 1 0 1 0 0 1 1 0 0\n1 0 0 0 0 1 1 0 0 0 0 0 0 0 0\n0 1 0 0 0 1 0 1 1 0 0 1 0 0 0\n0 0 1 1 0 1 0 1 0 1 1 0 1 0 0\n0 0 0 1 1 0 0 0 0 0 1 1 0 1 0\n0 0 1 0 0 0 0 0 0 1 0 0 1 1 0\n1 1 0 0 0 1 0 0 0 0 0 0 1 1 0\n0 0 0 0 1 0 1 1 1 0 0 0 1 0 1\n1 0 1 1 0 1 0 0 1 0 0 1 1 1 0\n1 0 0 0 0 1 0 0 0 0 0 1 0 0 0\n0 0 0 1 0 1 0 0 0 0 1 0 0 0 1\n0 0 1 0 1 0 0 0 1 1 1 1 0 0 0\n0 0 0 0 0 0 0 0 0 0 0 1 0 0 0\n", "output": "53166\n" }, { "input": "50 1\n0\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n0\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n0\n1\n1\n1\n1\n1\n1\n1\n0\n1\n1\n1\n1\n0\n1\n1\n1\n1\n1\n", "output": "35184372088862\n" }, { "input": "1 49\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "562949953421311\n" }, { "input": "1 50\n0 1 0 1 0 1 0 1 1 1 0 0 1 0 0 1 1 1 1 0 1 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 0 1 0 0 1 0 0 0 1 1 0 1\n", "output": "142606334\n" }, { "input": "10 11\n1 1 0 1 1 0 0 0 1 0 0\n1 0 0 1 1 1 0 0 1 1 0\n0 0 1 0 1 1 0 1 0 1 1\n0 1 1 1 0 1 0 1 0 0 0\n1 1 1 1 1 1 1 0 1 0 0\n1 1 0 1 1 1 1 0 0 1 1\n1 0 1 0 1 0 0 1 1 1 0\n1 1 0 0 0 0 0 1 0 1 1\n1 1 0 1 1 1 0 0 1 1 0\n1 0 1 1 0 0 1 0 0 1 1\n", "output": "2444\n" }, { "input": "2 50\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "2251799813685296\n" }, { "input": "1 50\n0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "562949953421312\n" }, { "input": "5 50\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "5629499534214415\n" }, { "input": "1 33\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "8589934591\n" }, { "input": "2 2\n1 1\n1 1\n", "output": "8\n" }, { "input": "3 50\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "3377699720528069\n" }, { "input": "50 1\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n", "output": "1125899906842623\n" }, { "input": "50 1\n0\n1\n0\n1\n0\n1\n0\n1\n1\n1\n0\n0\n1\n0\n0\n1\n1\n1\n1\n0\n1\n1\n0\n1\n1\n1\n0\n1\n0\n0\n0\n1\n1\n0\n1\n1\n0\n1\n0\n1\n0\n0\n1\n0\n0\n0\n1\n1\n0\n1\n", "output": "142606334\n" }, { "input": "2 20\n0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0\n", "output": "589853\n" }, { "input": "21 2\n0 1\n1 1\n0 1\n0 0\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n", "output": "1310745\n" }, { "input": "1 50\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "1125899906842623\n" }, { "input": "6 6\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n", "output": "720\n" }, { "input": "1 40\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "1099511627775\n" }, { "input": "1 50\n0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0\n", "output": "1099511628798\n" }, { "input": "5 5\n0 0 0 0 0\n0 0 0 0 0\n0 0 0 0 0\n0 0 0 0 0\n0 0 0 0 0\n", "output": "285\n" }, { "input": "2 40\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "2199023255590\n" }, { "input": "1 10\n0 0 0 0 0 0 0 0 0 0\n", "output": "1023\n" }, { "input": "50 1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n", "output": "1125899906842623\n" } ]
code_contests
python
0.5
fd3f02a78ae021cf2d68380e4cf17ea2
Programmer Vasya is studying a new programming language &K*. The &K* language resembles the languages of the C family in its syntax. However, it is more powerful, which is why the rules of the actual C-like languages are unapplicable to it. To fully understand the statement, please read the language's description below carefully and follow it and not the similar rules in real programming languages. There is a very powerful system of pointers on &K* — you can add an asterisk to the right of the existing type X — that will result in new type X * . That is called pointer-definition operation. Also, there is the operation that does the opposite — to any type of X, which is a pointer, you can add an ampersand — that will result in a type &X, to which refers X. That is called a dereference operation. The &K* language has only two basic data types — void and errtype. Also, the language has operators typedef and typeof. * The operator "typedef A B" defines a new data type B, which is equivalent to A. A can have asterisks and ampersands, and B cannot have them. For example, the operator typedef void** ptptvoid will create a new type ptptvoid, that can be used as void**. * The operator "typeof A" returns type of A, brought to void, that is, returns the type void**...*, equivalent to it with the necessary number of asterisks (the number can possibly be zero). That is, having defined the ptptvoid type, as shown above, the typeof ptptvoid operator will return void**. An attempt of dereferencing of the void type will lead to an error: to a special data type errtype. For errtype the following equation holds true: errtype* = &errtype = errtype. An attempt to use the data type that hasn't been defined before that will also lead to the errtype. Using typedef, we can define one type several times. Of all the definitions only the last one is valid. However, all the types that have been defined earlier using this type do not change. Let us also note that the dereference operation has the lower priority that the pointer operation, in other words &T * is always equal to T. Note, that the operators are executed consecutively one by one. If we have two operators "typedef &void a" and "typedef a* b", then at first a becomes errtype, and after that b becomes errtype* = errtype, but not &void* = void (see sample 2). Vasya does not yet fully understand this powerful technology, that's why he asked you to help him. Write a program that analyzes these operators. Input The first line contains an integer n (1 ≤ n ≤ 100) — the number of operators. Then follow n lines with operators. Each operator is of one of two types: either "typedef A B", or "typeof A". In the first case the B type differs from void and errtype types, and besides, doesn't have any asterisks and ampersands. All the data type names are non-empty lines of no more than 20 lowercase Latin letters. The number of asterisks and ampersands separately in one type in any operator does not exceed 10, however if we bring some types to void with several asterisks, their number may exceed 10. Output For every typeof operator print on the single line the answer to that operator — the type that the given operator returned. Examples Input 5 typedef void* ptv typeof ptv typedef &amp;&amp;ptv node typeof node typeof &amp;ptv Output void* errtype void Input 17 typedef void* b typedef b* c typeof b typeof c typedef &amp;b b typeof b typeof c typedef &amp;&amp;b* c typeof c typedef &amp;b* c typeof c typedef &amp;void b typeof b typedef b******* c typeof c typedef &amp;&amp;b* c typeof c Output void* void** void void** errtype void errtype errtype errtype Note Let's look at the second sample. After the first two queries typedef the b type is equivalent to void*, and с — to void**. The next query typedef redefines b — it is now equal to &b = &void* = void. At that, the с type doesn't change. After that the с type is defined as &&b* = &&void* = &void = errtype. It doesn't influence the b type, that's why the next typedef defines c as &void* = void. Then the b type is again redefined as &void = errtype. Please note that the c type in the next query is defined exactly as errtype******* = errtype, and not &void******* = void******. The same happens in the last typedef. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
types = {'void':'void', 'errtype':'errtype'} def getRealType(type_expr): expr_type = type_expr.strip('&*') full_type_name = type_expr.replace(expr_type, types.get(expr_type, "errtype")) base_type = full_type_name.strip('&*') if base_type == "void": addr_count = full_type_name.count('*') deref_count = full_type_name.count('&') if deref_count > addr_count: return "errtype" return base_type + "*" * (addr_count - deref_count) else: return "errtype" def setTypeAlias(type_expr, alias_name): types[alias_name] = getRealType(type_expr) n = int(input()) for _ in range(n): operator = input().split() command = operator[0] if command == "typedef": setTypeAlias(operator[1], operator[2]) else: print(getRealType(operator[1]))
python
code_algorithm
[ { "input": "17\ntypedef void* b\ntypedef b* c\ntypeof b\ntypeof c\ntypedef &amp;b b\ntypeof b\ntypeof c\ntypedef &amp;&amp;b* c\ntypeof c\ntypedef &amp;b* c\ntypeof c\ntypedef &amp;void b\ntypeof b\ntypedef b******* c\ntypeof c\ntypedef &amp;&amp;b* c\ntypeof c\n", "output": "void*\nvoid**\nerrtype\nvoid**\nerrtype\nerrtype\nerrtype\nerrtype\nerrtype\n" }, { "input": "5\ntypedef void* ptv\ntypeof ptv\ntypedef &amp;&amp;ptv node\ntypeof node\ntypeof &amp;ptv\n", "output": "void*\nerrtype\nerrtype\n" }, { "input": "10\ntypedef &&&&void******* xqldryeid\ntypeof &xqldryeid*\ntypedef &void****** frgqt\ntypeof &&frgqt*********\ntypedef &void******* xqldryeid\ntypeof xqldryeid*\ntypedef errtype* xqldryeid\ntypeof &xqldryeid****\ntypedef &&&&&xqldryeid***** cuyhdvkkfyjzjmdkgcf\ntypeof cuyhdvkkfyjzjmdkgcf********\n", "output": "void***\nvoid************\nvoid*******\nerrtype\nerrtype\n" }, { "input": "10\ntypeof void\ntypedef void voiddd\ntypeof &&&&&voiddd*********\ntypeof &&&&&voidddd*********\ntypedef aaaa bbbb\ntypeof bbbb\ntypeof aaaa\ntypedef void** aaaa\ntypeof aaaa\ntypeof bbbb\n", "output": "void\nvoid****\nerrtype\nerrtype\nerrtype\nvoid**\nerrtype\n" }, { "input": "10\ntypedef &errtype*** oomxdcottaxn\ntypeof &oomxdcottaxn*********\ntypedef oomxdcottaxn**** bqbigpn\ntypeof &&bqbigpn**********\ntypedef &&&void******** ilrltx\ntypeof &&ilrltx**********\ntypedef void*** yo\ntypeof yo**********\ntypedef oomxdcottaxn*** bqbigpn\ntypeof &bqbigpn****\n", "output": "errtype\nerrtype\nvoid*************\nvoid*************\nerrtype\n" }, { "input": "2\ntypedef void errtypea\ntypeof errtypea\n", "output": "void\n" }, { "input": "4\ntypedef void voida\ntypedef voida* voidb\ntypedef voidb* voidc\ntypeof voidc\n", "output": "void**\n" }, { "input": "15\ntypedef &void pt\ntypeof pt\ntypeof pt*\ntypedef pt**** err\ntypeof err\ntypeof &err\ntypeof err*\ntypedef &void*** pt\ntypeof err\ntypeof &err\ntypeof err*\ntypeof pt\ntypeof pt*\ntypeof &&pt*\ntypeof &&&pt\n", "output": "errtype\nerrtype\nerrtype\nerrtype\nerrtype\nerrtype\nerrtype\nerrtype\nvoid**\nvoid***\nvoid*\nerrtype\n" }, { "input": "10\ntypedef errtype** ucywcaykzh\ntypeof &ucywcaykzh*********\ntypedef &&&&&&void********* ucywcaykzh\ntypeof &&&ucywcaykzh******\ntypedef &errtype vfqmtssewklwhiukrz\ntypeof &&vfqmtssewklwhiukrz********\ntypedef &errtype********** xvhxopvh\ntypeof &xvhxopvh\ntypedef &void****** kieypzcclmsvce\ntypeof &&&&&kieypzcclmsvce**\n", "output": "errtype\nvoid******\nerrtype\nerrtype\nvoid**\n" }, { "input": "5\ntypedef void* ptv\ntypeof ptv\ntypedef &&ptv node\ntypeof node\ntypeof &ptv\n", "output": "void*\nerrtype\nvoid\n" }, { "input": "10\ntypedef &errtype********* xekls\ntypeof &xekls*\ntypedef xekls*** xekls\ntypeof &xekls********\ntypedef &void*** xekls\ntypeof &xekls\ntypedef &errtype******* dwkmly\ntypeof &&dwkmly******\ntypedef void******* zkpahsnsumbnnzi\ntypeof zkpahsnsumbnnzi*\n", "output": "errtype\nerrtype\nvoid*\nerrtype\nvoid********\n" }, { "input": "10\ntypedef &void**** youdyfpinzk\ntypeof &youdyfpinzk***\ntypedef &&&&youdyfpinzk****** nfbsgpjzhxzskmxc\ntypeof nfbsgpjzhxzskmxc***\ntypedef &&&void*** puerqioirikxej\ntypeof &puerqioirikxej********\ntypedef &puerqioirikxej******** xzgzsamjdufuyxz\ntypeof &xzgzsamjdufuyxz******\ntypedef &&&&xzgzsamjdufuyxz******* hbyqffrbitdgott\ntypeof hbyqffrbitdgott*****\n", "output": "void*****\nvoid********\nvoid*******\nvoid************\nvoid***************\n" }, { "input": "10\ntypedef void**** iizqen\ntypeof iizqen****\ntypedef &void**** gdq\ntypeof &&gdq*********\ntypedef &&errtype******** lhndwyohjckrcew\ntypeof &lhndwyohjckrcew*\ntypedef &&&&void********** ccuoxbgeui\ntypeof ccuoxbgeui\ntypedef &&&&gdq******** gdq\ntypeof gdq******\n", "output": "void********\nvoid**********\nerrtype\nvoid******\nvoid*************\n" }, { "input": "1\ntypeof a\n", "output": "errtype\n" }, { "input": "17\ntypedef void* b\ntypedef b* c\ntypeof b\ntypeof c\ntypedef &b b\ntypeof b\ntypeof c\ntypedef &&b* c\ntypeof c\ntypedef &b* c\ntypeof c\ntypedef &void b\ntypeof b\ntypedef b******* c\ntypeof c\ntypedef &&b* c\ntypeof c\n", "output": "void*\nvoid**\nvoid\nvoid**\nerrtype\nvoid\nerrtype\nerrtype\nerrtype\n" }, { "input": "10\ntypedef &&&&&void* mbmrmohbydctgukqbueu\ntypeof &mbmrmohbydctgukqbueu*******\ntypedef &&mbmrmohbydctgukqbueu******* xollxoxrhif\ntypeof xollxoxrhif********\ntypedef &&&&void** zijybfnyxmodoahvvikd\ntypeof zijybfnyxmodoahvvikd****\ntypedef &void**** to\ntypeof &to*******\ntypedef &void******* yhhoqgpnysxvft\ntypeof &&&yhhoqgpnysxvft*******\n", "output": "errtype\nerrtype\nerrtype\nvoid*********\nvoid**********\n" } ]
code_contests
python
0.1
170d63d000456c767e682b013c074005
Consider a rooted tree. A rooted tree has one special vertex called the root. All edges are directed from the root. Vertex u is called a child of vertex v and vertex v is called a parent of vertex u if there exists a directed edge from v to u. A vertex is called a leaf if it doesn't have children and has a parent. Let's call a rooted tree a spruce if its every non-leaf vertex has at least 3 leaf children. You are given a rooted tree, check whether it's a spruce. The definition of a rooted tree can be found [here](https://goo.gl/1dqvzz). Input The first line contains one integer n — the number of vertices in the tree (3 ≤ n ≤ 1 000). Each of the next n - 1 lines contains one integer pi (1 ≤ i ≤ n - 1) — the index of the parent of the i + 1-th vertex (1 ≤ pi ≤ i). Vertex 1 is the root. It's guaranteed that the root has at least 2 children. Output Print "Yes" if the tree is a spruce and "No" otherwise. Examples Input 4 1 1 1 Output Yes Input 7 1 1 1 2 2 2 Output No Input 8 1 1 1 1 3 3 3 Output Yes Note The first example: <image> The second example: <image> It is not a spruce, because the non-leaf vertex 1 has only 2 leaf children. The third example: <image> Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
if __name__ == '__main__': n = int(input()) nonleaf = [0 for i in range(1010)] child = [[] for i in range(1010)] leaf = [0 for i in range(1010)] def dfs(s): cnt = 0 for chd in child[s]: cnt += dfs(chd) leaf[s] = cnt return 1 - nonleaf[s] for i in range(2, n + 1): node = int(input()) child[node].append(i) nonleaf[node] = 1 dfs(1) # print(nonleaf[1:n + 1]) # print(child[1:n + 1]) # print(leaf[1:n + 1]) for i in range(1, n + 1): if nonleaf[i] and leaf[i] < 3: print("No") exit() print("Yes")
python
code_algorithm
[ { "input": "4\n1\n1\n1\n", "output": "Yes\n" }, { "input": "8\n1\n1\n1\n1\n3\n3\n3\n", "output": "Yes\n" }, { "input": "7\n1\n1\n1\n2\n2\n2\n", "output": "No\n" }, { "input": "7\n1\n1\n1\n3\n3\n3\n", "output": "No\n" }, { "input": "3\n1\n1\n", "output": "No\n" }, { "input": "12\n1\n1\n1\n2\n5\n5\n5\n5\n1\n2\n2\n", "output": "No\n" }, { "input": "13\n1\n2\n2\n2\n1\n6\n6\n6\n1\n10\n10\n10\n", "output": "No\n" }, { "input": "9\n1\n1\n1\n1\n2\n6\n6\n6\n", "output": "No\n" }, { "input": "20\n1\n1\n1\n1\n2\n2\n2\n3\n3\n3\n4\n4\n4\n5\n5\n5\n1\n1\n1\n", "output": "Yes\n" }, { "input": "8\n1\n1\n1\n1\n5\n5\n5\n", "output": "Yes\n" }, { "input": "7\n1\n1\n1\n1\n2\n2\n", "output": "No\n" }, { "input": "7\n1\n2\n2\n1\n1\n1\n", "output": "No\n" } ]
code_contests
python
0.5
46a0d1db75b2caaf2802699c44ce9ab0
Two neighboring kingdoms decided to build a wall between them with some gates to enable the citizens to go from one kingdom to another. Each time a citizen passes through a gate, he has to pay one silver coin. The world can be represented by the first quadrant of a plane and the wall is built along the identity line (i.e. the line with the equation x = y). Any point below the wall belongs to the first kingdom while any point above the wall belongs to the second kingdom. There is a gate at any integer point on the line (i.e. at points (0, 0), (1, 1), (2, 2), ...). The wall and the gates do not belong to any of the kingdoms. Fafa is at the gate at position (0, 0) and he wants to walk around in the two kingdoms. He knows the sequence S of moves he will do. This sequence is a string where each character represents a move. The two possible moves Fafa will do are 'U' (move one step up, from (x, y) to (x, y + 1)) and 'R' (move one step right, from (x, y) to (x + 1, y)). Fafa wants to know the number of silver coins he needs to pay to walk around the two kingdoms following the sequence S. Note that if Fafa visits a gate without moving from one kingdom to another, he pays no silver coins. Also assume that he doesn't pay at the gate at point (0, 0), i. e. he is initially on the side he needs. Input The first line of the input contains single integer n (1 ≤ n ≤ 105) — the number of moves in the walking sequence. The second line contains a string S of length n consisting of the characters 'U' and 'R' describing the required moves. Fafa will follow the sequence S in order from left to right. Output On a single line, print one integer representing the number of silver coins Fafa needs to pay at the gates to follow the sequence S. Examples Input 1 U Output 0 Input 6 RURUUR Output 1 Input 7 URRRUUU Output 2 Note The figure below describes the third sample. The red arrows represent the sequence of moves Fafa will follow. The green gates represent the gates at which Fafa have to pay silver coins. <image> Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n=int(input()) s=input() x=0 y=0 c=0 side=2 lastside=2 for i in s: prevx=x prevy=y if i=='U': y+=1 if i=='R': x+=1 lastside=side if x>y: side=0 elif x<y: side=1 if lastside!=side and lastside!=2: c+=1 print(c)
python
code_algorithm
[ { "input": "6\nRURUUR\n", "output": "1\n" }, { "input": "1\nU\n", "output": "0\n" }, { "input": "7\nURRRUUU\n", "output": "2\n" }, { "input": "2\nUR\n", "output": "0\n" }, { "input": "7\nURURRUR\n", "output": "1\n" }, { "input": "7\nRRRRRRR\n", "output": "0\n" }, { "input": "2\nUU\n", "output": "0\n" }, { "input": "100\nRUURUURRUURUUUUURRUUURRRRUURRURRURRRRUUUUUURRUURRRRURUUURUURURRRRRURUURRUURUURRUUURUUUUUURRUUUURUUUR\n", "output": "3\n" }, { "input": "15\nRUURRRRURRUUUUU\n", "output": "3\n" }, { "input": "6\nUURRRU\n", "output": "1\n" } ]
code_contests
python
0
4b557b5634a30524f65b9b8442770205
You are given a following process. There is a platform with n columns. 1 × 1 squares are appearing one after another in some columns on this platform. If there are no squares in the column, a square will occupy the bottom row. Otherwise a square will appear at the top of the highest square of this column. When all of the n columns have at least one square in them, the bottom row is being removed. You will receive 1 point for this, and all the squares left will fall down one row. You task is to calculate the amount of points you will receive. Input The first line of input contain 2 integer numbers n and m (1 ≤ n, m ≤ 1000) — the length of the platform and the number of the squares. The next line contain m integer numbers c_1, c_2, ..., c_m (1 ≤ c_i ≤ n) — column in which i-th square will appear. Output Print one integer — the amount of points you will receive. Example Input 3 9 1 1 2 2 2 3 1 2 3 Output 2 Note In the sample case the answer will be equal to 2 because after the appearing of 6-th square will be removed one row (counts of the squares on the platform will look like [2~ 3~ 1], and after removing one row will be [1~ 2~ 0]). After the appearing of 9-th square counts will be [2~ 3~ 1], and after removing one row it will look like [1~ 2~ 0]. So the answer will be equal to 2. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n, m = map(int, input().split()) mas = list(map(int, input().split())) mn = 1001 for i in range(1, n + 1): if mas.count(i) < mn: mn = mas.count(i) print(mn)
python
code_algorithm
[ { "input": "3 9\n1 1 2 2 2 3 1 2 3\n", "output": "2\n" }, { "input": "2 5\n2 1 1 2 1\n", "output": "2\n" }, { "input": "2 1\n2\n", "output": "0\n" }, { "input": "3 5\n1 1 1 2 3\n", "output": "1\n" }, { "input": "100 3\n1 2 3\n", "output": "0\n" }, { "input": "1 7\n1 1 1 1 1 1 1\n", "output": "7\n" }, { "input": "2 4\n1 2 1 1\n", "output": "1\n" }, { "input": "2 2\n2 2\n", "output": "0\n" }, { "input": "1000 10\n999 999 998 34 454 546 343 35 34 1000\n", "output": "0\n" }, { "input": "1 1\n1\n", "output": "1\n" }, { "input": "4 9\n1 2 3 1 2 3 1 2 3\n", "output": "0\n" }, { "input": "100 1\n50\n", "output": "0\n" }, { "input": "4 6\n4 4 4 4 4 4\n", "output": "0\n" }, { "input": "3 12\n1 1 1 1 2 2 2 2 3 3 3 3\n", "output": "4\n" }, { "input": "3 4\n3 2 2 2\n", "output": "0\n" }, { "input": "4 2\n1 2\n", "output": "0\n" }, { "input": "15 3\n13 14 15\n", "output": "0\n" }, { "input": "2 1\n1\n", "output": "0\n" }, { "input": "4 6\n2 3 4 4 4 4\n", "output": "0\n" }, { "input": "8 8\n2 2 3 4 5 6 7 8\n", "output": "0\n" } ]
code_contests
python
0.7
169b4ebc39aac1882d713b44caf3e11d
Polycarp lives on a coordinate line at the point x = 0. He goes to his friend that lives at the point x = a. Polycarp can move only from left to right, he can pass one unit of length each second. Now it's raining, so some segments of his way are in the rain. Formally, it's raining on n non-intersecting segments, the i-th segment which is in the rain is represented as [l_i, r_i] (0 ≤ l_i < r_i ≤ a). There are m umbrellas lying on the line, the i-th umbrella is located at point x_i (0 ≤ x_i ≤ a) and has weight p_i. When Polycarp begins his journey, he doesn't have any umbrellas. During his journey from x = 0 to x = a Polycarp can pick up and throw away umbrellas. Polycarp picks up and throws down any umbrella instantly. He can carry any number of umbrellas at any moment of time. Because Polycarp doesn't want to get wet, he must carry at least one umbrella while he moves from x to x + 1 if a segment [x, x + 1] is in the rain (i.e. if there exists some i such that l_i ≤ x and x + 1 ≤ r_i). The condition above is the only requirement. For example, it is possible to go without any umbrellas to a point where some rain segment starts, pick up an umbrella at this point and move along with an umbrella. Polycarp can swap umbrellas while he is in the rain. Each unit of length passed increases Polycarp's fatigue by the sum of the weights of umbrellas he carries while moving. Can Polycarp make his way from point x = 0 to point x = a? If yes, find the minimum total fatigue after reaching x = a, if Polycarp picks up and throws away umbrellas optimally. Input The first line contains three integers a, n and m (1 ≤ a, m ≤ 2000, 1 ≤ n ≤ ⌈a/2⌉) — the point at which Polycarp's friend lives, the number of the segments in the rain and the number of umbrellas. Each of the next n lines contains two integers l_i and r_i (0 ≤ l_i < r_i ≤ a) — the borders of the i-th segment under rain. It is guaranteed that there is no pair of intersecting segments. In other words, for each pair of segments i and j either r_i < l_j or r_j < l_i. Each of the next m lines contains two integers x_i and p_i (0 ≤ x_i ≤ a, 1 ≤ p_i ≤ 10^5) — the location and the weight of the i-th umbrella. Output Print "-1" (without quotes) if Polycarp can't make his way from point x = 0 to point x = a. Otherwise print one integer — the minimum total fatigue after reaching x = a, if Polycarp picks up and throws away umbrellas optimally. Examples Input 10 2 4 3 7 8 10 0 10 3 4 8 1 1 2 Output 14 Input 10 1 1 0 9 0 5 Output 45 Input 10 1 1 0 9 1 5 Output -1 Note In the first example the only possible strategy is to take the fourth umbrella at the point x = 1, keep it till the point x = 7 (the total fatigue at x = 7 will be equal to 12), throw it away, move on from x = 7 to x = 8 without an umbrella, take the third umbrella at x = 8 and keep it till the end (the total fatigue at x = 10 will be equal to 14). In the second example the only possible strategy is to take the first umbrella, move with it till the point x = 9, throw it away and proceed without an umbrella till the end. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
import sys a,m,n=list(map(int,input().split())) aux=[0]*(a+1) inf=10**15 dp=[aux.copy() for i in range(n+1)] m1=10**12 m2=10**12 for i in range(m): l,r=list(map(int,input().split())) if l<m1: m1=l for j in range(l,r): dp[0][j+1]=inf s=[] for i in range(1,n+1): x,w=list(map(int,input().split())) s.append(tuple([x,w])) if x<m2: m2=x if m2>m1: print(-1) sys.exit() s.sort() for i in range(1,n+1): x=s[i-1][0] w=s[i-1][1] for j in range(x+1): dp[i][j]=dp[i-1][j] for j in range(x+1,a+1): if i!=1: dp[i][j]=min(dp[0][j]+dp[i][j-1],dp[i-1][j],w*(j-x)+dp[i][x]) else: dp[i][j]=min(dp[0][j]+dp[i][j-1],w*(j-x)+dp[i][x]) ans=dp[-1][-1] if ans>=inf: print(-1) else: print(ans)
python
code_algorithm
[ { "input": "10 1 1\n0 9\n0 5\n", "output": "45\n" }, { "input": "10 2 4\n3 7\n8 10\n0 10\n3 4\n8 1\n1 2\n", "output": "14\n" }, { "input": "10 1 1\n0 9\n1 5\n", "output": "-1\n" }, { "input": "1 1 1\n0 1\n0 100000\n", "output": "100000\n" }, { "input": "10 3 3\n0 3\n4 8\n9 10\n0 89516\n9 30457\n2 31337\n", "output": "397511\n" }, { "input": "2000 1 1\n0 2000\n0 100000\n", "output": "200000000\n" }, { "input": "100 50 1\n1 2\n3 4\n5 6\n7 8\n9 10\n11 12\n13 14\n15 16\n17 18\n19 20\n21 22\n23 24\n25 26\n27 28\n29 30\n31 32\n33 34\n35 36\n37 38\n39 40\n41 42\n43 44\n45 46\n47 48\n49 50\n51 52\n53 54\n55 56\n57 58\n59 60\n61 62\n63 64\n65 66\n67 68\n69 70\n71 72\n73 74\n75 76\n77 78\n79 80\n81 82\n83 84\n85 86\n87 88\n89 90\n91 92\n93 94\n95 96\n97 98\n99 100\n0 91855\n", "output": "9185500\n" }, { "input": "2000 10 1\n63 103\n165 171\n412 438\n696 702\n764 782\n946 1040\n1106 1132\n1513 1532\n1589 1696\n1785 1919\n63 51662\n", "output": "95884672\n" }, { "input": "2000 10 10\n46 161\n197 348\n412 538\n694 1183\n1210 1321\n1360 1440\n1615 1705\n1707 1819\n1832 1846\n1868 1917\n428 95081\n975 8616\n1159 27215\n532 32890\n1165 53788\n1969 11184\n1443 32142\n553 7583\n1743 33810\n315 62896\n", "output": "-1\n" }, { "input": "2000 1 1\n1999 2000\n0 18898\n", "output": "37796000\n" }, { "input": "2000 1 1\n0 1\n2000 33303\n", "output": "-1\n" }, { "input": "1 1 1\n0 1\n1 100000\n", "output": "-1\n" } ]
code_contests
python
0
2d2a15d808a7d77a7980b131045f34ad
There are n points on the plane, (x_1,y_1), (x_2,y_2), …, (x_n,y_n). You need to place an isosceles triangle with two sides on the coordinate axis to cover all points (a point is covered if it lies inside the triangle or on the side of the triangle). Calculate the minimum length of the shorter side of the triangle. Input First line contains one integer n (1 ≤ n ≤ 10^5). Each of the next n lines contains two integers x_i and y_i (1 ≤ x_i,y_i ≤ 10^9). Output Print the minimum length of the shorter side of the triangle. It can be proved that it's always an integer. Examples Input 3 1 1 1 2 2 1 Output 3 Input 4 1 1 1 2 2 1 2 2 Output 4 Note Illustration for the first example: <image> Illustration for the second example: <image> Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n = int(input()) m = [[int(i) for i in input().split()] for i in range(n)] #l = [ sum(m[i]) for i in range(n) ] #l = l.index(max(l)) print(max([ sum(m[i]) for i in range(n) ]))
python
code_algorithm
[ { "input": "3\n1 1\n1 2\n2 1\n", "output": "3\n" }, { "input": "4\n1 1\n1 2\n2 1\n2 2\n", "output": "4\n" }, { "input": "2\n1 8\n5 5\n", "output": "10\n" }, { "input": "5\n7 7\n5 8\n8 5\n4 9\n9 4\n", "output": "14\n" }, { "input": "2\n4 3\n8 1\n", "output": "9\n" }, { "input": "2\n9 9\n1 15\n", "output": "18\n" }, { "input": "2\n190 1\n100 100\n", "output": "200\n" }, { "input": "2\n9 1\n6 6\n", "output": "12\n" }, { "input": "2\n4 4\n1 6\n", "output": "8\n" }, { "input": "3\n100 1\n1 100\n67 67\n", "output": "134\n" }, { "input": "2\n100 100\n1 201\n", "output": "202\n" }, { "input": "2\n6 7\n3 9\n", "output": "13\n" }, { "input": "2\n2 3\n5 1\n", "output": "6\n" }, { "input": "2\n4 3\n5 1\n", "output": "7\n" }, { "input": "2\n5 5\n8 1\n", "output": "10\n" }, { "input": "2\n1 7\n5 4\n", "output": "9\n" }, { "input": "3\n1 1\n1 199\n100 101\n", "output": "201\n" }, { "input": "10\n100 34\n27 17\n17 73\n12 60\n53 25\n46 31\n61 86\n22 91\n82 91\n8 41\n", "output": "173\n" }, { "input": "1\n233 666\n", "output": "899\n" }, { "input": "5\n1 6\n1 9\n5 5\n6 5\n1 8\n", "output": "11\n" }, { "input": "2\n10 1\n5 7\n", "output": "12\n" }, { "input": "2\n1 100000000\n3 99999999\n", "output": "100000002\n" }, { "input": "2\n4 6\n1 8\n", "output": "10\n" }, { "input": "2\n3 3\n1 6\n", "output": "7\n" }, { "input": "2\n2 100\n52 51\n", "output": "103\n" }, { "input": "2\n7 5\n9 1\n", "output": "12\n" }, { "input": "2\n8 1\n5 5\n", "output": "10\n" }, { "input": "2\n3 5\n1 6\n", "output": "8\n" }, { "input": "2\n9 1\n5 6\n", "output": "11\n" }, { "input": "2\n1 6\n4 4\n", "output": "8\n" }, { "input": "2\n6 1\n4 4\n", "output": "8\n" }, { "input": "2\n1 8\n4 6\n", "output": "10\n" }, { "input": "2\n1 150\n100 100\n", "output": "200\n" }, { "input": "2\n501 501\n1000 1\n", "output": "1002\n" }, { "input": "2\n5 5\n2 7\n", "output": "10\n" }, { "input": "2\n1 10\n6 6\n", "output": "12\n" }, { "input": "2\n20 8\n19 10\n", "output": "29\n" }, { "input": "2\n1 9\n4 7\n", "output": "11\n" }, { "input": "2\n24 7\n20 15\n", "output": "35\n" }, { "input": "2\n30 30\n1 100\n", "output": "101\n" }, { "input": "2\n5 5\n7 2\n", "output": "10\n" }, { "input": "2\n5 1\n3 4\n", "output": "7\n" }, { "input": "2\n5 6\n9 1\n", "output": "11\n" }, { "input": "2\n1 10\n5 5\n", "output": "11\n" }, { "input": "2\n3 4\n2 6\n", "output": "8\n" }, { "input": "2\n4 5\n1 7\n", "output": "9\n" }, { "input": "2\n1 20\n11 11\n", "output": "22\n" }, { "input": "2\n198 1\n100 100\n", "output": "200\n" }, { "input": "2\n4 4\n6 1\n", "output": "8\n" }, { "input": "2\n10 10\n18 1\n", "output": "20\n" }, { "input": "2\n7 1\n6 3\n", "output": "9\n" }, { "input": "2\n1 11\n7 7\n", "output": "14\n" }, { "input": "2\n7 7\n1 11\n", "output": "14\n" }, { "input": "2\n1 6\n3 5\n", "output": "8\n" }, { "input": "2\n1 5\n3 4\n", "output": "7\n" }, { "input": "2\n30 30\n1 46\n", "output": "60\n" }, { "input": "2\n20 1\n11 11\n", "output": "22\n" }, { "input": "2\n2 5\n1 10\n", "output": "11\n" } ]
code_contests
python
0
8b7c038475b6db9718e10294ee767ae6
You have a garden consisting entirely of grass and weeds. Your garden is described by an n × m grid, with rows numbered 1 to n from top to bottom, and columns 1 to m from left to right. Each cell is identified by a pair (r, c) which means that the cell is located at row r and column c. Each cell may contain either grass or weeds. For example, a 4 × 5 garden may look as follows (empty cells denote grass): <image> You have a land-mower with you to mow all the weeds. Initially, you are standing with your lawnmower at the top-left corner of the garden. That is, at cell (1, 1). At any moment of time you are facing a certain direction — either left or right. And initially, you face right. In one move you can do either one of these: 1) Move one cell in the direction that you are facing. * if you are facing right: move from cell (r, c) to cell (r, c + 1) <image> * if you are facing left: move from cell (r, c) to cell (r, c - 1) <image> 2) Move one cell down (that is, from cell (r, c) to cell (r + 1, c)), and change your direction to the opposite one. * if you were facing right previously, you will face left <image> * if you were facing left previously, you will face right <image> You are not allowed to leave the garden. Weeds will be mowed if you and your lawnmower are standing at the cell containing the weeds (your direction doesn't matter). This action isn't counted as a move. What is the minimum number of moves required to mow all the weeds? Input The first line contains two integers n and m (1 ≤ n, m ≤ 150) — the number of rows and columns respectively. Then follow n lines containing m characters each — the content of the grid. "G" means that this cell contains grass. "W" means that this cell contains weeds. It is guaranteed that the top-left corner of the grid will contain grass. Output Print a single number — the minimum number of moves required to mow all the weeds. Examples Input 4 5 GWGGW GGWGG GWGGG WGGGG Output 11 Input 3 3 GWW WWW WWG Output 7 Input 1 1 G Output 0 Note For the first example, this is the picture of the initial state of the grid: <image> A possible solution is by mowing the weeds as illustrated below: <image> Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n, m = [int(i) for i in input().split()] if n == 1 and m == 1: # nothing to mow print(0) elif n == 1: # 1 row --> move right until last weed lawn = input() print(lawn.rfind('W')) elif m == 1: # 1 column --> move down until last weed weeds = 0 for i in range(n): lawn = input() if lawn == 'W': weeds = i print(weeds) else: # generic solution for n-by-m lawn # Get lawn as a list of strings, where each string is a row lawn = [] for i in range(n): lawn.append(input()) # Determine the first and last weed in each row first_weed = [row.find('W') for row in lawn] last_weed = [row.rfind('W') for row in lawn] if all([i == -1 for i in first_weed]): # there are not weeds! print(0) else: # there must be some weeds to mow # Determine the last row that needs to be mowed last_row = max(i for i, v in enumerate(first_weed) if v >= 0) lawn = lawn[:last_row+1] first_weed = first_weed[:last_row+1] last_weed = last_weed[:last_row+1] n = len(lawn) # Add down movement moves = n-1 # Add left/right movement even = True col = 0 for i in range(n): if first_weed[i] != -1: if even: moves += abs(first_weed[i] - col) col = last_weed[i] else: moves += abs(last_weed[i] - col) col = first_weed[i] moves += last_weed[i] - first_weed[i] even = not even print(moves)
python
code_algorithm
[ { "input": "4 5\nGWGGW\nGGWGG\nGWGGG\nWGGGG\n", "output": "11\n" }, { "input": "3 3\nGWW\nWWW\nWWG\n", "output": "7\n" }, { "input": "1 1\nG\n", "output": "0\n" }, { "input": "150 1\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nW\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nW\nG\nG\nG\nW\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nW\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nW\nG\nG\nG\nG\nG\nG\nG\nG\nG\nW\nG\nG\nG\nG\n", "output": "145\n" }, { "input": "2 4\nGWWG\nGGWW\n", "output": "5\n" }, { "input": "1 150\nGGGGWWGGWWWGGWGWGGWWGGWGGGGGWWWGWWGWWGWWWGWGGWGWGWWGWGGWWGWGGWWWGGWGGGWGWGWGGGWGWWGGWGWGWWWWGGWWGWWWGWGWGGGWGWGGWWGWGGGWWGGGWWWWWWWWWWWGGGGWGWWGWGWGGG\n", "output": "146\n" }, { "input": "2 124\nGGGGWGGGWGGGGGWWWGWWWGWGWGGGWGGWWGGGGWGGGWGGGGGWGGGGWWGGGGWGWGWWWGGGGGWGGGGGGGWGWGGGGWGGWGGGGWGGWWGWGGWWGGWWGGGGWWGGGGGGGWGG\nGGGGGGGGWGGGWWWGWGGGGGGGWWGGGGWWGGGWGWGGWGGWGGGWGGWGGGGGWWGGWGGGGGWWGWWGWGGWWWGWWWWGGGGWGGWGGGWGGGWWWWWGGGGGWGGGGGGGWGGGWWGW\n", "output": "239\n" }, { "input": "5 2\nGG\nGG\nWW\nGW\nWG\n", "output": "6\n" }, { "input": "1 150\nGGWGGGGGGGGGGGGGGGGGGGWGGGGGGWGGGGGGWGGGGGGGGGGGGGGGGGGGGGGGGGGGGWGGGWGGGGGGGGGGGGGGGGGGGGWGGGGGGGGGGGGGGGGGGGGGGGWGGGGGGGGWGGGGGGGGGWWGGGGGWGGGGGGGGG\n", "output": "140\n" }, { "input": "2 150\nGGGGGGGGWWGGGGGGGWGGGGGWGGGGGGGGWGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGWWGGGGGGGGGGGGGWGGGGGGGGGGGGGGGGGGWGGGGGGGGGGGGGGGWGGGGGGGGGGGGGGW\nGGGGGGGGGGGGGGGGGGGGGGWGGGWGGGGGGGGGGGGGGGGGGGGGGWGWGGGGGGGGGGGGWGGGGGGGGGGGGGGWGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGWGGWGGGGGWGGGGWGGWGGGGGGWGGWGGGGWGGGGGGG\n", "output": "277\n" }, { "input": "1 150\nGGGWGGGWWWWWWWGWWWGGWWWWWGGWWGGWWWWWWWWGWWGWWWWWWGWGWGWWWWWGWGWWGWWWWGWWGWGWWWWWWWWGGGGWWWWWGGGWWWWGGGWWWWGGWWWWGWWWWGGGWWWWWWWGWGGWGWWWGWGGWWGWGWWWGW\n", "output": "149\n" }, { "input": "20 1\nG\nG\nW\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nG\nW\nG\nW\nG\nG\n", "output": "17\n" }, { "input": "2 2\nGG\nGW\n", "output": "2\n" }, { "input": "3 3\nGGG\nGGG\nGGW\n", "output": "4\n" }, { "input": "124 2\nGG\nGG\nGG\nGW\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nGW\nGG\nWW\nGG\nGG\nWG\nGG\nWW\nGG\nGG\nGW\nGG\nGG\nGG\nGG\nGG\nGW\nWG\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nWG\nGG\nGG\nWG\nWW\nWG\nGW\nGG\nGW\nGG\nWG\nGG\nWG\nGG\nGW\nGG\nGW\nGG\nWW\nGG\nGG\nGG\nGG\nGG\nGW\nGG\nGG\nGG\nWG\nGG\nWG\nGG\nGG\nGG\nGG\nGW\nGG\nGG\nGG\nWG\nWW\nWG\nWG\nGG\nGG\nWW\nGG\nGG\nGG\nGW\nGW\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nWG\nGG\nGG\nGG\nGG\nGG\nGG\nGG\nGW\nWG\nWG\nGG\nGG\nGG\nGG\nGW\n", "output": "144\n" }, { "input": "10 10\nGGGGGGGGGG\nGGGGGGGGGG\nGGGGGGGGGG\nGGGGGGGGGG\nGGGGGGGGGG\nGGGGGGGGGG\nGGGGGGGGGG\nGGGGGGGGGG\nGGGGGGGGGG\nGGGGGGGGGG\n", "output": "0\n" }, { "input": "3 150\nGGGWGGGGWWGGGGGGGGGGGGGWGGWGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGWGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGWGGGGGGGWGGGGGGGGGGGGGGGGGWGGGGGGGGGGGGGGGGGGW\nGGGGGGGGGGGGWGGGGGGGGGWGGGGGGGGGGGGWGGGGGWGGGGGGGWGGGGGGGWGGGGGWGGGGGGGGGGGGGGGGGGGGGGGGWGGGGWGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGWGGWGGG\nGGGGGGGWGGWWGWGGWGGGGWGWGGGGGGGWGGGGGGGGGGGGGGGGGGGGGGGGWGGGGGGWGGGWGGGGGGGGGGGGGGGGWGGGGGGGGGGWGWGGGGGGGGGGGGGGGGGGGGGGGGGWGGGGGGGGGGGGGGGGGGGGGGGGGW\n", "output": "435\n" }, { "input": "3 5\nGGWWW\nWWWWW\nWWWGG\n", "output": "12\n" }, { "input": "150 1\nG\nW\nG\nW\nG\nG\nG\nG\nW\nG\nW\nG\nG\nW\nG\nG\nW\nG\nW\nG\nW\nG\nW\nG\nW\nW\nW\nW\nG\nG\nW\nW\nG\nG\nG\nG\nG\nG\nG\nG\nW\nW\nW\nW\nG\nW\nG\nW\nG\nG\nW\nW\nG\nG\nG\nG\nG\nW\nG\nW\nG\nG\nG\nG\nG\nG\nG\nW\nW\nW\nG\nG\nG\nG\nG\nW\nG\nW\nW\nG\nW\nW\nW\nW\nW\nW\nG\nW\nG\nW\nG\nW\nW\nG\nW\nW\nG\nG\nW\nG\nG\nG\nW\nW\nW\nW\nW\nG\nG\nG\nW\nW\nG\nG\nG\nW\nG\nW\nW\nG\nG\nG\nW\nW\nW\nW\nG\nW\nG\nW\nW\nW\nG\nG\nW\nG\nW\nW\nG\nW\nW\nW\nG\nW\nW\nW\nW\nW\nW\nW\n", "output": "149\n" }, { "input": "2 3\nGGG\nGGG\n", "output": "0\n" }, { "input": "3 5\nGWGGW\nGGGGG\nWGGWG\n", "output": "13\n" }, { "input": "3 3\nGGG\nGGG\nGGG\n", "output": "0\n" }, { "input": "3 3\nGWG\nWGW\nGWG\n", "output": "7\n" }, { "input": "2 5\nGWGGG\nGWGGW\n", "output": "8\n" }, { "input": "6 4\nGWWW\nWWGG\nGGGG\nGGGG\nGGGW\nWWGG\n", "output": "17\n" }, { "input": "1 20\nGGGGWGGGGWWWWGGGWGGG\n", "output": "16\n" }, { "input": "4 3\nGWW\nWWW\nWWW\nWWG\n", "output": "11\n" }, { "input": "5 5\nGWGGG\nGGGGG\nGGGGG\nWGGGW\nGGGGG\n", "output": "11\n" }, { "input": "3 112\nGGWGGWWGGGWWGWWGWGGGGGGWGGGWGGGGGGGWGGGGWGGGGGGGGGWWGGWWWGWGGWGWGWGGGGWWGGWGWWWGGWWWGGGGWGWGGWGGGWGGGGGGGWWWGGWG\nWWWGGGGWGWGWGGWGGGGWGWGGGWGWGGGWWWGGGGGWGWWGGWGGGGGGGWGGGGGGGGGWGGGGWGGGGGGGGGGGWWGWGGGWGGGWGGWWGWGWGGGGGWGGGGGG\nWWWGGWGGWWGGGWWGGGGGWGGGWWGWGWWGWGGWWWWGGGGGGWGGGGGWGGWGGGGWGGWGGGWGGGWGGWGWGGGGGGGWGGWGGWGWGWWWGGWWGGGWGGWGWWWW\n", "output": "333\n" }, { "input": "3 150\nGWWWGWGWWWWGGWWWGWGWWGWWWWWGGWGGWWWWWWWWWWWWWGGWGWWWWWGWGWGWWWWWWGWWWWGWGWWGWGWWWWWWWGWWWGGWWGWWWGWWGGWWGGGWGWWWWWWWGWGWWWGWWGWWWWWGWGWWWGGWGGGGWGWWWW\nWWWGGWWGWWWGGGWWWGWWWWWWWGGWGGWWGWWWWWWWWWGWGWWWWGGWWWWGGGGWWWWGWGGGWWGGWWWGWWGWWWWWGGWGWGGWGWWWGGWWWGWWGWGWGWWGWGGWGWWWGGGGWWGGGGWWWWGWWGGWGWWWWWGWWW\nWWGWWGWWWWGWGGGWWWGWWWGGWWWWWWGGWWGWWWWWWGWGWWWGGWWWWWWWGGWWWGGGWWWGWWWWWGWWWGGWWWWWGWWWGWGGWGWWGWGWWWGWGWWWGWWWWWWWGGWGWWWWWWWWGWWWWWWGGGWWWWWWGGWGGW\n", "output": "449\n" }, { "input": "3 3\nGWW\nGWW\nWWG\n", "output": "7\n" }, { "input": "2 150\nGWWWWGWGWGWGWGWWWWWWWWWWGWWWGGWWWGGWWWWGWWGGGGGWWWGWWWGWWWWWWWWWWWWWWGWGWWWWWWWWGWWGWWGWWGWWGWWWWWWGGGWWWWWWWWGWWGWGWGWGWWWGGWWWWWGGGWWWGWWGGWGWWGGWWW\nWGGGGWWWWWWGWWGWGGWGWGWWWWWGWWWGWWWWWWGGWGWWWWGGWWWWWWGGGWGGWGWWGWGWWGWWWWWWGGWGGGWWWGWWWGWWWWWGGGWWWWGGGWWGGGGWWWWWGWWWWGGWWWWWWWGGGGWWWWGWWGGWWGWWWG\n", "output": "299\n" }, { "input": "6 3\nGGW\nGGG\nGGG\nGGG\nGGG\nWGG\n", "output": "9\n" }, { "input": "3 3\nGWG\nGGG\nGGW\n", "output": "4\n" }, { "input": "6 5\nGWWWW\nWWWWW\nWWWWW\nWWWWW\nWWWWW\nWWWWW\n", "output": "29\n" } ]
code_contests
python
0
0bba00b0ebeee6055fa46d8d1194662e
You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below: * A "+" shape has one center nonempty cell. * There should be some (at least one) consecutive non-empty cells in each direction (left, right, up, down) from the center. In other words, there should be a ray in each direction. * All other cells are empty. Find out if the given picture has single "+" shape. Input The first line contains two integers h and w (1 ≤ h, w ≤ 500) — the height and width of the picture. The i-th of the next h lines contains string s_{i} of length w consisting "." and "*" where "." denotes the empty space and "*" denotes the non-empty space. Output If the given picture satisfies all conditions, print "YES". Otherwise, print "NO". You can output each letter in any case (upper or lower). Examples Input 5 6 ...... ..*... .****. ..*... ..*... Output YES Input 3 5 ..*.. ****. .*... Output NO Input 7 7 ....... ...*... ..****. ...*... ...*... ....... .*..... Output NO Input 5 6 ..**.. ..**.. ****** ..**.. ..**.. Output NO Input 3 7 .*...*. ***.*** .*...*. Output NO Input 5 10 .......... ..*....... .*.******. ..*....... .......... Output NO Note In the first example, the given picture contains one "+". In the second example, two vertical branches are located in a different column. In the third example, there is a dot outside of the shape. In the fourth example, the width of the two vertical branches is 2. In the fifth example, there are two shapes. In the sixth example, there is an empty space inside of the shape. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
def check(pic,row,col,h,w): for i in range(row+1,h): for j in range(w): if j != col: if pic[i][j] == '*': return False for i in range(row-1,-1,-1): for j in range(w): if j != col: if pic[i][j] == '*': return False col1 = col while col < w: if pic[row][col] == '*': col += 1 else: break for i in range(col,w): if pic[row][i] == '*': return False col = col1 while col > -1: if pic[row][col] == '*': col -= 1 else: break for i in range(col,-1,-1): if pic[row][i] == '*': return False row1 = row col = col1 while row < h: if pic[row][col] == '*': row += 1 else: break for i in range(row,h): if pic[i][col] == '*': return False row = row1 while row > -1: if pic[row][col] == '*': row -= 1 else: break for i in range(row,-1,-1): if pic[i][col] == '*': return False return True def main(): h,w = map(int,input().split()) pic = [] for i in range(h): pic.append(input()) for row in range(1,h-1): for col in range(1,w-1): if pic[row][col] == '*' and pic[row][col+1] == '*' and pic[row+1][col] == '*' and pic[row][col-1] == '*' and pic[row-1][col] == '*': if check(pic,row,col,h,w): print('YES') return print('NO') main()
python
code_algorithm
[ { "input": "3 7\n.*...*.\n***.***\n.*...*.\n", "output": "NO\n" }, { "input": "5 10\n..........\n..*.......\n.*.******.\n..*.......\n..........\n", "output": "NO\n" }, { "input": "5 6\n......\n..*...\n.****.\n..*...\n..*...\n", "output": "YES\n" }, { "input": "3 5\n..*..\n****.\n.*...\n", "output": "NO\n" }, { "input": "5 6\n..**..\n..**..\n******\n..**..\n..**..\n", "output": "NO\n" }, { "input": "7 7\n.......\n...*...\n..****.\n...*...\n...*...\n.......\n.*.....\n", "output": "NO\n" }, { "input": "7 4\n.*..\n***.\n.*..\n....\n.*..\n***.\n.*..\n", "output": "NO\n" }, { "input": "10 10\n..........\n..........\n....*.....\n....*.....\n.*******..\n....*.....\n....*.....\n..........\n....*.....\n..........\n", "output": "NO\n" }, { "input": "5 5\n.....\n..**.\n.***.\n..*..\n.....\n", "output": "NO\n" }, { "input": "7 7\n...*...\n.......\n...*...\n*.***.*\n...*...\n.......\n...*...\n", "output": "NO\n" }, { "input": "5 3\n.*.\n***\n.*.\n...\n.*.\n", "output": "NO\n" }, { "input": "5 5\n..*..\n.....\n*.*.*\n.....\n..*..\n", "output": "NO\n" }, { "input": "5 6\n......\n..*...\n.***..\n..**..\n......\n", "output": "NO\n" }, { "input": "6 6\n.*....\n.*...*\n******\n.*....\n......\n......\n", "output": "NO\n" }, { "input": "4 4\n.*..\n.*.*\n****\n.*..\n", "output": "NO\n" }, { "input": "3 3\n...\n.*.\n...\n", "output": "NO\n" }, { "input": "5 5\n.*...\n***..\n.*...\n.....\n.*...\n", "output": "NO\n" }, { "input": "6 6\n..*...\n..*...\n.***..\n......\n......\n......\n", "output": "NO\n" }, { "input": "6 9\n....*....\n.........\n....*....\n*********\n....*....\n.........\n", "output": "NO\n" }, { "input": "5 10\n..........\n..*.......\n.******.*.\n..*.......\n..........\n", "output": "NO\n" }, { "input": "5 5\n.....\n.....\n.....\n.....\n.....\n", "output": "NO\n" }, { "input": "3 3\n.*.\n**.\n.*.\n", "output": "NO\n" }, { "input": "5 7\n...*...\n.......\n...*...\n..***..\n...*...\n", "output": "NO\n" }, { "input": "5 5\n..*..\n.....\n..*..\n.***.\n..*..\n", "output": "NO\n" }, { "input": "5 3\n.*.\n...\n.*.\n***\n.*.\n", "output": "NO\n" }, { "input": "3 3\n**.\n***\n.*.\n", "output": "NO\n" }, { "input": "5 5\n.....\n.****\n.*...\n***..\n.*...\n", "output": "NO\n" }, { "input": "10 10\n..........\n..........\n....*.....\n....*.....\n.*******..\n....*.....\n....*.....\n..........\n....**....\n..........\n", "output": "NO\n" }, { "input": "2 2\n..\n..\n", "output": "NO\n" }, { "input": "3 4\n.*..\n*.*.\n**..\n", "output": "NO\n" }, { "input": "7 7\n.......\n...*...\n*.****.\n...*...\n...*...\n.......\n.......\n", "output": "NO\n" }, { "input": "3 3\n...\n..*\n.**\n", "output": "NO\n" }, { "input": "3 4\n..*.\n.**.\n..*.\n", "output": "NO\n" }, { "input": "3 4\n*.*.\n****\n..*.\n", "output": "NO\n" }, { "input": "5 5\n.*...\n***.*\n.*...\n.....\n.....\n", "output": "NO\n" }, { "input": "3 3\n...\n...\n...\n", "output": "NO\n" }, { "input": "5 3\n.*.\n.*.\n.*.\n.*.\n.*.\n", "output": "NO\n" }, { "input": "4 7\n.......\n..*....\n.***.*.\n..*....\n", "output": "NO\n" }, { "input": "7 3\n.*.\n***\n.*.\n...\n.*.\n***\n.*.\n", "output": "NO\n" }, { "input": "3 3\n*.*\n***\n*.*\n", "output": "NO\n" }, { "input": "1 1\n*\n", "output": "NO\n" }, { "input": "3 3\n.*.\n***\n.*.\n", "output": "YES\n" }, { "input": "5 5\n..*..\n.***.\n..*..\n.....\n..*..\n", "output": "NO\n" }, { "input": "4 4\n.*..\n****\n....\n....\n", "output": "NO\n" }, { "input": "3 3\n.*.\n***\n...\n", "output": "NO\n" }, { "input": "5 5\n.*...\n***..\n.*.*.\n..***\n...*.\n", "output": "NO\n" }, { "input": "5 5\n.....\n..***\n..*..\n.***.\n..*..\n", "output": "NO\n" }, { "input": "6 5\n..*..\n..*..\n*****\n.....\n..*..\n..*..\n", "output": "NO\n" } ]
code_contests
python
0
2f47dc9f6e03aae0aeae5251aa976511
Jack is working on his jumping skills recently. Currently he's located at point zero of the number line. He would like to get to the point x. In order to train, he has decided that he'll first jump by only one unit, and each subsequent jump will be exactly one longer than the previous one. He can go either left or right with each jump. He wonders how many jumps he needs to reach x. Input The input data consists of only one integer x ( - 109 ≤ x ≤ 109). Output Output the minimal number of jumps that Jack requires to reach x. Examples Input 2 Output 3 Input 6 Output 3 Input 0 Output 0 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
from math import sqrt x = abs(int(input())) n = int((sqrt(1 + 8 * x) - 1) / 2) k = (n * (n + 1)) // 2 if k == x: print(n) else: n += 1 k += n if (k - x) % 2: n += 1 k += n print(n + (k - x) % 2) else: print(n)
python
code_algorithm
[ { "input": "2\n", "output": "3\n" }, { "input": "0\n", "output": "0\n" }, { "input": "6\n", "output": "3\n" }, { "input": "-245245154\n", "output": "22147\n" }, { "input": "999961559\n", "output": "44721\n" }, { "input": "103702792\n", "output": "14403\n" }, { "input": "294680891\n", "output": "24277\n" }, { "input": "16417015\n", "output": "5730\n" }, { "input": "485658989\n", "output": "31166\n" }, { "input": "-779406751\n", "output": "39482\n" }, { "input": "-6985106\n", "output": "3739\n" }, { "input": "-904422532\n", "output": "42531\n" }, { "input": "288916443\n", "output": "24038\n" }, { "input": "27254274\n", "output": "7383\n" }, { "input": "-517744582\n", "output": "32179\n" }, { "input": "-278253406\n", "output": "23591\n" }, { "input": "823078041\n", "output": "40573\n" }, { "input": "999961561\n", "output": "44721\n" }, { "input": "-897912263\n", "output": "42377\n" }, { "input": "676637088\n", "output": "36787\n" }, { "input": "-706934164\n", "output": "37603\n" }, { "input": "-488979819\n", "output": "31273\n" }, { "input": "-941406715\n", "output": "43393\n" }, { "input": "845249034\n", "output": "41116\n" }, { "input": "-87275307\n", "output": "13213\n" }, { "input": "-236502086\n", "output": "21751\n" }, { "input": "999961560\n", "output": "44720\n" }, { "input": "561415872\n", "output": "33511\n" }, { "input": "-865918189\n", "output": "41617\n" }, { "input": "-790244010\n", "output": "39755\n" }, { "input": "-1000000000\n", "output": "44723\n" }, { "input": "867615187\n", "output": "41657\n" } ]
code_contests
python
0.6
a3565f84cb69be39e1ac2824882f62d4
You are a rebel leader and you are planning to start a revolution in your country. But the evil Government found out about your plans and set your punishment in the form of correctional labor. You must paint a fence which consists of 10^{100} planks in two colors in the following way (suppose planks are numbered from left to right from 0): * if the index of the plank is divisible by r (such planks have indices 0, r, 2r and so on) then you must paint it red; * if the index of the plank is divisible by b (such planks have indices 0, b, 2b and so on) then you must paint it blue; * if the index is divisible both by r and b you can choose the color to paint the plank; * otherwise, you don't need to paint the plank at all (and it is forbidden to spent paint on it). Furthermore, the Government added one additional restriction to make your punishment worse. Let's list all painted planks of the fence in ascending order: if there are k consecutive planks with the same color in this list, then the Government will state that you failed the labor and execute you immediately. If you don't paint the fence according to the four aforementioned conditions, you will also be executed. The question is: will you be able to accomplish the labor (the time is not important) or the execution is unavoidable and you need to escape at all costs. Input The first line contains single integer T (1 ≤ T ≤ 1000) — the number of test cases. The next T lines contain descriptions of test cases — one per line. Each test case contains three integers r, b, k (1 ≤ r, b ≤ 10^9, 2 ≤ k ≤ 10^9) — the corresponding coefficients. Output Print T words — one per line. For each test case print REBEL (case insensitive) if the execution is unavoidable or OBEY (case insensitive) otherwise. Example Input 4 1 1 2 2 10 4 5 2 3 3 2 2 Output OBEY REBEL OBEY OBEY Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
#------------------------template--------------------------# import os import sys from math import * from collections import * # from fractions import * # from heapq import* from bisect import * from io import BytesIO, IOBase def vsInput(): sys.stdin = open('input.txt', 'r') sys.stdout = open('output.txt', 'w') BUFSIZE = 8192 class FastIO(IOBase): newlines = 0 def __init__(self, file): self._fd = file.fileno() self.buffer = BytesIO() self.writable = "x" in file.mode or "r" not in file.mode self.write = self.buffer.write if self.writable else None def read(self): while True: b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE)) if not b: break ptr = self.buffer.tell() self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr) self.newlines = 0 return self.buffer.read() def readline(self): while self.newlines == 0: b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE)) self.newlines = b.count(b"\n") + (not b) ptr = self.buffer.tell() self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr) self.newlines -= 1 return self.buffer.readline() def flush(self): if self.writable: os.write(self._fd, self.buffer.getvalue()) self.buffer.truncate(0), self.buffer.seek(0) class IOWrapper(IOBase): def __init__(self, file): self.buffer = FastIO(file) self.flush = self.buffer.flush self.writable = self.buffer.writable self.write = lambda s: self.buffer.write(s.encode("ascii")) self.read = lambda: self.buffer.read().decode("ascii") self.readline = lambda: self.buffer.readline().decode("ascii") sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout) input = lambda: sys.stdin.readline().rstrip("\r\n") ALPHA='abcdefghijklmnopqrstuvwxyz' M=10**9+7 EPS=1e-6 def value():return tuple(map(int,input().split())) def array():return [int(i) for i in input().split()] def Int():return int(input()) def Str():return input() def arrayS():return [i for i in input().split()] #-------------------------code---------------------------# # vsInput() for _ in range(Int()): a,b,k=value() a,b=sorted((a,b)) lcm=a*b//gcd(a,b) c_a=lcm//a-1 c_b=lcm//b d_k=ceil(c_a/c_b) ok=1 if(d_k>=k):ok=0 if(a==b):ok=1 # print(ok,d_k) if(ok): print("OBEY") else: print("REBEL")
python
code_algorithm
[ { "input": "4\n1 1 2\n2 10 4\n5 2 3\n3 2 2\n", "output": "OBEY\nREBEL\nOBEY\nOBEY\n" }, { "input": "1\n99999971 99999989 2\n", "output": "REBEL\n" }, { "input": "1\n12 73 200000000\n", "output": "OBEY\n" }, { "input": "3\n3 7 2\n2 9 2\n999999937 999999929 2\n", "output": "REBEL\nREBEL\nREBEL\n" }, { "input": "1\n9532069 5631144 8332312\n", "output": "OBEY\n" }, { "input": "5\n1 1000000000 999999998\n1 1000000000 999999999\n1 1000000000 1000000000\n1000000000 1000000000 2\n1000000000 1000000000 1000000000\n", "output": "REBEL\nREBEL\nOBEY\nOBEY\nOBEY\n" }, { "input": "1\n1409 13337 1524200\n", "output": "OBEY\n" }, { "input": "1\n99999999 100000001 2\n", "output": "REBEL\n" }, { "input": "1\n852737558 154334374 81714164\n", "output": "OBEY\n" }, { "input": "1\n38647284 772970073 21\n", "output": "REBEL\n" }, { "input": "1\n496667478 999850149 61475504\n", "output": "OBEY\n" }, { "input": "1\n100000039 100000049 2\n", "output": "REBEL\n" }, { "input": "1\n999999999 1000000000 2\n", "output": "OBEY\n" }, { "input": "1\n99999 100001 2\n", "output": "REBEL\n" }, { "input": "1\n999999937 999999929 2\n", "output": "REBEL\n" }, { "input": "1\n999999999 999999997 2\n", "output": "REBEL\n" }, { "input": "1\n999999929 999999937 2\n", "output": "REBEL\n" }, { "input": "1\n999999999 1000000000 1000000000\n", "output": "OBEY\n" }, { "input": "1\n804289384 846930887 681692778\n", "output": "OBEY\n" }, { "input": "1\n1000000000 999999999 1000000000\n", "output": "OBEY\n" }, { "input": "1\n234959823 469921219 3\n", "output": "REBEL\n" }, { "input": "1\n7279424 3094044 1736295\n", "output": "OBEY\n" }, { "input": "1\n1000000000 999999999 30\n", "output": "OBEY\n" }, { "input": "1\n4807078 8896259 2846398\n", "output": "OBEY\n" } ]
code_contests
python
0
ea30bc24d0527925bd2a3545abaec728
This is the easy version of the problem. The difference is the constraint on the sum of lengths of strings and the number of test cases. You can make hacks only if you solve all versions of this task. You are given a string s, consisting of lowercase English letters. Find the longest string, t, which satisfies the following conditions: * The length of t does not exceed the length of s. * t is a palindrome. * There exists two strings a and b (possibly empty), such that t = a + b ( "+" represents concatenation), and a is prefix of s while b is suffix of s. Input The input consists of multiple test cases. The first line contains a single integer t (1 ≤ t ≤ 1000), the number of test cases. The next t lines each describe a test case. Each test case is a non-empty string s, consisting of lowercase English letters. It is guaranteed that the sum of lengths of strings over all test cases does not exceed 5000. Output For each test case, print the longest string which satisfies the conditions described above. If there exists multiple possible solutions, print any of them. Example Input 5 a abcdfdcecba abbaxyzyx codeforces acbba Output a abcdfdcba xyzyx c abba Note In the first test, the string s = "a" satisfies all conditions. In the second test, the string "abcdfdcba" satisfies all conditions, because: * Its length is 9, which does not exceed the length of the string s, which equals 11. * It is a palindrome. * "abcdfdcba" = "abcdfdc" + "ba", and "abcdfdc" is a prefix of s while "ba" is a suffix of s. It can be proven that there does not exist a longer string which satisfies the conditions. In the fourth test, the string "c" is correct, because "c" = "c" + "" and a or b can be empty. The other possible solution for this test is "s". Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
def is_polindrom(s): return s == reverse(s) def reverse(s): return s[::-1] result = [] test_am = int(input()) stroks = [] for alolo in range(test_am): stroks.append(input()) for test in range(test_am): string = stroks[test] if is_polindrom(string): print(string) continue # res = str() i = 1 while string[:i] == reverse(string[-i:]): i += 1 res1 = string[:i - 1] if len(res1) == 0: temp_string = string else: temp_string = string[i - 1:-i+1] left = temp_string[0] res2 = '' # print(temp_string) for j in range(len(temp_string), 0, -1): if is_polindrom(temp_string[:j]): res2 = temp_string[:j] break res3 = '' for j in range(0, len(temp_string), 1): if is_polindrom(temp_string[j:]): res3 = temp_string[j:] break # print(res2) # print(res3) res4 = res2 if len(res2) >= len(res3) else res3 result = res1 + res4 + reverse(res1) print(result)
python
code_algorithm
[ { "input": "5\na\nabcdfdcecba\nabbaxyzyx\ncodeforces\nacbba\n", "output": "a\nabcdfdcba\nxyzyx\nc\nabba\n" }, { "input": "1\ndafgdwwdgfadzvovgrddrgvovz\n", "output": "zvovgrddrgvovz\n" }, { "input": "1\nzzzzzagaadeaaaaffadkkkkkkzzzzzzz\n", "output": "zzzzzagazzzzz\n" }, { "input": "1\nrdgduvvudgdrbwhlpiiplhwb\n", "output": "rdgduvvudgdr\n" }, { "input": "1\nalahmavaaaaaaaavamhalazdadaapaohrggrhoapaadadz\n", "output": "zdadaapaohrggrhoapaadadz\n" }, { "input": "1\nafdamvaavarravaavmadfazeaaaaahpaiaaiaphaaaaaez\n", "output": "zeaaaaahpaiaaiaphaaaaaez\n" }, { "input": "1\nqjprjjjjrpjquiytxjjxtyiu\n", "output": "qjprjjjjrpjq\n" }, { "input": "1\noaaaigaakaaaakaagiaaaozavgbaaloaibbiaolaabgvaz\n", "output": "zavgbaaloaibbiaolaabgvaz\n" }, { "input": "1\nachaaaquajddjauqaaahcaztaaqtfaaeaaaaeaaftqaatz\n", "output": "ztaaqtfaaeaaaaeaaftqaatz\n" }, { "input": "1\nbjxxcwxaaaaaaa\n", "output": "aaaaaaa\n" }, { "input": "1\nwxclhkkhlcxwuzpxjlljxpzu\n", "output": "wxclhkkhlcxw\n" }, { "input": "1\ndaaanhhnaaadakfgaaaagfkaz\n", "output": "daaanhhnaaad\n" }, { "input": "1\ngsfhsddshfsgpxzaaffaazxp\n", "output": "gsfhsddshfsg\n" }, { "input": "1\ncaaaggcdaaaaaadcggaaaczabeaaaaaaheehaaaaaaebaz\n", "output": "zabeaaaaaaheehaaaaaaebaz\n" }, { "input": "1\nqwsdazzadswqviyupggpuyiv\n", "output": "qwsdazzadswq\n" }, { "input": "1\nlxgovxxvogxlzcjwnexxenwjcz\n", "output": "zcjwnexxenwjcz\n" }, { "input": "1\nhmpoqccqopmhzumxwhvvhwxmuz\n", "output": "zumxwhvvhwxmuz\n" }, { "input": "1\ncdbbaaaaaaaaaaacaaaaabababbbabaaaaaaaaaabaababbaacacadcbaaaa\n", "output": "aaaa\n" }, { "input": "1\naaacaecaaaaaaadabaabaaedaaabcabaaebdaaaaaaaaeabbdabbcaaaaaed\n", "output": "aaa\n" }, { "input": "1\nitxsssxvjffckdnrjzsxti\n", "output": "itxssssxti\n" }, { "input": "1\nwttsrrzpvecigubo\n", "output": "w\n" }, { "input": "1\nuopdxaaxdpouzfkuvlyylvukfz\n", "output": "zfkuvlyylvukfz\n" }, { "input": "1\nxuiirmmriiuxzhoowmxxmwoohz\n", "output": "zhoowmxxmwoohz\n" }, { "input": "1\nzsrfqaaqfrszkgzgrxxrgzgk\n", "output": "zsrfqaaqfrsz\n" }, { "input": "1\nmcuchnnhcucmfjryfbbfyrjf\n", "output": "mcuchnnhcucm\n" }, { "input": "1\nqxssassassxqzgdonnnnnnodgz\n", "output": "zgdonnnnnnodgz\n" }, { "input": "1\nuhokibbikohukclhxyyxhlck\n", "output": "uhokibbikohu\n" }, { "input": "1\naabacaliakakkakailacabaazbranacaagauaauagaacanarbz\n", "output": "zbranacaagauaauagaacanarbz\n" }, { "input": "1\njtnvmzzmvntjmbrocppcorbm\n", "output": "jtnvmzzmvntj\n" }, { "input": "1\nohmcbbaagaaaibqafjaaaaaa\n", "output": "aaaaaa\n" }, { "input": "1\nxotnoontoxqrhqiiqhrq\n", "output": "xotnoontox\n" }, { "input": "1\nsvrqjvvjqrvszfkafsmmsfakfz\n", "output": "zfkafsmmsfakfz\n" }, { "input": "1\noaaldaaqjaxxajqaadlaaozajdaaplaaaaaaaalpaadjaz\n", "output": "zajdaaplaaaaaaaalpaadjaz\n" }, { "input": "1\naaiameaciabaaacveevcaaabaicaemaiaazwaaoaagaaoafhcaaaaaachfaoaagaaoaawz\n", "output": "zwaaoaagaaoafhcaaaaaachfaoaagaaoaawz\n" }, { "input": "1\npyaahaeaaabbaaaeahaaypzaaecaeaqyraaryqaeaceaaz\n", "output": "zaaecaeaqyraaryqaeaceaaz\n" }, { "input": "1\nbacbeaaaeaebcaaaccaaabaadaaacdaaacaacaacbbaaaccaaaeacceaaaaa\n", "output": "aaaaa\n" }, { "input": "1\npsaayavarlaalravayaaspzaanaatamaannaamataanaaz\n", "output": "zaanaatamaannaamataanaaz\n" }, { "input": "1\naanyedeqoaeeaoqedeynaazffaaaaaaaoaaoaaaaaaaffz\n", "output": "zffaaaaaaaoaaoaaaaaaaffz\n" }, { "input": "1\nhnfumggmufnhvzzapzzpazzv\n", "output": "hnfumggmufnh\n" }, { "input": "1\nffrkzhhzkrffrqhzyuuyzhqrz\n", "output": "ffrkzhhzkrff\n" }, { "input": "1\naaaabdabaaadacbcbcaaababcaebaaacaagaaaaaabaaaaadaaddabaabdag\n", "output": "aaaa\n" }, { "input": "1\nfahzsrrszhafzdcfcxvvxcfcdz\n", "output": "zdcfcxvvxcfcdz\n" }, { "input": "1\nbaecabaabaabbaabaabaceabzabaabaababbaabbabaabaabaz\n", "output": "zabaabaababbaabbabaabaabaz\n" }, { "input": "1\ndraafaaaalabbalaaaafaardzaafnahmjgahaahagjmhanfaaz\n", "output": "zaafnahmjgahaahagjmhanfaaz\n" }, { "input": "1\nyvawijjiwavyzethfgvvgfhtez\n", "output": "zethfgvvgfhtez\n" }, { "input": "1\nrbphmccmhpbruouflsslfuou\n", "output": "rbphmccmhpbr\n" }, { "input": "1\nrhhnpxxpnhhrzlyycqiiqcyylz\n", "output": "zlyycqiiqcyylz\n" }, { "input": "1\naaaacbabaaaaabcabaabacaaacaaababababbbaaaaaaaaaababaacaabbbc\n", "output": "aaaa\n" }, { "input": "1\nepdimhhmidpezsowpeyyepwosz\n", "output": "zsowpeyyepwosz\n" }, { "input": "1\ngbulgrrglubgwslxfbbfxlsw\n", "output": "gbulgrrglubg\n" }, { "input": "1\noafafcaaahagcmfamaamafmcgahaaacfafaozakajaafvbafaaaapakkapaaaafabvfaajakaz\n", "output": "zakajaafvbafaaaapakkapaaaafabvfaajakaz\n" }, { "input": "1\nnajaasaadaaaadaasaajanzayanjachalqqlahcajnayaz\n", "output": "zayanjachalqqlahcajnayaz\n" }, { "input": "1\naijaahpabujjubaphaajiazyaaghaalaaaaaalaahgaayz\n", "output": "zyaaghaalaaaaaalaahgaayz\n" }, { "input": "1\nadaaaecabaaacgaeaacigabaabacaa\n", "output": "aacaa\n" }, { "input": "1\nbaaaaaaaabaaaaaabaaabaaaaaaaaaaaaaaaaaaaaaaabababaaaabbaabaa\n", "output": "baaaaaaaab\n" }, { "input": "1\nsaoaaacaihcchiacaaaoaszalanbcajaaaaaajacbnalaz\n", "output": "zalanbcajaaaaaajacbnalaz\n" }, { "input": "1\ncaaeaabgnaaaangbaaeaaczahdabeaaaehheaaaebadhaz\n", "output": "zahdabeaaaehheaaaebadhaz\n" }, { "input": "1\naaaiabaaaahdafaafadhaaaabaiaaadejadabbbeaahaccahaaebbbadajedz\n", "output": "aaaiabaaaahdafaafadhaaaabaiaaa\n" }, { "input": "1\nsvupwnnwpuvsdqrpyjjyprqd\n", "output": "svupwnnwpuvs\n" }, { "input": "1\ngnofwccahuxbwqrjbpoabadzhsblgelhqulvniunmidtjzdkabqrgewwcxsrqjngjortvfnupjohzuyxysjl\n", "output": "g\n" }, { "input": "2\nbyklvkupcupkhibyklvkupcupkhibyklvkupcupkhiihkpucpukvlkybihkpucpukvlkybihkpucpukvlkybbyklvkupcupkhibyklvkupcupkhiihkpucpukvlkybihkpucpukvlkybihkpucpukvlkybbyklvkupcupkhibyklvkupcupkhiihkpucpukvlkybihkpucpukvlkybihkpucpukvlkybihkpucpukvlkybihkpucpukvlkybihkpucpukvlkybihkpucpukvlkybbyklvkupcupkhiihkpucpukvlkybihkpucpukvlkybbyklvkupcupkhibyklvkupcupkhiihkpucpukvlkybihkpucpukvlkybihkpucpukvlkybbyklvkupcupkhibyklvkupcupkhibyklvkupcupkhi\nnlzrpjtbffovc\n", "output": "byklvkupcupkhibyklvkupcupkhibyklvkupcupkhiihkpucpukvlkybihkpucpukvlkybihkpucpukvlkyb\nn\n" }, { "input": "1\natacafaadcbaaaaamghaoaaafihahyaafakaafaaaaaafdlnaaaieaeaafdkaaaaagnpaamjaaaagdfaaaacaagaaejaaaaagfdadmabiaaalfaacaaabkaafaaaffbanaaaiaakaeav\n", "output": "ata\n" }, { "input": "1\natkapmicaaddaacimpaktazaaayaaaaknaankaaaayaaaz\n", "output": "zaaayaaaaknaankaaaayaaaz\n" }, { "input": "1\ngaaoyaaabafaaapaajaaxaanaabaacaagacaelisabaymakahaaakaraaaacacaemaaanacaafaamapajaaahgaaaaaaaagaaaaaaaaangofaaaaksaaankahnapaoaaahcrdahcygkahaaaaaiaaaarjgaqadaalaatkxaanospaaaaeeboojrreafodldskgaabfvadakaufafeakaxjbaanatahjlvanahkjaiaiaafaeaaaaeadaefafmahdawdasoabuahlhataljgaauga\n", "output": "g\n" }, { "input": "1\ndeaadajkjaohhoajkjadaaedzaabpahaaabaaaabaaahapbaaz\n", "output": "zaabpahaaabaaaabaaahapbaaz\n" }, { "input": "10\nu\nxqpczgnzazxyrvx\ncfjgfhxmzqmjgzzjthziuomldylspyfuxvjlgdc\nooydbldio\nyvaamavy\nrzjjebcgotjffuzr\nhtfkwvihzuwxczopzqujdnaorgxibjfcmlzntskawxhyoymwynitukttewfpajuph\nfactnjajntcaf\nywowyovhrgradhtrqkgurkjpudnrrqhmmwiaqicfxnoyejdsmmurusdzqgjjntocryhqsgr\nqq\n", "output": "u\nxqx\ncfc\nooo\nyvaaavy\nrzjjzr\nhth\nfactnjajntcaf\nywowy\nqq\n" }, { "input": "1\ndknbiwwibnkdzotcizffzictoz\n", "output": "zotcizffzictoz\n" }, { "input": "1\npalkjeejklapvcpyczzcypcv\n", "output": "palkjeejklap\n" }, { "input": "1\nfadeaafaghcaaababeiaaadaceaada\n", "output": "ada\n" }, { "input": "1\nlaaaaaoaobaaboaoaaaaalzauridhacaajjaacahdiruaz\n", "output": "zauridhacaajjaacahdiruaz\n" }, { "input": "1\ngikvdbbdvkigihfcrqqrcfhiz\n", "output": "gikvdbbdvkig\n" }, { "input": "1\nhlyhfmmfhylhuhfavbbvafhu\n", "output": "hlyhfmmfhylh\n" }, { "input": "1\naixprmmrpxiawxwlaccalwxw\n", "output": "aixprmmrpxia\n" }, { "input": "1\naacaaaaaxwaawxaaaaacaazqhapeebxaaiiaaxbeepahqz\n", "output": "zqhapeebxaaiiaaxbeepahqz\n" }, { "input": "1\nbaabbaaabbbcabababacaabbaabcababaaabaaccaaaaacaaaaaabaaaaaca\n", "output": "baab\n" }, { "input": "1\nabczdunbqlckfpyktalxycba\n", "output": "abczcba\n" }, { "input": "1\navcbkhaaaabbaaaahkbcvazoaaaaaifxgaagxfiaaaaaoz\n", "output": "zoaaaaaifxgaagxfiaaaaaoz\n" }, { "input": "1\nghvmxtzgrrrrgztxmvhgjqlufbjazxxzajbfulqj\n", "output": "ghvmxtzgrrrrgztxmvhg\n" }, { "input": "1\naabaaaadabbaabbaaabaaabbacbaabaaaaaaaababababaaacaaaaabbbaac\n", "output": "aabaa\n" }, { "input": "1\nwpxbhkkhbxpwbyyvoccovyyb\n", "output": "wpxbhkkhbxpw\n" }, { "input": "1\nabaagaaihanggnahiaagaabazaadnagdaajaaaajaadgandaaz\n", "output": "zaadnagdaajaaaajaadgandaaz\n" }, { "input": "1\neacfeijadmpaaaabbaaaapmdajiefcaezadaaaaauaaaghgaaaaghgaaauaaaaadaz\n", "output": "zadaaaaauaaaghgaaaaghgaaauaaaaadaz\n" }, { "input": "1\naeqiladaaxaaxaadaliqeazxaaaabafrahharfabaaaaxz\n", "output": "zxaaaabafrahharfabaaaaxz\n" }, { "input": "1\naaahffcaaaccaaacffhaaazbfgaaaaandaadnaaaaagfbz\n", "output": "zbfgaaaaandaadnaaaaagfbz\n" }, { "input": "1\nbaaikatachjqacaojjoacaqjhcatakiaabzanjaaiajaaaaiabaaaabaiaaaajaiaajnaz\n", "output": "zanjaaiajaaaaiabaaaabaiaaaajaiaajnaz\n" }, { "input": "1\nukgpmaampgkuzmcfwoppowfcmz\n", "output": "zmcfwoppowfcmz\n" }, { "input": "5\nrxhvjeejvhxraqwwryyrwwqaz\nfsfttffttfsfqlqoyssyoqlqz\nxcffdjjdffcxszjbvyyvbjzsz\nocechmmhcecocjzoattaozjcz\nhkjyddddyjkhyarmkuukmrayz\n", "output": "rxhvjeejvhxr\nfsfttffttfsf\nxcffdjjdffcx\nocechmmhceco\nhkjyddddyjkh\n" }, { "input": "1\nxadcnaaeagaaaagaeaancdaxzagaaayeamabiibamaeyaaagaz\n", "output": "zagaaayeamabiibamaeyaaagaz\n" }, { "input": "1\naannabaaaaaaaiaaavvaaaiaaaaaaabannaazaaaajahdpdaejaaanaanaaajeadpdhajaaaaz\n", "output": "zaaaajahdpdaejaaanaanaaajeadpdhajaaaaz\n" }, { "input": "1\naaaaaiaaalaggalaaaiaaaaabbfdhakgmalaalamgkahdfbbz\n", "output": "aaaaaiaaalaggalaaaiaaaaa\n" }, { "input": "1\naaabbbbaabababaaaabaabbbaaaaaaabbabbaaabaabbcbaaacaaaaaaaaba\n", "output": "aaabbbbaaa\n" }, { "input": "1\nackcarugaaajabndaaagaaah\n", "output": "ackca\n" }, { "input": "1\naxziannaizxazmcoeaaeocmz\n", "output": "axziannaizxa\n" }, { "input": "1\nhacalfaaiaaeaaedakaabgaeaaidabeahbaaiana\n", "output": "ana\n" }, { "input": "1\nfebdacaacaacaacadbefzaaaacabfaggafbacaaaaz\n", "output": "zaaaacabfaggafbacaaaaz\n" }, { "input": "1\nvwuyriiryuwvkncvwoowvcnk\n", "output": "vwuyriiryuwv\n" }, { "input": "1\naaaaaeplsaaaaslpeaaaaazpgphkaaaaprrpaaaakhpgpz\n", "output": "zpgphkaaaaprrpaaaakhpgpz\n" }, { "input": "1\nrelqcttcqlernvltommotlvn\n", "output": "relqcttcqler\n" }, { "input": "1\njqvdfggfdvqjtyavmffmvayta\n", "output": "jqvdfggfdvqj\n" }, { "input": "1\nyfeawqabaarraabaqwaefyzaaahaaaaqaaaaqaaaahaaaz\n", "output": "zaaahaaaaqaaaaqaaaahaaaz\n" }, { "input": "1\nenaekmaaaoaaoaaamkeanezaavaaaxldarradlxaaavaaz\n", "output": "zaavaaaxldarradlxaaavaaz\n" }, { "input": "1\naaafaazaasaaaauaauaaaasaazaafaaazsidahaashalfknaiiankflahsaahadisz\n", "output": "zsidahaashalfknaiiankflahsaahadisz\n" }, { "input": "1\njjcakaabaaffaabaakacjjzaaaoaaiateaaetaiaaoaaaz\n", "output": "zaaaoaaiateaaetaiaaoaaaz\n" }, { "input": "1\nebgaaaauaaammaaauaaaagbezaaabafpaalcaaclaapfabaaaz\n", "output": "zaaabafpaalcaaclaapfabaaaz\n" }, { "input": "1\naaaacbbbaaaabaacabaaaaaaaaacaaabababaaaccdaaaacaaaaaaaaabaab\n", "output": "aaaa\n" }, { "input": "1\naaneaakeaueeuaekaaenaazedaayaaaqaaaaqaaayaadez\n", "output": "zedaayaaaqaaaaqaaayaadez\n" }, { "input": "1\ncaszenpxwt\n", "output": "c\n" }, { "input": "1\naaadbaacaabaabaacaabdaaazabdaaaaaaeaccaeaaaaaadbaz\n", "output": "zabdaaaaaaeaccaeaaaaaadbaz\n" }, { "input": "1\naaaaabaabaaccabcbaaaabcbaaabaaaaabcaaaabacbaaaaaabbaaaacbcab\n", "output": "aaaaa\n" }, { "input": "1\naapmixaaahkkhaaaximpaazquaaaapplaaaalppaaaauqz\n", "output": "zquaaaapplaaaalppaaaauqz\n" }, { "input": "1\nzppxpwggpehyflmiemsvlenejoyvmewkpfygkjuwyincpvmjvrikngocatszlukfpmvurnotedcbqujgxgsilivboptnkvchfhdg\n", "output": "z\n" }, { "input": "1\neiaaaacaaajjaaacaaaaiezaakybqauoiaaiouaqbykaaz\n", "output": "zaakybqauoiaaiouaqbykaaz\n" } ]
code_contests
python
0
eba9a3200aa0b1aec48a0a75bafda0dd
Captain Flint and his crew keep heading to a savage shore of Byteland for several months already, drinking rum and telling stories. In such moments uncle Bogdan often remembers his nephew Denis. Today, he has told a story about how Denis helped him to come up with an interesting problem and asked the crew to solve it. In the beginning, uncle Bogdan wrote on a board a positive integer x consisting of n digits. After that, he wiped out x and wrote integer k instead, which was the concatenation of binary representations of digits x consists of (without leading zeroes). For example, let x = 729, then k = 111101001 (since 7 = 111, 2 = 10, 9 = 1001). After some time, uncle Bogdan understood that he doesn't know what to do with k and asked Denis to help. Denis decided to wipe last n digits of k and named the new number as r. As a result, Denis proposed to find such integer x of length n that r (as number) is maximum possible. If there are multiple valid x then Denis is interested in the minimum one. All crew members, including captain Flint himself, easily solved the task. All, except cabin boy Kostya, who was too drunk to think straight. But what about you? Note: in this task, we compare integers (x or k) as numbers (despite what representations they are written in), so 729 < 1999 or 111 < 1000. Input The first line contains a single integer t (1 ≤ t ≤ 1000) — the number of test cases. Next t lines contain test cases — one per test case. The one and only line of each test case contains the single integer n (1 ≤ n ≤ 10^5) — the length of the integer x you need to find. It's guaranteed that the sum of n from all test cases doesn't exceed 2 ⋅ 10^5. Output For each test case, print the minimum integer x of length n such that obtained by Denis number r is maximum possible. Example Input 2 1 3 Output 8 998 Note In the second test case (with n = 3), if uncle Bogdan had x = 998 then k = 100110011000. Denis (by wiping last n = 3 digits) will obtain r = 100110011. It can be proved that the 100110011 is the maximum possible r Denis can obtain and 998 is the minimum x to obtain it. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
#code t=int(input()) while t>0: n=int(input()) k=n/4 l=int(k) if k==l: for i in range(n-l): print("9",end="") for i in range(l): print("8",end="") print("") else: l+=1 for i in range(n-l): print("9",end="") for i in range(l): print("8",end="") print("") t-=1
python
code_algorithm
[ { "input": "2\n1\n3\n", "output": "8\n998\n" }, { "input": "1\n2\n", "output": "98\n" }, { "input": "2\n87911\n94124\n", "output": "99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999988888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n" }, { "input": "20\n1057\n7092\n1990\n3013\n7002\n18597\n2726\n6319\n1248\n5690\n3467\n4270\n6973\n2935\n100000\n19329\n1836\n1100\n2599\n2579\n", "output": "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999988888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999988888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999988888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999988888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999988888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n" }, { "input": "5\n46809\n40813\n42036\n43977\n24229\n", "output": "999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n" }, { "input": "2\n100000\n100000\n", "output": "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\n" } ]
code_contests
python
0
5e247d55fa36dc8210e0f0dae736c684
The Berland University is preparing to celebrate the 256-th anniversary of its founding! A specially appointed Vice Rector for the celebration prepares to decorate the campus. In the center of the campus n ice sculptures were erected. The sculptures are arranged in a circle at equal distances from each other, so they form a regular n-gon. They are numbered in clockwise order with numbers from 1 to n. The site of the University has already conducted a voting that estimated each sculpture's characteristic of ti — the degree of the sculpture's attractiveness. The values of ti can be positive, negative or zero. When the university rector came to evaluate the work, he said that this might be not the perfect arrangement. He suggested to melt some of the sculptures so that: * the remaining sculptures form a regular polygon (the number of vertices should be between 3 and n), * the sum of the ti values of the remaining sculptures is maximized. Help the Vice Rector to analyze the criticism — find the maximum value of ti sum which can be obtained in this way. It is allowed not to melt any sculptures at all. The sculptures can not be moved. Input The first input line contains an integer n (3 ≤ n ≤ 20000) — the initial number of sculptures. The second line contains a sequence of integers t1, t2, ..., tn, ti — the degree of the i-th sculpture's attractiveness ( - 1000 ≤ ti ≤ 1000). The numbers on the line are separated by spaces. Output Print the required maximum sum of the sculptures' attractiveness. Examples Input 8 1 2 -3 4 -5 5 2 3 Output 14 Input 6 1 -2 3 -4 5 -6 Output 9 Input 6 1 2 3 4 5 6 Output 21 Note In the first sample it is best to leave every second sculpture, that is, leave sculptures with attractivenesses: 2, 4, 5 и 3. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n=int(input()) s=list(map(int,input().split())) max=0 for i in range(n): max+=s[i] for i in range(2,n): if n%i==0 and n//i>=3: for j in range(i): sum=0 x=j while(x<n): sum+=s[x] x+=i if sum>max:max=sum print(max)
python
code_algorithm
[ { "input": "6\n1 2 3 4 5 6\n", "output": "21\n" }, { "input": "6\n1 -2 3 -4 5 -6\n", "output": "9\n" }, { "input": "8\n1 2 -3 4 -5 5 2 3\n", "output": "14\n" }, { "input": "12\n1 1 1 1 1 1 1 -1000 1 1 1 1\n", "output": "6\n" }, { "input": "13\n6 7 8 2 5 1 -9 -6 9 10 8 9 -8\n", "output": "42\n" }, { "input": "6\n1 0 1 0 1 0\n", "output": "3\n" }, { "input": "4\n1 -10 1 -10\n", "output": "-18\n" }, { "input": "3\n-1 -1 -1\n", "output": "-3\n" }, { "input": "5\n0 -1 1 1 0\n", "output": "1\n" }, { "input": "6\n-8 -8 6 5 -5 1\n", "output": "-2\n" }, { "input": "7\n0 55 -5 50 53 34 84\n", "output": "271\n" }, { "input": "10\n5 -5 -4 3 -1 -1 2 1 5 -2\n", "output": "7\n" }, { "input": "97\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "0\n" }, { "input": "9\n-2 -1 2 0 1 1 -1 -2 -2\n", "output": "1\n" } ]
code_contests
python
0.5
0acaf9c760a3456aee6282ad1e75cedc
A dice is a cube, its faces contain distinct integers from 1 to 6 as black points. The sum of numbers at the opposite dice faces always equals 7. Please note that there are only two dice (these dices are mirror of each other) that satisfy the given constraints (both of them are shown on the picture on the left). <image> Alice and Bob play dice. Alice has built a tower from n dice. We know that in this tower the adjacent dice contact with faces with distinct numbers. Bob wants to uniquely identify the numbers written on the faces of all dice, from which the tower is built. Unfortunately, Bob is looking at the tower from the face, and so he does not see all the numbers on the faces. Bob sees the number on the top of the tower and the numbers on the two adjacent sides (on the right side of the picture shown what Bob sees). Help Bob, tell whether it is possible to uniquely identify the numbers on the faces of all the dice in the tower, or not. Input The first line contains a single integer n (1 ≤ n ≤ 100) — the number of dice in the tower. The second line contains an integer x (1 ≤ x ≤ 6) — the number Bob sees at the top of the tower. Next n lines contain two space-separated integers each: the i-th line contains numbers ai, bi (1 ≤ ai, bi ≤ 6; ai ≠ bi) — the numbers Bob sees on the two sidelong faces of the i-th dice in the tower. Consider the dice in the tower indexed from top to bottom from 1 to n. That is, the topmost dice has index 1 (the dice whose top face Bob can see). It is guaranteed that it is possible to make a dice tower that will look as described in the input. Output Print "YES" (without the quotes), if it is possible to to uniquely identify the numbers on the faces of all the dice in the tower. If it is impossible, print "NO" (without the quotes). Examples Input 3 6 3 2 5 4 2 4 Output YES Input 3 3 2 6 4 1 5 3 Output NO Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
q=int(input()) w=int(input()) k=0 for i in range(q): e=list(map(int,input().split())) if (w in e) or ((7-w) in e): print('NO') k=1 break if k==0: print('YES')
python
code_algorithm
[ { "input": "3\n3\n2 6\n4 1\n5 3\n", "output": "NO\n" }, { "input": "3\n6\n3 2\n5 4\n2 4\n", "output": "YES\n" }, { "input": "2\n4\n2 6\n5 4\n", "output": "NO\n" }, { "input": "96\n4\n1 5\n5 1\n6 5\n2 1\n2 1\n2 6\n6 5\n6 5\n6 2\n2 6\n1 5\n6 5\n1 5\n2 6\n6 5\n5 6\n2 1\n2 6\n1 2\n1 5\n2 6\n2 6\n2 1\n1 5\n5 1\n1 2\n2 6\n2 6\n6 5\n1 5\n2 1\n2 6\n1 2\n5 6\n1 5\n2 6\n6 2\n2 6\n6 5\n1 5\n6 5\n6 5\n1 5\n5 1\n6 2\n5 1\n5 1\n1 5\n2 6\n5 1\n1 5\n2 1\n1 2\n6 2\n6 2\n5 6\n1 5\n6 5\n2 1\n6 5\n2 1\n2 1\n1 2\n6 2\n1 2\n1 5\n5 1\n5 6\n6 5\n6 2\n1 5\n2 6\n1 2\n1 2\n5 1\n1 5\n6 5\n6 2\n6 5\n2 6\n5 6\n2 1\n5 6\n2 1\n6 5\n2 6\n2 1\n1 5\n2 1\n6 2\n1 2\n1 5\n5 6\n5 1\n5 6\n2 1\n", "output": "YES\n" }, { "input": "2\n6\n2 4\n6 5\n", "output": "NO\n" }, { "input": "1\n3\n2 1\n", "output": "YES\n" }, { "input": "2\n6\n3 2\n6 4\n", "output": "NO\n" }, { "input": "2\n1\n2 3\n1 2\n", "output": "NO\n" }, { "input": "2\n3\n2 6\n3 1\n", "output": "NO\n" }, { "input": "100\n3\n6 5\n1 5\n2 1\n5 1\n6 5\n5 1\n6 2\n1 2\n6 5\n5 1\n5 1\n1 5\n2 6\n6 2\n5 6\n1 2\n1 5\n5 6\n1 5\n1 2\n2 6\n1 2\n6 2\n1 5\n6 2\n2 6\n1 5\n6 2\n6 5\n5 6\n1 5\n5 6\n5 1\n5 1\n2 1\n1 2\n5 6\n6 5\n1 5\n5 1\n1 2\n1 5\n1 2\n2 6\n5 1\n2 6\n2 6\n5 6\n2 6\n6 5\n6 5\n1 5\n2 1\n5 6\n5 6\n1 2\n2 1\n1 2\n1 2\n1 2\n5 6\n6 2\n1 5\n1 2\n2 1\n2 6\n1 2\n5 1\n1 5\n6 5\n5 1\n5 1\n2 6\n5 6\n6 2\n1 2\n5 1\n6 2\n2 1\n5 6\n2 1\n1 5\n6 5\n6 5\n1 2\n1 2\n5 1\n6 2\n6 2\n1 2\n1 5\n6 5\n5 6\n1 2\n6 5\n2 1\n6 5\n1 5\n5 6\n6 5\n", "output": "YES\n" }, { "input": "2\n5\n6 3\n4 5\n", "output": "NO\n" }, { "input": "2\n1\n3 2\n1 2\n", "output": "NO\n" }, { "input": "98\n6\n4 2\n2 3\n2 3\n2 3\n2 3\n2 3\n3 2\n5 4\n4 2\n5 4\n5 4\n5 4\n5 3\n4 5\n2 3\n4 2\n5 3\n5 4\n4 5\n3 5\n3 2\n4 2\n2 4\n5 4\n2 3\n2 4\n5 4\n4 2\n3 5\n5 4\n2 3\n2 4\n3 5\n2 3\n3 5\n4 2\n3 5\n5 3\n4 2\n5 3\n5 3\n2 3\n2 4\n4 5\n3 2\n4 2\n3 5\n3 2\n3 5\n5 4\n3 5\n3 5\n4 2\n4 2\n3 2\n4 5\n5 4\n2 3\n5 4\n2 4\n2 3\n4 5\n3 5\n5 4\n3 2\n2 3\n5 3\n2 3\n5 3\n2 3\n2 3\n2 4\n2 3\n2 3\n5 3\n2 3\n4 2\n4 2\n5 4\n2 3\n2 3\n4 5\n3 2\n5 3\n3 2\n2 4\n2 4\n5 3\n5 4\n4 5\n5 3\n4 5\n2 4\n5 3\n4 2\n5 4\n2 4\n5 3\n", "output": "YES\n" }, { "input": "2\n4\n1 2\n4 5\n", "output": "NO\n" }, { "input": "3\n1\n4 5\n4 1\n4 5\n", "output": "NO\n" }, { "input": "96\n4\n1 5\n1 5\n4 6\n1 2\n4 2\n3 2\n4 6\n6 4\n6 3\n6 2\n4 1\n6 4\n5 1\n2 4\n5 6\n6 5\n3 2\n6 2\n3 1\n1 4\n3 2\n6 2\n2 4\n1 3\n5 4\n1 3\n6 2\n6 2\n5 6\n1 4\n4 2\n6 2\n3 1\n6 5\n3 1\n4 2\n6 3\n3 2\n3 6\n1 3\n5 6\n6 4\n1 4\n5 4\n2 6\n3 5\n5 4\n5 1\n2 4\n1 5\n1 3\n1 2\n1 3\n6 4\n6 3\n4 5\n4 1\n3 6\n1 2\n6 4\n1 2\n2 3\n2 1\n4 6\n1 3\n5 1\n4 5\n5 4\n6 3\n2 6\n5 1\n6 2\n3 1\n3 1\n5 4\n3 1\n5 6\n2 6\n5 6\n4 2\n6 5\n3 2\n6 5\n2 3\n6 4\n6 2\n1 2\n4 1\n1 2\n6 3\n2 1\n5 1\n6 5\n5 4\n4 5\n1 2\n", "output": "NO\n" }, { "input": "3\n2\n1 4\n5 3\n6 4\n", "output": "NO\n" }, { "input": "2\n6\n3 5\n3 6\n", "output": "NO\n" }, { "input": "100\n3\n6 5\n5 1\n3 2\n1 5\n3 6\n5 4\n2 6\n4 1\n6 3\n4 5\n1 5\n1 4\n4 2\n2 6\n5 4\n4 1\n1 3\n6 5\n5 1\n2 1\n2 4\n2 1\n3 6\n4 1\n6 3\n2 3\n5 1\n2 6\n6 4\n3 5\n4 1\n6 5\n1 5\n1 5\n2 3\n4 1\n5 3\n6 4\n1 3\n5 3\n4 1\n1 4\n2 1\n6 2\n1 5\n6 2\n6 2\n4 5\n4 2\n5 6\n6 3\n1 3\n2 3\n5 4\n6 5\n3 1\n1 2\n4 1\n1 3\n1 3\n6 5\n4 6\n3 1\n2 1\n2 3\n3 2\n4 1\n1 5\n4 1\n6 3\n1 5\n4 5\n4 2\n4 5\n2 6\n2 1\n3 5\n4 6\n4 2\n4 5\n2 4\n3 1\n6 4\n5 6\n3 1\n1 4\n4 5\n6 3\n6 3\n2 1\n5 1\n3 6\n3 5\n2 1\n4 6\n4 2\n5 6\n3 1\n3 5\n3 6\n", "output": "NO\n" }, { "input": "2\n6\n3 2\n6 5\n", "output": "NO\n" }, { "input": "15\n4\n2 1\n2 6\n6 5\n5 1\n1 5\n2 1\n6 5\n5 1\n5 1\n6 2\n6 5\n5 1\n5 1\n6 5\n2 6\n", "output": "YES\n" }, { "input": "4\n3\n5 6\n1 3\n1 5\n4 1\n", "output": "NO\n" }, { "input": "3\n6\n3 2\n5 6\n2 4\n", "output": "NO\n" }, { "input": "4\n1\n2 3\n2 3\n2 3\n1 3\n", "output": "NO\n" }, { "input": "2\n3\n5 1\n3 5\n", "output": "NO\n" }, { "input": "3\n5\n3 1\n1 3\n2 3\n", "output": "NO\n" }, { "input": "25\n4\n1 2\n4 1\n3 5\n2 1\n3 5\n6 5\n3 5\n5 6\n1 2\n2 4\n6 2\n2 3\n2 4\n6 5\n2 3\n6 3\n2 3\n1 3\n2 1\n3 1\n5 6\n3 1\n6 4\n3 6\n2 3\n", "output": "NO\n" }, { "input": "2\n2\n3 1\n1 3\n", "output": "YES\n" }, { "input": "15\n4\n2 1\n2 4\n6 4\n5 3\n4 1\n4 2\n6 3\n4 5\n3 5\n2 6\n5 6\n1 5\n3 5\n6 4\n3 2\n", "output": "NO\n" }, { "input": "3\n3\n1 2\n3 2\n3 1\n", "output": "NO\n" }, { "input": "4\n3\n5 6\n1 5\n5 1\n1 5\n", "output": "YES\n" }, { "input": "20\n6\n3 2\n4 2\n3 5\n4 2\n5 3\n5 4\n2 3\n2 3\n4 5\n3 5\n3 2\n2 4\n4 5\n2 4\n3 2\n4 2\n5 4\n3 2\n3 5\n2 4\n", "output": "YES\n" }, { "input": "10\n5\n1 3\n3 1\n6 3\n6 3\n4 6\n3 1\n1 4\n3 1\n4 6\n1 3\n", "output": "YES\n" }, { "input": "2\n1\n2 3\n2 1\n", "output": "NO\n" }, { "input": "99\n3\n2 1\n6 2\n3 6\n1 3\n5 1\n2 6\n4 6\n6 4\n6 4\n6 5\n3 6\n2 6\n1 5\n2 3\n4 6\n1 4\n4 1\n2 3\n4 5\n4 1\n5 1\n1 2\n6 5\n4 6\n6 5\n6 2\n3 6\n6 4\n2 1\n3 1\n2 1\n6 2\n3 5\n4 1\n5 3\n3 1\n1 5\n3 6\n6 2\n1 5\n2 1\n5 1\n4 1\n2 6\n5 4\n4 2\n2 1\n1 5\n1 3\n4 6\n4 6\n4 5\n2 3\n6 2\n3 2\n2 1\n4 6\n6 2\n3 5\n3 6\n3 1\n2 3\n2 1\n3 6\n6 5\n6 3\n1 2\n5 1\n1 4\n6 2\n5 3\n1 3\n5 4\n2 3\n6 3\n1 5\n1 2\n2 6\n5 6\n5 6\n3 5\n3 1\n4 6\n3 1\n4 5\n4 2\n3 5\n6 2\n2 4\n4 6\n6 2\n4 2\n2 3\n2 4\n1 5\n1 4\n3 5\n1 2\n4 5\n", "output": "NO\n" }, { "input": "97\n3\n2 1\n6 5\n4 1\n6 5\n3 2\n1 2\n6 3\n6 4\n6 3\n1 3\n1 3\n3 1\n3 6\n3 2\n5 6\n4 2\n3 6\n1 5\n2 6\n3 2\n6 2\n2 1\n2 4\n1 3\n3 1\n2 6\n3 6\n4 6\n6 2\n5 1\n6 3\n2 6\n3 6\n2 4\n4 5\n6 5\n4 1\n5 6\n6 2\n5 4\n5 1\n6 5\n1 4\n2 1\n4 5\n4 5\n4 1\n5 4\n1 4\n2 6\n2 6\n1 5\n5 6\n3 2\n2 3\n1 4\n4 1\n3 6\n6 2\n5 3\n6 2\n4 5\n6 2\n2 6\n6 5\n1 4\n2 6\n3 5\n2 6\n4 1\n4 5\n1 3\n4 2\n3 2\n1 2\n5 6\n1 5\n3 5\n2 1\n1 2\n1 2\n6 4\n5 1\n1 2\n2 4\n6 3\n4 5\n1 5\n4 2\n5 1\n3 1\n6 4\n4 2\n1 5\n4 6\n2 1\n2 6\n", "output": "NO\n" }, { "input": "98\n6\n4 2\n1 2\n3 2\n2 1\n2 1\n3 2\n2 3\n6 5\n4 6\n1 5\n4 5\n5 1\n6 5\n1 4\n1 2\n2 4\n6 5\n4 5\n4 6\n3 1\n2 3\n4 1\n4 2\n6 5\n3 2\n4 2\n5 1\n2 4\n1 3\n4 5\n3 2\n1 2\n3 1\n3 2\n3 6\n6 4\n3 6\n3 5\n4 6\n6 5\n3 5\n3 2\n4 2\n6 4\n1 3\n2 4\n5 3\n2 3\n1 3\n5 6\n5 3\n5 3\n4 6\n4 6\n3 6\n4 1\n6 5\n6 2\n1 5\n2 1\n6 2\n5 4\n6 3\n1 5\n2 3\n2 6\n5 6\n2 6\n5 1\n3 2\n6 2\n6 2\n1 2\n2 1\n3 5\n2 1\n4 6\n1 4\n4 5\n3 2\n3 2\n5 4\n1 3\n5 1\n2 3\n6 2\n2 6\n1 5\n5 1\n5 4\n5 1\n5 4\n2 1\n6 5\n1 4\n6 5\n1 2\n3 5\n", "output": "NO\n" }, { "input": "99\n3\n2 1\n2 6\n6 2\n1 5\n1 5\n6 2\n6 5\n6 5\n6 2\n5 6\n6 5\n6 2\n5 1\n2 6\n6 5\n1 5\n1 5\n2 6\n5 1\n1 5\n1 5\n2 1\n5 6\n6 5\n5 6\n2 6\n6 2\n6 5\n1 2\n1 2\n1 2\n2 6\n5 6\n1 2\n5 6\n1 2\n5 1\n6 5\n2 6\n5 1\n1 2\n1 5\n1 5\n6 2\n5 1\n2 6\n1 2\n5 1\n1 5\n6 5\n6 5\n5 6\n2 1\n2 6\n2 6\n1 2\n6 2\n2 6\n5 6\n6 5\n1 5\n2 1\n1 2\n6 2\n5 6\n6 5\n2 1\n1 5\n1 5\n2 6\n5 1\n1 2\n5 6\n2 1\n6 5\n5 1\n2 1\n6 2\n6 5\n6 5\n5 6\n1 2\n6 5\n1 2\n5 1\n2 1\n5 1\n2 6\n2 1\n6 2\n2 6\n2 6\n2 1\n2 1\n5 1\n1 5\n5 6\n2 1\n5 6\n", "output": "YES\n" }, { "input": "5\n1\n2 3\n5 3\n5 4\n5 1\n3 5\n", "output": "NO\n" }, { "input": "25\n4\n1 2\n1 5\n5 6\n1 2\n5 1\n5 6\n5 1\n6 5\n2 1\n2 6\n2 6\n2 6\n2 6\n5 6\n2 6\n6 5\n2 1\n1 5\n1 2\n1 2\n6 5\n1 2\n6 5\n6 2\n2 6\n", "output": "YES\n" }, { "input": "2\n3\n2 1\n3 5\n", "output": "NO\n" }, { "input": "2\n2\n3 1\n1 5\n", "output": "NO\n" }, { "input": "5\n1\n2 3\n3 5\n4 5\n5 4\n5 3\n", "output": "YES\n" }, { "input": "97\n3\n2 1\n5 6\n1 2\n5 6\n2 6\n2 1\n6 2\n6 5\n6 2\n1 5\n1 2\n1 2\n6 2\n2 6\n6 5\n2 6\n6 5\n5 1\n6 2\n2 6\n2 6\n1 2\n2 6\n1 2\n1 5\n6 2\n6 5\n6 5\n2 6\n1 5\n6 5\n6 2\n6 2\n2 6\n5 6\n5 6\n1 5\n6 5\n2 6\n5 6\n1 5\n5 6\n1 5\n1 2\n5 1\n5 1\n1 5\n5 1\n1 5\n6 2\n6 2\n5 1\n6 5\n2 1\n2 6\n1 5\n1 5\n6 2\n2 6\n5 6\n2 6\n5 6\n2 6\n6 2\n5 6\n1 2\n6 2\n5 6\n6 2\n1 5\n5 6\n1 5\n2 6\n2 6\n2 1\n6 5\n5 1\n5 1\n1 2\n2 1\n2 1\n6 2\n1 5\n2 1\n2 1\n6 2\n5 1\n5 1\n2 6\n1 5\n1 2\n6 2\n2 6\n5 1\n6 5\n1 2\n6 2\n", "output": "YES\n" }, { "input": "2\n3\n2 6\n5 3\n", "output": "NO\n" }, { "input": "3\n6\n3 2\n5 4\n2 6\n", "output": "NO\n" }, { "input": "2\n6\n3 2\n6 2\n", "output": "NO\n" }, { "input": "2\n3\n1 2\n3 1\n", "output": "NO\n" }, { "input": "20\n6\n3 2\n4 6\n3 6\n6 4\n5 1\n1 5\n2 6\n1 2\n1 4\n5 3\n2 3\n6 2\n5 4\n2 6\n1 3\n4 6\n4 5\n6 3\n3 1\n6 2\n", "output": "NO\n" }, { "input": "2\n6\n4 5\n6 5\n", "output": "NO\n" }, { "input": "10\n5\n1 3\n2 3\n6 5\n6 5\n4 5\n1 3\n1 2\n3 2\n4 2\n1 2\n", "output": "NO\n" }, { "input": "3\n2\n1 4\n3 1\n4 6\n", "output": "YES\n" } ]
code_contests
python
0
114ffacb20a5ecb96b56066fc9bd5fe2
In the evenings Donkey would join Shrek to look at the stars. They would sit on a log, sipping tea and they would watch the starry sky. The sky hung above the roof, right behind the chimney. Shrek's stars were to the right of the chimney and the Donkey's stars were to the left. Most days the Donkey would just count the stars, so he knew that they are exactly n. This time he wanted a challenge. He imagined a coordinate system: he put the origin of the coordinates at the intersection of the roof and the chimney, directed the OX axis to the left along the roof and the OY axis — up along the chimney (see figure). The Donkey imagined two rays emanating from he origin of axes at angles α1 and α2 to the OX axis. <image> Now he chooses any star that lies strictly between these rays. After that he imagines more rays that emanate from this star at the same angles α1 and α2 to the OX axis and chooses another star that lies strictly between the new rays. He repeats the operation as long as there still are stars he can choose between the rays that emanate from a star. <image> As a result, the Donkey gets a chain of stars. He can consecutively get to each star if he acts by the given rules. Your task is to find the maximum number of stars m that the Donkey's chain can contain. Note that the chain must necessarily start in the point of the origin of the axes, that isn't taken into consideration while counting the number m of stars in the chain. Input The first line contains an integer n (1 ≤ n ≤ 105) — the number of stars. The second line contains simple fractions representing relationships "a/b c/d", such that <image> and <image> (0 ≤ a, b, c, d ≤ 105; <image>; <image>; <image>). The given numbers a, b, c, d are integers. Next n lines contain pairs of integers xi, yi (1 ≤ xi, yi ≤ 105)— the stars' coordinates. It is guaranteed that all stars have distinct coordinates. Output In a single line print number m — the answer to the problem. Examples Input 15 1/3 2/1 3 1 6 2 4 2 2 5 4 5 6 6 3 4 1 6 2 1 7 4 9 3 5 3 1 3 15 5 12 4 Output 4 Note In the sample the longest chain the Donkey can build consists of four stars. Note that the Donkey can't choose the stars that lie on the rays he imagines. <image> Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
import bisect def INPUT(): global n, a, b, c, d n = int(input()) a, b, c, d = [int(j) for i in input().split() for j in i.split("/")] global y_alpha y_alpha = [] for _ in range(n): x, y = [int(x) for x in input().split()] y_alpha.append((b * y - a * x, c * x - d * y)) if __name__ == '__main__': INPUT() y_alpha = sorted([(x, y) for x, y in y_alpha if x > 0 and y > 0], key = lambda x: (x[0], -x[1])) dp = [] for x, y in y_alpha: i = bisect.bisect_left(dp, y) if i == len(dp): dp.append(y) else: dp[i] = y; print(len(dp));
python
code_algorithm
[ { "input": "15\n1/3 2/1\n3 1\n6 2\n4 2\n2 5\n4 5\n6 6\n3 4\n1 6\n2 1\n7 4\n9 3\n5 3\n1 3\n15 5\n12 4\n", "output": "4\n" }, { "input": "5\n0/17 74/0\n68877 18122\n96115 84747\n71027 43746\n31622 3444\n93281 34803\n", "output": "4\n" }, { "input": "5\n3/18 18/17\n49797 95131\n5075 96918\n91898 7865\n91852 41070\n12076 45049\n", "output": "1\n" }, { "input": "15\n1/4 2/1\n3 1\n6 2\n9 3\n12 4\n15 5\n2 1\n4 2\n5 3\n7 4\n1 3\n3 4\n2 5\n4 5\n1 6\n6 6\n", "output": "5\n" }, { "input": "5\n0/17 74/0\n69711 29703\n91677 56040\n26051 78244\n20816 40897\n70770 35908\n", "output": "3\n" }, { "input": "5\n27/18 27/17\n85006 4046\n10811 30171\n97316 32923\n73899 71559\n76723 17949\n", "output": "0\n" }, { "input": "5\n3/24 24/3\n31394 23366\n27990 71363\n33642 36903\n79731 10588\n10907 5058\n", "output": "3\n" }, { "input": "5\n27/18 27/17\n91659 76441\n96317 38081\n99805 94867\n79758 84753\n96445 53616\n", "output": "0\n" }, { "input": "5\n3/18 18/17\n5148 38615\n84759 63111\n16345 23100\n49727 20597\n43590 46573\n", "output": "1\n" }, { "input": "5\n3/18 18/17\n43008 52460\n68903 46619\n16613 30280\n66639 17904\n83797 83401\n", "output": "1\n" }, { "input": "5\n3/18 18/17\n35429 29897\n89928 67711\n29047 22691\n84838 6917\n32683 99009\n", "output": "2\n" }, { "input": "5\n3/18 18/17\n62344 72564\n31069 2824\n74485 34763\n61186 78544\n75470 51019\n", "output": "1\n" }, { "input": "5\n27/18 27/17\n27746 42830\n22071 47985\n44242 62799\n16038 48367\n85158 21622\n", "output": "1\n" }, { "input": "5\n3/18 18/17\n66980 84763\n69224 39\n62888 61748\n53474 234\n77487 94808\n", "output": "1\n" }, { "input": "5\n3/18 18/17\n84697 26074\n16334 31084\n38824 37740\n1288 50582\n87807 48721\n", "output": "2\n" }, { "input": "15\n2/1 2/0\n3 1\n6 2\n9 3\n12 4\n15 5\n2 1\n4 2\n5 3\n7 4\n1 3\n3 4\n2 5\n4 5\n1 6\n6 6\n", "output": "1\n" }, { "input": "5\n0/17 74/0\n24922 93126\n75686 80827\n33683 91759\n10584 66980\n58159 52129\n", "output": "2\n" }, { "input": "15\n2/1 2/0\n3 1\n6 2\n9 3\n12 4\n15 5\n2 1\n4 2\n5 3\n7 4\n1 3\n3 4\n2 6\n4 5\n1 6\n6 6\n", "output": "2\n" } ]
code_contests
python
0
372599c9fb66bbf47324135388f41564
It is known that there are k fish species in the polar ocean, numbered from 1 to k. They are sorted by non-decreasing order of their weight, which is a positive number. Let the weight of the i-th type of fish be wi, then 0 < w1 ≤ w2 ≤ ... ≤ wk holds. Polar bears Alice and Bob each have caught some fish, and they are guessing who has the larger sum of weight of the fish he/she's caught. Given the type of the fish they've caught, determine whether it is possible that the fish caught by Alice has a strictly larger total weight than Bob's. In other words, does there exist a sequence of weights wi (not necessary integers), such that the fish caught by Alice has a strictly larger total weight? Input The first line contains three integers n, m, k (1 ≤ n, m ≤ 105, 1 ≤ k ≤ 109) — the number of fish caught by Alice and Bob respectively, and the number of fish species. The second line contains n integers each from 1 to k, the list of fish type caught by Alice. The third line contains m integers each from 1 to k, the list of fish type caught by Bob. Note that one may have caught more than one fish for a same species. Output Output "YES" (without quotes) if it is possible, and "NO" (without quotes) otherwise. Examples Input 3 3 3 2 2 2 1 1 3 Output YES Input 4 7 9 5 2 7 3 3 5 2 7 3 8 7 Output NO Note In the first sample, if w1 = 1, w2 = 2, w3 = 2.5, then Alice has a total of 2 + 2 + 2 = 6 weight units, while Bob only has 1 + 1 + 2.5 = 4.5. In the second sample, the fish that Alice caught is a subset of Bob's. Therefore, the total weight of Bob’s fish is always not less than the total weight of Alice’s fish. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n,m,k=list(map(int,input().split())) a=sorted(list(map(int,input().split()))) b=sorted(list(map(int,input().split()))) for i in range(n): if a[-i-1]>int(b[-i-1] if i<m else 0): print('YES') break else: print('NO')
python
code_algorithm
[ { "input": "4 7 9\n5 2 7 3\n3 5 2 7 3 8 7\n", "output": "NO\n" }, { "input": "3 3 3\n2 2 2\n1 1 3\n", "output": "YES\n" }, { "input": "25 25 10\n10 6 2 1 9 7 2 5 6 9 2 3 2 8 5 8 2 9 10 8 9 7 7 4 8\n6 2 10 4 7 9 3 2 4 5 1 8 6 9 8 6 9 8 4 8 7 9 10 2 8\n", "output": "NO\n" }, { "input": "7 7 10\n8 2 8 10 6 9 10\n2 4 9 5 6 2 5\n", "output": "YES\n" }, { "input": "1 1 1000000000\n502700350\n502700349\n", "output": "YES\n" }, { "input": "1 1 1\n1\n1\n", "output": "NO\n" }, { "input": "2 2 1000000000\n398981840 446967516\n477651114 577011341\n", "output": "NO\n" }, { "input": "2 1 1000000000\n699573624 308238132\n308238132\n", "output": "YES\n" }, { "input": "1 1 1000000000\n406009709\n406009709\n", "output": "NO\n" }, { "input": "5 4 5\n1 2 2 3 4\n1 3 4 5\n", "output": "YES\n" }, { "input": "50 100 10\n10 9 10 5 5 2 2 6 4 8 9 1 6 3 9 7 8 3 8 5 6 6 5 7 2 10 3 6 8 1 8 8 9 5 10 1 5 10 9 4 7 8 10 3 3 4 7 8 6 3\n5 3 2 6 4 10 2 3 1 8 8 10 1 1 4 3 9 2 9 9 8 8 7 9 4 1 1 10 5 6 3 7 2 10 2 3 3 3 7 4 1 3 1 6 7 6 1 9 1 7 6 8 6 1 3 3 3 4 3 6 7 8 2 5 4 1 4 8 3 9 7 4 10 5 3 6 3 1 4 10 3 6 1 8 4 6 10 9 6 2 8 3 7 5 3 4 10 9 1 4\n", "output": "NO\n" }, { "input": "15 15 10\n4 5 9 1 4 6 4 1 4 3 7 9 9 2 6\n6 6 7 7 2 9 1 6 10 9 7 10 7 10 9\n", "output": "NO\n" }, { "input": "100 50 10\n7 8 7 1 6 7 9 2 4 6 7 7 3 9 4 5 1 7 8 10 4 1 3 6 8 10 4 6 6 1 6 6 7 4 10 3 10 1 3 2 10 6 9 9 5 2 9 2 9 8 10 2 10 3 3 2 3 8 6 2 7 10 7 2 7 2 8 9 6 2 5 4 4 5 3 3 9 10 9 4 9 3 9 5 3 6 6 1 3 6 10 3 10 2 6 10 10 10 4 8\n3 3 2 9 4 4 10 2 7 3 3 2 6 3 3 4 7 4 1 2 3 8 1 6 7 7 2 10 1 1 1 5 7 7 5 1 6 8 7 5 3 7 4 6 10 5 5 5 1 9\n", "output": "YES\n" }, { "input": "10 10 10\n2 10 8 1 10 4 6 1 3 7\n8 1 1 5 7 1 9 10 2 3\n", "output": "YES\n" }, { "input": "5 5 10\n8 2 8 5 9\n9 1 7 5 1\n", "output": "YES\n" } ]
code_contests
python
0
cee3f6d429af1d2556d80510cb44085a
Devu and his brother love each other a lot. As they are super geeks, they only like to play with arrays. They are given two arrays a and b by their father. The array a is given to Devu and b to his brother. As Devu is really a naughty kid, he wants the minimum value of his array a should be at least as much as the maximum value of his brother's array b. Now you have to help Devu in achieving this condition. You can perform multiple operations on the arrays. In a single operation, you are allowed to decrease or increase any element of any of the arrays by 1. Note that you are allowed to apply the operation on any index of the array multiple times. You need to find minimum number of operations required to satisfy Devu's condition so that the brothers can play peacefully without fighting. Input The first line contains two space-separated integers n, m (1 ≤ n, m ≤ 105). The second line will contain n space-separated integers representing content of the array a (1 ≤ ai ≤ 109). The third line will contain m space-separated integers representing content of the array b (1 ≤ bi ≤ 109). Output You need to output a single integer representing the minimum number of operations needed to satisfy Devu's condition. Examples Input 2 2 2 3 3 5 Output 3 Input 3 2 1 2 3 3 4 Output 4 Input 3 2 4 5 6 1 2 Output 0 Note In example 1, you can increase a1 by 1 and decrease b2 by 1 and then again decrease b2 by 1. Now array a will be [3; 3] and array b will also be [3; 3]. Here minimum element of a is at least as large as maximum element of b. So minimum number of operations needed to satisfy Devu's condition are 3. In example 3, you don't need to do any operation, Devu's condition is already satisfied. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
def costo(a, b, t): resultado = 0 for elem in a: resultado += max(t - elem, 0) for elem in b: resultado += max(elem - t, 0) return resultado m, n = tuple(map(int, input().split())) a = list(map(int, input().split())) b = list(map(int, input().split())) inf, sup = min(a), max(b) while inf < sup: t = (inf + sup)//2 if costo(a, b, t+1) - costo(a, b, t) >= 0: sup = t else: inf = t + 1 print(costo(a, b, inf))
python
code_algorithm
[ { "input": "2 2\n2 3\n3 5\n", "output": "3\n" }, { "input": "3 2\n1 2 3\n3 4\n", "output": "4\n" }, { "input": "3 2\n4 5 6\n1 2\n", "output": "0\n" }, { "input": "1 1\n2\n1\n", "output": "0\n" }, { "input": "2 1\n2 2\n3\n", "output": "1\n" }, { "input": "1 1\n100\n183299\n", "output": "183199\n" }, { "input": "1 1\n1\n1\n", "output": "0\n" }, { "input": "1 2\n1\n2 2\n", "output": "1\n" }, { "input": "10 10\n23 100 38 38 73 54 59 69 44 86\n100 100 100 100 100 100 100 100 100 100\n", "output": "416\n" }, { "input": "1 1\n100\n4\n", "output": "0\n" }, { "input": "1 1\n999999999\n1000000000\n", "output": "1\n" }, { "input": "1 1\n1\n2\n", "output": "1\n" }, { "input": "1 1\n401114\n998223974\n", "output": "997822860\n" }, { "input": "1 1\n1\n3\n", "output": "2\n" }, { "input": "1 1\n1000000000\n1000000000\n", "output": "0\n" } ]
code_contests
python
0
0ab9ee5a050aabb087e6d8e09fea5476
Appleman and Toastman play a game. Initially Appleman gives one group of n numbers to the Toastman, then they start to complete the following tasks: * Each time Toastman gets a group of numbers, he sums up all the numbers and adds this sum to the score. Then he gives the group to the Appleman. * Each time Appleman gets a group consisting of a single number, he throws this group out. Each time Appleman gets a group consisting of more than one number, he splits the group into two non-empty groups (he can do it in any way) and gives each of them to Toastman. After guys complete all the tasks they look at the score value. What is the maximum possible value of score they can get? Input The first line contains a single integer n (1 ≤ n ≤ 3·105). The second line contains n integers a1, a2, ..., an (1 ≤ ai ≤ 106) — the initial group that is given to Toastman. Output Print a single integer — the largest possible score. Examples Input 3 3 1 5 Output 26 Input 1 10 Output 10 Note Consider the following situation in the first example. Initially Toastman gets group [3, 1, 5] and adds 9 to the score, then he give the group to Appleman. Appleman splits group [3, 1, 5] into two groups: [3, 5] and [1]. Both of them should be given to Toastman. When Toastman receives group [1], he adds 1 to score and gives the group to Appleman (he will throw it out). When Toastman receives group [3, 5], he adds 8 to the score and gives the group to Appleman. Appleman splits [3, 5] in the only possible way: [5] and [3]. Then he gives both groups to Toastman. When Toastman receives [5], he adds 5 to the score and gives the group to Appleman (he will throws it out). When Toastman receives [3], he adds 3 to the score and gives the group to Appleman (he will throws it out). Finally Toastman have added 9 + 1 + 8 + 5 + 3 = 26 to the score. This is the optimal sequence of actions. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n=int(input()) a=sorted([int(i) for i in input().split()]) l=len(a) out=0 for i in range(l): out+=(i+2)*a[i] out-=a[l-1] print(out)
python
code_algorithm
[ { "input": "3\n3 1 5\n", "output": "26\n" }, { "input": "1\n10\n", "output": "10\n" }, { "input": "10\n2 2 2 5 5 6 10 10 10 10\n", "output": "485\n" }, { "input": "10\n1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000\n", "output": "64000000\n" }, { "input": "10\n8 10 2 5 6 2 4 7 2 1\n", "output": "376\n" }, { "input": "10\n431255 724672 228496 397870 397870 397870 397870 724672 888642 431255\n", "output": "36742665\n" }, { "input": "1\n1000000\n", "output": "1000000\n" }, { "input": "1\n397870\n", "output": "397870\n" }, { "input": "2\n2 3\n", "output": "10\n" }, { "input": "2\n1 1\n", "output": "4\n" }, { "input": "10\n10 10 10 10 6 5 5 2 2 2\n", "output": "485\n" }, { "input": "10\n888642 724672 724672 431255 431255 397870 397870 397870 397870 228496\n", "output": "36742665\n" }, { "input": "10\n5 2 6 10 10 10 10 2 2 5\n", "output": "485\n" }, { "input": "10\n10 10 10 10 10 10 10 10 10 10\n", "output": "640\n" }, { "input": "10\n171308 397870 724672 431255 228496 892002 542924 718337 888642 161821\n", "output": "40204082\n" }, { "input": "10\n161821 171308 228496 397870 431255 542924 718337 724672 888642 892002\n", "output": "40204082\n" }, { "input": "10\n228496 397870 397870 397870 397870 431255 431255 724672 724672 888642\n", "output": "36742665\n" }, { "input": "10\n892002 888642 724672 718337 542924 431255 397870 228496 171308 161821\n", "output": "40204082\n" }, { "input": "2\n1 2\n", "output": "6\n" }, { "input": "10\n1 2 2 2 4 5 6 7 8 10\n", "output": "376\n" }, { "input": "10\n10 8 7 6 5 4 2 2 2 1\n", "output": "376\n" } ]
code_contests
python
0
84b419ba6585317aea007d1fe6e01478
One Big Software Company has n employees numbered from 1 to n. The director is assigned number 1. Every employee of the company except the director has exactly one immediate superior. The director, of course, doesn't have a superior. We will call person a a subordinates of another person b, if either b is an immediate supervisor of a, or the immediate supervisor of a is a subordinate to person b. In particular, subordinates of the head are all other employees of the company. To solve achieve an Important Goal we need to form a workgroup. Every person has some efficiency, expressed by a positive integer ai, where i is the person's number. The efficiency of the workgroup is defined as the total efficiency of all the people included in it. The employees of the big software company are obsessed with modern ways of work process organization. Today pair programming is at the peak of popularity, so the workgroup should be formed with the following condition. Each person entering the workgroup should be able to sort all of his subordinates who are also in the workgroup into pairs. In other words, for each of the members of the workgroup the number of his subordinates within the workgroup should be even. Your task is to determine the maximum possible efficiency of the workgroup formed at observing the given condition. Any person including the director of company can enter the workgroup. Input The first line contains integer n (1 ≤ n ≤ 2·105) — the number of workers of the Big Software Company. Then n lines follow, describing the company employees. The i-th line contains two integers pi, ai (1 ≤ ai ≤ 105) — the number of the person who is the i-th employee's immediate superior and i-th employee's efficiency. For the director p1 = - 1, for all other people the condition 1 ≤ pi < i is fulfilled. Output Print a single integer — the maximum possible efficiency of the workgroup. Examples Input 7 -1 3 1 2 1 1 1 4 4 5 4 3 5 2 Output 17 Note In the sample test the most effective way is to make a workgroup from employees number 1, 2, 4, 5, 6. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n = int(input()) t = [list(map(int, input().split())) for q in range(n)] t[0][0] = 0 n += 1 u = [-1e7] * n v = [0] * n for i, (j, a) in list(enumerate(t, 1))[::-1]: u[i] = max(u[i], v[i] + a) v[j], u[j] = max(v[j] + v[i], u[j] + u[i]), max(v[j] + u[i], u[j] + v[i]) print(u[1])
python
code_algorithm
[ { "input": "7\n-1 3\n1 2\n1 1\n1 4\n4 5\n4 3\n5 2\n", "output": "17\n" }, { "input": "20\n-1 100\n1 35\n1 22\n1 28\n1 2\n1 8\n1 17\n1 50\n5 37\n1 25\n1 29\n5 21\n4 16\n2 39\n1 41\n3 28\n3 30\n2 36\n2 26\n14 17\n", "output": "548\n" }, { "input": "2\n-1 1\n1 2\n", "output": "2\n" }, { "input": "3\n-1 1\n1 2\n1 3\n", "output": "6\n" }, { "input": "4\n-1 1\n1 100\n1 100\n1 100\n", "output": "300\n" }, { "input": "3\n-1 1\n1 2\n2 3\n", "output": "3\n" }, { "input": "2\n-1 3\n1 2\n", "output": "3\n" }, { "input": "3\n-1 1\n1 42\n1 42\n", "output": "85\n" }, { "input": "20\n-1 100\n1 10\n2 26\n2 33\n3 31\n2 28\n1 47\n6 18\n6 25\n9 2\n4 17\n6 18\n6 2\n6 30\n13 7\n5 25\n7 11\n11 7\n17 40\n12 43\n", "output": "355\n" }, { "input": "3\n-1 3\n1 1\n1 2\n", "output": "6\n" }, { "input": "1\n-1 42\n", "output": "42\n" }, { "input": "20\n-1 100\n1 35\n2 22\n3 28\n3 2\n4 8\n3 17\n2 50\n5 37\n5 25\n4 29\n9 21\n10 16\n10 39\n11 41\n9 28\n9 30\n12 36\n13 26\n19 17\n", "output": "459\n" }, { "input": "4\n-1 1\n1 42\n1 42\n1 42\n", "output": "126\n" }, { "input": "3\n-1 3\n1 2\n2 1\n", "output": "3\n" } ]
code_contests
python
0
54cb8282f77fa499d387359e8a78e80d
Amr lives in Lala Land. Lala Land is a very beautiful country that is located on a coordinate line. Lala Land is famous with its apple trees growing everywhere. Lala Land has exactly n apple trees. Tree number i is located in a position xi and has ai apples growing on it. Amr wants to collect apples from the apple trees. Amr currently stands in x = 0 position. At the beginning, he can choose whether to go right or left. He'll continue in his direction until he meets an apple tree he didn't visit before. He'll take all of its apples and then reverse his direction, continue walking in this direction until he meets another apple tree he didn't visit before and so on. In the other words, Amr reverses his direction when visiting each new apple tree. Amr will stop collecting apples when there are no more trees he didn't visit in the direction he is facing. What is the maximum number of apples he can collect? Input The first line contains one number n (1 ≤ n ≤ 100), the number of apple trees in Lala Land. The following n lines contains two integers each xi, ai ( - 105 ≤ xi ≤ 105, xi ≠ 0, 1 ≤ ai ≤ 105), representing the position of the i-th tree and number of apples on it. It's guaranteed that there is at most one apple tree at each coordinate. It's guaranteed that no tree grows in point 0. Output Output the maximum number of apples Amr can collect. Examples Input 2 -1 5 1 5 Output 10 Input 3 -2 2 1 4 -1 3 Output 9 Input 3 1 9 3 5 7 10 Output 9 Note In the first sample test it doesn't matter if Amr chose at first to go left or right. In both cases he'll get all the apples. In the second sample test the optimal solution is to go left to x = - 1, collect apples from there, then the direction will be reversed, Amr has to go to x = 1, collect apples from there, then the direction will be reversed and Amr goes to the final tree x = - 2. In the third sample test the optimal solution is to go right to x = 1, collect apples from there, then the direction will be reversed and Amr will not be able to collect anymore apples because there are no apple trees to his left. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
a = [list(map(int, input().split(" "))) for x in range(int(input()))] pl = []; ol = [] for i in range(len(a)): if a[i][0] < 0: ol.append(a[i]) else: pl.append(a[i]) pl.sort(); ol.sort(); ol.reverse() del a; dl = abs(len(ol)-len(pl)); sum = int(0); j = 0 m = min(len(ol), len(pl)) if (len(pl) == 0)and(len(ol) != 0): sum = ol[0][1] print(sum) exit() elif (len(pl) == 0)and(len(ol) == 0): print(sum) exit() elif (len(ol) == 0)and(len(pl) != 0): sum = pl[0][1] print(sum) exit() elif dl > 1: for i in range(m): sum = sum + pl[i][1]+ ol[i][1] j = i if len(pl)>len(ol): sum = sum+pl[j+1][1] else: sum = sum+ol[j+1][1] print(sum) exit() elif dl == 0 or dl == 1: for i in range(len(pl)): sum = sum + pl[i][1] for i in range(len(ol)): sum = sum + ol[i][1] print(sum) exit()
python
code_algorithm
[ { "input": "2\n-1 5\n1 5\n", "output": "10\n" }, { "input": "3\n1 9\n3 5\n7 10\n", "output": "9\n" }, { "input": "3\n-2 2\n1 4\n-1 3\n", "output": "9\n" }, { "input": "3\n-94146 4473\n28707 99079\n-4153 8857\n", "output": "112409\n" }, { "input": "2\n-100000 100000\n100000 99999\n", "output": "199999\n" }, { "input": "1\n1 1\n", "output": "1\n" }, { "input": "18\n-18697 44186\n56333 51938\n-75688 49735\n77762 14039\n-43996 81060\n69700 49107\n74532 45568\n-94476 203\n-92347 90745\n58921 44650\n57563 63561\n44630 8486\n35750 5999\n3249 34202\n75358 68110\n-33245 60458\n-88148 2342\n87856 85532\n", "output": "632240\n" }, { "input": "25\n5704 67795\n6766 31836\n-41715 89987\n76854 9848\n11648 90020\n-79763 10107\n96971 92636\n-64205 71937\n87997 38273\n-9782 57187\n22186 6905\n-41130 40258\n-28403 66579\n19578 43375\n35735 52929\n-52417 89388\n-89430 1939\n9401 43491\n-11228 10112\n-86859 16024\n-51486 33467\n-80578 65080\n-52820 98445\n-89165 7657\n-97106 79422\n", "output": "1109655\n" }, { "input": "2\n100000 3\n-100000 9\n", "output": "12\n" }, { "input": "27\n-30721 24576\n-6620 92252\n88986 24715\n-94356 10509\n-6543 29234\n-68554 69530\n39176 96911\n67266 99669\n95905 51002\n-94093 92134\n65382 23947\n-6525 79426\n-448 67531\n-70083 26921\n-86333 50029\n48924 8036\n-27228 5349\n6022 10691\n-13840 56735\n50398 58794\n-63258 45557\n-27792 77057\n98295 1203\n-51294 18757\n35037 61941\n-30112 13076\n82334 20463\n", "output": "1036452\n" }, { "input": "3\n-3 3\n-2 2\n-1 1\n", "output": "1\n" }, { "input": "28\n49728 91049\n-42863 4175\n-89214 22191\n77977 16965\n-42960 87627\n-84329 97494\n89270 75906\n-13695 28908\n-72279 13607\n-97327 87062\n-58682 32094\n39108 99936\n29304 93784\n-63886 48237\n-77359 57648\n-87013 79017\n-41086 35033\n-60613 83555\n-48955 56816\n-20568 26802\n52113 25160\n-88885 45294\n22601 42971\n62693 65662\n-15985 5357\n86671 8522\n-59921 11271\n-79304 25044\n", "output": "891593\n" }, { "input": "4\n10000 100000\n-1000 100000\n-2 100000\n-1 100000\n", "output": "300000\n" }, { "input": "16\n-41732 47681\n44295 28942\n-75194 99827\n69982 18020\n-75378 22026\n80032 22908\n-34879 41113\n36257 48574\n-35882 84333\n29646 71151\n-86214 80886\n72724 39364\n-42529 60880\n29150 29921\n-8471 80781\n79387 70834\n", "output": "847241\n" }, { "input": "1\n-1 1\n", "output": "1\n" } ]
code_contests
python
0.1
8fa94e99bc79279f80eba2879b79f3f3
Alice and Bob like games. And now they are ready to start a new game. They have placed n chocolate bars in a line. Alice starts to eat chocolate bars one by one from left to right, and Bob — from right to left. For each chocololate bar the time, needed for the player to consume it, is known (Alice and Bob eat them with equal speed). When the player consumes a chocolate bar, he immediately starts with another. It is not allowed to eat two chocolate bars at the same time, to leave the bar unfinished and to make pauses. If both players start to eat the same bar simultaneously, Bob leaves it to Alice as a true gentleman. How many bars each of the players will consume? Input The first line contains one integer n (1 ≤ n ≤ 105) — the amount of bars on the table. The second line contains a sequence t1, t2, ..., tn (1 ≤ ti ≤ 1000), where ti is the time (in seconds) needed to consume the i-th bar (in the order from left to right). Output Print two numbers a and b, where a is the amount of bars consumed by Alice, and b is the amount of bars consumed by Bob. Examples Input 5 2 9 8 2 7 Output 2 3 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n=int(input()) *l,=map(int,input().split()) a=b=i=0 j=n-1 while i<=j: if a<=b:a+=l[i];i+=1 else:b+=l[j];j-=1 print(i,n-i) #hello
python
code_algorithm
[ { "input": "5\n2 9 8 2 7\n", "output": "2 3\n" }, { "input": "2\n1 1\n", "output": "1 1\n" }, { "input": "4\n1 1 1 1\n", "output": "2 2\n" }, { "input": "3\n1 1 1\n", "output": "2 1\n" }, { "input": "4\n4 3 2 8\n", "output": "3 1\n" }, { "input": "1\n6\n", "output": "1 0\n" }, { "input": "6\n1 4 7 3 2 1\n", "output": "3 3\n" }, { "input": "3\n6 8 4\n", "output": "1 2\n" }, { "input": "2\n8 2\n", "output": "1 1\n" }, { "input": "12\n4 2 7 1 9 5 6 2 7 8 5 7\n", "output": "7 5\n" }, { "input": "1\n1\n", "output": "1 0\n" }, { "input": "11\n7 9 1 8 7 1 7 1 4 8 1\n", "output": "4 7\n" }, { "input": "13\n9 9 9 9 9 9 9 9 9 9 9 9 9\n", "output": "7 6\n" }, { "input": "5\n1 9 8 2 7\n", "output": "2 3\n" } ]
code_contests
python
0
794db85359e65d2abef48b06df601961
A breakthrough among computer games, "Civilization XIII", is striking in its scale and elaborate details. Let's take a closer look at one of them. The playing area in the game is split into congruent cells that are regular hexagons. The side of each cell is equal to 1. Each unit occupies exactly one cell of the playing field. The field can be considered infinite. Let's take a look at the battle unit called an "Archer". Each archer has a parameter "shot range". It's a positive integer that determines the radius of the circle in which the archer can hit a target. The center of the circle coincides with the center of the cell in which the archer stays. A cell is considered to be under the archer’s fire if and only if all points of this cell, including border points are located inside the circle or on its border. The picture below shows the borders for shot ranges equal to 3, 4 and 5. The archer is depicted as A. <image> Find the number of cells that are under fire for some archer. Input The first and only line of input contains a single positive integer k — the archer's shot range (1 ≤ k ≤ 106). Output Print the single number, the number of cells that are under fire. Please do not use the %lld specificator to read or write 64-bit integers in C++. It is preferred to use the cout stream (also you may use the %I64d specificator). Examples Input 3 Output 7 Input 4 Output 13 Input 5 Output 19 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
import math k = int(input()) n = int(k/3)*2 + 1 # print('n', n) ans = 0 last = 0 while True: point_to_check = (n+2)//2 # print('p', point_to_check) x = 0.0 y = n# *math.sqrt(3) # print('r', math.sqrt((x**2+y**2))) # p1 x -= 0.5 y += 0.5 #* math.sqrt(3) # print('r', math.sqrt((x**2+y**2))) x -= 1.5*(point_to_check-1) y -= 0.5*(point_to_check-1) count = point_to_check x += 1.5*last y += 0.5*last for i in range(last, point_to_check): if ((x**2+3*(y**2))>k**2): count = i last = i break x += 1.5 y += 0.5 # * math.sqrt(3) # print(count) # input() extra = 0 if count != 0: extra = count if (n+1)%2==0: extra *= 2 else: extra = extra*2 -1 if extra == n+1: ans += (extra-1)*6 break else: ans += extra*6 # print('n', n, 'ans', ans, 'point_to_check', point_to_check) n = n-1 # print('extra', extra) ans += 1 ans += 3*n*(n-1) if k<=2: print(1) else: print(ans) # R = 1 # r = sqrt(3)*0.5*R # full_cycle_count = k / (math.sqrt(3)) - 0.5 # print(full_cycle_count) # full_cycle_count = int(full_cycle_count) # print(full_cycle_count) # # half_cycle_count = int((k - 1) / 3) * 2 # print(half_cycle_count) # # ans = 1 # last_add = 0 # for i in range(1, full_cycle_count+1): # last_add +=6 # ans += last_add # # print(last_add) # # if half_cycle_count>full_cycle_count: # ans += (last_add+6) / 2 # # print(int(ans))
python
code_algorithm
[ { "input": "4\n", "output": "13\n" }, { "input": "5\n", "output": "19\n" }, { "input": "3\n", "output": "7\n" }, { "input": "10264\n", "output": "127364821\n" }, { "input": "217\n", "output": "56425\n" }, { "input": "7\n", "output": "43\n" }, { "input": "777777\n", "output": "731487842995\n" }, { "input": "47248\n", "output": "2699275123\n" }, { "input": "13\n", "output": "175\n" }, { "input": "301\n", "output": "108847\n" }, { "input": "1034\n", "output": "1290385\n" }, { "input": "6\n", "output": "31\n" }, { "input": "6486\n", "output": "50854039\n" }, { "input": "225481\n", "output": "61477218007\n" }, { "input": "1\n", "output": "1\n" }, { "input": "403\n", "output": "195457\n" }, { "input": "6726\n", "output": "54687523\n" }, { "input": "43\n", "output": "2137\n" }, { "input": "9\n", "output": "85\n" }, { "input": "21352\n", "output": "551234029\n" }, { "input": "999811\n", "output": "1208740231393\n" }, { "input": "10000\n", "output": "120896557\n" }, { "input": "999998\n", "output": "1209192430093\n" }, { "input": "51\n", "output": "3037\n" }, { "input": "498598\n", "output": "300605820001\n" }, { "input": "5832\n", "output": "41114119\n" }, { "input": "2\n", "output": "1\n" }, { "input": "2749\n", "output": "9131485\n" }, { "input": "101\n", "output": "12109\n" }, { "input": "999999\n", "output": "1209194850235\n" }, { "input": "9991\n", "output": "120678955\n" }, { "input": "100000\n", "output": "12091764163\n" }, { "input": "8\n", "output": "61\n" }, { "input": "10\n", "output": "97\n" }, { "input": "88\n", "output": "9151\n" }, { "input": "911\n", "output": "1001425\n" }, { "input": "8910\n", "output": "95975509\n" }, { "input": "9654\n", "output": "112674937\n" }, { "input": "40094\n", "output": "1943730367\n" }, { "input": "1249\n", "output": "1883353\n" }, { "input": "11\n", "output": "121\n" }, { "input": "1000000\n", "output": "1209197264797\n" } ]
code_contests
python
0
056aeabc6220189ef3452ee5badcd4c8
At regular competition Vladik and Valera won a and b candies respectively. Vladik offered 1 his candy to Valera. After that Valera gave Vladik 2 his candies, so that no one thought that he was less generous. Vladik for same reason gave 3 candies to Valera in next turn. More formally, the guys take turns giving each other one candy more than they received in the previous turn. This continued until the moment when one of them couldn’t give the right amount of candy. Candies, which guys got from each other, they don’t consider as their own. You need to know, who is the first who can’t give the right amount of candy. Input Single line of input data contains two space-separated integers a, b (1 ≤ a, b ≤ 109) — number of Vladik and Valera candies respectively. Output Pring a single line "Vladik’’ in case, if Vladik first who can’t give right amount of candy, or "Valera’’ otherwise. Examples Input 1 1 Output Valera Input 7 6 Output Vladik Note Illustration for first test case: <image> Illustration for second test case: <image> Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
# coding: utf-8 import math vs = ["Vladik", "Valera"] a, b = map(int, input().split(" ")) an = math.floor(math.sqrt(a)) bn = 0 while True: bn += 1 if b < bn * (bn + 1): bn -= 1 break print(vs[an > bn])
python
code_algorithm
[ { "input": "1 1\n", "output": "Valera\n" }, { "input": "7 6\n", "output": "Vladik\n" }, { "input": "2 2\n", "output": "Vladik\n" }, { "input": "1000000000 999982505\n", "output": "Valera\n" }, { "input": "100 9\n", "output": "Valera\n" }, { "input": "2 1\n", "output": "Valera\n" }, { "input": "4 4\n", "output": "Valera\n" }, { "input": "3 2\n", "output": "Vladik\n" }, { "input": "999963734 999994456\n", "output": "Vladik\n" }, { "input": "5 4\n", "output": "Valera\n" }, { "input": "5 5\n", "output": "Valera\n" }, { "input": "7 8\n", "output": "Vladik\n" }, { "input": "957985574 24997558\n", "output": "Valera\n" }, { "input": "965161805 908862070\n", "output": "Valera\n" }, { "input": "10 11\n", "output": "Valera\n" }, { "input": "1 2\n", "output": "Vladik\n" }, { "input": "1000 996\n", "output": "Vladik\n" }, { "input": "1033090 7376359\n", "output": "Vladik\n" }, { "input": "10 9\n", "output": "Valera\n" }, { "input": "9 11\n", "output": "Valera\n" }, { "input": "6 6\n", "output": "Vladik\n" }, { "input": "9754309 9525494\n", "output": "Valera\n" }, { "input": "12 12\n", "output": "Vladik\n" }, { "input": "90706344 99960537\n", "output": "Vladik\n" }, { "input": "9 6\n", "output": "Valera\n" }, { "input": "1 5\n", "output": "Vladik\n" }, { "input": "678 76687\n", "output": "Vladik\n" }, { "input": "9 10\n", "output": "Valera\n" }, { "input": "101357 236928\n", "output": "Vladik\n" }, { "input": "8311 2468\n", "output": "Valera\n" }, { "input": "1000000000 1000000000\n", "output": "Vladik\n" }, { "input": "250708 857756\n", "output": "Vladik\n" }, { "input": "946 879\n", "output": "Valera\n" }, { "input": "9 5\n", "output": "Valera\n" }, { "input": "10819 45238\n", "output": "Vladik\n" }, { "input": "25 38\n", "output": "Vladik\n" }, { "input": "1 678\n", "output": "Vladik\n" }, { "input": "3 3\n", "output": "Vladik\n" }, { "input": "12345680 1\n", "output": "Valera\n" }, { "input": "4 5\n", "output": "Valera\n" }, { "input": "1000 950\n", "output": "Valera\n" }, { "input": "45 1678\n", "output": "Vladik\n" } ]
code_contests
python
0.6
e5ec7d444dbb0103f24f9af8b191be02
One very important person has a piece of paper in the form of a rectangle a × b. Also, he has n seals. Each seal leaves an impression on the paper in the form of a rectangle of the size xi × yi. Each impression must be parallel to the sides of the piece of paper (but seal can be rotated by 90 degrees). A very important person wants to choose two different seals and put them two impressions. Each of the selected seals puts exactly one impression. Impressions should not overlap (but they can touch sides), and the total area occupied by them should be the largest possible. What is the largest area that can be occupied by two seals? Input The first line contains three integer numbers n, a and b (1 ≤ n, a, b ≤ 100). Each of the next n lines contain two numbers xi, yi (1 ≤ xi, yi ≤ 100). Output Print the largest total area that can be occupied by two seals. If you can not select two seals, print 0. Examples Input 2 2 2 1 2 2 1 Output 4 Input 4 10 9 2 3 1 1 5 10 9 11 Output 56 Input 3 10 10 6 6 7 7 20 5 Output 0 Note In the first example you can rotate the second seal by 90 degrees. Then put impression of it right under the impression of the first seal. This will occupy all the piece of paper. In the second example you can't choose the last seal because it doesn't fit. By choosing the first and the third seals you occupy the largest area. In the third example there is no such pair of seals that they both can fit on a piece of paper. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n,A,B=map(int,input().split()) arr=[] for x in range(n): i,j=map(int,input().split()) arr.append([i,j]) ans=int(0) i=int(0) j=int(0) for i in range(n): for j in range(i+1,n): a=arr[i][0] b=arr[i][1] c=arr[j][0] d=arr[j][1] temp=a*b+c*d if(temp<=ans): continue if((b+d<=B and max(a,c)<=A) or(max(b,d)<=B and a+c<=A)or (b+c<=B and max(a,d)<=A)or (max(b,c)<=B and a+d<=A)or (a+d<=B and max(c,b)<=A)or(max(a,d)<=B and c+b<=A)or(a+c<=B and max(b,d)<=A)or(max(a,c)<=B and b+d<=A)): ans=max(ans,temp) print(ans)
python
code_algorithm
[ { "input": "4 10 9\n2 3\n1 1\n5 10\n9 11\n", "output": "56\n" }, { "input": "2 2 2\n1 2\n2 1\n", "output": "4\n" }, { "input": "3 10 10\n6 6\n7 7\n20 5\n", "output": "0\n" }, { "input": "2 2 4\n3 1\n2 2\n", "output": "0\n" }, { "input": "2 4 6\n4 4\n4 2\n", "output": "24\n" }, { "input": "1 100 50\n4 20\n", "output": "0\n" }, { "input": "5 9 7\n2 8\n3 8\n2 8\n4 4\n2 2\n", "output": "40\n" }, { "input": "6 7 5\n6 6\n4 7\n6 1\n4 1\n4 6\n1 5\n", "output": "34\n" }, { "input": "2 2 3\n1 2\n2 2\n", "output": "6\n" }, { "input": "6 8 5\n4 1\n3 3\n5 3\n6 7\n2 2\n5 4\n", "output": "35\n" }, { "input": "2 1 2\n1 1\n1 1\n", "output": "2\n" }, { "input": "2 1 1\n1 1\n1 1\n", "output": "0\n" }, { "input": "6 7 5\n6 4\n5 7\n4 7\n5 4\n1 1\n3 6\n", "output": "29\n" }, { "input": "5 100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n", "output": "0\n" }, { "input": "2 2 4\n2 3\n2 1\n", "output": "8\n" }, { "input": "2 1 4\n3 2\n3 3\n", "output": "0\n" }, { "input": "5 9 7\n6 7\n4 1\n1 2\n4 7\n5 6\n", "output": "58\n" }, { "input": "6 5 9\n2 3\n7 4\n1 5\n1 7\n2 5\n7 1\n", "output": "38\n" }, { "input": "4 1 100\n1 25\n25 1\n1 25\n2 100\n", "output": "50\n" }, { "input": "15 50 50\n9 36\n28 14\n77 74\n35 2\n20 32\n83 85\n47 3\n41 50\n21 7\n38 46\n17 6\n79 90\n91 83\n9 33\n24 11\n", "output": "2374\n" }, { "input": "6 9 5\n4 5\n6 2\n1 4\n5 6\n3 7\n6 5\n", "output": "34\n" }, { "input": "15 100 100\n100 100\n100 100\n100 100\n42 58\n80 22\n100 100\n100 100\n100 100\n100 100\n100 100\n48 42\n100 100\n100 100\n100 100\n100 100\n", "output": "4452\n" }, { "input": "3 100 1\n1 50\n1 60\n1 30\n", "output": "90\n" }, { "input": "6 9 7\n1 2\n1 5\n4 3\n4 7\n3 5\n6 7\n", "output": "57\n" }, { "input": "2 4 3\n2 1\n1 2\n", "output": "4\n" }, { "input": "30 100 100\n60 34\n29 82\n89 77\n39 1\n100 100\n82 12\n57 87\n93 43\n78 50\n38 55\n37 9\n67 5\n100 100\n100 100\n82 47\n3 71\n100 100\n19 26\n25 94\n89 5\n100 100\n32 1\n100 100\n34 3\n40 99\n100 100\n36 12\n100 100\n100 100\n100 100\n", "output": "8958\n" }, { "input": "2 2 2\n2 1\n1 1\n", "output": "3\n" }, { "input": "5 9 7\n5 2\n6 9\n1 4\n7 7\n6 4\n", "output": "59\n" }, { "input": "3 1 60\n1 40\n2 2\n20 1\n", "output": "60\n" }, { "input": "2 2 3\n1 4\n2 1\n", "output": "0\n" }, { "input": "2 2 3\n1 2\n2 3\n", "output": "0\n" }, { "input": "2 4 6\n4 2\n4 4\n", "output": "24\n" }, { "input": "2 100 100\n100 100\n1 1\n", "output": "0\n" }, { "input": "2 3 2\n3 2\n1 1\n", "output": "0\n" }, { "input": "5 9 7\n3 8\n7 6\n4 1\n5 8\n7 8\n", "output": "60\n" }, { "input": "2 1 4\n1 1\n3 3\n", "output": "0\n" }, { "input": "5 9 7\n7 4\n6 9\n4 3\n7 5\n2 3\n", "output": "63\n" }, { "input": "2 100 100\n100 100\n87 72\n", "output": "0\n" }, { "input": "5 9 7\n4 7\n3 9\n5 4\n3 4\n3 8\n", "output": "55\n" }, { "input": "5 9 7\n6 7\n4 5\n2 7\n4 2\n5 8\n", "output": "56\n" }, { "input": "2 100 100\n50 100\n100 50\n", "output": "10000\n" }, { "input": "2 11 51\n1 10\n11 50\n", "output": "560\n" }, { "input": "2 4 5\n2 4\n4 3\n", "output": "20\n" }, { "input": "5 9 7\n1 6\n7 9\n1 5\n1 5\n7 3\n", "output": "27\n" }, { "input": "2 4 2\n2 2\n1 3\n", "output": "0\n" }, { "input": "2 1 4\n1 2\n1 2\n", "output": "4\n" }, { "input": "2 4 2\n1 2\n2 3\n", "output": "8\n" } ]
code_contests
python
0.5
2f7a896ca12dbe6dfd2ba571bd4fee9a
Polycarpus takes part in the "Field of Wonders" TV show. The participants of the show have to guess a hidden word as fast as possible. Initially all the letters of the word are hidden. The game consists of several turns. At each turn the participant tells a letter and the TV show host responds if there is such letter in the word or not. If there is such letter then the host reveals all such letters. For example, if the hidden word is "abacaba" and the player tells the letter "a", the host will reveal letters at all positions, occupied by "a": 1, 3, 5 and 7 (positions are numbered from left to right starting from 1). Polycarpus knows m words of exactly the same length as the hidden word. The hidden word is also known to him and appears as one of these m words. At current moment a number of turns have already been made and some letters (possibly zero) of the hidden word are already revealed. Previously Polycarp has told exactly the letters which are currently revealed. It is Polycarpus' turn. He wants to tell a letter in such a way, that the TV show host will assuredly reveal at least one more letter. Polycarpus cannot tell the letters, which are already revealed. Your task is to help Polycarpus and find out the number of letters he can tell so that the show host will assuredly reveal at least one of the remaining letters. Input The first line contains one integer n (1 ≤ n ≤ 50) — the length of the hidden word. The following line describes already revealed letters. It contains the string of length n, which consists of lowercase Latin letters and symbols "*". If there is a letter at some position, then this letter was already revealed. If the position contains symbol "*", then the letter at this position has not been revealed yet. It is guaranteed, that at least one letter is still closed. The third line contains an integer m (1 ≤ m ≤ 1000) — the number of words of length n, which Polycarpus knows. The following m lines contain the words themselves — n-letter strings of lowercase Latin letters. All words are distinct. It is guaranteed that the hidden word appears as one of the given m words. Before the current move Polycarp has told exactly the letters which are currently revealed. Output Output the single integer — the number of letters Polycarpus can tell so that the TV show host definitely reveals at least one more letter. It is possible that this number is zero. Examples Input 4 a**d 2 abcd acbd Output 2 Input 5 lo*er 2 lover loser Output 0 Input 3 a*a 2 aaa aba Output 1 Note In the first example Polycarpus can tell letters "b" and "c", which assuredly will be revealed. The second example contains no letters which can be told as it is not clear, which of the letters "v" or "s" is located at the third position of the hidden word. In the third example Polycarpus exactly knows that the hidden word is "aba", because in case it was "aaa", then the second letter "a" would have already been revealed in one of previous turns. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n = int(input()) S = input() HaveLetters = set(list(S)) m = int(input()) words = [] CanLetters = set([chr(i) for i in range(ord("a"), ord("z") + 1)]) - HaveLetters for _ in range(m): Word = input() for i in range(n): if S[i] == "*": if Word[i] in HaveLetters: break else: if Word[i] != S[i]: break else: words += [Word] ans = 0 for letter in CanLetters: can = True for Word in words: if letter not in Word: can = False break if can: ans += 1 print(ans)
python
code_algorithm
[ { "input": "3\na*a\n2\naaa\naba\n", "output": "1\n" }, { "input": "4\na**d\n2\nabcd\nacbd\n", "output": "2\n" }, { "input": "5\nlo*er\n2\nlover\nloser\n", "output": "0\n" }, { "input": "2\n**\n1\naa\n", "output": "1\n" }, { "input": "1\n*\n1\na\n", "output": "1\n" }, { "input": "42\n*****o*******t********************oo******\n10\nvcrccobltkeidtxhsxhccaslkjhfyeqsetoowaemso\nuimjsoxifamvctkgqmrwhyjrgmlydczzqjoobnnwch\nuvmjsoqizfavctkxemrpaycngmlyemzzqjoobszwbh\nusmjsoviskzvctkljmrlmylugmlydfzzqvoobzawgh\nfeqweodinkhiatqmfokaxwcmlmbmvskssyookgcrax\ntackfosjhxeqftkgjynbbedrczegtimuvooosypczy\nxanuvoeismzmctruyplxgmfcpyrpqopyctoozlquvg\nurmjsouirdrvctkepmrwjyaxgmlyzvzzqcoobjgwih\nuymjsogivzivctkydmrgwyavgmlyphzzquoobclwhh\nkodyeoyihylgrtrdwudrsyonmuhtxaqklcoolsaclu\n", "output": "18\n" }, { "input": "41\n*z*hjcxxdgkny*tc*rmaov***fra**efs*lbi*puw\n1\nqzqhjcxxdgknyqtcqrmaovqqqfraqqefsqlbiqpuw\n", "output": "1\n" }, { "input": "48\n*h*i**ag**um**fuxvmxlj*dsyt*gb*dxkzp*brnelctkq*w\n1\nohoiooagooumoofuxvmxljodsytogbodxkzpobrnelctkqow\n", "output": "1\n" }, { "input": "26\n**************************\n1\nayvguplhjsoiencbkxdrfwmqtz\n", "output": "26\n" }, { "input": "26\n**************************\n10\nevfsnczuiodgbhqmlypkjatxrw\nuapqfdtoxkzynlbrehgwismvjc\nwjuyacngtzmvhqelikxoprdfbs\nyjgstlkvrhoqadxwfbiucpznem\nvebnxtrlocgkajqmwfuiszhypd\nroaqchwlpvtzxymnbkjigfedsu\noxmwaqpcendihzkutsybrjgfvl\nbnfzlwcsagxojdiyktqvruemhp\npdjahwnvmouxgqlciktzrfeysb\nbznurcyefxiapgktmqwjvsdloh\n", "output": "26\n" }, { "input": "50\n**************************************************\n1\nqgaeytghzvvtgeitpovqozyclectzcohivbggudhiylaecbdzq\n", "output": "17\n" }, { "input": "3\ntv*\n2\ntvc\nbvq\n", "output": "1\n" }, { "input": "26\n*lmnotuvwxyzjkabcdehiqfgrs\n2\nblmnotuvwxyzjkabcdehiqfgrs\nplmnotuvwxyzjkabcdehiqfgrs\n", "output": "1\n" }, { "input": "1\n*\n2\na\nz\n", "output": "0\n" }, { "input": "3\n***\n2\naaa\nbbb\n", "output": "0\n" }, { "input": "16\nx*d**s******xd*u\n22\nxfdeoshogyqjxdmu\nxvdvdsnwfwakxdyu\nxfdjoshftykjxdmu\nxfdcoshfwyajxdmu\nxfdfoshkmyajxdmu\nxfdyoshpoycjxdmu\nxmdhcswqnhxjxdtu\nxxdxwsoogqzwxdcu\nxxdhhsxqzciuxdfu\nxddcmswqzksqxdhu\nxfdtoshioyvjxdmu\nxsdxmsfmgjbyxdgu\nxadfssplfnlbxdru\nxndcasykmqmbxdru\nxrdxgszaisicxdlu\nxfdfoshhmypjxdmu\nxfdioshfiyhjxdmu\nxvdzysydlmyuxdnu\nxjdbqszgkuwhxdmu\nxfdfoshjyymjxdmu\nxgdjksubrmrfxdpu\nxkdshsfszixmxdcu\n", "output": "2\n" }, { "input": "2\n**\n2\nfx\naf\n", "output": "1\n" }, { "input": "10\n**********\n10\nmvsthotcmi\nhmivtctsmo\nmmcostthiv\ntmomihtsvc\nmottsivmch\nhtomvcsmit\nsvhmotmcti\nmitotmvhcs\nvomcttmish\ncmostitvmh\n", "output": "8\n" }, { "input": "3\n*a*\n4\naaa\ncac\naab\nbaa\n", "output": "1\n" }, { "input": "2\na*\n2\naa\nab\n", "output": "1\n" }, { "input": "3\n***\n2\naab\nabb\n", "output": "2\n" }, { "input": "2\n**\n1\nfx\n", "output": "2\n" }, { "input": "4\na*b*\n3\nabbc\nadbd\nacbe\n", "output": "0\n" }, { "input": "50\n**************************************************\n2\nhvjbrfkhdaobruoptrrachzuvkxvvsckycfiroipqicoqvcqpr\nuirvabciccxdvpryroisvpoqvthrpurkzhoovcfqcjbhkarkqf\n", "output": "20\n" }, { "input": "2\n**\n2\nfx\nab\n", "output": "0\n" }, { "input": "4\na*b*\n2\nabbc\nadbd\n", "output": "1\n" }, { "input": "4\na*b*\n3\nabbc\nadbd\nacbd\n", "output": "1\n" }, { "input": "50\n***********************************o**************\n5\nwrubnrgpqmduhgxtlxymsmcaiimivvypkkeouspglhzkfbpzcu\nfrubkrgplrduhgjuuxdmsgeaiimavvypkkeousulbhnkebpzcu\nwrubkrgpdrduhgfanxdmsufaiimgvvypkkeouwvsshikhbpzcu\nvhyfvnnobcguishyvuswkaxhkesgatuvbkyodxdrvlwwifiimd\nwrubwrgpvaduhgfnqxtmsjqaiimcvvypkkeouiqpyhckkbpzcu\n", "output": "20\n" }, { "input": "3\n*vt\n2\ncvt\nqvb\n", "output": "1\n" }, { "input": "1\n*\n1\nz\n", "output": "1\n" }, { "input": "20\n********************\n1\nlaizpfbafxrugjcytfbs\n", "output": "16\n" } ]
code_contests
python
0
5c23a297121b838879409e12798d46d7
A flower shop has got n bouquets, and the i-th bouquet consists of ai flowers. Vasya, the manager of the shop, decided to make large bouquets from these bouquets. Vasya thinks that a bouquet is large if it is made of two or more initial bouquets, and there is a constraint: the total number of flowers in a large bouquet should be odd. Each of the initial bouquets can be a part of at most one large bouquet. If an initial bouquet becomes a part of a large bouquet, all its flowers are included in the large bouquet. Determine the maximum possible number of large bouquets Vasya can make. Input The first line contains a single positive integer n (1 ≤ n ≤ 105) — the number of initial bouquets. The second line contains a sequence of integers a1, a2, ..., an (1 ≤ ai ≤ 106) — the number of flowers in each of the initial bouquets. Output Print the maximum number of large bouquets Vasya can make. Examples Input 5 2 3 4 2 7 Output 2 Input 6 2 2 6 8 6 12 Output 0 Input 3 11 4 10 Output 1 Note In the first example Vasya can make 2 large bouquets. For example, the first bouquet can contain the first and the fifth initial bouquets (the total number of flowers is then equal to 9), and the second bouquet can consist of the second and the third initial bouquets (the total number of flowers is then equal to 7). The fourth initial bouquet is unused in this scheme. In the second example it is not possible to form a single bouquet with odd number of flowers. In the third example Vasya can make one large bouquet. For example, he can make it using all three initial bouquets. The size of the large bouquet is then equal to 11 + 4 + 10 = 25. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n = int(input()) flowers = input().split() odd = 0 ott = 0 for val in flowers: if int(val) % 2 == 0: odd += 1 else: ott += 1 while ott > odd + 2: ott -= 2 odd += 1 print(min(odd, ott))
python
code_algorithm
[ { "input": "5\n2 3 4 2 7\n", "output": "2\n" }, { "input": "6\n2 2 6 8 6 12\n", "output": "0\n" }, { "input": "3\n11 4 10\n", "output": "1\n" }, { "input": "4\n943543 151729 379602 589828\n", "output": "2\n" }, { "input": "2\n468463 62253\n", "output": "0\n" }, { "input": "1\n999999\n", "output": "0\n" }, { "input": "20\n274039 899325 798709 157662 963297 276599 529230 80095 252956 980560 358150 82383 29856 901568 123794 275349 512273 508369 120076 170206\n", "output": "10\n" }, { "input": "1\n1\n", "output": "0\n" }, { "input": "3\n352987 849349 967007\n", "output": "1\n" }, { "input": "1\n1000000\n", "output": "0\n" }, { "input": "1\n2\n", "output": "0\n" }, { "input": "25\n742168 377547 485672 437223 96307 902863 759104 747933 512899 410317 588598 666688 823202 257684 520631 910066 168864 71499 899972 565350 764848 754913 929040 864132 289976\n", "output": "10\n" } ]
code_contests
python
0
c737f46fb8f2caf9bf707ee06273d41e
You're given an array a. You should repeat the following operation k times: find the minimum non-zero element in the array, print it, and then subtract it from all the non-zero elements of the array. If all the elements are 0s, just print 0. Input The first line contains integers n and k (1 ≤ n,k ≤ 10^5), the length of the array and the number of operations you should perform. The second line contains n space-separated integers a_1, a_2, …, a_n (1 ≤ a_i ≤ 10^9), the elements of the array. Output Print the minimum non-zero element before each operation in a new line. Examples Input 3 5 1 2 3 Output 1 1 1 0 0 Input 4 2 10 3 5 3 Output 3 2 Note In the first sample: In the first step: the array is [1,2,3], so the minimum non-zero element is 1. In the second step: the array is [0,1,2], so the minimum non-zero element is 1. In the third step: the array is [0,0,1], so the minimum non-zero element is 1. In the fourth and fifth step: the array is [0,0,0], so we printed 0. In the second sample: In the first step: the array is [10,3,5,3], so the minimum non-zero element is 3. In the second step: the array is [7,0,2,0], so the minimum non-zero element is 2. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
# coding: utf-8 # Your code here! import sys n,k = map(int,input().split()) A = list(map(int,input().split())) A.sort() cnt = 0 prev = 0 for i in range(len(A)): ans = A[i] - prev if ans != 0: print(ans) prev = A[i] cnt += 1 if cnt == k: break for _ in range(k-cnt): print(0)
python
code_algorithm
[ { "input": "3 5\n1 2 3\n", "output": "1\n1\n1\n0\n0\n" }, { "input": "4 2\n10 3 5 3\n", "output": "3\n2\n" }, { "input": "1 2\n1000000000\n", "output": "1000000000\n0\n" }, { "input": "3 1\n3 5 10\n", "output": "3\n" }, { "input": "7 5\n5 8 10 3 6 10 8\n", "output": "3\n2\n1\n2\n2\n" }, { "input": "10 20\n9 10 9 10 10 9 3 10 9 3\n", "output": "3\n6\n1\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n" }, { "input": "50 30\n26 87 83 27 2 51 94 38 21 9 6 7 85 20 68 56 30 55 62 51 16 82 100 28 93 70 33 52 50 87 55 36 93 84 63 94 96 2 42 84 37 54 34 76 38 86 14 21 6 4\n", "output": "2\n2\n2\n1\n2\n5\n2\n4\n1\n5\n1\n1\n2\n3\n1\n2\n1\n1\n4\n8\n1\n1\n2\n1\n1\n6\n1\n5\n2\n6\n" }, { "input": "2 5\n2 3\n", "output": "2\n1\n0\n0\n0\n" }, { "input": "3 10\n5 10 5\n", "output": "5\n5\n0\n0\n0\n0\n0\n0\n0\n0\n" } ]
code_contests
python
0
4ea9b1d7f2ad0767f3f01eba5046b141
Finished her homework, Nastya decided to play computer games. Passing levels one by one, Nastya eventually faced a problem. Her mission is to leave a room, where a lot of monsters live, as quickly as possible. There are n manholes in the room which are situated on one line, but, unfortunately, all the manholes are closed, and there is one stone on every manhole. There is exactly one coin under every manhole, and to win the game Nastya should pick all the coins. Initially Nastya stands near the k-th manhole from the left. She is thinking what to do. In one turn, Nastya can do one of the following: * if there is at least one stone on the manhole Nastya stands near, throw exactly one stone from it onto any other manhole (yes, Nastya is strong). * go to a neighboring manhole; * if there are no stones on the manhole Nastya stays near, she can open it and pick the coin from it. After it she must close the manhole immediately (it doesn't require additional moves). <image> The figure shows the intermediate state of the game. At the current position Nastya can throw the stone to any other manhole or move left or right to the neighboring manholes. If she were near the leftmost manhole, she could open it (since there are no stones on it). Nastya can leave the room when she picks all the coins. Monsters are everywhere, so you need to compute the minimum number of moves Nastya has to make to pick all the coins. Note one time more that Nastya can open a manhole only when there are no stones onto it. Input The first and only line contains two integers n and k, separated by space (2 ≤ n ≤ 5000, 1 ≤ k ≤ n) — the number of manholes and the index of manhole from the left, near which Nastya stays initially. Initially there is exactly one stone near each of the n manholes. Output Print a single integer — minimum number of moves which lead Nastya to pick all the coins. Examples Input 2 2 Output 6 Input 4 2 Output 13 Input 5 1 Output 15 Note Let's consider the example where n = 2, k = 2. Nastya should play as follows: * At first she throws the stone from the second manhole to the first. Now there are two stones on the first manhole. * Then she opens the second manhole and pick the coin from it. * Then she goes to the first manhole, throws two stones by two moves to the second manhole and then opens the manhole and picks the coin from it. So, 6 moves are required to win. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n,k=map(int,input().split()) print(n+min(k-1,n-k)+2*n)
python
code_algorithm
[ { "input": "5 1\n", "output": "15\n" }, { "input": "2 2\n", "output": "6\n" }, { "input": "4 2\n", "output": "13\n" }, { "input": "44 1\n", "output": "132\n" }, { "input": "4291 2145\n", "output": "15017\n" }, { "input": "2266 1133\n", "output": "7930\n" }, { "input": "1023 999\n", "output": "3093\n" }, { "input": "5000 888\n", "output": "15887\n" }, { "input": "5000 3378\n", "output": "16622\n" }, { "input": "2029 360\n", "output": "6446\n" }, { "input": "9 1\n", "output": "27\n" }, { "input": "2563 1281\n", "output": "8969\n" }, { "input": "40 24\n", "output": "136\n" }, { "input": "8 2\n", "output": "25\n" }, { "input": "5000 539\n", "output": "15538\n" }, { "input": "2944 2468\n", "output": "9308\n" }, { "input": "8 4\n", "output": "27\n" }, { "input": "10 9\n", "output": "31\n" }, { "input": "530 530\n", "output": "1590\n" }, { "input": "5000 1\n", "output": "15000\n" }, { "input": "5000 2653\n", "output": "17347\n" }, { "input": "3068 1534\n", "output": "10737\n" }, { "input": "3046 1523\n", "output": "10660\n" }, { "input": "1000 199\n", "output": "3198\n" }, { "input": "3247 1623\n", "output": "11363\n" }, { "input": "64 49\n", "output": "207\n" }, { "input": "3058 82\n", "output": "9255\n" }, { "input": "87 87\n", "output": "261\n" }, { "input": "3400 1203\n", "output": "11402\n" }, { "input": "113 42\n", "output": "380\n" }, { "input": "4992 1\n", "output": "14976\n" }, { "input": "3 1\n", "output": "9\n" }, { "input": "3355 2536\n", "output": "10884\n" }, { "input": "10 4\n", "output": "33\n" }, { "input": "675 675\n", "output": "2025\n" }, { "input": "3151 1575\n", "output": "11027\n" }, { "input": "4676 1\n", "output": "14028\n" }, { "input": "1000 201\n", "output": "3200\n" }, { "input": "1815 1371\n", "output": "5889\n" }, { "input": "4 1\n", "output": "12\n" }, { "input": "65 61\n", "output": "199\n" }, { "input": "1029 1028\n", "output": "3088\n" }, { "input": "5000 2895\n", "output": "17105\n" }, { "input": "308 1\n", "output": "924\n" }, { "input": "3010 1505\n", "output": "10534\n" }, { "input": "5000 4494\n", "output": "15506\n" }, { "input": "2229 1114\n", "output": "7800\n" }, { "input": "4158 2162\n", "output": "14470\n" }, { "input": "87 27\n", "output": "287\n" }, { "input": "18 12\n", "output": "60\n" }, { "input": "5000 3531\n", "output": "16469\n" }, { "input": "4919 2459\n", "output": "17215\n" }, { "input": "2116 1\n", "output": "6348\n" }, { "input": "3 3\n", "output": "9\n" }, { "input": "5000 3336\n", "output": "16664\n" }, { "input": "5000 1628\n", "output": "16627\n" }, { "input": "731 1\n", "output": "2193\n" }, { "input": "91 39\n", "output": "311\n" }, { "input": "7 3\n", "output": "23\n" }, { "input": "88 33\n", "output": "296\n" }, { "input": "4602 2301\n", "output": "16106\n" }, { "input": "4237 4112\n", "output": "12836\n" }, { "input": "24 6\n", "output": "77\n" }, { "input": "1052 1052\n", "output": "3156\n" }, { "input": "1237 618\n", "output": "4328\n" }, { "input": "5000 3576\n", "output": "16424\n" }, { "input": "2 1\n", "output": "6\n" }, { "input": "1214 76\n", "output": "3717\n" }, { "input": "978 489\n", "output": "3422\n" }, { "input": "4951 4649\n", "output": "15155\n" }, { "input": "5000 2500\n", "output": "17499\n" }, { "input": "4345 1015\n", "output": "14049\n" }, { "input": "5000 2612\n", "output": "17388\n" }, { "input": "1024 1023\n", "output": "3073\n" }, { "input": "10 2\n", "output": "31\n" }, { "input": "72 36\n", "output": "251\n" }, { "input": "3474 3427\n", "output": "10469\n" } ]
code_contests
python
0
1abd1176c787ec6dc05185b4194c93d7
Authors guessed an array a consisting of n integers; each integer is not less than 2 and not greater than 2 ⋅ 10^5. You don't know the array a, but you know the array b which is formed from it with the following sequence of operations: 1. Firstly, let the array b be equal to the array a; 2. Secondly, for each i from 1 to n: * if a_i is a prime number, then one integer p_{a_i} is appended to array b, where p is an infinite sequence of prime numbers (2, 3, 5, ...); * otherwise (if a_i is not a prime number), the greatest divisor of a_i which is not equal to a_i is appended to b; 3. Then the obtained array of length 2n is shuffled and given to you in the input. Here p_{a_i} means the a_i-th prime number. The first prime p_1 = 2, the second one is p_2 = 3, and so on. Your task is to recover any suitable array a that forms the given array b. It is guaranteed that the answer exists (so the array b is obtained from some suitable array a). If there are multiple answers, you can print any. Input The first line of the input contains one integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the number of elements in a. The second line of the input contains 2n integers b_1, b_2, ..., b_{2n} (2 ≤ b_i ≤ 2750131), where b_i is the i-th element of b. 2750131 is the 199999-th prime number. Output In the only line of the output print n integers a_1, a_2, ..., a_n (2 ≤ a_i ≤ 2 ⋅ 10^5) in any order — the array a from which the array b can be obtained using the sequence of moves given in the problem statement. If there are multiple answers, you can print any. Examples Input 3 3 5 2 3 2 4 Output 3 4 2 Input 1 2750131 199999 Output 199999 Input 1 3 6 Output 6 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
from sys import stdin, stdout import collections import math import heapq def primes(n): """ Returns a list of primes < n """ sieve = [True] * n for i in range(3,int(n**0.5)+1,2): if sieve[i]: sieve[i*i::2*i]=[False]*((n-i*i-1)//(2*i)+1) return [2] + [i for i in range(3,n,2) if sieve[i]] p = primes(2750132) look_up = {} i = 1 for num in p: look_up[num] = i i += 1 N = int(input()) #N,M = [int(x) for x in stdin.readline().split()] arr = [int(x) for x in stdin.readline().split()] arr.sort() h = [] freq = {} for num in arr: heapq.heappush(h, -num) freq[num] = 0 #ans = [] while h: num = -heapq.heappop(h) if freq[num]>0: freq[num] -= 1 continue if num in look_up: #ans.append(look_up[num]) print(look_up[num],end=' ') freq[look_up[num]] += 1 else: for i in range(2,num): if num%i==0: print(num,end=' ') freq[num//i] += 1 break
python
code_algorithm
[ { "input": "3\n3 5 2 3 2 4\n", "output": "3 4 2 " }, { "input": "1\n3 6\n", "output": "6 " }, { "input": "1\n2750131 199999\n", "output": "199999 " }, { "input": "1\n3 2\n", "output": "2 " }, { "input": "1\n68914 137828\n", "output": "137828 " }, { "input": "2\n1327 1847 2654 283\n", "output": "2654 283 " }, { "input": "100\n3 3 2 2 3 2 3 2 2 2 2 3 3 2 2 2 2 2 3 3 3 2 3 3 3 2 2 2 3 3 2 3 2 2 3 2 3 2 2 2 3 2 3 3 3 2 3 3 3 2 2 3 3 3 3 3 2 3 2 2 2 3 3 3 2 3 3 3 3 2 2 3 2 3 2 3 2 3 3 2 3 2 3 3 3 2 2 2 2 3 2 2 3 2 3 2 3 3 2 2 3 2 3 3 2 2 2 2 3 2 3 2 2 2 3 3 2 3 3 3 3 2 2 3 2 3 3 2 3 3 3 2 3 2 3 2 2 3 2 2 2 2 2 2 3 3 2 3 2 3 2 2 3 3 2 2 2 2 3 2 3 2 2 3 2 2 2 3 3 3 3 2 3 3 2 2 3 3 2 2 2 3 2 2 3 3 3 2 2 2 3 3 3 3 3 3 2 2 3 3\n", "output": "2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 " }, { "input": "10\n17726 109910 31153 155765 80159 101196 58175 174525 188607 123148 50598 61574 8161 14403 62869 35452 1129 28806 83617 54955\n", "output": "188607 174525 155765 123148 109910 101196 8161 80159 35452 28806 " }, { "input": "2\n1118003 93212 87037 186424\n", "output": "87037 186424 " }, { "input": "1\n200000 100000\n", "output": "200000 " }, { "input": "2\n97908 66299 198897 195816\n", "output": "198897 195816 " }, { "input": "10\n100000 100000 100000 200000 100000 100000 200000 200000 100000 200000 200000 100000 200000 200000 200000 100000 200000 100000 200000 100000\n", "output": "200000 200000 200000 200000 200000 200000 200000 200000 200000 200000 " }, { "input": "1\n815 1630\n", "output": "1630 " }, { "input": "2\n200000 100000 200000 100000\n", "output": "200000 200000 " }, { "input": "1\n99917 199834\n", "output": "199834 " }, { "input": "2\n3 2 3 2\n", "output": "2 2 " }, { "input": "10\n1999 1983 305 566 1044 2088 283 645 943 1645 329 215 299 525 1050 661 23 17387 610 41\n", "output": "1999 2088 1983 1645 1050 943 645 610 566 299 " }, { "input": "10\n3 3 3 2 3 3 3 3 2 2 2 2 3 2 2 2 2 3 2 3\n", "output": "2 2 2 2 2 2 2 2 2 2 " }, { "input": "10\n192758 199327 193073 98226 66541 196327 199623 4241 199932 99966 197438 96379 98719 10333 196452 2647331 18181 39857 199991 199285\n", "output": "193073 199991 199932 199623 199327 199285 197438 196452 196327 192758 " } ]
code_contests
python
0
5ecc0e319773b2c7febe37528d5d9a48
Finally, a basketball court has been opened in SIS, so Demid has decided to hold a basketball exercise session. 2 ⋅ n students have come to Demid's exercise session, and he lined up them into two rows of the same size (there are exactly n people in each row). Students are numbered from 1 to n in each row in order from left to right. <image> Now Demid wants to choose a team to play basketball. He will choose players from left to right, and the index of each chosen player (excluding the first one taken) will be strictly greater than the index of the previously chosen player. To avoid giving preference to one of the rows, Demid chooses students in such a way that no consecutive chosen students belong to the same row. The first student can be chosen among all 2n students (there are no additional constraints), and a team can consist of any number of students. Demid thinks, that in order to compose a perfect team, he should choose students in such a way, that the total height of all chosen students is maximum possible. Help Demid to find the maximum possible total height of players in a team he can choose. Input The first line of the input contains a single integer n (1 ≤ n ≤ 10^5) — the number of students in each row. The second line of the input contains n integers h_{1, 1}, h_{1, 2}, …, h_{1, n} (1 ≤ h_{1, i} ≤ 10^9), where h_{1, i} is the height of the i-th student in the first row. The third line of the input contains n integers h_{2, 1}, h_{2, 2}, …, h_{2, n} (1 ≤ h_{2, i} ≤ 10^9), where h_{2, i} is the height of the i-th student in the second row. Output Print a single integer — the maximum possible total height of players in a team Demid can choose. Examples Input 5 9 3 5 7 3 5 8 1 4 5 Output 29 Input 3 1 2 9 10 1 1 Output 19 Input 1 7 4 Output 7 Note In the first example Demid can choose the following team as follows: <image> In the second example Demid can choose the following team as follows: <image> Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n=int(input()) a=[int(x) for x in input().split()] b=[int(x) for x in input().split()] dp=[[-1,-1] for i in range(n-1)] dp.append([a[n-1],b[n-1]]) dp.append([0,0]) for i in range(n-1): dp[n-2-i][0]=a[n-2-i]+max(dp[n-1-i][1],dp[n-i][1]) dp[n-2-i][1]=b[n-2-i]+max(dp[n-1-i][0],dp[n-i][0]) print(max(dp[0][0],dp[0][1]))
python
code_algorithm
[ { "input": "5\n9 3 5 7 3\n5 8 1 4 5\n", "output": "29\n" }, { "input": "1\n7\n4\n", "output": "7\n" }, { "input": "3\n1 2 9\n10 1 1\n", "output": "19\n" }, { "input": "1\n5\n8\n", "output": "8\n" }, { "input": "100\n1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4\n4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1\n", "output": "400\n" }, { "input": "5\n1 7 6 9 1\n6 1 1 7 10\n", "output": "33\n" }, { "input": "5\n3 10 9 10 6\n4 3 3 6 9\n", "output": "36\n" }, { "input": "1\n5\n1\n", "output": "5\n" }, { "input": "5\n7 3 3 1 8\n7 2 1 1 2\n", "output": "21\n" }, { "input": "100\n4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1\n1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4\n", "output": "400\n" } ]
code_contests
python
0.7
df08da481ef2d6230b89cbc2db83bd1a
You're given an undirected graph with n nodes and m edges. Nodes are numbered from 1 to n. The graph is considered harmonious if and only if the following property holds: * For every triple of integers (l, m, r) such that 1 ≤ l < m < r ≤ n, if there exists a path going from node l to node r, then there exists a path going from node l to node m. In other words, in a harmonious graph, if from a node l we can reach a node r through edges (l < r), then we should able to reach nodes (l+1), (l+2), …, (r-1) too. What is the minimum number of edges we need to add to make the graph harmonious? Input The first line contains two integers n and m (3 ≤ n ≤ 200\ 000 and 1 ≤ m ≤ 200\ 000). The i-th of the next m lines contains two integers u_i and v_i (1 ≤ u_i, v_i ≤ n, u_i ≠ v_i), that mean that there's an edge between nodes u and v. It is guaranteed that the given graph is simple (there is no self-loop, and there is at most one edge between every pair of nodes). Output Print the minimum number of edges we have to add to the graph to make it harmonious. Examples Input 14 8 1 2 2 7 3 4 6 3 5 7 3 8 6 8 11 12 Output 1 Input 200000 3 7 9 9 8 4 5 Output 0 Note In the first example, the given graph is not harmonious (for instance, 1 < 6 < 7, node 1 can reach node 7 through the path 1 → 2 → 7, but node 1 can't reach node 6). However adding the edge (2, 4) is sufficient to make it harmonious. In the second example, the given graph is already harmonious. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
import sys input = sys.stdin.buffer.readline sys.setrecursionlimit(300000) n, m = map(int, input().split()) sn, smx = list(range(n+1)), list(range(n+1)) def s_find(u): p = [] while sn[u] != u: p.append(u) u = sn[u] for v in p: sn[v] = u return u def s_union(u, v): su, sv = s_find(u), s_find(v) if su == sv: return False smx[su] = max(smx[su], smx[sv]) sn[sv] = su return True for i in range(m): a, b = map(int, input().split()) s_union(a, b) cc = 0 for u in range(1, n+1): su = s_find(u) if u < smx[su] and s_union(u, u+1): cc += 1 print(cc)
python
code_algorithm
[ { "input": "200000 3\n7 9\n9 8\n4 5\n", "output": "0\n" }, { "input": "14 8\n1 2\n2 7\n3 4\n6 3\n5 7\n3 8\n6 8\n11 12\n", "output": "1\n" }, { "input": "500 5\n100 300\n200 400\n420 440\n430 450\n435 460\n", "output": "335\n" }, { "input": "200000 1\n1 200000\n", "output": "199998\n" }, { "input": "3 1\n1 3\n", "output": "1\n" } ]
code_contests
python
0.1
ad7e636f3f45cab5a388759cf2a0d365
In this problem, we will deal with binary strings. Each character of a binary string is either a 0 or a 1. We will also deal with substrings; recall that a substring is a contiguous subsequence of a string. We denote the substring of string s starting from the l-th character and ending with the r-th character as s[l ... r]. The characters of each string are numbered from 1. We can perform several operations on the strings we consider. Each operation is to choose a substring of our string and replace it with another string. There are two possible types of operations: replace 011 with 110, or replace 110 with 011. For example, if we apply exactly one operation to the string 110011110, it can be transformed into 011011110, 110110110, or 110011011. Binary string a is considered reachable from binary string b if there exists a sequence s_1, s_2, ..., s_k such that s_1 = a, s_k = b, and for every i ∈ [1, k - 1], s_i can be transformed into s_{i + 1} using exactly one operation. Note that k can be equal to 1, i. e., every string is reachable from itself. You are given a string t and q queries to it. Each query consists of three integers l_1, l_2 and len. To answer each query, you have to determine whether t[l_1 ... l_1 + len - 1] is reachable from t[l_2 ... l_2 + len - 1]. Input The first line contains one integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the length of string t. The second line contains one string t (|t| = n). Each character of t is either 0 or 1. The third line contains one integer q (1 ≤ q ≤ 2 ⋅ 10^5) — the number of queries. Then q lines follow, each line represents a query. The i-th line contains three integers l_1, l_2 and len (1 ≤ l_1, l_2 ≤ |t|, 1 ≤ len ≤ |t| - max(l_1, l_2) + 1) for the i-th query. Output For each query, print either YES if t[l_1 ... l_1 + len - 1] is reachable from t[l_2 ... l_2 + len - 1], or NO otherwise. You may print each letter in any register. Example Input 5 11011 3 1 3 3 1 4 2 1 2 3 Output Yes Yes No Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
import sys input = sys.stdin.readline n=int(input()) t=input().strip() q=int(input()) ZEROS=[0]*n ZERO_ONE=[] ONECOUNT=[0]*n ind=0 count=0 for i in range(n): ZEROS[i]=ind if t[i]=="0": ind+=1 ONECOUNT[i]=count%2 ZERO_ONE.append(count%2) count=0 else: count+=1 ONECOUNT[i]=count ZEROS.append(ind) S=ZERO_ONE LEN=len(S) p=2 import random mod=random.randint(10**8,10**9)*2+1 mod2=random.randint(10**8,10**9)*2+1 mod3=random.randint(10**8,10**9)*2+1 mod4=random.randint(10**8,10**9)*2+1 TABLE=[0] TABLE2=[0] TABLE3=[0] TABLE4=[0] for i in range(LEN): TABLE.append(p*TABLE[-1]%mod+S[i]%mod) # テーブルを埋める TABLE2.append(p*TABLE2[-1]%mod2+S[i]%mod2) # テーブルを埋める TABLE3.append(p*TABLE3[-1]%mod3+S[i]%mod2) # テーブルを埋める TABLE4.append(p*TABLE4[-1]%mod4+S[i]%mod4) # テーブルを埋める def hash_ij(i,j): # [i,j)のハッシュ値を求める return (TABLE[j]-TABLE[i]*pow(p,j-i,mod))%mod def hash_ij2(i,j): # [i,j)のハッシュ値を求める return (TABLE2[j]-TABLE2[i]*pow(p,j-i,mod2))%mod2 def hash_ij3(i,j): # [i,j)のハッシュ値を求める return (TABLE3[j]-TABLE3[i]*pow(p,j-i,mod3))%mod3 def hash_ij4(i,j): # [i,j)のハッシュ値を求める return (TABLE4[j]-TABLE4[i]*pow(p,j-i,mod4))%mod4 def zcount(l,LEN): return ZEROS[l+LEN]-ZEROS[l] def first_check(l,LEN): if t[l]=="0": return 0 else: return (ZERO_ONE[ZEROS[l]]-ONECOUNT[l]+1)%2 def equalcheck(l1,l2,LEN): f1,f2=ZEROS[l1]+1,ZEROS[l2]+1 if l1+LEN-1=="0": la1=ZEROS[l1+LEN] else: la1=ZEROS[l1+LEN]-1 if l2+LEN-1=="0": la2=ZEROS[l2+LEN] else: la2=ZEROS[l2+LEN]-1 if hash_ij(f1,la1+1)==hash_ij(f2,la2+1) and hash_ij2(f1,la1+1)==hash_ij2(f2,la2+1) and hash_ij3(f1,la1+1)==hash_ij3(f2,la2+1) and hash_ij4(f1,la1+1)==hash_ij4(f2,la2+1): return "Yes" else: return "No" for queries in range(q): l1,l2,LEN=map(int,input().split()) l1-=1 l2-=1 #print(l1,l2,LEN) if zcount(l1,LEN)!=zcount(l2,LEN): print("No") continue if zcount(l1,LEN)==0: print("Yes") continue if first_check(l1,LEN)!=first_check(l2,LEN): print("No") continue if zcount(l1,LEN)==1: print("Yes") continue print(equalcheck(l1,l2,LEN))
python
code_algorithm
[ { "input": "5\n11011\n3\n1 3 3\n1 4 2\n1 2 3\n", "output": "Yes\nYes\nNo\n" }, { "input": "3\n010\n3\n1 3 1\n1 3 1\n3 2 1\n", "output": "Yes\nYes\nNo\n" }, { "input": "10\n1100111011\n10\n10 10 1\n5 4 5\n6 10 1\n10 10 1\n10 10 1\n5 5 4\n6 10 1\n4 6 4\n10 10 1\n6 10 1\n", "output": "Yes\nNo\nYes\nYes\nYes\nYes\nYes\nYes\nYes\nYes\n" }, { "input": "50\n01110100101100100100011001100001110010010000000101\n50\n27 18 7\n22 35 2\n50 35 1\n41 16 1\n27 5 5\n11 6 33\n7 19 2\n9 12 33\n14 37 4\n1 22 8\n22 3 5\n50 42 1\n50 38 1\n29 20 2\n20 34 17\n20 4 29\n16 21 3\n11 43 3\n15 45 1\n12 28 3\n31 34 13\n43 1 8\n3 41 1\n18 3 13\n29 44 6\n47 44 3\n40 43 2\n6 46 5\n9 12 35\n19 45 2\n38 47 4\n19 47 3\n48 3 1\n16 12 9\n24 18 2\n32 40 4\n16 28 11\n33 22 12\n7 16 9\n17 30 3\n16 13 26\n46 24 5\n48 17 2\n25 32 15\n46 19 1\n40 29 2\n36 34 10\n47 27 4\n43 18 6\n4 10 12\n", "output": "Yes\nNo\nNo\nYes\nNo\nNo\nYes\nNo\nNo\nNo\nNo\nNo\nNo\nYes\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nYes\nNo\nNo\nYes\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nYes\nNo\nNo\nNo\nNo\nNo\n" }, { "input": "10\n0100001001\n10\n2 5 4\n10 2 1\n5 3 5\n2 9 2\n5 3 1\n3 3 3\n9 8 1\n5 3 1\n9 5 2\n2 3 6\n", "output": "No\nYes\nNo\nNo\nYes\nYes\nYes\nYes\nNo\nNo\n" }, { "input": "240\n010101010101010101011001011001101010011010011010101001010101101010100101100101011010101001010101011001100110010110011010010101010101010101100101100110101001101001101010100101010110101010010110010101101010100101010101100110011001011001101001\n1\n1 121 120\n", "output": "No\n" }, { "input": "182\n00101000101001010000010010100000100100010000001010100100001000010101000000000000100000100001001000000000000010100000100101000000010001000010100000001000100001001010101010000100000101\n1\n1 92 91\n", "output": "No\n" }, { "input": "5\n11010\n5\n2 1 4\n3 5 1\n4 2 1\n4 5 1\n2 4 2\n", "output": "No\nYes\nYes\nNo\nYes\n" }, { "input": "248\n01011010011010101001010101011001101001101001100110100110101001101001010101100101011001010101100110010101010101011010101010100110100110101010010101010110011010011010011001101001101010011010010101011001010110010101011001100101010101010110101010101001\n1\n1 125 124\n", "output": "No\n" }, { "input": "10\n1101011011\n10\n10 3 1\n10 10 1\n5 10 1\n10 4 1\n10 10 1\n10 10 1\n10 10 1\n10 4 1\n4 5 2\n3 5 3\n", "output": "No\nYes\nNo\nYes\nYes\nYes\nYes\nYes\nNo\nNo\n" }, { "input": "104\n01000100100101000001001000100001010100010011111111110101001010010100010101001010010101001010101010101010\n1\n1 53 52\n", "output": "No\n" }, { "input": "238\n0100010101001010101000010001000001000100100101001000000010000001010100101010101001010010111111111111111111111111111111110101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100\n1\n1 120 119\n", "output": "No\n" }, { "input": "1\n0\n1\n1 1 1\n", "output": "Yes\n" }, { "input": "160\n1010010101100101100110101010100101010110100101011001100110101001011010101001100101011010101010101001100101010101011010011001010110011010011001101001100101100101\n1\n1 81 80\n", "output": "No\n" }, { "input": "358\n0100100101000100100001010010000001000010000101000010100100100100000000100010100001001001001000010010010100101010001010001010001111111111111111111111111111111111111111111111111111110101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100\n1\n1 180 179\n", "output": "No\n" }, { "input": "240\n011010101001011010100110101001011001011010100101100110011001011010010101010110100110010110100101101001101001101001010110011010010101011010011010010101010110011001100110101001010101100110101001100110101010100101010101011010010101010110101010\n1\n1 121 120\n", "output": "No\n" }, { "input": "96\n000100000000001000010010010010001010100111111111101010010010001010101000100100100101010001010010\n1\n1 49 48\n", "output": "No\n" }, { "input": "50\n01110011100101101001001101110101011011101011010011\n50\n10 18 32\n13 50 1\n5 42 1\n10 6 35\n47 4 4\n42 44 7\n50 7 1\n45 1 5\n14 38 11\n28 29 4\n7 48 2\n35 10 1\n12 44 6\n28 26 4\n43 4 4\n42 12 4\n47 29 3\n47 49 1\n19 47 2\n3 46 2\n9 17 23\n17 30 1\n1 31 11\n48 48 1\n14 27 9\n15 26 4\n7 32 10\n39 33 4\n8 46 3\n7 42 8\n34 25 12\n18 18 9\n41 14 6\n25 25 24\n22 26 24\n49 9 2\n27 44 4\n5 32 9\n18 34 7\n23 22 4\n16 26 12\n8 49 2\n4 10 30\n21 8 20\n26 27 5\n4 29 14\n32 22 2\n34 40 2\n26 49 1\n6 13 34\n", "output": "No\nNo\nYes\nNo\nNo\nNo\nYes\nNo\nYes\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nYes\nNo\nYes\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nYes\nNo\nYes\nNo\nNo\nNo\nNo\nNo\nNo\nNo\nYes\nNo\nNo\nNo\nNo\nNo\nNo\nYes\nNo\n" }, { "input": "5\n00010\n5\n5 3 1\n2 1 2\n4 1 1\n3 1 3\n2 1 3\n", "output": "Yes\nYes\nNo\nNo\nNo\n" }, { "input": "160\n0101100101011001100110101010100110011001101001101010100101011010011001010110010110011010010101011001010101100110010110010110101010010101100110101010101010010110\n1\n1 81 80\n", "output": "No\n" } ]
code_contests
python
0
9b690336ce41e321cee7cfc80708e789
Unary is a minimalistic Brainfuck dialect in which programs are written using only one token. Brainfuck programs use 8 commands: "+", "-", "[", "]", "<", ">", "." and "," (their meaning is not important for the purposes of this problem). Unary programs are created from Brainfuck programs using the following algorithm. First, replace each command with a corresponding binary code, using the following conversion table: * ">" → 1000, * "<" → 1001, * "+" → 1010, * "-" → 1011, * "." → 1100, * "," → 1101, * "[" → 1110, * "]" → 1111. Next, concatenate the resulting binary codes into one binary number in the same order as in the program. Finally, write this number using unary numeral system — this is the Unary program equivalent to the original Brainfuck one. You are given a Brainfuck program. Your task is to calculate the size of the equivalent Unary program, and print it modulo 1000003 (106 + 3). Input The input will consist of a single line p which gives a Brainfuck program. String p will contain between 1 and 100 characters, inclusive. Each character of p will be "+", "-", "[", "]", "<", ">", "." or ",". Output Output the size of the equivalent Unary program modulo 1000003 (106 + 3). Examples Input ,. Output 220 Input ++++[&gt;,.&lt;-] Output 61425 Note To write a number n in unary numeral system, one simply has to write 1 n times. For example, 5 written in unary system will be 11111. In the first example replacing Brainfuck commands with binary code will give us 1101 1100. After we concatenate the codes, we'll get 11011100 in binary system, or 220 in decimal. That's exactly the number of tokens in the equivalent Unary program. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
# n=bin() s=input() ans="" for i in s: if i==">": ans+="1000" elif i=="<": ans+="1001" elif i =="+": ans+="1010" elif i=="-": ans+="1011" elif i==".": ans+="1100" elif i==",": ans+="1101" elif i=="[": ans+="1110" elif i=="]": ans+="1111" print(int(ans,2)% 1000003)
python
code_algorithm
[ { "input": "++++[&gt;,.&lt;-]\n", "output": "122016\n" }, { "input": ",.\n", "output": "220\n" }, { "input": "-[..[]+>>.>,]>.+]>.]>[.>+,>+\n", "output": "860720\n" }, { "input": ".<>.+]>],>><\n", "output": "228058\n" }, { "input": "+,+><[>..,]-.[.++[>-<<-,-.>,.>]+,<,]]<[>,-+,.-[+,[.[<.-[].+>[,>-.>>]-[-][+,>>-,+<-,<.+-.+[.,\n", "output": "537427\n" }, { "input": "<.,+.><[,.+<[,.,<-,[>,\n", "output": "982288\n" }, { "input": "[-.].+<<]---+[+-+-[,[[[,]-<[-[[><>]\n", "output": "765140\n" }, { "input": ",]+>.],,+->+>-[]][><,-]><]++<.,-[.>.<+.[.<,[-,,[<]+>]->>]>]-+-+<][].,.]+][[<,-.+][+<<-+.],,,<,.]-].-\n", "output": "859903\n" }, { "input": ",><[-]-,],+<<]>.][]][+]>.[-]]>++-.+[.<[,.-,<,[,,>,],,>-<+],>->-[<<.,>>,<][,<-->+-..+.,>>.\n", "output": "11994\n" }, { "input": "-.+[.<[[<],.-<-[+-->.-->>[<<.[>,]>->[<.[-++>..,.[.\n", "output": "185396\n" }, { "input": "<+[[],+,+[]-<]<<.+><,.<[.[-+>.+-]><+[]<]>[>]<<[<>.+[-><>]->>>,>.[[.>-+>]+],\n", "output": "915891\n" }, { "input": "]+,]>>+-+++<[].][[.]->,+]]>>,<>>+<+,>]\n", "output": "694915\n" }, { "input": "[-],<],<<,<[,>,+>[[<>.,[>-[-[<><>><<<<]>,.-].>-[[>+,>,[,-,.-,-[[]>..<>,<[+,-<]-++.<+.]<,[[.<<-><<<],\n", "output": "43789\n" }, { "input": ".\n", "output": "12\n" }, { "input": "[.[[+.<<>,+,>],<][+-],>.]<+]>><<][+-,][.>[-,.>--][-[]>]-<>,+<<>+,]][.>>.<,>.<..]>]<][-.[\n", "output": "386152\n" }, { "input": ".[.+<,->[++,]]++[[<-.]][.<.<]<-,>]]>.\n", "output": "626679\n" }, { "input": "[,+.-.<],,]-]-[[,[]+,[.]][>],,]<[>,<+<<>>].>]>][->+>\n", "output": "411338\n" }, { "input": ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n", "output": "208877\n" }, { "input": "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\n", "output": "47113\n" }, { "input": ">[][+...+[.-[,,>,[,-.].--[..>+<>[]<,],,<<,<>[<<.+>-[]+><]+,[+[\n", "output": "356953\n" }, { "input": "+]]],,>],][],<+.[->,>..<-+]][>><.+>[][.]<,>-..-,..-]>-]+>,><+<<.+>.,++]<]],],<+-<.\n", "output": "113966\n" }, { "input": "+\n", "output": "10\n" }, { "input": "><\n", "output": "137\n" }, { "input": "]<[--]>[-.,,.[[.,-<.]+->+++,+<+]]<>>+].]>[>].[+,><->>++,[,><,,.<-]-+-+<].][-[<].<-->-+>]<]>,\n", "output": "589486\n" }, { "input": "[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\n", "output": "889131\n" }, { "input": "<,+<-+[[-<[-,]\n", "output": "570514\n" }, { "input": ".>]+,>->,.>[+>+<-.-+<<>-,..+-<.,>]>.<<,+-[].,],<,..-<[-\n", "output": "223676\n" }, { "input": ">\n", "output": "8\n" }, { "input": "++++[>,.<-]\n", "output": "61425\n" }, { "input": "[>+,.+<<>..-+[>,><.-,--[+[>+>+[].[-[,][..<<[<,-<+-,<][][,>]++]+-<,,]++>.].[-[-[[,<[>><->]->+[+-\n", "output": "89776\n" }, { "input": ",-,[,,,.-]+]]>-<[+[.]]][[>-<[.[<->+.>[++[.><[+<].],]>,.,<+.--[\n", "output": "243567\n" }, { "input": "],[>>-,].><-.[]>.-+]<<<+]>-,+,.,[+[<+[],]-+>+>+--+]+<,]-+],><>+,>.-,+]-,,\n", "output": "965603\n" }, { "input": ">]-[.-+[,,]].]+,][[>>[+][,<+,>.<[],.>+[]-[,[[+],..>..<[>.,,,+]]<+++<][[>..>>+-]+][--],]<[]\n", "output": "952413\n" }, { "input": "<\n", "output": "9\n" }, { "input": ">[[<][[><]+.+.[..],.<,<[],]<[>]-.-+<+->]],\n", "output": "419600\n" }, { "input": "+[-][]..+,<<+,++<<][<,]<[][+,+,++[+-],->],-.--<-[.]+]-+]<][,.>.+[<+]<+<>-\n", "output": "240679\n" }, { "input": ">.><]..>,,<<-[.,]]+,+,>[<>>+]+++--,>.[+,,+,+[><+,+[<,-]<-,..[,,.[[><]]<[<.-++][.[]][<\n", "output": "916864\n" }, { "input": ",\n", "output": "13\n" }, { "input": "+]+<-]-<,>[,]<[][+<[+]>[[,\n", "output": "221907\n" }, { "input": ">]<-.+>>..<-,[-+.]+<<>[-,.],,,[,-+>>>>>.-]>,+<.+[,<>><\n", "output": "481849\n" }, { "input": "]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\n", "output": "266644\n" }, { "input": ">+,][>]]]+[-..<<<+]>>.+-++.+<.,>>-[+-,+.+>]<.>-[<>]<<+[>].[++[].[++++,<[+-<<[+<[]-+][>[-+.,,],<<,>+\n", "output": "701493\n" }, { "input": ">-[+>[++[,]-<<,.-->]+[<[-<>-]<,]<.+][]].]++]]+<,...>-[><,-\n", "output": "739433\n" }, { "input": "[,[.+-,,.>+-[+[][,[][,.-+>+]]<.,,.]<+><.[<,\n", "output": "96775\n" }, { "input": "]+<+[,.[,]-,.][]..[.<[<-]]]+.<[]]>>]-+]-+-.>-.].,[+[]><-.[[]++<\n", "output": "86015\n" }, { "input": "-],,<<><.,.+][.[++-+..,,>-><>+,[,,,.[>.-+]]\n", "output": "670018\n" }, { "input": ".,,>-,<-+,-<[,<>\n", "output": "900168\n" }, { "input": "].[+.,]].+->][.+-[[,--.-+.,,+]>+[-[,+.><-+[[--<[.->]<>+-]<.,]]>.<>-+,<.+[]>>[<+.][[\n", "output": "9085\n" }, { "input": "<+.,,<[+-.+[<>[>.]+<[[<]<,<].-<-\n", "output": "975622\n" }, { "input": "][-+>,>[,<[<+-,[+[-.<+,<[.,<+<,>+],.]><+<,+<..[[[>,[<>+-<<[>,[>-->[>+[<+<[-<]]]<>.+-,.+++-+++-+>-.]+\n", "output": "235230\n" }, { "input": "-\n", "output": "11\n" }, { "input": ">>.<<[-,.<.].\n", "output": "518117\n" }, { "input": "-,]]]+[]-,+]>][>[[->,..-.,[[.<,,.,+[].[[[-.][.<.,.<.>[.,+.,<[-]-[--<,>+-,.,.[.,]+.>>--,\n", "output": "533116\n" }, { "input": ".<],>>[[+.+]><<<>,,+][.,-+-+<>-[,+><].+-+<[],+-+]<].>]<+-.][,,+>],[,[+\n", "output": "898085\n" }, { "input": "[[>>[>[],+>-..]<]>-<-]<>].-[,,,.[+.-].-\n", "output": "416600\n" }, { "input": "-[.<>].[,>,]>++<+].>,<<],,,]++<[<+,,,,[.]<[-[,,]-..+<++].----]++><,+.,>+,+[,-[<.]-+++][-]<+.<\n", "output": "170107\n" }, { "input": "+<.[[<,]<-<[<[-]<<.>]]]<--.<,-++<<<[,<.>+<+[>-,.->,<[>-><<>-<[.,+<][+],>,],],<[[,+.],<,.-,-\n", "output": "7032\n" }, { "input": "[\n", "output": "14\n" }, { "input": "-,,....<.<-<.[[,]<+-,,+.>].<>[<>,.+]>,,>.>[<>.+<,><,>\n", "output": "474184\n" }, { "input": "<].]->+,.],-][--<.--++\n", "output": "425408\n" }, { "input": ">,>+,-,+<-[[]][-,[<][]>.+]+<].>]+][]][,...<,-,]\n", "output": "586457\n" }, { "input": "]<><]>,>]-]],[,>+[->,,[<-+,.][[++[,+.<[,[-][[>.]<.].+-,,]]+[->]]-][>[].,>.,],,>,]-]]<+[,>>-]+]\n", "output": "283602\n" }, { "input": "-[.<++]-,-]-,[<<+[,-+]+[[...,[-...,<>+[]>][+.],[-[>>-->---+-+]>>><-++]]-++>][,],<[[,+],++<---<[\n", "output": "709697\n" }, { "input": "]\n", "output": "15\n" }, { "input": "].<.<.,++[>--[++[><\n", "output": "983198\n" }, { "input": ",]--++..<>.+.,-[-.],,<++.+<<-+[<,,.,++],>[+>\n", "output": "647820\n" }, { "input": ">..-\n", "output": "36043\n" }, { "input": "<-[>[,.+>-]<-[[]+[.]--<-[[]->[.<<,,.,+[.][].,<<]],,+[.>+.>+-<.-+[-,-<][+,[>[.,.+,[+[]+<-.>-<>\n", "output": "204479\n" } ]
code_contests
python
0
278f8ab18236b70d5ce027f91aa0e93e
This winter is so cold in Nvodsk! A group of n friends decided to buy k bottles of a soft drink called "Take-It-Light" to warm up a bit. Each bottle has l milliliters of the drink. Also they bought c limes and cut each of them into d slices. After that they found p grams of salt. To make a toast, each friend needs nl milliliters of the drink, a slice of lime and np grams of salt. The friends want to make as many toasts as they can, provided they all drink the same amount. How many toasts can each friend make? Input The first and only line contains positive integers n, k, l, c, d, p, nl, np, not exceeding 1000 and no less than 1. The numbers are separated by exactly one space. Output Print a single integer — the number of toasts each friend can make. Examples Input 3 4 5 10 8 100 3 1 Output 2 Input 5 100 10 1 19 90 4 3 Output 3 Input 10 1000 1000 25 23 1 50 1 Output 0 Note A comment to the first sample: Overall the friends have 4 * 5 = 20 milliliters of the drink, it is enough to make 20 / 3 = 6 toasts. The limes are enough for 10 * 8 = 80 toasts and the salt is enough for 100 / 1 = 100 toasts. However, there are 3 friends in the group, so the answer is min(6, 80, 100) / 3 = 2. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
party = list(map(int, input().split())) friends, bottles, ml, limes, lime_slices, salt, friend_ml, friend_salt = party total_gas = bottles * ml total_limes = limes * lime_slices rotation_ml = friend_ml * friends q_tosts = -1 while all(x >= 0 for x in (salt, total_gas, total_limes)): total_gas -= rotation_ml total_limes -= friends salt -= friend_salt * friends q_tosts += 1 print(q_tosts)
python
code_algorithm
[ { "input": "3 4 5 10 8 100 3 1\n", "output": "2\n" }, { "input": "5 100 10 1 19 90 4 3\n", "output": "3\n" }, { "input": "10 1000 1000 25 23 1 50 1\n", "output": "0\n" }, { "input": "17 1000 1000 1000 1000 1000 3 7\n", "output": "8\n" }, { "input": "3 5 3 7 6 10 3 1\n", "output": "1\n" }, { "input": "3 4 3 5 3 6 2 1\n", "output": "2\n" }, { "input": "1 6 5 5 5 8 3 1\n", "output": "8\n" }, { "input": "115 1000 1000 1000 1000 1000 17 15\n", "output": "0\n" }, { "input": "2 4 7 3 4 10 2 1\n", "output": "5\n" }, { "input": "1 1000 1000 1000 1000 1000 1 1\n", "output": "1000\n" }, { "input": "2 5 3 5 6 9 2 1\n", "output": "3\n" }, { "input": "1 7 3 5 3 6 2 1\n", "output": "6\n" }, { "input": "1 7 5 3 3 9 2 1\n", "output": "9\n" }, { "input": "1 4 5 5 3 10 3 1\n", "output": "6\n" }, { "input": "1 587 981 1 2 1 1 1\n", "output": "1\n" }, { "input": "2 4 5 4 5 7 3 2\n", "output": "1\n" }, { "input": "1 7 5 5 5 5 2 2\n", "output": "2\n" }, { "input": "1 4 6 7 3 5 1 3\n", "output": "1\n" }, { "input": "1 7 4 5 5 8 3 2\n", "output": "4\n" }, { "input": "2 6 4 5 6 5 1 3\n", "output": "0\n" }, { "input": "2 6 5 3 3 8 1 1\n", "output": "4\n" }, { "input": "2 3 7 6 5 9 3 1\n", "output": "3\n" }, { "input": "1 5 5 4 7 6 3 1\n", "output": "6\n" }, { "input": "1 1 2 1 2 2 1 1\n", "output": "2\n" }, { "input": "2 3 6 5 7 8 2 1\n", "output": "4\n" }, { "input": "3 6 3 5 3 6 3 1\n", "output": "2\n" }, { "input": "2 3 3 5 5 10 1 3\n", "output": "1\n" } ]
code_contests
python
0.4
d23b92d2f3d43ed1244f183b9ee9f972
Polycarpus is an amateur programmer. Now he is analyzing a friend's program. He has already found there the function rangeIncrement(l, r), that adds 1 to each element of some array a for all indexes in the segment [l, r]. In other words, this function does the following: function rangeIncrement(l, r) for i := l .. r do a[i] = a[i] + 1 Polycarpus knows the state of the array a after a series of function calls. He wants to determine the minimum number of function calls that lead to such state. In addition, he wants to find what function calls are needed in this case. It is guaranteed that the required number of calls does not exceed 105. Before calls of function rangeIncrement(l, r) all array elements equal zero. Input The first input line contains a single integer n (1 ≤ n ≤ 105) — the length of the array a[1... n]. The second line contains its integer space-separated elements, a[1], a[2], ..., a[n] (0 ≤ a[i] ≤ 105) after some series of function calls rangeIncrement(l, r). It is guaranteed that at least one element of the array is positive. It is guaranteed that the answer contains no more than 105 calls of function rangeIncrement(l, r). Output Print on the first line t — the minimum number of calls of function rangeIncrement(l, r), that lead to the array from the input data. It is guaranteed that this number will turn out not more than 105. Then print t lines — the descriptions of function calls, one per line. Each line should contain two integers li, ri (1 ≤ li ≤ ri ≤ n) — the arguments of the i-th call rangeIncrement(l, r). Calls can be applied in any order. If there are multiple solutions, you are allowed to print any of them. Examples Input 6 1 2 1 1 4 1 Output 5 2 2 5 5 5 5 5 5 1 6 Input 5 1 0 1 0 1 Output 3 1 1 3 3 5 5 Note The first sample requires a call for the entire array, and four additional calls: * one for the segment [2,2] (i.e. the second element of the array), * three for the segment [5,5] (i.e. the fifth element of the array). Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n = int(input()) big = 10 ** 5 last = (big + 1) * [ -1 ] data = list(map(int, input().split())) data.insert(0, 0) data.append(0) result = [] previous = 0 for pos, current in enumerate(data): if current > previous: for x in range(previous + 1, current + 1): last[x] = pos elif current < previous: for x in range(previous, current, -1): result.append('%d %d' % (last[x], pos - 1)) previous = current print(len(result)) print('\n'.join(result))
python
code_algorithm
[ { "input": "6\n1 2 1 1 4 1\n", "output": "5\n2 2\n5 5\n5 5\n5 5\n1 6\n" }, { "input": "5\n1 0 1 0 1\n", "output": "3\n1 1\n3 3\n5 5\n" }, { "input": "2\n2 1\n", "output": "2\n1 1\n1 2\n" }, { "input": "3\n2 4 2\n", "output": "4\n2 2\n2 2\n1 3\n1 3\n" }, { "input": "2\n1 1\n", "output": "1\n1 2\n" }, { "input": "3\n1 1 1\n", "output": "1\n1 3\n" }, { "input": "20\n1 6 8 9 10 10 11 11 10 10 9 6 6 6 6 4 3 2 1 0\n", "output": "11\n7 8\n5 10\n4 11\n3 11\n3 11\n2 15\n2 15\n2 16\n2 17\n2 18\n1 19\n" }, { "input": "3\n0 2 1\n", "output": "2\n2 2\n2 3\n" }, { "input": "3\n2 2 1\n", "output": "2\n1 2\n1 3\n" }, { "input": "2\n2 4\n", "output": "4\n2 2\n2 2\n1 2\n1 2\n" }, { "input": "2\n1 3\n", "output": "3\n2 2\n2 2\n1 2\n" }, { "input": "1\n1\n", "output": "1\n1 1\n" }, { "input": "5\n1 0 2 1 0\n", "output": "3\n1 1\n3 3\n3 4\n" }, { "input": "20\n2 2 4 5 5 6 7 6 5 5 7 6 4 3 3 3 3 3 3 1\n", "output": "9\n7 7\n6 8\n11 11\n11 12\n4 12\n3 13\n3 19\n1 19\n1 20\n" }, { "input": "5\n1 1 0 0 0\n", "output": "1\n1 2\n" }, { "input": "5\n1 2 3 4 5\n", "output": "5\n5 5\n4 5\n3 5\n2 5\n1 5\n" }, { "input": "12\n0 1 1 1 3 4 3 3 3 3 2 2\n", "output": "4\n6 6\n5 10\n5 12\n2 12\n" }, { "input": "20\n4 5 4 4 3 2 2 1 2 2 2 3 3 4 2 2 2 1 1 1\n", "output": "8\n2 2\n1 4\n1 5\n1 7\n14 14\n12 14\n9 17\n1 20\n" }, { "input": "5\n0 0 1 1 0\n", "output": "1\n3 4\n" }, { "input": "20\n5 9 11 12 13 13 13 13 13 13 13 13 13 13 12 11 11 8 6 4\n", "output": "13\n5 14\n4 15\n3 17\n3 17\n2 17\n2 18\n2 18\n2 19\n1 19\n1 20\n1 20\n1 20\n1 20\n" }, { "input": "20\n4 6 7 8 8 8 9 9 10 12 12 11 12 12 11 9 8 8 5 2\n", "output": "13\n10 11\n13 14\n10 15\n9 15\n7 16\n4 18\n3 18\n2 18\n2 19\n1 19\n1 19\n1 20\n1 20\n" }, { "input": "5\n2 1 2 3 3\n", "output": "4\n1 1\n4 5\n3 5\n1 5\n" } ]
code_contests
python
0
5893c4d76637f001b72d452ff267ed5d
Petya and Vasya are tossing a coin. Their friend Valera is appointed as a judge. The game is very simple. First Vasya tosses a coin x times, then Petya tosses a coin y times. If the tossing player gets head, he scores one point. If he gets tail, nobody gets any points. The winner is the player with most points by the end of the game. If boys have the same number of points, the game finishes with a draw. At some point, Valera lost his count, and so he can not say exactly what the score is at the end of the game. But there are things he remembers for sure. He remembers that the entire game Vasya got heads at least a times, and Petya got heads at least b times. Moreover, he knows that the winner of the game was Vasya. Valera wants to use this information to know every possible outcome of the game, which do not contradict his memories. Input The single line contains four integers x, y, a, b (1 ≤ a ≤ x ≤ 100, 1 ≤ b ≤ y ≤ 100). The numbers on the line are separated by a space. Output In the first line print integer n — the number of possible outcomes of the game. Then on n lines print the outcomes. On the i-th line print a space-separated pair of integers ci, di — the number of heads Vasya and Petya got in the i-th outcome of the game, correspondingly. Print pairs of integers (ci, di) in the strictly increasing order. Let us remind you that the pair of numbers (p1, q1) is less than the pair of numbers (p2, q2), if p1 < p2, or p1 = p2 and also q1 < q2. Examples Input 3 2 1 1 Output 3 2 1 3 1 3 2 Input 2 4 2 2 Output 0 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
x, y, a, b = map(int, input().split()) ans = [] for x1 in range(a,x+1): if x1<=b: continue for y1 in range(b,y+1): if x1>y1 and x1>=a and y1>=b: ans.append((x1,y1)) print(len(ans)) for x in ans: print(*x)
python
code_algorithm
[ { "input": "3 2 1 1\n", "output": "3\n2 1\n3 1\n3 2\n" }, { "input": "2 4 2 2\n", "output": "0\n" }, { "input": "4 5 2 3\n", "output": "1\n4 3\n" }, { "input": "9 7 4 7\n", "output": "2\n8 7\n9 7\n" }, { "input": "99 100 20 7\n", "output": "4200\n20 7\n20 8\n20 9\n20 10\n20 11\n20 12\n20 13\n20 14\n20 15\n20 16\n20 17\n20 18\n20 19\n21 7\n21 8\n21 9\n21 10\n21 11\n21 12\n21 13\n21 14\n21 15\n21 16\n21 17\n21 18\n21 19\n21 20\n22 7\n22 8\n22 9\n22 10\n22 11\n22 12\n22 13\n22 14\n22 15\n22 16\n22 17\n22 18\n22 19\n22 20\n22 21\n23 7\n23 8\n23 9\n23 10\n23 11\n23 12\n23 13\n23 14\n23 15\n23 16\n23 17\n23 18\n23 19\n23 20\n23 21\n23 22\n24 7\n24 8\n24 9\n24 10\n24 11\n24 12\n24 13\n24 14\n24 15\n24 16\n24 17\n24 18\n24 19\n24 20\n24 21\n24 22\n24 23\n25 7\n25 8\n25 9\n25 10\n25 11\n25 12\n25 13\n25 14\n25 15\n25 16\n25 17\n25 18\n25 19\n25 20\n25 21\n25 22\n25 23\n25 24\n26 7\n26 8\n26 9\n26 10\n26 11\n26 12\n26 13\n26 14\n26 15\n26 16\n26 17\n26 18\n26 19\n26 20\n26 21\n26 22\n26 23\n26 24\n26 25\n27 7\n27 8\n27 9\n27 10\n27 11\n27 12\n27 13\n27 14\n27 15\n27 16\n27 17\n27 18\n27 19\n27 20\n27 21\n27 22\n27 23\n27 24\n27 25\n27 26\n28 7\n28 8\n28 9\n28 10\n28 11\n28 12\n28 13\n28 14\n28 15\n28 16\n28 17\n28 18\n28 19\n28 20\n28 21\n28 22\n28 23\n28 24\n28 25\n28 26\n28 27\n29 7\n29 8\n29 9\n29 10\n29 11\n29 12\n29 13\n29 14\n29 15\n29 16\n29 17\n29 18\n29 19\n29 20\n29 21\n29 22\n29 23\n29 24\n29 25\n29 26\n29 27\n29 28\n30 7\n30 8\n30 9\n30 10\n30 11\n30 12\n30 13\n30 14\n30 15\n30 16\n30 17\n30 18\n30 19\n30 20\n30 21\n30 22\n30 23\n30 24\n30 25\n30 26\n30 27\n30 28\n30 29\n31 7\n31 8\n31 9\n31 10\n31 11\n31 12\n31 13\n31 14\n31 15\n31 16\n31 17\n31 18\n31 19\n31 20\n31 21\n31 22\n31 23\n31 24\n31 25\n31 26\n31 27\n31 28\n31 29\n31 30\n32 7\n32 8\n32 9\n32 10\n32 11\n32 12\n32 13\n32 14\n32 15\n32 16\n32 17\n32 18\n32 19\n32 20\n32 21\n32 22\n32 23\n32 24\n32 25\n32 26\n32 27\n32 28\n32 29\n32 30\n32 31\n33 7\n33 8\n33 9\n33 10\n33 11\n33 12\n33 13\n33 14\n33 15\n33 16\n33 17\n33 18\n33 19\n33 20\n33 21\n33 22\n33 23\n33 24\n33 25\n33 26\n33 27\n33 28\n33 29\n33 30\n33 31\n33 32\n34 7\n34 8\n34 9\n34 10\n34 11\n34 12\n34 13\n34 14\n34 15\n34 16\n34 17\n34 18\n34 19\n34 20\n34 21\n34 22\n34 23\n34 24\n34 25\n34 26\n34 27\n34 28\n34 29\n34 30\n34 31\n34 32\n34 33\n35 7\n35 8\n35 9\n35 10\n35 11\n35 12\n35 13\n35 14\n35 15\n35 16\n35 17\n35 18\n35 19\n35 20\n35 21\n35 22\n35 23\n35 24\n35 25\n35 26\n35 27\n35 28\n35 29\n35 30\n35 31\n35 32\n35 33\n35 34\n36 7\n36 8\n36 9\n36 10\n36 11\n36 12\n36 13\n36 14\n36 15\n36 16\n36 17\n36 18\n36 19\n36 20\n36 21\n36 22\n36 23\n36 24\n36 25\n36 26\n36 27\n36 28\n36 29\n36 30\n36 31\n36 32\n36 33\n36 34\n36 35\n37 7\n37 8\n37 9\n37 10\n37 11\n37 12\n37 13\n37 14\n37 15\n37 16\n37 17\n37 18\n37 19\n37 20\n37 21\n37 22\n37 23\n37 24\n37 25\n37 26\n37 27\n37 28\n37 29\n37 30\n37 31\n37 32\n37 33\n37 34\n37 35\n37 36\n38 7\n38 8\n38 9\n38 10\n38 11\n38 12\n38 13\n38 14\n38 15\n38 16\n38 17\n38 18\n38 19\n38 20\n38 21\n38 22\n38 23\n38 24\n38 25\n38 26\n38 27\n38 28\n38 29\n38 30\n38 31\n38 32\n38 33\n38 34\n38 35\n38 36\n38 37\n39 7\n39 8\n39 9\n39 10\n39 11\n39 12\n39 13\n39 14\n39 15\n39 16\n39 17\n39 18\n39 19\n39 20\n39 21\n39 22\n39 23\n39 24\n39 25\n39 26\n39 27\n39 28\n39 29\n39 30\n39 31\n39 32\n39 33\n39 34\n39 35\n39 36\n39 37\n39 38\n40 7\n40 8\n40 9\n40 10\n40 11\n40 12\n40 13\n40 14\n40 15\n40 16\n40 17\n40 18\n40 19\n40 20\n40 21\n40 22\n40 23\n40 24\n40 25\n40 26\n40 27\n40 28\n40 29\n40 30\n40 31\n40 32\n40 33\n40 34\n40 35\n40 36\n40 37\n40 38\n40 39\n41 7\n41 8\n41 9\n41 10\n41 11\n41 12\n41 13\n41 14\n41 15\n41 16\n41 17\n41 18\n41 19\n41 20\n41 21\n41 22\n41 23\n41 24\n41 25\n41 26\n41 27\n41 28\n41 29\n41 30\n41 31\n41 32\n41 33\n41 34\n41 35\n41 36\n41 37\n41 38\n41 39\n41 40\n42 7\n42 8\n42 9\n42 10\n42 11\n42 12\n42 13\n42 14\n42 15\n42 16\n42 17\n42 18\n42 19\n42 20\n42 21\n42 22\n42 23\n42 24\n42 25\n42 26\n42 27\n42 28\n42 29\n42 30\n42 31\n42 32\n42 33\n42 34\n42 35\n42 36\n42 37\n42 38\n42 39\n42 40\n42 41\n43 7\n43 8\n43 9\n43 10\n43 11\n43 12\n43 13\n43 14\n43 15\n43 16\n43 17\n43 18\n43 19\n43 20\n43 21\n43 22\n43 23\n43 24\n43 25\n43 26\n43 27\n43 28\n43 29\n43 30\n43 31\n43 32\n43 33\n43 34\n43 35\n43 36\n43 37\n43 38\n43 39\n43 40\n43 41\n43 42\n44 7\n44 8\n44 9\n44 10\n44 11\n44 12\n44 13\n44 14\n44 15\n44 16\n44 17\n44 18\n44 19\n44 20\n44 21\n44 22\n44 23\n44 24\n44 25\n44 26\n44 27\n44 28\n44 29\n44 30\n44 31\n44 32\n44 33\n44 34\n44 35\n44 36\n44 37\n44 38\n44 39\n44 40\n44 41\n44 42\n44 43\n45 7\n45 8\n45 9\n45 10\n45 11\n45 12\n45 13\n45 14\n45 15\n45 16\n45 17\n45 18\n45 19\n45 20\n45 21\n45 22\n45 23\n45 24\n45 25\n45 26\n45 27\n45 28\n45 29\n45 30\n45 31\n45 32\n45 33\n45 34\n45 35\n45 36\n45 37\n45 38\n45 39\n45 40\n45 41\n45 42\n45 43\n45 44\n46 7\n46 8\n46 9\n46 10\n46 11\n46 12\n46 13\n46 14\n46 15\n46 16\n46 17\n46 18\n46 19\n46 20\n46 21\n46 22\n46 23\n46 24\n46 25\n46 26\n46 27\n46 28\n46 29\n46 30\n46 31\n46 32\n46 33\n46 34\n46 35\n46 36\n46 37\n46 38\n46 39\n46 40\n46 41\n46 42\n46 43\n46 44\n46 45\n47 7\n47 8\n47 9\n47 10\n47 11\n47 12\n47 13\n47 14\n47 15\n47 16\n47 17\n47 18\n47 19\n47 20\n47 21\n47 22\n47 23\n47 24\n47 25\n47 26\n47 27\n47 28\n47 29\n47 30\n47 31\n47 32\n47 33\n47 34\n47 35\n47 36\n47 37\n47 38\n47 39\n47 40\n47 41\n47 42\n47 43\n47 44\n47 45\n47 46\n48 7\n48 8\n48 9\n48 10\n48 11\n48 12\n48 13\n48 14\n48 15\n48 16\n48 17\n48 18\n48 19\n48 20\n48 21\n48 22\n48 23\n48 24\n48 25\n48 26\n48 27\n48 28\n48 29\n48 30\n48 31\n48 32\n48 33\n48 34\n48 35\n48 36\n48 37\n48 38\n48 39\n48 40\n48 41\n48 42\n48 43\n48 44\n48 45\n48 46\n48 47\n49 7\n49 8\n49 9\n49 10\n49 11\n49 12\n49 13\n49 14\n49 15\n49 16\n49 17\n49 18\n49 19\n49 20\n49 21\n49 22\n49 23\n49 24\n49 25\n49 26\n49 27\n49 28\n49 29\n49 30\n49 31\n49 32\n49 33\n49 34\n49 35\n49 36\n49 37\n49 38\n49 39\n49 40\n49 41\n49 42\n49 43\n49 44\n49 45\n49 46\n49 47\n49 48\n50 7\n50 8\n50 9\n50 10\n50 11\n50 12\n50 13\n50 14\n50 15\n50 16\n50 17\n50 18\n50 19\n50 20\n50 21\n50 22\n50 23\n50 24\n50 25\n50 26\n50 27\n50 28\n50 29\n50 30\n50 31\n50 32\n50 33\n50 34\n50 35\n50 36\n50 37\n50 38\n50 39\n50 40\n50 41\n50 42\n50 43\n50 44\n50 45\n50 46\n50 47\n50 48\n50 49\n51 7\n51 8\n51 9\n51 10\n51 11\n51 12\n51 13\n51 14\n51 15\n51 16\n51 17\n51 18\n51 19\n51 20\n51 21\n51 22\n51 23\n51 24\n51 25\n51 26\n51 27\n51 28\n51 29\n51 30\n51 31\n51 32\n51 33\n51 34\n51 35\n51 36\n51 37\n51 38\n51 39\n51 40\n51 41\n51 42\n51 43\n51 44\n51 45\n51 46\n51 47\n51 48\n51 49\n51 50\n52 7\n52 8\n52 9\n52 10\n52 11\n52 12\n52 13\n52 14\n52 15\n52 16\n52 17\n52 18\n52 19\n52 20\n52 21\n52 22\n52 23\n52 24\n52 25\n52 26\n52 27\n52 28\n52 29\n52 30\n52 31\n52 32\n52 33\n52 34\n52 35\n52 36\n52 37\n52 38\n52 39\n52 40\n52 41\n52 42\n52 43\n52 44\n52 45\n52 46\n52 47\n52 48\n52 49\n52 50\n52 51\n53 7\n53 8\n53 9\n53 10\n53 11\n53 12\n53 13\n53 14\n53 15\n53 16\n53 17\n53 18\n53 19\n53 20\n53 21\n53 22\n53 23\n53 24\n53 25\n53 26\n53 27\n53 28\n53 29\n53 30\n53 31\n53 32\n53 33\n53 34\n53 35\n53 36\n53 37\n53 38\n53 39\n53 40\n53 41\n53 42\n53 43\n53 44\n53 45\n53 46\n53 47\n53 48\n53 49\n53 50\n53 51\n53 52\n54 7\n54 8\n54 9\n54 10\n54 11\n54 12\n54 13\n54 14\n54 15\n54 16\n54 17\n54 18\n54 19\n54 20\n54 21\n54 22\n54 23\n54 24\n54 25\n54 26\n54 27\n54 28\n54 29\n54 30\n54 31\n54 32\n54 33\n54 34\n54 35\n54 36\n54 37\n54 38\n54 39\n54 40\n54 41\n54 42\n54 43\n54 44\n54 45\n54 46\n54 47\n54 48\n54 49\n54 50\n54 51\n54 52\n54 53\n55 7\n55 8\n55 9\n55 10\n55 11\n55 12\n55 13\n55 14\n55 15\n55 16\n55 17\n55 18\n55 19\n55 20\n55 21\n55 22\n55 23\n55 24\n55 25\n55 26\n55 27\n55 28\n55 29\n55 30\n55 31\n55 32\n55 33\n55 34\n55 35\n55 36\n55 37\n55 38\n55 39\n55 40\n55 41\n55 42\n55 43\n55 44\n55 45\n55 46\n55 47\n55 48\n55 49\n55 50\n55 51\n55 52\n55 53\n55 54\n56 7\n56 8\n56 9\n56 10\n56 11\n56 12\n56 13\n56 14\n56 15\n56 16\n56 17\n56 18\n56 19\n56 20\n56 21\n56 22\n56 23\n56 24\n56 25\n56 26\n56 27\n56 28\n56 29\n56 30\n56 31\n56 32\n56 33\n56 34\n56 35\n56 36\n56 37\n56 38\n56 39\n56 40\n56 41\n56 42\n56 43\n56 44\n56 45\n56 46\n56 47\n56 48\n56 49\n56 50\n56 51\n56 52\n56 53\n56 54\n56 55\n57 7\n57 8\n57 9\n57 10\n57 11\n57 12\n57 13\n57 14\n57 15\n57 16\n57 17\n57 18\n57 19\n57 20\n57 21\n57 22\n57 23\n57 24\n57 25\n57 26\n57 27\n57 28\n57 29\n57 30\n57 31\n57 32\n57 33\n57 34\n57 35\n57 36\n57 37\n57 38\n57 39\n57 40\n57 41\n57 42\n57 43\n57 44\n57 45\n57 46\n57 47\n57 48\n57 49\n57 50\n57 51\n57 52\n57 53\n57 54\n57 55\n57 56\n58 7\n58 8\n58 9\n58 10\n58 11\n58 12\n58 13\n58 14\n58 15\n58 16\n58 17\n58 18\n58 19\n58 20\n58 21\n58 22\n58 23\n58 24\n58 25\n58 26\n58 27\n58 28\n58 29\n58 30\n58 31\n58 32\n58 33\n58 34\n58 35\n58 36\n58 37\n58 38\n58 39\n58 40\n58 41\n58 42\n58 43\n58 44\n58 45\n58 46\n58 47\n58 48\n58 49\n58 50\n58 51\n58 52\n58 53\n58 54\n58 55\n58 56\n58 57\n59 7\n59 8\n59 9\n59 10\n59 11\n59 12\n59 13\n59 14\n59 15\n59 16\n59 17\n59 18\n59 19\n59 20\n59 21\n59 22\n59 23\n59 24\n59 25\n59 26\n59 27\n59 28\n59 29\n59 30\n59 31\n59 32\n59 33\n59 34\n59 35\n59 36\n59 37\n59 38\n59 39\n59 40\n59 41\n59 42\n59 43\n59 44\n59 45\n59 46\n59 47\n59 48\n59 49\n59 50\n59 51\n59 52\n59 53\n59 54\n59 55\n59 56\n59 57\n59 58\n60 7\n60 8\n60 9\n60 10\n60 11\n60 12\n60 13\n60 14\n60 15\n60 16\n60 17\n60 18\n60 19\n60 20\n60 21\n60 22\n60 23\n60 24\n60 25\n60 26\n60 27\n60 28\n60 29\n60 30\n60 31\n60 32\n60 33\n60 34\n60 35\n60 36\n60 37\n60 38\n60 39\n60 40\n60 41\n60 42\n60 43\n60 44\n60 45\n60 46\n60 47\n60 48\n60 49\n60 50\n60 51\n60 52\n60 53\n60 54\n60 55\n60 56\n60 57\n60 58\n60 59\n61 7\n61 8\n61 9\n61 10\n61 11\n61 12\n61 13\n61 14\n61 15\n61 16\n61 17\n61 18\n61 19\n61 20\n61 21\n61 22\n61 23\n61 24\n61 25\n61 26\n61 27\n61 28\n61 29\n61 30\n61 31\n61 32\n61 33\n61 34\n61 35\n61 36\n61 37\n61 38\n61 39\n61 40\n61 41\n61 42\n61 43\n61 44\n61 45\n61 46\n61 47\n61 48\n61 49\n61 50\n61 51\n61 52\n61 53\n61 54\n61 55\n61 56\n61 57\n61 58\n61 59\n61 60\n62 7\n62 8\n62 9\n62 10\n62 11\n62 12\n62 13\n62 14\n62 15\n62 16\n62 17\n62 18\n62 19\n62 20\n62 21\n62 22\n62 23\n62 24\n62 25\n62 26\n62 27\n62 28\n62 29\n62 30\n62 31\n62 32\n62 33\n62 34\n62 35\n62 36\n62 37\n62 38\n62 39\n62 40\n62 41\n62 42\n62 43\n62 44\n62 45\n62 46\n62 47\n62 48\n62 49\n62 50\n62 51\n62 52\n62 53\n62 54\n62 55\n62 56\n62 57\n62 58\n62 59\n62 60\n62 61\n63 7\n63 8\n63 9\n63 10\n63 11\n63 12\n63 13\n63 14\n63 15\n63 16\n63 17\n63 18\n63 19\n63 20\n63 21\n63 22\n63 23\n63 24\n63 25\n63 26\n63 27\n63 28\n63 29\n63 30\n63 31\n63 32\n63 33\n63 34\n63 35\n63 36\n63 37\n63 38\n63 39\n63 40\n63 41\n63 42\n63 43\n63 44\n63 45\n63 46\n63 47\n63 48\n63 49\n63 50\n63 51\n63 52\n63 53\n63 54\n63 55\n63 56\n63 57\n63 58\n63 59\n63 60\n63 61\n63 62\n64 7\n64 8\n64 9\n64 10\n64 11\n64 12\n64 13\n64 14\n64 15\n64 16\n64 17\n64 18\n64 19\n64 20\n64 21\n64 22\n64 23\n64 24\n64 25\n64 26\n64 27\n64 28\n64 29\n64 30\n64 31\n64 32\n64 33\n64 34\n64 35\n64 36\n64 37\n64 38\n64 39\n64 40\n64 41\n64 42\n64 43\n64 44\n64 45\n64 46\n64 47\n64 48\n64 49\n64 50\n64 51\n64 52\n64 53\n64 54\n64 55\n64 56\n64 57\n64 58\n64 59\n64 60\n64 61\n64 62\n64 63\n65 7\n65 8\n65 9\n65 10\n65 11\n65 12\n65 13\n65 14\n65 15\n65 16\n65 17\n65 18\n65 19\n65 20\n65 21\n65 22\n65 23\n65 24\n65 25\n65 26\n65 27\n65 28\n65 29\n65 30\n65 31\n65 32\n65 33\n65 34\n65 35\n65 36\n65 37\n65 38\n65 39\n65 40\n65 41\n65 42\n65 43\n65 44\n65 45\n65 46\n65 47\n65 48\n65 49\n65 50\n65 51\n65 52\n65 53\n65 54\n65 55\n65 56\n65 57\n65 58\n65 59\n65 60\n65 61\n65 62\n65 63\n65 64\n66 7\n66 8\n66 9\n66 10\n66 11\n66 12\n66 13\n66 14\n66 15\n66 16\n66 17\n66 18\n66 19\n66 20\n66 21\n66 22\n66 23\n66 24\n66 25\n66 26\n66 27\n66 28\n66 29\n66 30\n66 31\n66 32\n66 33\n66 34\n66 35\n66 36\n66 37\n66 38\n66 39\n66 40\n66 41\n66 42\n66 43\n66 44\n66 45\n66 46\n66 47\n66 48\n66 49\n66 50\n66 51\n66 52\n66 53\n66 54\n66 55\n66 56\n66 57\n66 58\n66 59\n66 60\n66 61\n66 62\n66 63\n66 64\n66 65\n67 7\n67 8\n67 9\n67 10\n67 11\n67 12\n67 13\n67 14\n67 15\n67 16\n67 17\n67 18\n67 19\n67 20\n67 21\n67 22\n67 23\n67 24\n67 25\n67 26\n67 27\n67 28\n67 29\n67 30\n67 31\n67 32\n67 33\n67 34\n67 35\n67 36\n67 37\n67 38\n67 39\n67 40\n67 41\n67 42\n67 43\n67 44\n67 45\n67 46\n67 47\n67 48\n67 49\n67 50\n67 51\n67 52\n67 53\n67 54\n67 55\n67 56\n67 57\n67 58\n67 59\n67 60\n67 61\n67 62\n67 63\n67 64\n67 65\n67 66\n68 7\n68 8\n68 9\n68 10\n68 11\n68 12\n68 13\n68 14\n68 15\n68 16\n68 17\n68 18\n68 19\n68 20\n68 21\n68 22\n68 23\n68 24\n68 25\n68 26\n68 27\n68 28\n68 29\n68 30\n68 31\n68 32\n68 33\n68 34\n68 35\n68 36\n68 37\n68 38\n68 39\n68 40\n68 41\n68 42\n68 43\n68 44\n68 45\n68 46\n68 47\n68 48\n68 49\n68 50\n68 51\n68 52\n68 53\n68 54\n68 55\n68 56\n68 57\n68 58\n68 59\n68 60\n68 61\n68 62\n68 63\n68 64\n68 65\n68 66\n68 67\n69 7\n69 8\n69 9\n69 10\n69 11\n69 12\n69 13\n69 14\n69 15\n69 16\n69 17\n69 18\n69 19\n69 20\n69 21\n69 22\n69 23\n69 24\n69 25\n69 26\n69 27\n69 28\n69 29\n69 30\n69 31\n69 32\n69 33\n69 34\n69 35\n69 36\n69 37\n69 38\n69 39\n69 40\n69 41\n69 42\n69 43\n69 44\n69 45\n69 46\n69 47\n69 48\n69 49\n69 50\n69 51\n69 52\n69 53\n69 54\n69 55\n69 56\n69 57\n69 58\n69 59\n69 60\n69 61\n69 62\n69 63\n69 64\n69 65\n69 66\n69 67\n69 68\n70 7\n70 8\n70 9\n70 10\n70 11\n70 12\n70 13\n70 14\n70 15\n70 16\n70 17\n70 18\n70 19\n70 20\n70 21\n70 22\n70 23\n70 24\n70 25\n70 26\n70 27\n70 28\n70 29\n70 30\n70 31\n70 32\n70 33\n70 34\n70 35\n70 36\n70 37\n70 38\n70 39\n70 40\n70 41\n70 42\n70 43\n70 44\n70 45\n70 46\n70 47\n70 48\n70 49\n70 50\n70 51\n70 52\n70 53\n70 54\n70 55\n70 56\n70 57\n70 58\n70 59\n70 60\n70 61\n70 62\n70 63\n70 64\n70 65\n70 66\n70 67\n70 68\n70 69\n71 7\n71 8\n71 9\n71 10\n71 11\n71 12\n71 13\n71 14\n71 15\n71 16\n71 17\n71 18\n71 19\n71 20\n71 21\n71 22\n71 23\n71 24\n71 25\n71 26\n71 27\n71 28\n71 29\n71 30\n71 31\n71 32\n71 33\n71 34\n71 35\n71 36\n71 37\n71 38\n71 39\n71 40\n71 41\n71 42\n71 43\n71 44\n71 45\n71 46\n71 47\n71 48\n71 49\n71 50\n71 51\n71 52\n71 53\n71 54\n71 55\n71 56\n71 57\n71 58\n71 59\n71 60\n71 61\n71 62\n71 63\n71 64\n71 65\n71 66\n71 67\n71 68\n71 69\n71 70\n72 7\n72 8\n72 9\n72 10\n72 11\n72 12\n72 13\n72 14\n72 15\n72 16\n72 17\n72 18\n72 19\n72 20\n72 21\n72 22\n72 23\n72 24\n72 25\n72 26\n72 27\n72 28\n72 29\n72 30\n72 31\n72 32\n72 33\n72 34\n72 35\n72 36\n72 37\n72 38\n72 39\n72 40\n72 41\n72 42\n72 43\n72 44\n72 45\n72 46\n72 47\n72 48\n72 49\n72 50\n72 51\n72 52\n72 53\n72 54\n72 55\n72 56\n72 57\n72 58\n72 59\n72 60\n72 61\n72 62\n72 63\n72 64\n72 65\n72 66\n72 67\n72 68\n72 69\n72 70\n72 71\n73 7\n73 8\n73 9\n73 10\n73 11\n73 12\n73 13\n73 14\n73 15\n73 16\n73 17\n73 18\n73 19\n73 20\n73 21\n73 22\n73 23\n73 24\n73 25\n73 26\n73 27\n73 28\n73 29\n73 30\n73 31\n73 32\n73 33\n73 34\n73 35\n73 36\n73 37\n73 38\n73 39\n73 40\n73 41\n73 42\n73 43\n73 44\n73 45\n73 46\n73 47\n73 48\n73 49\n73 50\n73 51\n73 52\n73 53\n73 54\n73 55\n73 56\n73 57\n73 58\n73 59\n73 60\n73 61\n73 62\n73 63\n73 64\n73 65\n73 66\n73 67\n73 68\n73 69\n73 70\n73 71\n73 72\n74 7\n74 8\n74 9\n74 10\n74 11\n74 12\n74 13\n74 14\n74 15\n74 16\n74 17\n74 18\n74 19\n74 20\n74 21\n74 22\n74 23\n74 24\n74 25\n74 26\n74 27\n74 28\n74 29\n74 30\n74 31\n74 32\n74 33\n74 34\n74 35\n74 36\n74 37\n74 38\n74 39\n74 40\n74 41\n74 42\n74 43\n74 44\n74 45\n74 46\n74 47\n74 48\n74 49\n74 50\n74 51\n74 52\n74 53\n74 54\n74 55\n74 56\n74 57\n74 58\n74 59\n74 60\n74 61\n74 62\n74 63\n74 64\n74 65\n74 66\n74 67\n74 68\n74 69\n74 70\n74 71\n74 72\n74 73\n75 7\n75 8\n75 9\n75 10\n75 11\n75 12\n75 13\n75 14\n75 15\n75 16\n75 17\n75 18\n75 19\n75 20\n75 21\n75 22\n75 23\n75 24\n75 25\n75 26\n75 27\n75 28\n75 29\n75 30\n75 31\n75 32\n75 33\n75 34\n75 35\n75 36\n75 37\n75 38\n75 39\n75 40\n75 41\n75 42\n75 43\n75 44\n75 45\n75 46\n75 47\n75 48\n75 49\n75 50\n75 51\n75 52\n75 53\n75 54\n75 55\n75 56\n75 57\n75 58\n75 59\n75 60\n75 61\n75 62\n75 63\n75 64\n75 65\n75 66\n75 67\n75 68\n75 69\n75 70\n75 71\n75 72\n75 73\n75 74\n76 7\n76 8\n76 9\n76 10\n76 11\n76 12\n76 13\n76 14\n76 15\n76 16\n76 17\n76 18\n76 19\n76 20\n76 21\n76 22\n76 23\n76 24\n76 25\n76 26\n76 27\n76 28\n76 29\n76 30\n76 31\n76 32\n76 33\n76 34\n76 35\n76 36\n76 37\n76 38\n76 39\n76 40\n76 41\n76 42\n76 43\n76 44\n76 45\n76 46\n76 47\n76 48\n76 49\n76 50\n76 51\n76 52\n76 53\n76 54\n76 55\n76 56\n76 57\n76 58\n76 59\n76 60\n76 61\n76 62\n76 63\n76 64\n76 65\n76 66\n76 67\n76 68\n76 69\n76 70\n76 71\n76 72\n76 73\n76 74\n76 75\n77 7\n77 8\n77 9\n77 10\n77 11\n77 12\n77 13\n77 14\n77 15\n77 16\n77 17\n77 18\n77 19\n77 20\n77 21\n77 22\n77 23\n77 24\n77 25\n77 26\n77 27\n77 28\n77 29\n77 30\n77 31\n77 32\n77 33\n77 34\n77 35\n77 36\n77 37\n77 38\n77 39\n77 40\n77 41\n77 42\n77 43\n77 44\n77 45\n77 46\n77 47\n77 48\n77 49\n77 50\n77 51\n77 52\n77 53\n77 54\n77 55\n77 56\n77 57\n77 58\n77 59\n77 60\n77 61\n77 62\n77 63\n77 64\n77 65\n77 66\n77 67\n77 68\n77 69\n77 70\n77 71\n77 72\n77 73\n77 74\n77 75\n77 76\n78 7\n78 8\n78 9\n78 10\n78 11\n78 12\n78 13\n78 14\n78 15\n78 16\n78 17\n78 18\n78 19\n78 20\n78 21\n78 22\n78 23\n78 24\n78 25\n78 26\n78 27\n78 28\n78 29\n78 30\n78 31\n78 32\n78 33\n78 34\n78 35\n78 36\n78 37\n78 38\n78 39\n78 40\n78 41\n78 42\n78 43\n78 44\n78 45\n78 46\n78 47\n78 48\n78 49\n78 50\n78 51\n78 52\n78 53\n78 54\n78 55\n78 56\n78 57\n78 58\n78 59\n78 60\n78 61\n78 62\n78 63\n78 64\n78 65\n78 66\n78 67\n78 68\n78 69\n78 70\n78 71\n78 72\n78 73\n78 74\n78 75\n78 76\n78 77\n79 7\n79 8\n79 9\n79 10\n79 11\n79 12\n79 13\n79 14\n79 15\n79 16\n79 17\n79 18\n79 19\n79 20\n79 21\n79 22\n79 23\n79 24\n79 25\n79 26\n79 27\n79 28\n79 29\n79 30\n79 31\n79 32\n79 33\n79 34\n79 35\n79 36\n79 37\n79 38\n79 39\n79 40\n79 41\n79 42\n79 43\n79 44\n79 45\n79 46\n79 47\n79 48\n79 49\n79 50\n79 51\n79 52\n79 53\n79 54\n79 55\n79 56\n79 57\n79 58\n79 59\n79 60\n79 61\n79 62\n79 63\n79 64\n79 65\n79 66\n79 67\n79 68\n79 69\n79 70\n79 71\n79 72\n79 73\n79 74\n79 75\n79 76\n79 77\n79 78\n80 7\n80 8\n80 9\n80 10\n80 11\n80 12\n80 13\n80 14\n80 15\n80 16\n80 17\n80 18\n80 19\n80 20\n80 21\n80 22\n80 23\n80 24\n80 25\n80 26\n80 27\n80 28\n80 29\n80 30\n80 31\n80 32\n80 33\n80 34\n80 35\n80 36\n80 37\n80 38\n80 39\n80 40\n80 41\n80 42\n80 43\n80 44\n80 45\n80 46\n80 47\n80 48\n80 49\n80 50\n80 51\n80 52\n80 53\n80 54\n80 55\n80 56\n80 57\n80 58\n80 59\n80 60\n80 61\n80 62\n80 63\n80 64\n80 65\n80 66\n80 67\n80 68\n80 69\n80 70\n80 71\n80 72\n80 73\n80 74\n80 75\n80 76\n80 77\n80 78\n80 79\n81 7\n81 8\n81 9\n81 10\n81 11\n81 12\n81 13\n81 14\n81 15\n81 16\n81 17\n81 18\n81 19\n81 20\n81 21\n81 22\n81 23\n81 24\n81 25\n81 26\n81 27\n81 28\n81 29\n81 30\n81 31\n81 32\n81 33\n81 34\n81 35\n81 36\n81 37\n81 38\n81 39\n81 40\n81 41\n81 42\n81 43\n81 44\n81 45\n81 46\n81 47\n81 48\n81 49\n81 50\n81 51\n81 52\n81 53\n81 54\n81 55\n81 56\n81 57\n81 58\n81 59\n81 60\n81 61\n81 62\n81 63\n81 64\n81 65\n81 66\n81 67\n81 68\n81 69\n81 70\n81 71\n81 72\n81 73\n81 74\n81 75\n81 76\n81 77\n81 78\n81 79\n81 80\n82 7\n82 8\n82 9\n82 10\n82 11\n82 12\n82 13\n82 14\n82 15\n82 16\n82 17\n82 18\n82 19\n82 20\n82 21\n82 22\n82 23\n82 24\n82 25\n82 26\n82 27\n82 28\n82 29\n82 30\n82 31\n82 32\n82 33\n82 34\n82 35\n82 36\n82 37\n82 38\n82 39\n82 40\n82 41\n82 42\n82 43\n82 44\n82 45\n82 46\n82 47\n82 48\n82 49\n82 50\n82 51\n82 52\n82 53\n82 54\n82 55\n82 56\n82 57\n82 58\n82 59\n82 60\n82 61\n82 62\n82 63\n82 64\n82 65\n82 66\n82 67\n82 68\n82 69\n82 70\n82 71\n82 72\n82 73\n82 74\n82 75\n82 76\n82 77\n82 78\n82 79\n82 80\n82 81\n83 7\n83 8\n83 9\n83 10\n83 11\n83 12\n83 13\n83 14\n83 15\n83 16\n83 17\n83 18\n83 19\n83 20\n83 21\n83 22\n83 23\n83 24\n83 25\n83 26\n83 27\n83 28\n83 29\n83 30\n83 31\n83 32\n83 33\n83 34\n83 35\n83 36\n83 37\n83 38\n83 39\n83 40\n83 41\n83 42\n83 43\n83 44\n83 45\n83 46\n83 47\n83 48\n83 49\n83 50\n83 51\n83 52\n83 53\n83 54\n83 55\n83 56\n83 57\n83 58\n83 59\n83 60\n83 61\n83 62\n83 63\n83 64\n83 65\n83 66\n83 67\n83 68\n83 69\n83 70\n83 71\n83 72\n83 73\n83 74\n83 75\n83 76\n83 77\n83 78\n83 79\n83 80\n83 81\n83 82\n84 7\n84 8\n84 9\n84 10\n84 11\n84 12\n84 13\n84 14\n84 15\n84 16\n84 17\n84 18\n84 19\n84 20\n84 21\n84 22\n84 23\n84 24\n84 25\n84 26\n84 27\n84 28\n84 29\n84 30\n84 31\n84 32\n84 33\n84 34\n84 35\n84 36\n84 37\n84 38\n84 39\n84 40\n84 41\n84 42\n84 43\n84 44\n84 45\n84 46\n84 47\n84 48\n84 49\n84 50\n84 51\n84 52\n84 53\n84 54\n84 55\n84 56\n84 57\n84 58\n84 59\n84 60\n84 61\n84 62\n84 63\n84 64\n84 65\n84 66\n84 67\n84 68\n84 69\n84 70\n84 71\n84 72\n84 73\n84 74\n84 75\n84 76\n84 77\n84 78\n84 79\n84 80\n84 81\n84 82\n84 83\n85 7\n85 8\n85 9\n85 10\n85 11\n85 12\n85 13\n85 14\n85 15\n85 16\n85 17\n85 18\n85 19\n85 20\n85 21\n85 22\n85 23\n85 24\n85 25\n85 26\n85 27\n85 28\n85 29\n85 30\n85 31\n85 32\n85 33\n85 34\n85 35\n85 36\n85 37\n85 38\n85 39\n85 40\n85 41\n85 42\n85 43\n85 44\n85 45\n85 46\n85 47\n85 48\n85 49\n85 50\n85 51\n85 52\n85 53\n85 54\n85 55\n85 56\n85 57\n85 58\n85 59\n85 60\n85 61\n85 62\n85 63\n85 64\n85 65\n85 66\n85 67\n85 68\n85 69\n85 70\n85 71\n85 72\n85 73\n85 74\n85 75\n85 76\n85 77\n85 78\n85 79\n85 80\n85 81\n85 82\n85 83\n85 84\n86 7\n86 8\n86 9\n86 10\n86 11\n86 12\n86 13\n86 14\n86 15\n86 16\n86 17\n86 18\n86 19\n86 20\n86 21\n86 22\n86 23\n86 24\n86 25\n86 26\n86 27\n86 28\n86 29\n86 30\n86 31\n86 32\n86 33\n86 34\n86 35\n86 36\n86 37\n86 38\n86 39\n86 40\n86 41\n86 42\n86 43\n86 44\n86 45\n86 46\n86 47\n86 48\n86 49\n86 50\n86 51\n86 52\n86 53\n86 54\n86 55\n86 56\n86 57\n86 58\n86 59\n86 60\n86 61\n86 62\n86 63\n86 64\n86 65\n86 66\n86 67\n86 68\n86 69\n86 70\n86 71\n86 72\n86 73\n86 74\n86 75\n86 76\n86 77\n86 78\n86 79\n86 80\n86 81\n86 82\n86 83\n86 84\n86 85\n87 7\n87 8\n87 9\n87 10\n87 11\n87 12\n87 13\n87 14\n87 15\n87 16\n87 17\n87 18\n87 19\n87 20\n87 21\n87 22\n87 23\n87 24\n87 25\n87 26\n87 27\n87 28\n87 29\n87 30\n87 31\n87 32\n87 33\n87 34\n87 35\n87 36\n87 37\n87 38\n87 39\n87 40\n87 41\n87 42\n87 43\n87 44\n87 45\n87 46\n87 47\n87 48\n87 49\n87 50\n87 51\n87 52\n87 53\n87 54\n87 55\n87 56\n87 57\n87 58\n87 59\n87 60\n87 61\n87 62\n87 63\n87 64\n87 65\n87 66\n87 67\n87 68\n87 69\n87 70\n87 71\n87 72\n87 73\n87 74\n87 75\n87 76\n87 77\n87 78\n87 79\n87 80\n87 81\n87 82\n87 83\n87 84\n87 85\n87 86\n88 7\n88 8\n88 9\n88 10\n88 11\n88 12\n88 13\n88 14\n88 15\n88 16\n88 17\n88 18\n88 19\n88 20\n88 21\n88 22\n88 23\n88 24\n88 25\n88 26\n88 27\n88 28\n88 29\n88 30\n88 31\n88 32\n88 33\n88 34\n88 35\n88 36\n88 37\n88 38\n88 39\n88 40\n88 41\n88 42\n88 43\n88 44\n88 45\n88 46\n88 47\n88 48\n88 49\n88 50\n88 51\n88 52\n88 53\n88 54\n88 55\n88 56\n88 57\n88 58\n88 59\n88 60\n88 61\n88 62\n88 63\n88 64\n88 65\n88 66\n88 67\n88 68\n88 69\n88 70\n88 71\n88 72\n88 73\n88 74\n88 75\n88 76\n88 77\n88 78\n88 79\n88 80\n88 81\n88 82\n88 83\n88 84\n88 85\n88 86\n88 87\n89 7\n89 8\n89 9\n89 10\n89 11\n89 12\n89 13\n89 14\n89 15\n89 16\n89 17\n89 18\n89 19\n89 20\n89 21\n89 22\n89 23\n89 24\n89 25\n89 26\n89 27\n89 28\n89 29\n89 30\n89 31\n89 32\n89 33\n89 34\n89 35\n89 36\n89 37\n89 38\n89 39\n89 40\n89 41\n89 42\n89 43\n89 44\n89 45\n89 46\n89 47\n89 48\n89 49\n89 50\n89 51\n89 52\n89 53\n89 54\n89 55\n89 56\n89 57\n89 58\n89 59\n89 60\n89 61\n89 62\n89 63\n89 64\n89 65\n89 66\n89 67\n89 68\n89 69\n89 70\n89 71\n89 72\n89 73\n89 74\n89 75\n89 76\n89 77\n89 78\n89 79\n89 80\n89 81\n89 82\n89 83\n89 84\n89 85\n89 86\n89 87\n89 88\n90 7\n90 8\n90 9\n90 10\n90 11\n90 12\n90 13\n90 14\n90 15\n90 16\n90 17\n90 18\n90 19\n90 20\n90 21\n90 22\n90 23\n90 24\n90 25\n90 26\n90 27\n90 28\n90 29\n90 30\n90 31\n90 32\n90 33\n90 34\n90 35\n90 36\n90 37\n90 38\n90 39\n90 40\n90 41\n90 42\n90 43\n90 44\n90 45\n90 46\n90 47\n90 48\n90 49\n90 50\n90 51\n90 52\n90 53\n90 54\n90 55\n90 56\n90 57\n90 58\n90 59\n90 60\n90 61\n90 62\n90 63\n90 64\n90 65\n90 66\n90 67\n90 68\n90 69\n90 70\n90 71\n90 72\n90 73\n90 74\n90 75\n90 76\n90 77\n90 78\n90 79\n90 80\n90 81\n90 82\n90 83\n90 84\n90 85\n90 86\n90 87\n90 88\n90 89\n91 7\n91 8\n91 9\n91 10\n91 11\n91 12\n91 13\n91 14\n91 15\n91 16\n91 17\n91 18\n91 19\n91 20\n91 21\n91 22\n91 23\n91 24\n91 25\n91 26\n91 27\n91 28\n91 29\n91 30\n91 31\n91 32\n91 33\n91 34\n91 35\n91 36\n91 37\n91 38\n91 39\n91 40\n91 41\n91 42\n91 43\n91 44\n91 45\n91 46\n91 47\n91 48\n91 49\n91 50\n91 51\n91 52\n91 53\n91 54\n91 55\n91 56\n91 57\n91 58\n91 59\n91 60\n91 61\n91 62\n91 63\n91 64\n91 65\n91 66\n91 67\n91 68\n91 69\n91 70\n91 71\n91 72\n91 73\n91 74\n91 75\n91 76\n91 77\n91 78\n91 79\n91 80\n91 81\n91 82\n91 83\n91 84\n91 85\n91 86\n91 87\n91 88\n91 89\n91 90\n92 7\n92 8\n92 9\n92 10\n92 11\n92 12\n92 13\n92 14\n92 15\n92 16\n92 17\n92 18\n92 19\n92 20\n92 21\n92 22\n92 23\n92 24\n92 25\n92 26\n92 27\n92 28\n92 29\n92 30\n92 31\n92 32\n92 33\n92 34\n92 35\n92 36\n92 37\n92 38\n92 39\n92 40\n92 41\n92 42\n92 43\n92 44\n92 45\n92 46\n92 47\n92 48\n92 49\n92 50\n92 51\n92 52\n92 53\n92 54\n92 55\n92 56\n92 57\n92 58\n92 59\n92 60\n92 61\n92 62\n92 63\n92 64\n92 65\n92 66\n92 67\n92 68\n92 69\n92 70\n92 71\n92 72\n92 73\n92 74\n92 75\n92 76\n92 77\n92 78\n92 79\n92 80\n92 81\n92 82\n92 83\n92 84\n92 85\n92 86\n92 87\n92 88\n92 89\n92 90\n92 91\n93 7\n93 8\n93 9\n93 10\n93 11\n93 12\n93 13\n93 14\n93 15\n93 16\n93 17\n93 18\n93 19\n93 20\n93 21\n93 22\n93 23\n93 24\n93 25\n93 26\n93 27\n93 28\n93 29\n93 30\n93 31\n93 32\n93 33\n93 34\n93 35\n93 36\n93 37\n93 38\n93 39\n93 40\n93 41\n93 42\n93 43\n93 44\n93 45\n93 46\n93 47\n93 48\n93 49\n93 50\n93 51\n93 52\n93 53\n93 54\n93 55\n93 56\n93 57\n93 58\n93 59\n93 60\n93 61\n93 62\n93 63\n93 64\n93 65\n93 66\n93 67\n93 68\n93 69\n93 70\n93 71\n93 72\n93 73\n93 74\n93 75\n93 76\n93 77\n93 78\n93 79\n93 80\n93 81\n93 82\n93 83\n93 84\n93 85\n93 86\n93 87\n93 88\n93 89\n93 90\n93 91\n93 92\n94 7\n94 8\n94 9\n94 10\n94 11\n94 12\n94 13\n94 14\n94 15\n94 16\n94 17\n94 18\n94 19\n94 20\n94 21\n94 22\n94 23\n94 24\n94 25\n94 26\n94 27\n94 28\n94 29\n94 30\n94 31\n94 32\n94 33\n94 34\n94 35\n94 36\n94 37\n94 38\n94 39\n94 40\n94 41\n94 42\n94 43\n94 44\n94 45\n94 46\n94 47\n94 48\n94 49\n94 50\n94 51\n94 52\n94 53\n94 54\n94 55\n94 56\n94 57\n94 58\n94 59\n94 60\n94 61\n94 62\n94 63\n94 64\n94 65\n94 66\n94 67\n94 68\n94 69\n94 70\n94 71\n94 72\n94 73\n94 74\n94 75\n94 76\n94 77\n94 78\n94 79\n94 80\n94 81\n94 82\n94 83\n94 84\n94 85\n94 86\n94 87\n94 88\n94 89\n94 90\n94 91\n94 92\n94 93\n95 7\n95 8\n95 9\n95 10\n95 11\n95 12\n95 13\n95 14\n95 15\n95 16\n95 17\n95 18\n95 19\n95 20\n95 21\n95 22\n95 23\n95 24\n95 25\n95 26\n95 27\n95 28\n95 29\n95 30\n95 31\n95 32\n95 33\n95 34\n95 35\n95 36\n95 37\n95 38\n95 39\n95 40\n95 41\n95 42\n95 43\n95 44\n95 45\n95 46\n95 47\n95 48\n95 49\n95 50\n95 51\n95 52\n95 53\n95 54\n95 55\n95 56\n95 57\n95 58\n95 59\n95 60\n95 61\n95 62\n95 63\n95 64\n95 65\n95 66\n95 67\n95 68\n95 69\n95 70\n95 71\n95 72\n95 73\n95 74\n95 75\n95 76\n95 77\n95 78\n95 79\n95 80\n95 81\n95 82\n95 83\n95 84\n95 85\n95 86\n95 87\n95 88\n95 89\n95 90\n95 91\n95 92\n95 93\n95 94\n96 7\n96 8\n96 9\n96 10\n96 11\n96 12\n96 13\n96 14\n96 15\n96 16\n96 17\n96 18\n96 19\n96 20\n96 21\n96 22\n96 23\n96 24\n96 25\n96 26\n96 27\n96 28\n96 29\n96 30\n96 31\n96 32\n96 33\n96 34\n96 35\n96 36\n96 37\n96 38\n96 39\n96 40\n96 41\n96 42\n96 43\n96 44\n96 45\n96 46\n96 47\n96 48\n96 49\n96 50\n96 51\n96 52\n96 53\n96 54\n96 55\n96 56\n96 57\n96 58\n96 59\n96 60\n96 61\n96 62\n96 63\n96 64\n96 65\n96 66\n96 67\n96 68\n96 69\n96 70\n96 71\n96 72\n96 73\n96 74\n96 75\n96 76\n96 77\n96 78\n96 79\n96 80\n96 81\n96 82\n96 83\n96 84\n96 85\n96 86\n96 87\n96 88\n96 89\n96 90\n96 91\n96 92\n96 93\n96 94\n96 95\n97 7\n97 8\n97 9\n97 10\n97 11\n97 12\n97 13\n97 14\n97 15\n97 16\n97 17\n97 18\n97 19\n97 20\n97 21\n97 22\n97 23\n97 24\n97 25\n97 26\n97 27\n97 28\n97 29\n97 30\n97 31\n97 32\n97 33\n97 34\n97 35\n97 36\n97 37\n97 38\n97 39\n97 40\n97 41\n97 42\n97 43\n97 44\n97 45\n97 46\n97 47\n97 48\n97 49\n97 50\n97 51\n97 52\n97 53\n97 54\n97 55\n97 56\n97 57\n97 58\n97 59\n97 60\n97 61\n97 62\n97 63\n97 64\n97 65\n97 66\n97 67\n97 68\n97 69\n97 70\n97 71\n97 72\n97 73\n97 74\n97 75\n97 76\n97 77\n97 78\n97 79\n97 80\n97 81\n97 82\n97 83\n97 84\n97 85\n97 86\n97 87\n97 88\n97 89\n97 90\n97 91\n97 92\n97 93\n97 94\n97 95\n97 96\n98 7\n98 8\n98 9\n98 10\n98 11\n98 12\n98 13\n98 14\n98 15\n98 16\n98 17\n98 18\n98 19\n98 20\n98 21\n98 22\n98 23\n98 24\n98 25\n98 26\n98 27\n98 28\n98 29\n98 30\n98 31\n98 32\n98 33\n98 34\n98 35\n98 36\n98 37\n98 38\n98 39\n98 40\n98 41\n98 42\n98 43\n98 44\n98 45\n98 46\n98 47\n98 48\n98 49\n98 50\n98 51\n98 52\n98 53\n98 54\n98 55\n98 56\n98 57\n98 58\n98 59\n98 60\n98 61\n98 62\n98 63\n98 64\n98 65\n98 66\n98 67\n98 68\n98 69\n98 70\n98 71\n98 72\n98 73\n98 74\n98 75\n98 76\n98 77\n98 78\n98 79\n98 80\n98 81\n98 82\n98 83\n98 84\n98 85\n98 86\n98 87\n98 88\n98 89\n98 90\n98 91\n98 92\n98 93\n98 94\n98 95\n98 96\n98 97\n99 7\n99 8\n99 9\n99 10\n99 11\n99 12\n99 13\n99 14\n99 15\n99 16\n99 17\n99 18\n99 19\n99 20\n99 21\n99 22\n99 23\n99 24\n99 25\n99 26\n99 27\n99 28\n99 29\n99 30\n99 31\n99 32\n99 33\n99 34\n99 35\n99 36\n99 37\n99 38\n99 39\n99 40\n99 41\n99 42\n99 43\n99 44\n99 45\n99 46\n99 47\n99 48\n99 49\n99 50\n99 51\n99 52\n99 53\n99 54\n99 55\n99 56\n99 57\n99 58\n99 59\n99 60\n99 61\n99 62\n99 63\n99 64\n99 65\n99 66\n99 67\n99 68\n99 69\n99 70\n99 71\n99 72\n99 73\n99 74\n99 75\n99 76\n99 77\n99 78\n99 79\n99 80\n99 81\n99 82\n99 83\n99 84\n99 85\n99 86\n99 87\n99 88\n99 89\n99 90\n99 91\n99 92\n99 93\n99 94\n99 95\n99 96\n99 97\n99 98\n" }, { "input": "20 10 1 8\n", "output": "33\n9 8\n10 8\n10 9\n11 8\n11 9\n11 10\n12 8\n12 9\n12 10\n13 8\n13 9\n13 10\n14 8\n14 9\n14 10\n15 8\n15 9\n15 10\n16 8\n16 9\n16 10\n17 8\n17 9\n17 10\n18 8\n18 9\n18 10\n19 8\n19 9\n19 10\n20 8\n20 9\n20 10\n" }, { "input": "80 100 1 50\n", "output": "465\n51 50\n52 50\n52 51\n53 50\n53 51\n53 52\n54 50\n54 51\n54 52\n54 53\n55 50\n55 51\n55 52\n55 53\n55 54\n56 50\n56 51\n56 52\n56 53\n56 54\n56 55\n57 50\n57 51\n57 52\n57 53\n57 54\n57 55\n57 56\n58 50\n58 51\n58 52\n58 53\n58 54\n58 55\n58 56\n58 57\n59 50\n59 51\n59 52\n59 53\n59 54\n59 55\n59 56\n59 57\n59 58\n60 50\n60 51\n60 52\n60 53\n60 54\n60 55\n60 56\n60 57\n60 58\n60 59\n61 50\n61 51\n61 52\n61 53\n61 54\n61 55\n61 56\n61 57\n61 58\n61 59\n61 60\n62 50\n62 51\n62 52\n62 53\n62 54\n62 55\n62 56\n62 57\n62 58\n62 59\n62 60\n62 61\n63 50\n63 51\n63 52\n63 53\n63 54\n63 55\n63 56\n63 57\n63 58\n63 59\n63 60\n63 61\n63 62\n64 50\n64 51\n64 52\n64 53\n64 54\n64 55\n64 56\n64 57\n64 58\n64 59\n64 60\n64 61\n64 62\n64 63\n65 50\n65 51\n65 52\n65 53\n65 54\n65 55\n65 56\n65 57\n65 58\n65 59\n65 60\n65 61\n65 62\n65 63\n65 64\n66 50\n66 51\n66 52\n66 53\n66 54\n66 55\n66 56\n66 57\n66 58\n66 59\n66 60\n66 61\n66 62\n66 63\n66 64\n66 65\n67 50\n67 51\n67 52\n67 53\n67 54\n67 55\n67 56\n67 57\n67 58\n67 59\n67 60\n67 61\n67 62\n67 63\n67 64\n67 65\n67 66\n68 50\n68 51\n68 52\n68 53\n68 54\n68 55\n68 56\n68 57\n68 58\n68 59\n68 60\n68 61\n68 62\n68 63\n68 64\n68 65\n68 66\n68 67\n69 50\n69 51\n69 52\n69 53\n69 54\n69 55\n69 56\n69 57\n69 58\n69 59\n69 60\n69 61\n69 62\n69 63\n69 64\n69 65\n69 66\n69 67\n69 68\n70 50\n70 51\n70 52\n70 53\n70 54\n70 55\n70 56\n70 57\n70 58\n70 59\n70 60\n70 61\n70 62\n70 63\n70 64\n70 65\n70 66\n70 67\n70 68\n70 69\n71 50\n71 51\n71 52\n71 53\n71 54\n71 55\n71 56\n71 57\n71 58\n71 59\n71 60\n71 61\n71 62\n71 63\n71 64\n71 65\n71 66\n71 67\n71 68\n71 69\n71 70\n72 50\n72 51\n72 52\n72 53\n72 54\n72 55\n72 56\n72 57\n72 58\n72 59\n72 60\n72 61\n72 62\n72 63\n72 64\n72 65\n72 66\n72 67\n72 68\n72 69\n72 70\n72 71\n73 50\n73 51\n73 52\n73 53\n73 54\n73 55\n73 56\n73 57\n73 58\n73 59\n73 60\n73 61\n73 62\n73 63\n73 64\n73 65\n73 66\n73 67\n73 68\n73 69\n73 70\n73 71\n73 72\n74 50\n74 51\n74 52\n74 53\n74 54\n74 55\n74 56\n74 57\n74 58\n74 59\n74 60\n74 61\n74 62\n74 63\n74 64\n74 65\n74 66\n74 67\n74 68\n74 69\n74 70\n74 71\n74 72\n74 73\n75 50\n75 51\n75 52\n75 53\n75 54\n75 55\n75 56\n75 57\n75 58\n75 59\n75 60\n75 61\n75 62\n75 63\n75 64\n75 65\n75 66\n75 67\n75 68\n75 69\n75 70\n75 71\n75 72\n75 73\n75 74\n76 50\n76 51\n76 52\n76 53\n76 54\n76 55\n76 56\n76 57\n76 58\n76 59\n76 60\n76 61\n76 62\n76 63\n76 64\n76 65\n76 66\n76 67\n76 68\n76 69\n76 70\n76 71\n76 72\n76 73\n76 74\n76 75\n77 50\n77 51\n77 52\n77 53\n77 54\n77 55\n77 56\n77 57\n77 58\n77 59\n77 60\n77 61\n77 62\n77 63\n77 64\n77 65\n77 66\n77 67\n77 68\n77 69\n77 70\n77 71\n77 72\n77 73\n77 74\n77 75\n77 76\n78 50\n78 51\n78 52\n78 53\n78 54\n78 55\n78 56\n78 57\n78 58\n78 59\n78 60\n78 61\n78 62\n78 63\n78 64\n78 65\n78 66\n78 67\n78 68\n78 69\n78 70\n78 71\n78 72\n78 73\n78 74\n78 75\n78 76\n78 77\n79 50\n79 51\n79 52\n79 53\n79 54\n79 55\n79 56\n79 57\n79 58\n79 59\n79 60\n79 61\n79 62\n79 63\n79 64\n79 65\n79 66\n79 67\n79 68\n79 69\n79 70\n79 71\n79 72\n79 73\n79 74\n79 75\n79 76\n79 77\n79 78\n80 50\n80 51\n80 52\n80 53\n80 54\n80 55\n80 56\n80 57\n80 58\n80 59\n80 60\n80 61\n80 62\n80 63\n80 64\n80 65\n80 66\n80 67\n80 68\n80 69\n80 70\n80 71\n80 72\n80 73\n80 74\n80 75\n80 76\n80 77\n80 78\n80 79\n" }, { "input": "10 20 4 6\n", "output": "10\n7 6\n8 6\n8 7\n9 6\n9 7\n9 8\n10 6\n10 7\n10 8\n10 9\n" }, { "input": "100 100 100 5\n", "output": "95\n100 5\n100 6\n100 7\n100 8\n100 9\n100 10\n100 11\n100 12\n100 13\n100 14\n100 15\n100 16\n100 17\n100 18\n100 19\n100 20\n100 21\n100 22\n100 23\n100 24\n100 25\n100 26\n100 27\n100 28\n100 29\n100 30\n100 31\n100 32\n100 33\n100 34\n100 35\n100 36\n100 37\n100 38\n100 39\n100 40\n100 41\n100 42\n100 43\n100 44\n100 45\n100 46\n100 47\n100 48\n100 49\n100 50\n100 51\n100 52\n100 53\n100 54\n100 55\n100 56\n100 57\n100 58\n100 59\n100 60\n100 61\n100 62\n100 63\n100 64\n100 65\n100 66\n100 67\n100 68\n100 69\n100 70\n100 71\n100 72\n100 73\n100 74\n100 75\n100 76\n100 77\n100 78\n100 79\n100 80\n100 81\n100 82\n100 83\n100 84\n100 85\n100 86\n100 87\n100 88\n100 89\n100 90\n100 91\n100 92\n100 93\n100 94\n100 95\n100 96\n100 97\n100 98\n100 99\n" }, { "input": "70 80 30 80\n", "output": "0\n" }, { "input": "99 100 20 7\n", "output": "4200\n20 7\n20 8\n20 9\n20 10\n20 11\n20 12\n20 13\n20 14\n20 15\n20 16\n20 17\n20 18\n20 19\n21 7\n21 8\n21 9\n21 10\n21 11\n21 12\n21 13\n21 14\n21 15\n21 16\n21 17\n21 18\n21 19\n21 20\n22 7\n22 8\n22 9\n22 10\n22 11\n22 12\n22 13\n22 14\n22 15\n22 16\n22 17\n22 18\n22 19\n22 20\n22 21\n23 7\n23 8\n23 9\n23 10\n23 11\n23 12\n23 13\n23 14\n23 15\n23 16\n23 17\n23 18\n23 19\n23 20\n23 21\n23 22\n24 7\n24 8\n24 9\n24 10\n24 11\n24 12\n24 13\n24 14\n24 15\n24 16\n24 17\n24 18\n24 19\n24 20\n24 21\n24 22\n24 23\n25 7\n25 8\n25 9\n25 10\n25 11\n25 12\n25 13\n25 14\n25 15\n25 16\n25 17\n25 18\n25 19\n25 20\n25 21\n25 22\n25 23\n25 24\n26 7\n26 8\n26 9\n26 10\n26 11\n26 12\n26 13\n26 14\n26 15\n26 16\n26 17\n26 18\n26 19\n26 20\n26 21\n26 22\n26 23\n26 24\n26 25\n27 7\n27 8\n27 9\n27 10\n27 11\n27 12\n27 13\n27 14\n27 15\n27 16\n27 17\n27 18\n27 19\n27 20\n27 21\n27 22\n27 23\n27 24\n27 25\n27 26\n28 7\n28 8\n28 9\n28 10\n28 11\n28 12\n28 13\n28 14\n28 15\n28 16\n28 17\n28 18\n28 19\n28 20\n28 21\n28 22\n28 23\n28 24\n28 25\n28 26\n28 27\n29 7\n29 8\n29 9\n29 10\n29 11\n29 12\n29 13\n29 14\n29 15\n29 16\n29 17\n29 18\n29 19\n29 20\n29 21\n29 22\n29 23\n29 24\n29 25\n29 26\n29 27\n29 28\n30 7\n30 8\n30 9\n30 10\n30 11\n30 12\n30 13\n30 14\n30 15\n30 16\n30 17\n30 18\n30 19\n30 20\n30 21\n30 22\n30 23\n30 24\n30 25\n30 26\n30 27\n30 28\n30 29\n31 7\n31 8\n31 9\n31 10\n31 11\n31 12\n31 13\n31 14\n31 15\n31 16\n31 17\n31 18\n31 19\n31 20\n31 21\n31 22\n31 23\n31 24\n31 25\n31 26\n31 27\n31 28\n31 29\n31 30\n32 7\n32 8\n32 9\n32 10\n32 11\n32 12\n32 13\n32 14\n32 15\n32 16\n32 17\n32 18\n32 19\n32 20\n32 21\n32 22\n32 23\n32 24\n32 25\n32 26\n32 27\n32 28\n32 29\n32 30\n32 31\n33 7\n33 8\n33 9\n33 10\n33 11\n33 12\n33 13\n33 14\n33 15\n33 16\n33 17\n33 18\n33 19\n33 20\n33 21\n33 22\n33 23\n33 24\n33 25\n33 26\n33 27\n33 28\n33 29\n33 30\n33 31\n33 32\n34 7\n34 8\n34 9\n34 10\n34 11\n34 12\n34 13\n34 14\n34 15\n34 16\n34 17\n34 18\n34 19\n34 20\n34 21\n34 22\n34 23\n34 24\n34 25\n34 26\n34 27\n34 28\n34 29\n34 30\n34 31\n34 32\n34 33\n35 7\n35 8\n35 9\n35 10\n35 11\n35 12\n35 13\n35 14\n35 15\n35 16\n35 17\n35 18\n35 19\n35 20\n35 21\n35 22\n35 23\n35 24\n35 25\n35 26\n35 27\n35 28\n35 29\n35 30\n35 31\n35 32\n35 33\n35 34\n36 7\n36 8\n36 9\n36 10\n36 11\n36 12\n36 13\n36 14\n36 15\n36 16\n36 17\n36 18\n36 19\n36 20\n36 21\n36 22\n36 23\n36 24\n36 25\n36 26\n36 27\n36 28\n36 29\n36 30\n36 31\n36 32\n36 33\n36 34\n36 35\n37 7\n37 8\n37 9\n37 10\n37 11\n37 12\n37 13\n37 14\n37 15\n37 16\n37 17\n37 18\n37 19\n37 20\n37 21\n37 22\n37 23\n37 24\n37 25\n37 26\n37 27\n37 28\n37 29\n37 30\n37 31\n37 32\n37 33\n37 34\n37 35\n37 36\n38 7\n38 8\n38 9\n38 10\n38 11\n38 12\n38 13\n38 14\n38 15\n38 16\n38 17\n38 18\n38 19\n38 20\n38 21\n38 22\n38 23\n38 24\n38 25\n38 26\n38 27\n38 28\n38 29\n38 30\n38 31\n38 32\n38 33\n38 34\n38 35\n38 36\n38 37\n39 7\n39 8\n39 9\n39 10\n39 11\n39 12\n39 13\n39 14\n39 15\n39 16\n39 17\n39 18\n39 19\n39 20\n39 21\n39 22\n39 23\n39 24\n39 25\n39 26\n39 27\n39 28\n39 29\n39 30\n39 31\n39 32\n39 33\n39 34\n39 35\n39 36\n39 37\n39 38\n40 7\n40 8\n40 9\n40 10\n40 11\n40 12\n40 13\n40 14\n40 15\n40 16\n40 17\n40 18\n40 19\n40 20\n40 21\n40 22\n40 23\n40 24\n40 25\n40 26\n40 27\n40 28\n40 29\n40 30\n40 31\n40 32\n40 33\n40 34\n40 35\n40 36\n40 37\n40 38\n40 39\n41 7\n41 8\n41 9\n41 10\n41 11\n41 12\n41 13\n41 14\n41 15\n41 16\n41 17\n41 18\n41 19\n41 20\n41 21\n41 22\n41 23\n41 24\n41 25\n41 26\n41 27\n41 28\n41 29\n41 30\n41 31\n41 32\n41 33\n41 34\n41 35\n41 36\n41 37\n41 38\n41 39\n41 40\n42 7\n42 8\n42 9\n42 10\n42 11\n42 12\n42 13\n42 14\n42 15\n42 16\n42 17\n42 18\n42 19\n42 20\n42 21\n42 22\n42 23\n42 24\n42 25\n42 26\n42 27\n42 28\n42 29\n42 30\n42 31\n42 32\n42 33\n42 34\n42 35\n42 36\n42 37\n42 38\n42 39\n42 40\n42 41\n43 7\n43 8\n43 9\n43 10\n43 11\n43 12\n43 13\n43 14\n43 15\n43 16\n43 17\n43 18\n43 19\n43 20\n43 21\n43 22\n43 23\n43 24\n43 25\n43 26\n43 27\n43 28\n43 29\n43 30\n43 31\n43 32\n43 33\n43 34\n43 35\n43 36\n43 37\n43 38\n43 39\n43 40\n43 41\n43 42\n44 7\n44 8\n44 9\n44 10\n44 11\n44 12\n44 13\n44 14\n44 15\n44 16\n44 17\n44 18\n44 19\n44 20\n44 21\n44 22\n44 23\n44 24\n44 25\n44 26\n44 27\n44 28\n44 29\n44 30\n44 31\n44 32\n44 33\n44 34\n44 35\n44 36\n44 37\n44 38\n44 39\n44 40\n44 41\n44 42\n44 43\n45 7\n45 8\n45 9\n45 10\n45 11\n45 12\n45 13\n45 14\n45 15\n45 16\n45 17\n45 18\n45 19\n45 20\n45 21\n45 22\n45 23\n45 24\n45 25\n45 26\n45 27\n45 28\n45 29\n45 30\n45 31\n45 32\n45 33\n45 34\n45 35\n45 36\n45 37\n45 38\n45 39\n45 40\n45 41\n45 42\n45 43\n45 44\n46 7\n46 8\n46 9\n46 10\n46 11\n46 12\n46 13\n46 14\n46 15\n46 16\n46 17\n46 18\n46 19\n46 20\n46 21\n46 22\n46 23\n46 24\n46 25\n46 26\n46 27\n46 28\n46 29\n46 30\n46 31\n46 32\n46 33\n46 34\n46 35\n46 36\n46 37\n46 38\n46 39\n46 40\n46 41\n46 42\n46 43\n46 44\n46 45\n47 7\n47 8\n47 9\n47 10\n47 11\n47 12\n47 13\n47 14\n47 15\n47 16\n47 17\n47 18\n47 19\n47 20\n47 21\n47 22\n47 23\n47 24\n47 25\n47 26\n47 27\n47 28\n47 29\n47 30\n47 31\n47 32\n47 33\n47 34\n47 35\n47 36\n47 37\n47 38\n47 39\n47 40\n47 41\n47 42\n47 43\n47 44\n47 45\n47 46\n48 7\n48 8\n48 9\n48 10\n48 11\n48 12\n48 13\n48 14\n48 15\n48 16\n48 17\n48 18\n48 19\n48 20\n48 21\n48 22\n48 23\n48 24\n48 25\n48 26\n48 27\n48 28\n48 29\n48 30\n48 31\n48 32\n48 33\n48 34\n48 35\n48 36\n48 37\n48 38\n48 39\n48 40\n48 41\n48 42\n48 43\n48 44\n48 45\n48 46\n48 47\n49 7\n49 8\n49 9\n49 10\n49 11\n49 12\n49 13\n49 14\n49 15\n49 16\n49 17\n49 18\n49 19\n49 20\n49 21\n49 22\n49 23\n49 24\n49 25\n49 26\n49 27\n49 28\n49 29\n49 30\n49 31\n49 32\n49 33\n49 34\n49 35\n49 36\n49 37\n49 38\n49 39\n49 40\n49 41\n49 42\n49 43\n49 44\n49 45\n49 46\n49 47\n49 48\n50 7\n50 8\n50 9\n50 10\n50 11\n50 12\n50 13\n50 14\n50 15\n50 16\n50 17\n50 18\n50 19\n50 20\n50 21\n50 22\n50 23\n50 24\n50 25\n50 26\n50 27\n50 28\n50 29\n50 30\n50 31\n50 32\n50 33\n50 34\n50 35\n50 36\n50 37\n50 38\n50 39\n50 40\n50 41\n50 42\n50 43\n50 44\n50 45\n50 46\n50 47\n50 48\n50 49\n51 7\n51 8\n51 9\n51 10\n51 11\n51 12\n51 13\n51 14\n51 15\n51 16\n51 17\n51 18\n51 19\n51 20\n51 21\n51 22\n51 23\n51 24\n51 25\n51 26\n51 27\n51 28\n51 29\n51 30\n51 31\n51 32\n51 33\n51 34\n51 35\n51 36\n51 37\n51 38\n51 39\n51 40\n51 41\n51 42\n51 43\n51 44\n51 45\n51 46\n51 47\n51 48\n51 49\n51 50\n52 7\n52 8\n52 9\n52 10\n52 11\n52 12\n52 13\n52 14\n52 15\n52 16\n52 17\n52 18\n52 19\n52 20\n52 21\n52 22\n52 23\n52 24\n52 25\n52 26\n52 27\n52 28\n52 29\n52 30\n52 31\n52 32\n52 33\n52 34\n52 35\n52 36\n52 37\n52 38\n52 39\n52 40\n52 41\n52 42\n52 43\n52 44\n52 45\n52 46\n52 47\n52 48\n52 49\n52 50\n52 51\n53 7\n53 8\n53 9\n53 10\n53 11\n53 12\n53 13\n53 14\n53 15\n53 16\n53 17\n53 18\n53 19\n53 20\n53 21\n53 22\n53 23\n53 24\n53 25\n53 26\n53 27\n53 28\n53 29\n53 30\n53 31\n53 32\n53 33\n53 34\n53 35\n53 36\n53 37\n53 38\n53 39\n53 40\n53 41\n53 42\n53 43\n53 44\n53 45\n53 46\n53 47\n53 48\n53 49\n53 50\n53 51\n53 52\n54 7\n54 8\n54 9\n54 10\n54 11\n54 12\n54 13\n54 14\n54 15\n54 16\n54 17\n54 18\n54 19\n54 20\n54 21\n54 22\n54 23\n54 24\n54 25\n54 26\n54 27\n54 28\n54 29\n54 30\n54 31\n54 32\n54 33\n54 34\n54 35\n54 36\n54 37\n54 38\n54 39\n54 40\n54 41\n54 42\n54 43\n54 44\n54 45\n54 46\n54 47\n54 48\n54 49\n54 50\n54 51\n54 52\n54 53\n55 7\n55 8\n55 9\n55 10\n55 11\n55 12\n55 13\n55 14\n55 15\n55 16\n55 17\n55 18\n55 19\n55 20\n55 21\n55 22\n55 23\n55 24\n55 25\n55 26\n55 27\n55 28\n55 29\n55 30\n55 31\n55 32\n55 33\n55 34\n55 35\n55 36\n55 37\n55 38\n55 39\n55 40\n55 41\n55 42\n55 43\n55 44\n55 45\n55 46\n55 47\n55 48\n55 49\n55 50\n55 51\n55 52\n55 53\n55 54\n56 7\n56 8\n56 9\n56 10\n56 11\n56 12\n56 13\n56 14\n56 15\n56 16\n56 17\n56 18\n56 19\n56 20\n56 21\n56 22\n56 23\n56 24\n56 25\n56 26\n56 27\n56 28\n56 29\n56 30\n56 31\n56 32\n56 33\n56 34\n56 35\n56 36\n56 37\n56 38\n56 39\n56 40\n56 41\n56 42\n56 43\n56 44\n56 45\n56 46\n56 47\n56 48\n56 49\n56 50\n56 51\n56 52\n56 53\n56 54\n56 55\n57 7\n57 8\n57 9\n57 10\n57 11\n57 12\n57 13\n57 14\n57 15\n57 16\n57 17\n57 18\n57 19\n57 20\n57 21\n57 22\n57 23\n57 24\n57 25\n57 26\n57 27\n57 28\n57 29\n57 30\n57 31\n57 32\n57 33\n57 34\n57 35\n57 36\n57 37\n57 38\n57 39\n57 40\n57 41\n57 42\n57 43\n57 44\n57 45\n57 46\n57 47\n57 48\n57 49\n57 50\n57 51\n57 52\n57 53\n57 54\n57 55\n57 56\n58 7\n58 8\n58 9\n58 10\n58 11\n58 12\n58 13\n58 14\n58 15\n58 16\n58 17\n58 18\n58 19\n58 20\n58 21\n58 22\n58 23\n58 24\n58 25\n58 26\n58 27\n58 28\n58 29\n58 30\n58 31\n58 32\n58 33\n58 34\n58 35\n58 36\n58 37\n58 38\n58 39\n58 40\n58 41\n58 42\n58 43\n58 44\n58 45\n58 46\n58 47\n58 48\n58 49\n58 50\n58 51\n58 52\n58 53\n58 54\n58 55\n58 56\n58 57\n59 7\n59 8\n59 9\n59 10\n59 11\n59 12\n59 13\n59 14\n59 15\n59 16\n59 17\n59 18\n59 19\n59 20\n59 21\n59 22\n59 23\n59 24\n59 25\n59 26\n59 27\n59 28\n59 29\n59 30\n59 31\n59 32\n59 33\n59 34\n59 35\n59 36\n59 37\n59 38\n59 39\n59 40\n59 41\n59 42\n59 43\n59 44\n59 45\n59 46\n59 47\n59 48\n59 49\n59 50\n59 51\n59 52\n59 53\n59 54\n59 55\n59 56\n59 57\n59 58\n60 7\n60 8\n60 9\n60 10\n60 11\n60 12\n60 13\n60 14\n60 15\n60 16\n60 17\n60 18\n60 19\n60 20\n60 21\n60 22\n60 23\n60 24\n60 25\n60 26\n60 27\n60 28\n60 29\n60 30\n60 31\n60 32\n60 33\n60 34\n60 35\n60 36\n60 37\n60 38\n60 39\n60 40\n60 41\n60 42\n60 43\n60 44\n60 45\n60 46\n60 47\n60 48\n60 49\n60 50\n60 51\n60 52\n60 53\n60 54\n60 55\n60 56\n60 57\n60 58\n60 59\n61 7\n61 8\n61 9\n61 10\n61 11\n61 12\n61 13\n61 14\n61 15\n61 16\n61 17\n61 18\n61 19\n61 20\n61 21\n61 22\n61 23\n61 24\n61 25\n61 26\n61 27\n61 28\n61 29\n61 30\n61 31\n61 32\n61 33\n61 34\n61 35\n61 36\n61 37\n61 38\n61 39\n61 40\n61 41\n61 42\n61 43\n61 44\n61 45\n61 46\n61 47\n61 48\n61 49\n61 50\n61 51\n61 52\n61 53\n61 54\n61 55\n61 56\n61 57\n61 58\n61 59\n61 60\n62 7\n62 8\n62 9\n62 10\n62 11\n62 12\n62 13\n62 14\n62 15\n62 16\n62 17\n62 18\n62 19\n62 20\n62 21\n62 22\n62 23\n62 24\n62 25\n62 26\n62 27\n62 28\n62 29\n62 30\n62 31\n62 32\n62 33\n62 34\n62 35\n62 36\n62 37\n62 38\n62 39\n62 40\n62 41\n62 42\n62 43\n62 44\n62 45\n62 46\n62 47\n62 48\n62 49\n62 50\n62 51\n62 52\n62 53\n62 54\n62 55\n62 56\n62 57\n62 58\n62 59\n62 60\n62 61\n63 7\n63 8\n63 9\n63 10\n63 11\n63 12\n63 13\n63 14\n63 15\n63 16\n63 17\n63 18\n63 19\n63 20\n63 21\n63 22\n63 23\n63 24\n63 25\n63 26\n63 27\n63 28\n63 29\n63 30\n63 31\n63 32\n63 33\n63 34\n63 35\n63 36\n63 37\n63 38\n63 39\n63 40\n63 41\n63 42\n63 43\n63 44\n63 45\n63 46\n63 47\n63 48\n63 49\n63 50\n63 51\n63 52\n63 53\n63 54\n63 55\n63 56\n63 57\n63 58\n63 59\n63 60\n63 61\n63 62\n64 7\n64 8\n64 9\n64 10\n64 11\n64 12\n64 13\n64 14\n64 15\n64 16\n64 17\n64 18\n64 19\n64 20\n64 21\n64 22\n64 23\n64 24\n64 25\n64 26\n64 27\n64 28\n64 29\n64 30\n64 31\n64 32\n64 33\n64 34\n64 35\n64 36\n64 37\n64 38\n64 39\n64 40\n64 41\n64 42\n64 43\n64 44\n64 45\n64 46\n64 47\n64 48\n64 49\n64 50\n64 51\n64 52\n64 53\n64 54\n64 55\n64 56\n64 57\n64 58\n64 59\n64 60\n64 61\n64 62\n64 63\n65 7\n65 8\n65 9\n65 10\n65 11\n65 12\n65 13\n65 14\n65 15\n65 16\n65 17\n65 18\n65 19\n65 20\n65 21\n65 22\n65 23\n65 24\n65 25\n65 26\n65 27\n65 28\n65 29\n65 30\n65 31\n65 32\n65 33\n65 34\n65 35\n65 36\n65 37\n65 38\n65 39\n65 40\n65 41\n65 42\n65 43\n65 44\n65 45\n65 46\n65 47\n65 48\n65 49\n65 50\n65 51\n65 52\n65 53\n65 54\n65 55\n65 56\n65 57\n65 58\n65 59\n65 60\n65 61\n65 62\n65 63\n65 64\n66 7\n66 8\n66 9\n66 10\n66 11\n66 12\n66 13\n66 14\n66 15\n66 16\n66 17\n66 18\n66 19\n66 20\n66 21\n66 22\n66 23\n66 24\n66 25\n66 26\n66 27\n66 28\n66 29\n66 30\n66 31\n66 32\n66 33\n66 34\n66 35\n66 36\n66 37\n66 38\n66 39\n66 40\n66 41\n66 42\n66 43\n66 44\n66 45\n66 46\n66 47\n66 48\n66 49\n66 50\n66 51\n66 52\n66 53\n66 54\n66 55\n66 56\n66 57\n66 58\n66 59\n66 60\n66 61\n66 62\n66 63\n66 64\n66 65\n67 7\n67 8\n67 9\n67 10\n67 11\n67 12\n67 13\n67 14\n67 15\n67 16\n67 17\n67 18\n67 19\n67 20\n67 21\n67 22\n67 23\n67 24\n67 25\n67 26\n67 27\n67 28\n67 29\n67 30\n67 31\n67 32\n67 33\n67 34\n67 35\n67 36\n67 37\n67 38\n67 39\n67 40\n67 41\n67 42\n67 43\n67 44\n67 45\n67 46\n67 47\n67 48\n67 49\n67 50\n67 51\n67 52\n67 53\n67 54\n67 55\n67 56\n67 57\n67 58\n67 59\n67 60\n67 61\n67 62\n67 63\n67 64\n67 65\n67 66\n68 7\n68 8\n68 9\n68 10\n68 11\n68 12\n68 13\n68 14\n68 15\n68 16\n68 17\n68 18\n68 19\n68 20\n68 21\n68 22\n68 23\n68 24\n68 25\n68 26\n68 27\n68 28\n68 29\n68 30\n68 31\n68 32\n68 33\n68 34\n68 35\n68 36\n68 37\n68 38\n68 39\n68 40\n68 41\n68 42\n68 43\n68 44\n68 45\n68 46\n68 47\n68 48\n68 49\n68 50\n68 51\n68 52\n68 53\n68 54\n68 55\n68 56\n68 57\n68 58\n68 59\n68 60\n68 61\n68 62\n68 63\n68 64\n68 65\n68 66\n68 67\n69 7\n69 8\n69 9\n69 10\n69 11\n69 12\n69 13\n69 14\n69 15\n69 16\n69 17\n69 18\n69 19\n69 20\n69 21\n69 22\n69 23\n69 24\n69 25\n69 26\n69 27\n69 28\n69 29\n69 30\n69 31\n69 32\n69 33\n69 34\n69 35\n69 36\n69 37\n69 38\n69 39\n69 40\n69 41\n69 42\n69 43\n69 44\n69 45\n69 46\n69 47\n69 48\n69 49\n69 50\n69 51\n69 52\n69 53\n69 54\n69 55\n69 56\n69 57\n69 58\n69 59\n69 60\n69 61\n69 62\n69 63\n69 64\n69 65\n69 66\n69 67\n69 68\n70 7\n70 8\n70 9\n70 10\n70 11\n70 12\n70 13\n70 14\n70 15\n70 16\n70 17\n70 18\n70 19\n70 20\n70 21\n70 22\n70 23\n70 24\n70 25\n70 26\n70 27\n70 28\n70 29\n70 30\n70 31\n70 32\n70 33\n70 34\n70 35\n70 36\n70 37\n70 38\n70 39\n70 40\n70 41\n70 42\n70 43\n70 44\n70 45\n70 46\n70 47\n70 48\n70 49\n70 50\n70 51\n70 52\n70 53\n70 54\n70 55\n70 56\n70 57\n70 58\n70 59\n70 60\n70 61\n70 62\n70 63\n70 64\n70 65\n70 66\n70 67\n70 68\n70 69\n71 7\n71 8\n71 9\n71 10\n71 11\n71 12\n71 13\n71 14\n71 15\n71 16\n71 17\n71 18\n71 19\n71 20\n71 21\n71 22\n71 23\n71 24\n71 25\n71 26\n71 27\n71 28\n71 29\n71 30\n71 31\n71 32\n71 33\n71 34\n71 35\n71 36\n71 37\n71 38\n71 39\n71 40\n71 41\n71 42\n71 43\n71 44\n71 45\n71 46\n71 47\n71 48\n71 49\n71 50\n71 51\n71 52\n71 53\n71 54\n71 55\n71 56\n71 57\n71 58\n71 59\n71 60\n71 61\n71 62\n71 63\n71 64\n71 65\n71 66\n71 67\n71 68\n71 69\n71 70\n72 7\n72 8\n72 9\n72 10\n72 11\n72 12\n72 13\n72 14\n72 15\n72 16\n72 17\n72 18\n72 19\n72 20\n72 21\n72 22\n72 23\n72 24\n72 25\n72 26\n72 27\n72 28\n72 29\n72 30\n72 31\n72 32\n72 33\n72 34\n72 35\n72 36\n72 37\n72 38\n72 39\n72 40\n72 41\n72 42\n72 43\n72 44\n72 45\n72 46\n72 47\n72 48\n72 49\n72 50\n72 51\n72 52\n72 53\n72 54\n72 55\n72 56\n72 57\n72 58\n72 59\n72 60\n72 61\n72 62\n72 63\n72 64\n72 65\n72 66\n72 67\n72 68\n72 69\n72 70\n72 71\n73 7\n73 8\n73 9\n73 10\n73 11\n73 12\n73 13\n73 14\n73 15\n73 16\n73 17\n73 18\n73 19\n73 20\n73 21\n73 22\n73 23\n73 24\n73 25\n73 26\n73 27\n73 28\n73 29\n73 30\n73 31\n73 32\n73 33\n73 34\n73 35\n73 36\n73 37\n73 38\n73 39\n73 40\n73 41\n73 42\n73 43\n73 44\n73 45\n73 46\n73 47\n73 48\n73 49\n73 50\n73 51\n73 52\n73 53\n73 54\n73 55\n73 56\n73 57\n73 58\n73 59\n73 60\n73 61\n73 62\n73 63\n73 64\n73 65\n73 66\n73 67\n73 68\n73 69\n73 70\n73 71\n73 72\n74 7\n74 8\n74 9\n74 10\n74 11\n74 12\n74 13\n74 14\n74 15\n74 16\n74 17\n74 18\n74 19\n74 20\n74 21\n74 22\n74 23\n74 24\n74 25\n74 26\n74 27\n74 28\n74 29\n74 30\n74 31\n74 32\n74 33\n74 34\n74 35\n74 36\n74 37\n74 38\n74 39\n74 40\n74 41\n74 42\n74 43\n74 44\n74 45\n74 46\n74 47\n74 48\n74 49\n74 50\n74 51\n74 52\n74 53\n74 54\n74 55\n74 56\n74 57\n74 58\n74 59\n74 60\n74 61\n74 62\n74 63\n74 64\n74 65\n74 66\n74 67\n74 68\n74 69\n74 70\n74 71\n74 72\n74 73\n75 7\n75 8\n75 9\n75 10\n75 11\n75 12\n75 13\n75 14\n75 15\n75 16\n75 17\n75 18\n75 19\n75 20\n75 21\n75 22\n75 23\n75 24\n75 25\n75 26\n75 27\n75 28\n75 29\n75 30\n75 31\n75 32\n75 33\n75 34\n75 35\n75 36\n75 37\n75 38\n75 39\n75 40\n75 41\n75 42\n75 43\n75 44\n75 45\n75 46\n75 47\n75 48\n75 49\n75 50\n75 51\n75 52\n75 53\n75 54\n75 55\n75 56\n75 57\n75 58\n75 59\n75 60\n75 61\n75 62\n75 63\n75 64\n75 65\n75 66\n75 67\n75 68\n75 69\n75 70\n75 71\n75 72\n75 73\n75 74\n76 7\n76 8\n76 9\n76 10\n76 11\n76 12\n76 13\n76 14\n76 15\n76 16\n76 17\n76 18\n76 19\n76 20\n76 21\n76 22\n76 23\n76 24\n76 25\n76 26\n76 27\n76 28\n76 29\n76 30\n76 31\n76 32\n76 33\n76 34\n76 35\n76 36\n76 37\n76 38\n76 39\n76 40\n76 41\n76 42\n76 43\n76 44\n76 45\n76 46\n76 47\n76 48\n76 49\n76 50\n76 51\n76 52\n76 53\n76 54\n76 55\n76 56\n76 57\n76 58\n76 59\n76 60\n76 61\n76 62\n76 63\n76 64\n76 65\n76 66\n76 67\n76 68\n76 69\n76 70\n76 71\n76 72\n76 73\n76 74\n76 75\n77 7\n77 8\n77 9\n77 10\n77 11\n77 12\n77 13\n77 14\n77 15\n77 16\n77 17\n77 18\n77 19\n77 20\n77 21\n77 22\n77 23\n77 24\n77 25\n77 26\n77 27\n77 28\n77 29\n77 30\n77 31\n77 32\n77 33\n77 34\n77 35\n77 36\n77 37\n77 38\n77 39\n77 40\n77 41\n77 42\n77 43\n77 44\n77 45\n77 46\n77 47\n77 48\n77 49\n77 50\n77 51\n77 52\n77 53\n77 54\n77 55\n77 56\n77 57\n77 58\n77 59\n77 60\n77 61\n77 62\n77 63\n77 64\n77 65\n77 66\n77 67\n77 68\n77 69\n77 70\n77 71\n77 72\n77 73\n77 74\n77 75\n77 76\n78 7\n78 8\n78 9\n78 10\n78 11\n78 12\n78 13\n78 14\n78 15\n78 16\n78 17\n78 18\n78 19\n78 20\n78 21\n78 22\n78 23\n78 24\n78 25\n78 26\n78 27\n78 28\n78 29\n78 30\n78 31\n78 32\n78 33\n78 34\n78 35\n78 36\n78 37\n78 38\n78 39\n78 40\n78 41\n78 42\n78 43\n78 44\n78 45\n78 46\n78 47\n78 48\n78 49\n78 50\n78 51\n78 52\n78 53\n78 54\n78 55\n78 56\n78 57\n78 58\n78 59\n78 60\n78 61\n78 62\n78 63\n78 64\n78 65\n78 66\n78 67\n78 68\n78 69\n78 70\n78 71\n78 72\n78 73\n78 74\n78 75\n78 76\n78 77\n79 7\n79 8\n79 9\n79 10\n79 11\n79 12\n79 13\n79 14\n79 15\n79 16\n79 17\n79 18\n79 19\n79 20\n79 21\n79 22\n79 23\n79 24\n79 25\n79 26\n79 27\n79 28\n79 29\n79 30\n79 31\n79 32\n79 33\n79 34\n79 35\n79 36\n79 37\n79 38\n79 39\n79 40\n79 41\n79 42\n79 43\n79 44\n79 45\n79 46\n79 47\n79 48\n79 49\n79 50\n79 51\n79 52\n79 53\n79 54\n79 55\n79 56\n79 57\n79 58\n79 59\n79 60\n79 61\n79 62\n79 63\n79 64\n79 65\n79 66\n79 67\n79 68\n79 69\n79 70\n79 71\n79 72\n79 73\n79 74\n79 75\n79 76\n79 77\n79 78\n80 7\n80 8\n80 9\n80 10\n80 11\n80 12\n80 13\n80 14\n80 15\n80 16\n80 17\n80 18\n80 19\n80 20\n80 21\n80 22\n80 23\n80 24\n80 25\n80 26\n80 27\n80 28\n80 29\n80 30\n80 31\n80 32\n80 33\n80 34\n80 35\n80 36\n80 37\n80 38\n80 39\n80 40\n80 41\n80 42\n80 43\n80 44\n80 45\n80 46\n80 47\n80 48\n80 49\n80 50\n80 51\n80 52\n80 53\n80 54\n80 55\n80 56\n80 57\n80 58\n80 59\n80 60\n80 61\n80 62\n80 63\n80 64\n80 65\n80 66\n80 67\n80 68\n80 69\n80 70\n80 71\n80 72\n80 73\n80 74\n80 75\n80 76\n80 77\n80 78\n80 79\n81 7\n81 8\n81 9\n81 10\n81 11\n81 12\n81 13\n81 14\n81 15\n81 16\n81 17\n81 18\n81 19\n81 20\n81 21\n81 22\n81 23\n81 24\n81 25\n81 26\n81 27\n81 28\n81 29\n81 30\n81 31\n81 32\n81 33\n81 34\n81 35\n81 36\n81 37\n81 38\n81 39\n81 40\n81 41\n81 42\n81 43\n81 44\n81 45\n81 46\n81 47\n81 48\n81 49\n81 50\n81 51\n81 52\n81 53\n81 54\n81 55\n81 56\n81 57\n81 58\n81 59\n81 60\n81 61\n81 62\n81 63\n81 64\n81 65\n81 66\n81 67\n81 68\n81 69\n81 70\n81 71\n81 72\n81 73\n81 74\n81 75\n81 76\n81 77\n81 78\n81 79\n81 80\n82 7\n82 8\n82 9\n82 10\n82 11\n82 12\n82 13\n82 14\n82 15\n82 16\n82 17\n82 18\n82 19\n82 20\n82 21\n82 22\n82 23\n82 24\n82 25\n82 26\n82 27\n82 28\n82 29\n82 30\n82 31\n82 32\n82 33\n82 34\n82 35\n82 36\n82 37\n82 38\n82 39\n82 40\n82 41\n82 42\n82 43\n82 44\n82 45\n82 46\n82 47\n82 48\n82 49\n82 50\n82 51\n82 52\n82 53\n82 54\n82 55\n82 56\n82 57\n82 58\n82 59\n82 60\n82 61\n82 62\n82 63\n82 64\n82 65\n82 66\n82 67\n82 68\n82 69\n82 70\n82 71\n82 72\n82 73\n82 74\n82 75\n82 76\n82 77\n82 78\n82 79\n82 80\n82 81\n83 7\n83 8\n83 9\n83 10\n83 11\n83 12\n83 13\n83 14\n83 15\n83 16\n83 17\n83 18\n83 19\n83 20\n83 21\n83 22\n83 23\n83 24\n83 25\n83 26\n83 27\n83 28\n83 29\n83 30\n83 31\n83 32\n83 33\n83 34\n83 35\n83 36\n83 37\n83 38\n83 39\n83 40\n83 41\n83 42\n83 43\n83 44\n83 45\n83 46\n83 47\n83 48\n83 49\n83 50\n83 51\n83 52\n83 53\n83 54\n83 55\n83 56\n83 57\n83 58\n83 59\n83 60\n83 61\n83 62\n83 63\n83 64\n83 65\n83 66\n83 67\n83 68\n83 69\n83 70\n83 71\n83 72\n83 73\n83 74\n83 75\n83 76\n83 77\n83 78\n83 79\n83 80\n83 81\n83 82\n84 7\n84 8\n84 9\n84 10\n84 11\n84 12\n84 13\n84 14\n84 15\n84 16\n84 17\n84 18\n84 19\n84 20\n84 21\n84 22\n84 23\n84 24\n84 25\n84 26\n84 27\n84 28\n84 29\n84 30\n84 31\n84 32\n84 33\n84 34\n84 35\n84 36\n84 37\n84 38\n84 39\n84 40\n84 41\n84 42\n84 43\n84 44\n84 45\n84 46\n84 47\n84 48\n84 49\n84 50\n84 51\n84 52\n84 53\n84 54\n84 55\n84 56\n84 57\n84 58\n84 59\n84 60\n84 61\n84 62\n84 63\n84 64\n84 65\n84 66\n84 67\n84 68\n84 69\n84 70\n84 71\n84 72\n84 73\n84 74\n84 75\n84 76\n84 77\n84 78\n84 79\n84 80\n84 81\n84 82\n84 83\n85 7\n85 8\n85 9\n85 10\n85 11\n85 12\n85 13\n85 14\n85 15\n85 16\n85 17\n85 18\n85 19\n85 20\n85 21\n85 22\n85 23\n85 24\n85 25\n85 26\n85 27\n85 28\n85 29\n85 30\n85 31\n85 32\n85 33\n85 34\n85 35\n85 36\n85 37\n85 38\n85 39\n85 40\n85 41\n85 42\n85 43\n85 44\n85 45\n85 46\n85 47\n85 48\n85 49\n85 50\n85 51\n85 52\n85 53\n85 54\n85 55\n85 56\n85 57\n85 58\n85 59\n85 60\n85 61\n85 62\n85 63\n85 64\n85 65\n85 66\n85 67\n85 68\n85 69\n85 70\n85 71\n85 72\n85 73\n85 74\n85 75\n85 76\n85 77\n85 78\n85 79\n85 80\n85 81\n85 82\n85 83\n85 84\n86 7\n86 8\n86 9\n86 10\n86 11\n86 12\n86 13\n86 14\n86 15\n86 16\n86 17\n86 18\n86 19\n86 20\n86 21\n86 22\n86 23\n86 24\n86 25\n86 26\n86 27\n86 28\n86 29\n86 30\n86 31\n86 32\n86 33\n86 34\n86 35\n86 36\n86 37\n86 38\n86 39\n86 40\n86 41\n86 42\n86 43\n86 44\n86 45\n86 46\n86 47\n86 48\n86 49\n86 50\n86 51\n86 52\n86 53\n86 54\n86 55\n86 56\n86 57\n86 58\n86 59\n86 60\n86 61\n86 62\n86 63\n86 64\n86 65\n86 66\n86 67\n86 68\n86 69\n86 70\n86 71\n86 72\n86 73\n86 74\n86 75\n86 76\n86 77\n86 78\n86 79\n86 80\n86 81\n86 82\n86 83\n86 84\n86 85\n87 7\n87 8\n87 9\n87 10\n87 11\n87 12\n87 13\n87 14\n87 15\n87 16\n87 17\n87 18\n87 19\n87 20\n87 21\n87 22\n87 23\n87 24\n87 25\n87 26\n87 27\n87 28\n87 29\n87 30\n87 31\n87 32\n87 33\n87 34\n87 35\n87 36\n87 37\n87 38\n87 39\n87 40\n87 41\n87 42\n87 43\n87 44\n87 45\n87 46\n87 47\n87 48\n87 49\n87 50\n87 51\n87 52\n87 53\n87 54\n87 55\n87 56\n87 57\n87 58\n87 59\n87 60\n87 61\n87 62\n87 63\n87 64\n87 65\n87 66\n87 67\n87 68\n87 69\n87 70\n87 71\n87 72\n87 73\n87 74\n87 75\n87 76\n87 77\n87 78\n87 79\n87 80\n87 81\n87 82\n87 83\n87 84\n87 85\n87 86\n88 7\n88 8\n88 9\n88 10\n88 11\n88 12\n88 13\n88 14\n88 15\n88 16\n88 17\n88 18\n88 19\n88 20\n88 21\n88 22\n88 23\n88 24\n88 25\n88 26\n88 27\n88 28\n88 29\n88 30\n88 31\n88 32\n88 33\n88 34\n88 35\n88 36\n88 37\n88 38\n88 39\n88 40\n88 41\n88 42\n88 43\n88 44\n88 45\n88 46\n88 47\n88 48\n88 49\n88 50\n88 51\n88 52\n88 53\n88 54\n88 55\n88 56\n88 57\n88 58\n88 59\n88 60\n88 61\n88 62\n88 63\n88 64\n88 65\n88 66\n88 67\n88 68\n88 69\n88 70\n88 71\n88 72\n88 73\n88 74\n88 75\n88 76\n88 77\n88 78\n88 79\n88 80\n88 81\n88 82\n88 83\n88 84\n88 85\n88 86\n88 87\n89 7\n89 8\n89 9\n89 10\n89 11\n89 12\n89 13\n89 14\n89 15\n89 16\n89 17\n89 18\n89 19\n89 20\n89 21\n89 22\n89 23\n89 24\n89 25\n89 26\n89 27\n89 28\n89 29\n89 30\n89 31\n89 32\n89 33\n89 34\n89 35\n89 36\n89 37\n89 38\n89 39\n89 40\n89 41\n89 42\n89 43\n89 44\n89 45\n89 46\n89 47\n89 48\n89 49\n89 50\n89 51\n89 52\n89 53\n89 54\n89 55\n89 56\n89 57\n89 58\n89 59\n89 60\n89 61\n89 62\n89 63\n89 64\n89 65\n89 66\n89 67\n89 68\n89 69\n89 70\n89 71\n89 72\n89 73\n89 74\n89 75\n89 76\n89 77\n89 78\n89 79\n89 80\n89 81\n89 82\n89 83\n89 84\n89 85\n89 86\n89 87\n89 88\n90 7\n90 8\n90 9\n90 10\n90 11\n90 12\n90 13\n90 14\n90 15\n90 16\n90 17\n90 18\n90 19\n90 20\n90 21\n90 22\n90 23\n90 24\n90 25\n90 26\n90 27\n90 28\n90 29\n90 30\n90 31\n90 32\n90 33\n90 34\n90 35\n90 36\n90 37\n90 38\n90 39\n90 40\n90 41\n90 42\n90 43\n90 44\n90 45\n90 46\n90 47\n90 48\n90 49\n90 50\n90 51\n90 52\n90 53\n90 54\n90 55\n90 56\n90 57\n90 58\n90 59\n90 60\n90 61\n90 62\n90 63\n90 64\n90 65\n90 66\n90 67\n90 68\n90 69\n90 70\n90 71\n90 72\n90 73\n90 74\n90 75\n90 76\n90 77\n90 78\n90 79\n90 80\n90 81\n90 82\n90 83\n90 84\n90 85\n90 86\n90 87\n90 88\n90 89\n91 7\n91 8\n91 9\n91 10\n91 11\n91 12\n91 13\n91 14\n91 15\n91 16\n91 17\n91 18\n91 19\n91 20\n91 21\n91 22\n91 23\n91 24\n91 25\n91 26\n91 27\n91 28\n91 29\n91 30\n91 31\n91 32\n91 33\n91 34\n91 35\n91 36\n91 37\n91 38\n91 39\n91 40\n91 41\n91 42\n91 43\n91 44\n91 45\n91 46\n91 47\n91 48\n91 49\n91 50\n91 51\n91 52\n91 53\n91 54\n91 55\n91 56\n91 57\n91 58\n91 59\n91 60\n91 61\n91 62\n91 63\n91 64\n91 65\n91 66\n91 67\n91 68\n91 69\n91 70\n91 71\n91 72\n91 73\n91 74\n91 75\n91 76\n91 77\n91 78\n91 79\n91 80\n91 81\n91 82\n91 83\n91 84\n91 85\n91 86\n91 87\n91 88\n91 89\n91 90\n92 7\n92 8\n92 9\n92 10\n92 11\n92 12\n92 13\n92 14\n92 15\n92 16\n92 17\n92 18\n92 19\n92 20\n92 21\n92 22\n92 23\n92 24\n92 25\n92 26\n92 27\n92 28\n92 29\n92 30\n92 31\n92 32\n92 33\n92 34\n92 35\n92 36\n92 37\n92 38\n92 39\n92 40\n92 41\n92 42\n92 43\n92 44\n92 45\n92 46\n92 47\n92 48\n92 49\n92 50\n92 51\n92 52\n92 53\n92 54\n92 55\n92 56\n92 57\n92 58\n92 59\n92 60\n92 61\n92 62\n92 63\n92 64\n92 65\n92 66\n92 67\n92 68\n92 69\n92 70\n92 71\n92 72\n92 73\n92 74\n92 75\n92 76\n92 77\n92 78\n92 79\n92 80\n92 81\n92 82\n92 83\n92 84\n92 85\n92 86\n92 87\n92 88\n92 89\n92 90\n92 91\n93 7\n93 8\n93 9\n93 10\n93 11\n93 12\n93 13\n93 14\n93 15\n93 16\n93 17\n93 18\n93 19\n93 20\n93 21\n93 22\n93 23\n93 24\n93 25\n93 26\n93 27\n93 28\n93 29\n93 30\n93 31\n93 32\n93 33\n93 34\n93 35\n93 36\n93 37\n93 38\n93 39\n93 40\n93 41\n93 42\n93 43\n93 44\n93 45\n93 46\n93 47\n93 48\n93 49\n93 50\n93 51\n93 52\n93 53\n93 54\n93 55\n93 56\n93 57\n93 58\n93 59\n93 60\n93 61\n93 62\n93 63\n93 64\n93 65\n93 66\n93 67\n93 68\n93 69\n93 70\n93 71\n93 72\n93 73\n93 74\n93 75\n93 76\n93 77\n93 78\n93 79\n93 80\n93 81\n93 82\n93 83\n93 84\n93 85\n93 86\n93 87\n93 88\n93 89\n93 90\n93 91\n93 92\n94 7\n94 8\n94 9\n94 10\n94 11\n94 12\n94 13\n94 14\n94 15\n94 16\n94 17\n94 18\n94 19\n94 20\n94 21\n94 22\n94 23\n94 24\n94 25\n94 26\n94 27\n94 28\n94 29\n94 30\n94 31\n94 32\n94 33\n94 34\n94 35\n94 36\n94 37\n94 38\n94 39\n94 40\n94 41\n94 42\n94 43\n94 44\n94 45\n94 46\n94 47\n94 48\n94 49\n94 50\n94 51\n94 52\n94 53\n94 54\n94 55\n94 56\n94 57\n94 58\n94 59\n94 60\n94 61\n94 62\n94 63\n94 64\n94 65\n94 66\n94 67\n94 68\n94 69\n94 70\n94 71\n94 72\n94 73\n94 74\n94 75\n94 76\n94 77\n94 78\n94 79\n94 80\n94 81\n94 82\n94 83\n94 84\n94 85\n94 86\n94 87\n94 88\n94 89\n94 90\n94 91\n94 92\n94 93\n95 7\n95 8\n95 9\n95 10\n95 11\n95 12\n95 13\n95 14\n95 15\n95 16\n95 17\n95 18\n95 19\n95 20\n95 21\n95 22\n95 23\n95 24\n95 25\n95 26\n95 27\n95 28\n95 29\n95 30\n95 31\n95 32\n95 33\n95 34\n95 35\n95 36\n95 37\n95 38\n95 39\n95 40\n95 41\n95 42\n95 43\n95 44\n95 45\n95 46\n95 47\n95 48\n95 49\n95 50\n95 51\n95 52\n95 53\n95 54\n95 55\n95 56\n95 57\n95 58\n95 59\n95 60\n95 61\n95 62\n95 63\n95 64\n95 65\n95 66\n95 67\n95 68\n95 69\n95 70\n95 71\n95 72\n95 73\n95 74\n95 75\n95 76\n95 77\n95 78\n95 79\n95 80\n95 81\n95 82\n95 83\n95 84\n95 85\n95 86\n95 87\n95 88\n95 89\n95 90\n95 91\n95 92\n95 93\n95 94\n96 7\n96 8\n96 9\n96 10\n96 11\n96 12\n96 13\n96 14\n96 15\n96 16\n96 17\n96 18\n96 19\n96 20\n96 21\n96 22\n96 23\n96 24\n96 25\n96 26\n96 27\n96 28\n96 29\n96 30\n96 31\n96 32\n96 33\n96 34\n96 35\n96 36\n96 37\n96 38\n96 39\n96 40\n96 41\n96 42\n96 43\n96 44\n96 45\n96 46\n96 47\n96 48\n96 49\n96 50\n96 51\n96 52\n96 53\n96 54\n96 55\n96 56\n96 57\n96 58\n96 59\n96 60\n96 61\n96 62\n96 63\n96 64\n96 65\n96 66\n96 67\n96 68\n96 69\n96 70\n96 71\n96 72\n96 73\n96 74\n96 75\n96 76\n96 77\n96 78\n96 79\n96 80\n96 81\n96 82\n96 83\n96 84\n96 85\n96 86\n96 87\n96 88\n96 89\n96 90\n96 91\n96 92\n96 93\n96 94\n96 95\n97 7\n97 8\n97 9\n97 10\n97 11\n97 12\n97 13\n97 14\n97 15\n97 16\n97 17\n97 18\n97 19\n97 20\n97 21\n97 22\n97 23\n97 24\n97 25\n97 26\n97 27\n97 28\n97 29\n97 30\n97 31\n97 32\n97 33\n97 34\n97 35\n97 36\n97 37\n97 38\n97 39\n97 40\n97 41\n97 42\n97 43\n97 44\n97 45\n97 46\n97 47\n97 48\n97 49\n97 50\n97 51\n97 52\n97 53\n97 54\n97 55\n97 56\n97 57\n97 58\n97 59\n97 60\n97 61\n97 62\n97 63\n97 64\n97 65\n97 66\n97 67\n97 68\n97 69\n97 70\n97 71\n97 72\n97 73\n97 74\n97 75\n97 76\n97 77\n97 78\n97 79\n97 80\n97 81\n97 82\n97 83\n97 84\n97 85\n97 86\n97 87\n97 88\n97 89\n97 90\n97 91\n97 92\n97 93\n97 94\n97 95\n97 96\n98 7\n98 8\n98 9\n98 10\n98 11\n98 12\n98 13\n98 14\n98 15\n98 16\n98 17\n98 18\n98 19\n98 20\n98 21\n98 22\n98 23\n98 24\n98 25\n98 26\n98 27\n98 28\n98 29\n98 30\n98 31\n98 32\n98 33\n98 34\n98 35\n98 36\n98 37\n98 38\n98 39\n98 40\n98 41\n98 42\n98 43\n98 44\n98 45\n98 46\n98 47\n98 48\n98 49\n98 50\n98 51\n98 52\n98 53\n98 54\n98 55\n98 56\n98 57\n98 58\n98 59\n98 60\n98 61\n98 62\n98 63\n98 64\n98 65\n98 66\n98 67\n98 68\n98 69\n98 70\n98 71\n98 72\n98 73\n98 74\n98 75\n98 76\n98 77\n98 78\n98 79\n98 80\n98 81\n98 82\n98 83\n98 84\n98 85\n98 86\n98 87\n98 88\n98 89\n98 90\n98 91\n98 92\n98 93\n98 94\n98 95\n98 96\n98 97\n99 7\n99 8\n99 9\n99 10\n99 11\n99 12\n99 13\n99 14\n99 15\n99 16\n99 17\n99 18\n99 19\n99 20\n99 21\n99 22\n99 23\n99 24\n99 25\n99 26\n99 27\n99 28\n99 29\n99 30\n99 31\n99 32\n99 33\n99 34\n99 35\n99 36\n99 37\n99 38\n99 39\n99 40\n99 41\n99 42\n99 43\n99 44\n99 45\n99 46\n99 47\n99 48\n99 49\n99 50\n99 51\n99 52\n99 53\n99 54\n99 55\n99 56\n99 57\n99 58\n99 59\n99 60\n99 61\n99 62\n99 63\n99 64\n99 65\n99 66\n99 67\n99 68\n99 69\n99 70\n99 71\n99 72\n99 73\n99 74\n99 75\n99 76\n99 77\n99 78\n99 79\n99 80\n99 81\n99 82\n99 83\n99 84\n99 85\n99 86\n99 87\n99 88\n99 89\n99 90\n99 91\n99 92\n99 93\n99 94\n99 95\n99 96\n99 97\n99 98\n" }, { "input": "100 99 10 13\n", "output": "3828\n14 13\n15 13\n15 14\n16 13\n16 14\n16 15\n17 13\n17 14\n17 15\n17 16\n18 13\n18 14\n18 15\n18 16\n18 17\n19 13\n19 14\n19 15\n19 16\n19 17\n19 18\n20 13\n20 14\n20 15\n20 16\n20 17\n20 18\n20 19\n21 13\n21 14\n21 15\n21 16\n21 17\n21 18\n21 19\n21 20\n22 13\n22 14\n22 15\n22 16\n22 17\n22 18\n22 19\n22 20\n22 21\n23 13\n23 14\n23 15\n23 16\n23 17\n23 18\n23 19\n23 20\n23 21\n23 22\n24 13\n24 14\n24 15\n24 16\n24 17\n24 18\n24 19\n24 20\n24 21\n24 22\n24 23\n25 13\n25 14\n25 15\n25 16\n25 17\n25 18\n25 19\n25 20\n25 21\n25 22\n25 23\n25 24\n26 13\n26 14\n26 15\n26 16\n26 17\n26 18\n26 19\n26 20\n26 21\n26 22\n26 23\n26 24\n26 25\n27 13\n27 14\n27 15\n27 16\n27 17\n27 18\n27 19\n27 20\n27 21\n27 22\n27 23\n27 24\n27 25\n27 26\n28 13\n28 14\n28 15\n28 16\n28 17\n28 18\n28 19\n28 20\n28 21\n28 22\n28 23\n28 24\n28 25\n28 26\n28 27\n29 13\n29 14\n29 15\n29 16\n29 17\n29 18\n29 19\n29 20\n29 21\n29 22\n29 23\n29 24\n29 25\n29 26\n29 27\n29 28\n30 13\n30 14\n30 15\n30 16\n30 17\n30 18\n30 19\n30 20\n30 21\n30 22\n30 23\n30 24\n30 25\n30 26\n30 27\n30 28\n30 29\n31 13\n31 14\n31 15\n31 16\n31 17\n31 18\n31 19\n31 20\n31 21\n31 22\n31 23\n31 24\n31 25\n31 26\n31 27\n31 28\n31 29\n31 30\n32 13\n32 14\n32 15\n32 16\n32 17\n32 18\n32 19\n32 20\n32 21\n32 22\n32 23\n32 24\n32 25\n32 26\n32 27\n32 28\n32 29\n32 30\n32 31\n33 13\n33 14\n33 15\n33 16\n33 17\n33 18\n33 19\n33 20\n33 21\n33 22\n33 23\n33 24\n33 25\n33 26\n33 27\n33 28\n33 29\n33 30\n33 31\n33 32\n34 13\n34 14\n34 15\n34 16\n34 17\n34 18\n34 19\n34 20\n34 21\n34 22\n34 23\n34 24\n34 25\n34 26\n34 27\n34 28\n34 29\n34 30\n34 31\n34 32\n34 33\n35 13\n35 14\n35 15\n35 16\n35 17\n35 18\n35 19\n35 20\n35 21\n35 22\n35 23\n35 24\n35 25\n35 26\n35 27\n35 28\n35 29\n35 30\n35 31\n35 32\n35 33\n35 34\n36 13\n36 14\n36 15\n36 16\n36 17\n36 18\n36 19\n36 20\n36 21\n36 22\n36 23\n36 24\n36 25\n36 26\n36 27\n36 28\n36 29\n36 30\n36 31\n36 32\n36 33\n36 34\n36 35\n37 13\n37 14\n37 15\n37 16\n37 17\n37 18\n37 19\n37 20\n37 21\n37 22\n37 23\n37 24\n37 25\n37 26\n37 27\n37 28\n37 29\n37 30\n37 31\n37 32\n37 33\n37 34\n37 35\n37 36\n38 13\n38 14\n38 15\n38 16\n38 17\n38 18\n38 19\n38 20\n38 21\n38 22\n38 23\n38 24\n38 25\n38 26\n38 27\n38 28\n38 29\n38 30\n38 31\n38 32\n38 33\n38 34\n38 35\n38 36\n38 37\n39 13\n39 14\n39 15\n39 16\n39 17\n39 18\n39 19\n39 20\n39 21\n39 22\n39 23\n39 24\n39 25\n39 26\n39 27\n39 28\n39 29\n39 30\n39 31\n39 32\n39 33\n39 34\n39 35\n39 36\n39 37\n39 38\n40 13\n40 14\n40 15\n40 16\n40 17\n40 18\n40 19\n40 20\n40 21\n40 22\n40 23\n40 24\n40 25\n40 26\n40 27\n40 28\n40 29\n40 30\n40 31\n40 32\n40 33\n40 34\n40 35\n40 36\n40 37\n40 38\n40 39\n41 13\n41 14\n41 15\n41 16\n41 17\n41 18\n41 19\n41 20\n41 21\n41 22\n41 23\n41 24\n41 25\n41 26\n41 27\n41 28\n41 29\n41 30\n41 31\n41 32\n41 33\n41 34\n41 35\n41 36\n41 37\n41 38\n41 39\n41 40\n42 13\n42 14\n42 15\n42 16\n42 17\n42 18\n42 19\n42 20\n42 21\n42 22\n42 23\n42 24\n42 25\n42 26\n42 27\n42 28\n42 29\n42 30\n42 31\n42 32\n42 33\n42 34\n42 35\n42 36\n42 37\n42 38\n42 39\n42 40\n42 41\n43 13\n43 14\n43 15\n43 16\n43 17\n43 18\n43 19\n43 20\n43 21\n43 22\n43 23\n43 24\n43 25\n43 26\n43 27\n43 28\n43 29\n43 30\n43 31\n43 32\n43 33\n43 34\n43 35\n43 36\n43 37\n43 38\n43 39\n43 40\n43 41\n43 42\n44 13\n44 14\n44 15\n44 16\n44 17\n44 18\n44 19\n44 20\n44 21\n44 22\n44 23\n44 24\n44 25\n44 26\n44 27\n44 28\n44 29\n44 30\n44 31\n44 32\n44 33\n44 34\n44 35\n44 36\n44 37\n44 38\n44 39\n44 40\n44 41\n44 42\n44 43\n45 13\n45 14\n45 15\n45 16\n45 17\n45 18\n45 19\n45 20\n45 21\n45 22\n45 23\n45 24\n45 25\n45 26\n45 27\n45 28\n45 29\n45 30\n45 31\n45 32\n45 33\n45 34\n45 35\n45 36\n45 37\n45 38\n45 39\n45 40\n45 41\n45 42\n45 43\n45 44\n46 13\n46 14\n46 15\n46 16\n46 17\n46 18\n46 19\n46 20\n46 21\n46 22\n46 23\n46 24\n46 25\n46 26\n46 27\n46 28\n46 29\n46 30\n46 31\n46 32\n46 33\n46 34\n46 35\n46 36\n46 37\n46 38\n46 39\n46 40\n46 41\n46 42\n46 43\n46 44\n46 45\n47 13\n47 14\n47 15\n47 16\n47 17\n47 18\n47 19\n47 20\n47 21\n47 22\n47 23\n47 24\n47 25\n47 26\n47 27\n47 28\n47 29\n47 30\n47 31\n47 32\n47 33\n47 34\n47 35\n47 36\n47 37\n47 38\n47 39\n47 40\n47 41\n47 42\n47 43\n47 44\n47 45\n47 46\n48 13\n48 14\n48 15\n48 16\n48 17\n48 18\n48 19\n48 20\n48 21\n48 22\n48 23\n48 24\n48 25\n48 26\n48 27\n48 28\n48 29\n48 30\n48 31\n48 32\n48 33\n48 34\n48 35\n48 36\n48 37\n48 38\n48 39\n48 40\n48 41\n48 42\n48 43\n48 44\n48 45\n48 46\n48 47\n49 13\n49 14\n49 15\n49 16\n49 17\n49 18\n49 19\n49 20\n49 21\n49 22\n49 23\n49 24\n49 25\n49 26\n49 27\n49 28\n49 29\n49 30\n49 31\n49 32\n49 33\n49 34\n49 35\n49 36\n49 37\n49 38\n49 39\n49 40\n49 41\n49 42\n49 43\n49 44\n49 45\n49 46\n49 47\n49 48\n50 13\n50 14\n50 15\n50 16\n50 17\n50 18\n50 19\n50 20\n50 21\n50 22\n50 23\n50 24\n50 25\n50 26\n50 27\n50 28\n50 29\n50 30\n50 31\n50 32\n50 33\n50 34\n50 35\n50 36\n50 37\n50 38\n50 39\n50 40\n50 41\n50 42\n50 43\n50 44\n50 45\n50 46\n50 47\n50 48\n50 49\n51 13\n51 14\n51 15\n51 16\n51 17\n51 18\n51 19\n51 20\n51 21\n51 22\n51 23\n51 24\n51 25\n51 26\n51 27\n51 28\n51 29\n51 30\n51 31\n51 32\n51 33\n51 34\n51 35\n51 36\n51 37\n51 38\n51 39\n51 40\n51 41\n51 42\n51 43\n51 44\n51 45\n51 46\n51 47\n51 48\n51 49\n51 50\n52 13\n52 14\n52 15\n52 16\n52 17\n52 18\n52 19\n52 20\n52 21\n52 22\n52 23\n52 24\n52 25\n52 26\n52 27\n52 28\n52 29\n52 30\n52 31\n52 32\n52 33\n52 34\n52 35\n52 36\n52 37\n52 38\n52 39\n52 40\n52 41\n52 42\n52 43\n52 44\n52 45\n52 46\n52 47\n52 48\n52 49\n52 50\n52 51\n53 13\n53 14\n53 15\n53 16\n53 17\n53 18\n53 19\n53 20\n53 21\n53 22\n53 23\n53 24\n53 25\n53 26\n53 27\n53 28\n53 29\n53 30\n53 31\n53 32\n53 33\n53 34\n53 35\n53 36\n53 37\n53 38\n53 39\n53 40\n53 41\n53 42\n53 43\n53 44\n53 45\n53 46\n53 47\n53 48\n53 49\n53 50\n53 51\n53 52\n54 13\n54 14\n54 15\n54 16\n54 17\n54 18\n54 19\n54 20\n54 21\n54 22\n54 23\n54 24\n54 25\n54 26\n54 27\n54 28\n54 29\n54 30\n54 31\n54 32\n54 33\n54 34\n54 35\n54 36\n54 37\n54 38\n54 39\n54 40\n54 41\n54 42\n54 43\n54 44\n54 45\n54 46\n54 47\n54 48\n54 49\n54 50\n54 51\n54 52\n54 53\n55 13\n55 14\n55 15\n55 16\n55 17\n55 18\n55 19\n55 20\n55 21\n55 22\n55 23\n55 24\n55 25\n55 26\n55 27\n55 28\n55 29\n55 30\n55 31\n55 32\n55 33\n55 34\n55 35\n55 36\n55 37\n55 38\n55 39\n55 40\n55 41\n55 42\n55 43\n55 44\n55 45\n55 46\n55 47\n55 48\n55 49\n55 50\n55 51\n55 52\n55 53\n55 54\n56 13\n56 14\n56 15\n56 16\n56 17\n56 18\n56 19\n56 20\n56 21\n56 22\n56 23\n56 24\n56 25\n56 26\n56 27\n56 28\n56 29\n56 30\n56 31\n56 32\n56 33\n56 34\n56 35\n56 36\n56 37\n56 38\n56 39\n56 40\n56 41\n56 42\n56 43\n56 44\n56 45\n56 46\n56 47\n56 48\n56 49\n56 50\n56 51\n56 52\n56 53\n56 54\n56 55\n57 13\n57 14\n57 15\n57 16\n57 17\n57 18\n57 19\n57 20\n57 21\n57 22\n57 23\n57 24\n57 25\n57 26\n57 27\n57 28\n57 29\n57 30\n57 31\n57 32\n57 33\n57 34\n57 35\n57 36\n57 37\n57 38\n57 39\n57 40\n57 41\n57 42\n57 43\n57 44\n57 45\n57 46\n57 47\n57 48\n57 49\n57 50\n57 51\n57 52\n57 53\n57 54\n57 55\n57 56\n58 13\n58 14\n58 15\n58 16\n58 17\n58 18\n58 19\n58 20\n58 21\n58 22\n58 23\n58 24\n58 25\n58 26\n58 27\n58 28\n58 29\n58 30\n58 31\n58 32\n58 33\n58 34\n58 35\n58 36\n58 37\n58 38\n58 39\n58 40\n58 41\n58 42\n58 43\n58 44\n58 45\n58 46\n58 47\n58 48\n58 49\n58 50\n58 51\n58 52\n58 53\n58 54\n58 55\n58 56\n58 57\n59 13\n59 14\n59 15\n59 16\n59 17\n59 18\n59 19\n59 20\n59 21\n59 22\n59 23\n59 24\n59 25\n59 26\n59 27\n59 28\n59 29\n59 30\n59 31\n59 32\n59 33\n59 34\n59 35\n59 36\n59 37\n59 38\n59 39\n59 40\n59 41\n59 42\n59 43\n59 44\n59 45\n59 46\n59 47\n59 48\n59 49\n59 50\n59 51\n59 52\n59 53\n59 54\n59 55\n59 56\n59 57\n59 58\n60 13\n60 14\n60 15\n60 16\n60 17\n60 18\n60 19\n60 20\n60 21\n60 22\n60 23\n60 24\n60 25\n60 26\n60 27\n60 28\n60 29\n60 30\n60 31\n60 32\n60 33\n60 34\n60 35\n60 36\n60 37\n60 38\n60 39\n60 40\n60 41\n60 42\n60 43\n60 44\n60 45\n60 46\n60 47\n60 48\n60 49\n60 50\n60 51\n60 52\n60 53\n60 54\n60 55\n60 56\n60 57\n60 58\n60 59\n61 13\n61 14\n61 15\n61 16\n61 17\n61 18\n61 19\n61 20\n61 21\n61 22\n61 23\n61 24\n61 25\n61 26\n61 27\n61 28\n61 29\n61 30\n61 31\n61 32\n61 33\n61 34\n61 35\n61 36\n61 37\n61 38\n61 39\n61 40\n61 41\n61 42\n61 43\n61 44\n61 45\n61 46\n61 47\n61 48\n61 49\n61 50\n61 51\n61 52\n61 53\n61 54\n61 55\n61 56\n61 57\n61 58\n61 59\n61 60\n62 13\n62 14\n62 15\n62 16\n62 17\n62 18\n62 19\n62 20\n62 21\n62 22\n62 23\n62 24\n62 25\n62 26\n62 27\n62 28\n62 29\n62 30\n62 31\n62 32\n62 33\n62 34\n62 35\n62 36\n62 37\n62 38\n62 39\n62 40\n62 41\n62 42\n62 43\n62 44\n62 45\n62 46\n62 47\n62 48\n62 49\n62 50\n62 51\n62 52\n62 53\n62 54\n62 55\n62 56\n62 57\n62 58\n62 59\n62 60\n62 61\n63 13\n63 14\n63 15\n63 16\n63 17\n63 18\n63 19\n63 20\n63 21\n63 22\n63 23\n63 24\n63 25\n63 26\n63 27\n63 28\n63 29\n63 30\n63 31\n63 32\n63 33\n63 34\n63 35\n63 36\n63 37\n63 38\n63 39\n63 40\n63 41\n63 42\n63 43\n63 44\n63 45\n63 46\n63 47\n63 48\n63 49\n63 50\n63 51\n63 52\n63 53\n63 54\n63 55\n63 56\n63 57\n63 58\n63 59\n63 60\n63 61\n63 62\n64 13\n64 14\n64 15\n64 16\n64 17\n64 18\n64 19\n64 20\n64 21\n64 22\n64 23\n64 24\n64 25\n64 26\n64 27\n64 28\n64 29\n64 30\n64 31\n64 32\n64 33\n64 34\n64 35\n64 36\n64 37\n64 38\n64 39\n64 40\n64 41\n64 42\n64 43\n64 44\n64 45\n64 46\n64 47\n64 48\n64 49\n64 50\n64 51\n64 52\n64 53\n64 54\n64 55\n64 56\n64 57\n64 58\n64 59\n64 60\n64 61\n64 62\n64 63\n65 13\n65 14\n65 15\n65 16\n65 17\n65 18\n65 19\n65 20\n65 21\n65 22\n65 23\n65 24\n65 25\n65 26\n65 27\n65 28\n65 29\n65 30\n65 31\n65 32\n65 33\n65 34\n65 35\n65 36\n65 37\n65 38\n65 39\n65 40\n65 41\n65 42\n65 43\n65 44\n65 45\n65 46\n65 47\n65 48\n65 49\n65 50\n65 51\n65 52\n65 53\n65 54\n65 55\n65 56\n65 57\n65 58\n65 59\n65 60\n65 61\n65 62\n65 63\n65 64\n66 13\n66 14\n66 15\n66 16\n66 17\n66 18\n66 19\n66 20\n66 21\n66 22\n66 23\n66 24\n66 25\n66 26\n66 27\n66 28\n66 29\n66 30\n66 31\n66 32\n66 33\n66 34\n66 35\n66 36\n66 37\n66 38\n66 39\n66 40\n66 41\n66 42\n66 43\n66 44\n66 45\n66 46\n66 47\n66 48\n66 49\n66 50\n66 51\n66 52\n66 53\n66 54\n66 55\n66 56\n66 57\n66 58\n66 59\n66 60\n66 61\n66 62\n66 63\n66 64\n66 65\n67 13\n67 14\n67 15\n67 16\n67 17\n67 18\n67 19\n67 20\n67 21\n67 22\n67 23\n67 24\n67 25\n67 26\n67 27\n67 28\n67 29\n67 30\n67 31\n67 32\n67 33\n67 34\n67 35\n67 36\n67 37\n67 38\n67 39\n67 40\n67 41\n67 42\n67 43\n67 44\n67 45\n67 46\n67 47\n67 48\n67 49\n67 50\n67 51\n67 52\n67 53\n67 54\n67 55\n67 56\n67 57\n67 58\n67 59\n67 60\n67 61\n67 62\n67 63\n67 64\n67 65\n67 66\n68 13\n68 14\n68 15\n68 16\n68 17\n68 18\n68 19\n68 20\n68 21\n68 22\n68 23\n68 24\n68 25\n68 26\n68 27\n68 28\n68 29\n68 30\n68 31\n68 32\n68 33\n68 34\n68 35\n68 36\n68 37\n68 38\n68 39\n68 40\n68 41\n68 42\n68 43\n68 44\n68 45\n68 46\n68 47\n68 48\n68 49\n68 50\n68 51\n68 52\n68 53\n68 54\n68 55\n68 56\n68 57\n68 58\n68 59\n68 60\n68 61\n68 62\n68 63\n68 64\n68 65\n68 66\n68 67\n69 13\n69 14\n69 15\n69 16\n69 17\n69 18\n69 19\n69 20\n69 21\n69 22\n69 23\n69 24\n69 25\n69 26\n69 27\n69 28\n69 29\n69 30\n69 31\n69 32\n69 33\n69 34\n69 35\n69 36\n69 37\n69 38\n69 39\n69 40\n69 41\n69 42\n69 43\n69 44\n69 45\n69 46\n69 47\n69 48\n69 49\n69 50\n69 51\n69 52\n69 53\n69 54\n69 55\n69 56\n69 57\n69 58\n69 59\n69 60\n69 61\n69 62\n69 63\n69 64\n69 65\n69 66\n69 67\n69 68\n70 13\n70 14\n70 15\n70 16\n70 17\n70 18\n70 19\n70 20\n70 21\n70 22\n70 23\n70 24\n70 25\n70 26\n70 27\n70 28\n70 29\n70 30\n70 31\n70 32\n70 33\n70 34\n70 35\n70 36\n70 37\n70 38\n70 39\n70 40\n70 41\n70 42\n70 43\n70 44\n70 45\n70 46\n70 47\n70 48\n70 49\n70 50\n70 51\n70 52\n70 53\n70 54\n70 55\n70 56\n70 57\n70 58\n70 59\n70 60\n70 61\n70 62\n70 63\n70 64\n70 65\n70 66\n70 67\n70 68\n70 69\n71 13\n71 14\n71 15\n71 16\n71 17\n71 18\n71 19\n71 20\n71 21\n71 22\n71 23\n71 24\n71 25\n71 26\n71 27\n71 28\n71 29\n71 30\n71 31\n71 32\n71 33\n71 34\n71 35\n71 36\n71 37\n71 38\n71 39\n71 40\n71 41\n71 42\n71 43\n71 44\n71 45\n71 46\n71 47\n71 48\n71 49\n71 50\n71 51\n71 52\n71 53\n71 54\n71 55\n71 56\n71 57\n71 58\n71 59\n71 60\n71 61\n71 62\n71 63\n71 64\n71 65\n71 66\n71 67\n71 68\n71 69\n71 70\n72 13\n72 14\n72 15\n72 16\n72 17\n72 18\n72 19\n72 20\n72 21\n72 22\n72 23\n72 24\n72 25\n72 26\n72 27\n72 28\n72 29\n72 30\n72 31\n72 32\n72 33\n72 34\n72 35\n72 36\n72 37\n72 38\n72 39\n72 40\n72 41\n72 42\n72 43\n72 44\n72 45\n72 46\n72 47\n72 48\n72 49\n72 50\n72 51\n72 52\n72 53\n72 54\n72 55\n72 56\n72 57\n72 58\n72 59\n72 60\n72 61\n72 62\n72 63\n72 64\n72 65\n72 66\n72 67\n72 68\n72 69\n72 70\n72 71\n73 13\n73 14\n73 15\n73 16\n73 17\n73 18\n73 19\n73 20\n73 21\n73 22\n73 23\n73 24\n73 25\n73 26\n73 27\n73 28\n73 29\n73 30\n73 31\n73 32\n73 33\n73 34\n73 35\n73 36\n73 37\n73 38\n73 39\n73 40\n73 41\n73 42\n73 43\n73 44\n73 45\n73 46\n73 47\n73 48\n73 49\n73 50\n73 51\n73 52\n73 53\n73 54\n73 55\n73 56\n73 57\n73 58\n73 59\n73 60\n73 61\n73 62\n73 63\n73 64\n73 65\n73 66\n73 67\n73 68\n73 69\n73 70\n73 71\n73 72\n74 13\n74 14\n74 15\n74 16\n74 17\n74 18\n74 19\n74 20\n74 21\n74 22\n74 23\n74 24\n74 25\n74 26\n74 27\n74 28\n74 29\n74 30\n74 31\n74 32\n74 33\n74 34\n74 35\n74 36\n74 37\n74 38\n74 39\n74 40\n74 41\n74 42\n74 43\n74 44\n74 45\n74 46\n74 47\n74 48\n74 49\n74 50\n74 51\n74 52\n74 53\n74 54\n74 55\n74 56\n74 57\n74 58\n74 59\n74 60\n74 61\n74 62\n74 63\n74 64\n74 65\n74 66\n74 67\n74 68\n74 69\n74 70\n74 71\n74 72\n74 73\n75 13\n75 14\n75 15\n75 16\n75 17\n75 18\n75 19\n75 20\n75 21\n75 22\n75 23\n75 24\n75 25\n75 26\n75 27\n75 28\n75 29\n75 30\n75 31\n75 32\n75 33\n75 34\n75 35\n75 36\n75 37\n75 38\n75 39\n75 40\n75 41\n75 42\n75 43\n75 44\n75 45\n75 46\n75 47\n75 48\n75 49\n75 50\n75 51\n75 52\n75 53\n75 54\n75 55\n75 56\n75 57\n75 58\n75 59\n75 60\n75 61\n75 62\n75 63\n75 64\n75 65\n75 66\n75 67\n75 68\n75 69\n75 70\n75 71\n75 72\n75 73\n75 74\n76 13\n76 14\n76 15\n76 16\n76 17\n76 18\n76 19\n76 20\n76 21\n76 22\n76 23\n76 24\n76 25\n76 26\n76 27\n76 28\n76 29\n76 30\n76 31\n76 32\n76 33\n76 34\n76 35\n76 36\n76 37\n76 38\n76 39\n76 40\n76 41\n76 42\n76 43\n76 44\n76 45\n76 46\n76 47\n76 48\n76 49\n76 50\n76 51\n76 52\n76 53\n76 54\n76 55\n76 56\n76 57\n76 58\n76 59\n76 60\n76 61\n76 62\n76 63\n76 64\n76 65\n76 66\n76 67\n76 68\n76 69\n76 70\n76 71\n76 72\n76 73\n76 74\n76 75\n77 13\n77 14\n77 15\n77 16\n77 17\n77 18\n77 19\n77 20\n77 21\n77 22\n77 23\n77 24\n77 25\n77 26\n77 27\n77 28\n77 29\n77 30\n77 31\n77 32\n77 33\n77 34\n77 35\n77 36\n77 37\n77 38\n77 39\n77 40\n77 41\n77 42\n77 43\n77 44\n77 45\n77 46\n77 47\n77 48\n77 49\n77 50\n77 51\n77 52\n77 53\n77 54\n77 55\n77 56\n77 57\n77 58\n77 59\n77 60\n77 61\n77 62\n77 63\n77 64\n77 65\n77 66\n77 67\n77 68\n77 69\n77 70\n77 71\n77 72\n77 73\n77 74\n77 75\n77 76\n78 13\n78 14\n78 15\n78 16\n78 17\n78 18\n78 19\n78 20\n78 21\n78 22\n78 23\n78 24\n78 25\n78 26\n78 27\n78 28\n78 29\n78 30\n78 31\n78 32\n78 33\n78 34\n78 35\n78 36\n78 37\n78 38\n78 39\n78 40\n78 41\n78 42\n78 43\n78 44\n78 45\n78 46\n78 47\n78 48\n78 49\n78 50\n78 51\n78 52\n78 53\n78 54\n78 55\n78 56\n78 57\n78 58\n78 59\n78 60\n78 61\n78 62\n78 63\n78 64\n78 65\n78 66\n78 67\n78 68\n78 69\n78 70\n78 71\n78 72\n78 73\n78 74\n78 75\n78 76\n78 77\n79 13\n79 14\n79 15\n79 16\n79 17\n79 18\n79 19\n79 20\n79 21\n79 22\n79 23\n79 24\n79 25\n79 26\n79 27\n79 28\n79 29\n79 30\n79 31\n79 32\n79 33\n79 34\n79 35\n79 36\n79 37\n79 38\n79 39\n79 40\n79 41\n79 42\n79 43\n79 44\n79 45\n79 46\n79 47\n79 48\n79 49\n79 50\n79 51\n79 52\n79 53\n79 54\n79 55\n79 56\n79 57\n79 58\n79 59\n79 60\n79 61\n79 62\n79 63\n79 64\n79 65\n79 66\n79 67\n79 68\n79 69\n79 70\n79 71\n79 72\n79 73\n79 74\n79 75\n79 76\n79 77\n79 78\n80 13\n80 14\n80 15\n80 16\n80 17\n80 18\n80 19\n80 20\n80 21\n80 22\n80 23\n80 24\n80 25\n80 26\n80 27\n80 28\n80 29\n80 30\n80 31\n80 32\n80 33\n80 34\n80 35\n80 36\n80 37\n80 38\n80 39\n80 40\n80 41\n80 42\n80 43\n80 44\n80 45\n80 46\n80 47\n80 48\n80 49\n80 50\n80 51\n80 52\n80 53\n80 54\n80 55\n80 56\n80 57\n80 58\n80 59\n80 60\n80 61\n80 62\n80 63\n80 64\n80 65\n80 66\n80 67\n80 68\n80 69\n80 70\n80 71\n80 72\n80 73\n80 74\n80 75\n80 76\n80 77\n80 78\n80 79\n81 13\n81 14\n81 15\n81 16\n81 17\n81 18\n81 19\n81 20\n81 21\n81 22\n81 23\n81 24\n81 25\n81 26\n81 27\n81 28\n81 29\n81 30\n81 31\n81 32\n81 33\n81 34\n81 35\n81 36\n81 37\n81 38\n81 39\n81 40\n81 41\n81 42\n81 43\n81 44\n81 45\n81 46\n81 47\n81 48\n81 49\n81 50\n81 51\n81 52\n81 53\n81 54\n81 55\n81 56\n81 57\n81 58\n81 59\n81 60\n81 61\n81 62\n81 63\n81 64\n81 65\n81 66\n81 67\n81 68\n81 69\n81 70\n81 71\n81 72\n81 73\n81 74\n81 75\n81 76\n81 77\n81 78\n81 79\n81 80\n82 13\n82 14\n82 15\n82 16\n82 17\n82 18\n82 19\n82 20\n82 21\n82 22\n82 23\n82 24\n82 25\n82 26\n82 27\n82 28\n82 29\n82 30\n82 31\n82 32\n82 33\n82 34\n82 35\n82 36\n82 37\n82 38\n82 39\n82 40\n82 41\n82 42\n82 43\n82 44\n82 45\n82 46\n82 47\n82 48\n82 49\n82 50\n82 51\n82 52\n82 53\n82 54\n82 55\n82 56\n82 57\n82 58\n82 59\n82 60\n82 61\n82 62\n82 63\n82 64\n82 65\n82 66\n82 67\n82 68\n82 69\n82 70\n82 71\n82 72\n82 73\n82 74\n82 75\n82 76\n82 77\n82 78\n82 79\n82 80\n82 81\n83 13\n83 14\n83 15\n83 16\n83 17\n83 18\n83 19\n83 20\n83 21\n83 22\n83 23\n83 24\n83 25\n83 26\n83 27\n83 28\n83 29\n83 30\n83 31\n83 32\n83 33\n83 34\n83 35\n83 36\n83 37\n83 38\n83 39\n83 40\n83 41\n83 42\n83 43\n83 44\n83 45\n83 46\n83 47\n83 48\n83 49\n83 50\n83 51\n83 52\n83 53\n83 54\n83 55\n83 56\n83 57\n83 58\n83 59\n83 60\n83 61\n83 62\n83 63\n83 64\n83 65\n83 66\n83 67\n83 68\n83 69\n83 70\n83 71\n83 72\n83 73\n83 74\n83 75\n83 76\n83 77\n83 78\n83 79\n83 80\n83 81\n83 82\n84 13\n84 14\n84 15\n84 16\n84 17\n84 18\n84 19\n84 20\n84 21\n84 22\n84 23\n84 24\n84 25\n84 26\n84 27\n84 28\n84 29\n84 30\n84 31\n84 32\n84 33\n84 34\n84 35\n84 36\n84 37\n84 38\n84 39\n84 40\n84 41\n84 42\n84 43\n84 44\n84 45\n84 46\n84 47\n84 48\n84 49\n84 50\n84 51\n84 52\n84 53\n84 54\n84 55\n84 56\n84 57\n84 58\n84 59\n84 60\n84 61\n84 62\n84 63\n84 64\n84 65\n84 66\n84 67\n84 68\n84 69\n84 70\n84 71\n84 72\n84 73\n84 74\n84 75\n84 76\n84 77\n84 78\n84 79\n84 80\n84 81\n84 82\n84 83\n85 13\n85 14\n85 15\n85 16\n85 17\n85 18\n85 19\n85 20\n85 21\n85 22\n85 23\n85 24\n85 25\n85 26\n85 27\n85 28\n85 29\n85 30\n85 31\n85 32\n85 33\n85 34\n85 35\n85 36\n85 37\n85 38\n85 39\n85 40\n85 41\n85 42\n85 43\n85 44\n85 45\n85 46\n85 47\n85 48\n85 49\n85 50\n85 51\n85 52\n85 53\n85 54\n85 55\n85 56\n85 57\n85 58\n85 59\n85 60\n85 61\n85 62\n85 63\n85 64\n85 65\n85 66\n85 67\n85 68\n85 69\n85 70\n85 71\n85 72\n85 73\n85 74\n85 75\n85 76\n85 77\n85 78\n85 79\n85 80\n85 81\n85 82\n85 83\n85 84\n86 13\n86 14\n86 15\n86 16\n86 17\n86 18\n86 19\n86 20\n86 21\n86 22\n86 23\n86 24\n86 25\n86 26\n86 27\n86 28\n86 29\n86 30\n86 31\n86 32\n86 33\n86 34\n86 35\n86 36\n86 37\n86 38\n86 39\n86 40\n86 41\n86 42\n86 43\n86 44\n86 45\n86 46\n86 47\n86 48\n86 49\n86 50\n86 51\n86 52\n86 53\n86 54\n86 55\n86 56\n86 57\n86 58\n86 59\n86 60\n86 61\n86 62\n86 63\n86 64\n86 65\n86 66\n86 67\n86 68\n86 69\n86 70\n86 71\n86 72\n86 73\n86 74\n86 75\n86 76\n86 77\n86 78\n86 79\n86 80\n86 81\n86 82\n86 83\n86 84\n86 85\n87 13\n87 14\n87 15\n87 16\n87 17\n87 18\n87 19\n87 20\n87 21\n87 22\n87 23\n87 24\n87 25\n87 26\n87 27\n87 28\n87 29\n87 30\n87 31\n87 32\n87 33\n87 34\n87 35\n87 36\n87 37\n87 38\n87 39\n87 40\n87 41\n87 42\n87 43\n87 44\n87 45\n87 46\n87 47\n87 48\n87 49\n87 50\n87 51\n87 52\n87 53\n87 54\n87 55\n87 56\n87 57\n87 58\n87 59\n87 60\n87 61\n87 62\n87 63\n87 64\n87 65\n87 66\n87 67\n87 68\n87 69\n87 70\n87 71\n87 72\n87 73\n87 74\n87 75\n87 76\n87 77\n87 78\n87 79\n87 80\n87 81\n87 82\n87 83\n87 84\n87 85\n87 86\n88 13\n88 14\n88 15\n88 16\n88 17\n88 18\n88 19\n88 20\n88 21\n88 22\n88 23\n88 24\n88 25\n88 26\n88 27\n88 28\n88 29\n88 30\n88 31\n88 32\n88 33\n88 34\n88 35\n88 36\n88 37\n88 38\n88 39\n88 40\n88 41\n88 42\n88 43\n88 44\n88 45\n88 46\n88 47\n88 48\n88 49\n88 50\n88 51\n88 52\n88 53\n88 54\n88 55\n88 56\n88 57\n88 58\n88 59\n88 60\n88 61\n88 62\n88 63\n88 64\n88 65\n88 66\n88 67\n88 68\n88 69\n88 70\n88 71\n88 72\n88 73\n88 74\n88 75\n88 76\n88 77\n88 78\n88 79\n88 80\n88 81\n88 82\n88 83\n88 84\n88 85\n88 86\n88 87\n89 13\n89 14\n89 15\n89 16\n89 17\n89 18\n89 19\n89 20\n89 21\n89 22\n89 23\n89 24\n89 25\n89 26\n89 27\n89 28\n89 29\n89 30\n89 31\n89 32\n89 33\n89 34\n89 35\n89 36\n89 37\n89 38\n89 39\n89 40\n89 41\n89 42\n89 43\n89 44\n89 45\n89 46\n89 47\n89 48\n89 49\n89 50\n89 51\n89 52\n89 53\n89 54\n89 55\n89 56\n89 57\n89 58\n89 59\n89 60\n89 61\n89 62\n89 63\n89 64\n89 65\n89 66\n89 67\n89 68\n89 69\n89 70\n89 71\n89 72\n89 73\n89 74\n89 75\n89 76\n89 77\n89 78\n89 79\n89 80\n89 81\n89 82\n89 83\n89 84\n89 85\n89 86\n89 87\n89 88\n90 13\n90 14\n90 15\n90 16\n90 17\n90 18\n90 19\n90 20\n90 21\n90 22\n90 23\n90 24\n90 25\n90 26\n90 27\n90 28\n90 29\n90 30\n90 31\n90 32\n90 33\n90 34\n90 35\n90 36\n90 37\n90 38\n90 39\n90 40\n90 41\n90 42\n90 43\n90 44\n90 45\n90 46\n90 47\n90 48\n90 49\n90 50\n90 51\n90 52\n90 53\n90 54\n90 55\n90 56\n90 57\n90 58\n90 59\n90 60\n90 61\n90 62\n90 63\n90 64\n90 65\n90 66\n90 67\n90 68\n90 69\n90 70\n90 71\n90 72\n90 73\n90 74\n90 75\n90 76\n90 77\n90 78\n90 79\n90 80\n90 81\n90 82\n90 83\n90 84\n90 85\n90 86\n90 87\n90 88\n90 89\n91 13\n91 14\n91 15\n91 16\n91 17\n91 18\n91 19\n91 20\n91 21\n91 22\n91 23\n91 24\n91 25\n91 26\n91 27\n91 28\n91 29\n91 30\n91 31\n91 32\n91 33\n91 34\n91 35\n91 36\n91 37\n91 38\n91 39\n91 40\n91 41\n91 42\n91 43\n91 44\n91 45\n91 46\n91 47\n91 48\n91 49\n91 50\n91 51\n91 52\n91 53\n91 54\n91 55\n91 56\n91 57\n91 58\n91 59\n91 60\n91 61\n91 62\n91 63\n91 64\n91 65\n91 66\n91 67\n91 68\n91 69\n91 70\n91 71\n91 72\n91 73\n91 74\n91 75\n91 76\n91 77\n91 78\n91 79\n91 80\n91 81\n91 82\n91 83\n91 84\n91 85\n91 86\n91 87\n91 88\n91 89\n91 90\n92 13\n92 14\n92 15\n92 16\n92 17\n92 18\n92 19\n92 20\n92 21\n92 22\n92 23\n92 24\n92 25\n92 26\n92 27\n92 28\n92 29\n92 30\n92 31\n92 32\n92 33\n92 34\n92 35\n92 36\n92 37\n92 38\n92 39\n92 40\n92 41\n92 42\n92 43\n92 44\n92 45\n92 46\n92 47\n92 48\n92 49\n92 50\n92 51\n92 52\n92 53\n92 54\n92 55\n92 56\n92 57\n92 58\n92 59\n92 60\n92 61\n92 62\n92 63\n92 64\n92 65\n92 66\n92 67\n92 68\n92 69\n92 70\n92 71\n92 72\n92 73\n92 74\n92 75\n92 76\n92 77\n92 78\n92 79\n92 80\n92 81\n92 82\n92 83\n92 84\n92 85\n92 86\n92 87\n92 88\n92 89\n92 90\n92 91\n93 13\n93 14\n93 15\n93 16\n93 17\n93 18\n93 19\n93 20\n93 21\n93 22\n93 23\n93 24\n93 25\n93 26\n93 27\n93 28\n93 29\n93 30\n93 31\n93 32\n93 33\n93 34\n93 35\n93 36\n93 37\n93 38\n93 39\n93 40\n93 41\n93 42\n93 43\n93 44\n93 45\n93 46\n93 47\n93 48\n93 49\n93 50\n93 51\n93 52\n93 53\n93 54\n93 55\n93 56\n93 57\n93 58\n93 59\n93 60\n93 61\n93 62\n93 63\n93 64\n93 65\n93 66\n93 67\n93 68\n93 69\n93 70\n93 71\n93 72\n93 73\n93 74\n93 75\n93 76\n93 77\n93 78\n93 79\n93 80\n93 81\n93 82\n93 83\n93 84\n93 85\n93 86\n93 87\n93 88\n93 89\n93 90\n93 91\n93 92\n94 13\n94 14\n94 15\n94 16\n94 17\n94 18\n94 19\n94 20\n94 21\n94 22\n94 23\n94 24\n94 25\n94 26\n94 27\n94 28\n94 29\n94 30\n94 31\n94 32\n94 33\n94 34\n94 35\n94 36\n94 37\n94 38\n94 39\n94 40\n94 41\n94 42\n94 43\n94 44\n94 45\n94 46\n94 47\n94 48\n94 49\n94 50\n94 51\n94 52\n94 53\n94 54\n94 55\n94 56\n94 57\n94 58\n94 59\n94 60\n94 61\n94 62\n94 63\n94 64\n94 65\n94 66\n94 67\n94 68\n94 69\n94 70\n94 71\n94 72\n94 73\n94 74\n94 75\n94 76\n94 77\n94 78\n94 79\n94 80\n94 81\n94 82\n94 83\n94 84\n94 85\n94 86\n94 87\n94 88\n94 89\n94 90\n94 91\n94 92\n94 93\n95 13\n95 14\n95 15\n95 16\n95 17\n95 18\n95 19\n95 20\n95 21\n95 22\n95 23\n95 24\n95 25\n95 26\n95 27\n95 28\n95 29\n95 30\n95 31\n95 32\n95 33\n95 34\n95 35\n95 36\n95 37\n95 38\n95 39\n95 40\n95 41\n95 42\n95 43\n95 44\n95 45\n95 46\n95 47\n95 48\n95 49\n95 50\n95 51\n95 52\n95 53\n95 54\n95 55\n95 56\n95 57\n95 58\n95 59\n95 60\n95 61\n95 62\n95 63\n95 64\n95 65\n95 66\n95 67\n95 68\n95 69\n95 70\n95 71\n95 72\n95 73\n95 74\n95 75\n95 76\n95 77\n95 78\n95 79\n95 80\n95 81\n95 82\n95 83\n95 84\n95 85\n95 86\n95 87\n95 88\n95 89\n95 90\n95 91\n95 92\n95 93\n95 94\n96 13\n96 14\n96 15\n96 16\n96 17\n96 18\n96 19\n96 20\n96 21\n96 22\n96 23\n96 24\n96 25\n96 26\n96 27\n96 28\n96 29\n96 30\n96 31\n96 32\n96 33\n96 34\n96 35\n96 36\n96 37\n96 38\n96 39\n96 40\n96 41\n96 42\n96 43\n96 44\n96 45\n96 46\n96 47\n96 48\n96 49\n96 50\n96 51\n96 52\n96 53\n96 54\n96 55\n96 56\n96 57\n96 58\n96 59\n96 60\n96 61\n96 62\n96 63\n96 64\n96 65\n96 66\n96 67\n96 68\n96 69\n96 70\n96 71\n96 72\n96 73\n96 74\n96 75\n96 76\n96 77\n96 78\n96 79\n96 80\n96 81\n96 82\n96 83\n96 84\n96 85\n96 86\n96 87\n96 88\n96 89\n96 90\n96 91\n96 92\n96 93\n96 94\n96 95\n97 13\n97 14\n97 15\n97 16\n97 17\n97 18\n97 19\n97 20\n97 21\n97 22\n97 23\n97 24\n97 25\n97 26\n97 27\n97 28\n97 29\n97 30\n97 31\n97 32\n97 33\n97 34\n97 35\n97 36\n97 37\n97 38\n97 39\n97 40\n97 41\n97 42\n97 43\n97 44\n97 45\n97 46\n97 47\n97 48\n97 49\n97 50\n97 51\n97 52\n97 53\n97 54\n97 55\n97 56\n97 57\n97 58\n97 59\n97 60\n97 61\n97 62\n97 63\n97 64\n97 65\n97 66\n97 67\n97 68\n97 69\n97 70\n97 71\n97 72\n97 73\n97 74\n97 75\n97 76\n97 77\n97 78\n97 79\n97 80\n97 81\n97 82\n97 83\n97 84\n97 85\n97 86\n97 87\n97 88\n97 89\n97 90\n97 91\n97 92\n97 93\n97 94\n97 95\n97 96\n98 13\n98 14\n98 15\n98 16\n98 17\n98 18\n98 19\n98 20\n98 21\n98 22\n98 23\n98 24\n98 25\n98 26\n98 27\n98 28\n98 29\n98 30\n98 31\n98 32\n98 33\n98 34\n98 35\n98 36\n98 37\n98 38\n98 39\n98 40\n98 41\n98 42\n98 43\n98 44\n98 45\n98 46\n98 47\n98 48\n98 49\n98 50\n98 51\n98 52\n98 53\n98 54\n98 55\n98 56\n98 57\n98 58\n98 59\n98 60\n98 61\n98 62\n98 63\n98 64\n98 65\n98 66\n98 67\n98 68\n98 69\n98 70\n98 71\n98 72\n98 73\n98 74\n98 75\n98 76\n98 77\n98 78\n98 79\n98 80\n98 81\n98 82\n98 83\n98 84\n98 85\n98 86\n98 87\n98 88\n98 89\n98 90\n98 91\n98 92\n98 93\n98 94\n98 95\n98 96\n98 97\n99 13\n99 14\n99 15\n99 16\n99 17\n99 18\n99 19\n99 20\n99 21\n99 22\n99 23\n99 24\n99 25\n99 26\n99 27\n99 28\n99 29\n99 30\n99 31\n99 32\n99 33\n99 34\n99 35\n99 36\n99 37\n99 38\n99 39\n99 40\n99 41\n99 42\n99 43\n99 44\n99 45\n99 46\n99 47\n99 48\n99 49\n99 50\n99 51\n99 52\n99 53\n99 54\n99 55\n99 56\n99 57\n99 58\n99 59\n99 60\n99 61\n99 62\n99 63\n99 64\n99 65\n99 66\n99 67\n99 68\n99 69\n99 70\n99 71\n99 72\n99 73\n99 74\n99 75\n99 76\n99 77\n99 78\n99 79\n99 80\n99 81\n99 82\n99 83\n99 84\n99 85\n99 86\n99 87\n99 88\n99 89\n99 90\n99 91\n99 92\n99 93\n99 94\n99 95\n99 96\n99 97\n99 98\n100 13\n100 14\n100 15\n100 16\n100 17\n100 18\n100 19\n100 20\n100 21\n100 22\n100 23\n100 24\n100 25\n100 26\n100 27\n100 28\n100 29\n100 30\n100 31\n100 32\n100 33\n100 34\n100 35\n100 36\n100 37\n100 38\n100 39\n100 40\n100 41\n100 42\n100 43\n100 44\n100 45\n100 46\n100 47\n100 48\n100 49\n100 50\n100 51\n100 52\n100 53\n100 54\n100 55\n100 56\n100 57\n100 58\n100 59\n100 60\n100 61\n100 62\n100 63\n100 64\n100 65\n100 66\n100 67\n100 68\n100 69\n100 70\n100 71\n100 72\n100 73\n100 74\n100 75\n100 76\n100 77\n100 78\n100 79\n100 80\n100 81\n100 82\n100 83\n100 84\n100 85\n100 86\n100 87\n100 88\n100 89\n100 90\n100 91\n100 92\n100 93\n100 94\n100 95\n100 96\n100 97\n100 98\n100 99\n" }, { "input": "60 50 30 40\n", "output": "165\n41 40\n42 40\n42 41\n43 40\n43 41\n43 42\n44 40\n44 41\n44 42\n44 43\n45 40\n45 41\n45 42\n45 43\n45 44\n46 40\n46 41\n46 42\n46 43\n46 44\n46 45\n47 40\n47 41\n47 42\n47 43\n47 44\n47 45\n47 46\n48 40\n48 41\n48 42\n48 43\n48 44\n48 45\n48 46\n48 47\n49 40\n49 41\n49 42\n49 43\n49 44\n49 45\n49 46\n49 47\n49 48\n50 40\n50 41\n50 42\n50 43\n50 44\n50 45\n50 46\n50 47\n50 48\n50 49\n51 40\n51 41\n51 42\n51 43\n51 44\n51 45\n51 46\n51 47\n51 48\n51 49\n51 50\n52 40\n52 41\n52 42\n52 43\n52 44\n52 45\n52 46\n52 47\n52 48\n52 49\n52 50\n53 40\n53 41\n53 42\n53 43\n53 44\n53 45\n53 46\n53 47\n53 48\n53 49\n53 50\n54 40\n54 41\n54 42\n54 43\n54 44\n54 45\n54 46\n54 47\n54 48\n54 49\n54 50\n55 40\n55 41\n55 42\n55 43\n55 44\n55 45\n55 46\n55 47\n55 48\n55 49\n55 50\n56 40\n56 41\n56 42\n56 43\n56 44\n56 45\n56 46\n56 47\n56 48\n56 49\n56 50\n57 40\n57 41\n57 42\n57 43\n57 44\n57 45\n57 46\n57 47\n57 48\n57 49\n57 50\n58 40\n58 41\n58 42\n58 43\n58 44\n58 45\n58 46\n58 47\n58 48\n58 49\n58 50\n59 40\n59 41\n59 42\n59 43\n59 44\n59 45\n59 46\n59 47\n59 48\n59 49\n59 50\n60 40\n60 41\n60 42\n60 43\n60 44\n60 45\n60 46\n60 47\n60 48\n60 49\n60 50\n" }, { "input": "50 50 1 30\n", "output": "210\n31 30\n32 30\n32 31\n33 30\n33 31\n33 32\n34 30\n34 31\n34 32\n34 33\n35 30\n35 31\n35 32\n35 33\n35 34\n36 30\n36 31\n36 32\n36 33\n36 34\n36 35\n37 30\n37 31\n37 32\n37 33\n37 34\n37 35\n37 36\n38 30\n38 31\n38 32\n38 33\n38 34\n38 35\n38 36\n38 37\n39 30\n39 31\n39 32\n39 33\n39 34\n39 35\n39 36\n39 37\n39 38\n40 30\n40 31\n40 32\n40 33\n40 34\n40 35\n40 36\n40 37\n40 38\n40 39\n41 30\n41 31\n41 32\n41 33\n41 34\n41 35\n41 36\n41 37\n41 38\n41 39\n41 40\n42 30\n42 31\n42 32\n42 33\n42 34\n42 35\n42 36\n42 37\n42 38\n42 39\n42 40\n42 41\n43 30\n43 31\n43 32\n43 33\n43 34\n43 35\n43 36\n43 37\n43 38\n43 39\n43 40\n43 41\n43 42\n44 30\n44 31\n44 32\n44 33\n44 34\n44 35\n44 36\n44 37\n44 38\n44 39\n44 40\n44 41\n44 42\n44 43\n45 30\n45 31\n45 32\n45 33\n45 34\n45 35\n45 36\n45 37\n45 38\n45 39\n45 40\n45 41\n45 42\n45 43\n45 44\n46 30\n46 31\n46 32\n46 33\n46 34\n46 35\n46 36\n46 37\n46 38\n46 39\n46 40\n46 41\n46 42\n46 43\n46 44\n46 45\n47 30\n47 31\n47 32\n47 33\n47 34\n47 35\n47 36\n47 37\n47 38\n47 39\n47 40\n47 41\n47 42\n47 43\n47 44\n47 45\n47 46\n48 30\n48 31\n48 32\n48 33\n48 34\n48 35\n48 36\n48 37\n48 38\n48 39\n48 40\n48 41\n48 42\n48 43\n48 44\n48 45\n48 46\n48 47\n49 30\n49 31\n49 32\n49 33\n49 34\n49 35\n49 36\n49 37\n49 38\n49 39\n49 40\n49 41\n49 42\n49 43\n49 44\n49 45\n49 46\n49 47\n49 48\n50 30\n50 31\n50 32\n50 33\n50 34\n50 35\n50 36\n50 37\n50 38\n50 39\n50 40\n50 41\n50 42\n50 43\n50 44\n50 45\n50 46\n50 47\n50 48\n50 49\n" }, { "input": "100 99 10 13\n", "output": "3828\n14 13\n15 13\n15 14\n16 13\n16 14\n16 15\n17 13\n17 14\n17 15\n17 16\n18 13\n18 14\n18 15\n18 16\n18 17\n19 13\n19 14\n19 15\n19 16\n19 17\n19 18\n20 13\n20 14\n20 15\n20 16\n20 17\n20 18\n20 19\n21 13\n21 14\n21 15\n21 16\n21 17\n21 18\n21 19\n21 20\n22 13\n22 14\n22 15\n22 16\n22 17\n22 18\n22 19\n22 20\n22 21\n23 13\n23 14\n23 15\n23 16\n23 17\n23 18\n23 19\n23 20\n23 21\n23 22\n24 13\n24 14\n24 15\n24 16\n24 17\n24 18\n24 19\n24 20\n24 21\n24 22\n24 23\n25 13\n25 14\n25 15\n25 16\n25 17\n25 18\n25 19\n25 20\n25 21\n25 22\n25 23\n25 24\n26 13\n26 14\n26 15\n26 16\n26 17\n26 18\n26 19\n26 20\n26 21\n26 22\n26 23\n26 24\n26 25\n27 13\n27 14\n27 15\n27 16\n27 17\n27 18\n27 19\n27 20\n27 21\n27 22\n27 23\n27 24\n27 25\n27 26\n28 13\n28 14\n28 15\n28 16\n28 17\n28 18\n28 19\n28 20\n28 21\n28 22\n28 23\n28 24\n28 25\n28 26\n28 27\n29 13\n29 14\n29 15\n29 16\n29 17\n29 18\n29 19\n29 20\n29 21\n29 22\n29 23\n29 24\n29 25\n29 26\n29 27\n29 28\n30 13\n30 14\n30 15\n30 16\n30 17\n30 18\n30 19\n30 20\n30 21\n30 22\n30 23\n30 24\n30 25\n30 26\n30 27\n30 28\n30 29\n31 13\n31 14\n31 15\n31 16\n31 17\n31 18\n31 19\n31 20\n31 21\n31 22\n31 23\n31 24\n31 25\n31 26\n31 27\n31 28\n31 29\n31 30\n32 13\n32 14\n32 15\n32 16\n32 17\n32 18\n32 19\n32 20\n32 21\n32 22\n32 23\n32 24\n32 25\n32 26\n32 27\n32 28\n32 29\n32 30\n32 31\n33 13\n33 14\n33 15\n33 16\n33 17\n33 18\n33 19\n33 20\n33 21\n33 22\n33 23\n33 24\n33 25\n33 26\n33 27\n33 28\n33 29\n33 30\n33 31\n33 32\n34 13\n34 14\n34 15\n34 16\n34 17\n34 18\n34 19\n34 20\n34 21\n34 22\n34 23\n34 24\n34 25\n34 26\n34 27\n34 28\n34 29\n34 30\n34 31\n34 32\n34 33\n35 13\n35 14\n35 15\n35 16\n35 17\n35 18\n35 19\n35 20\n35 21\n35 22\n35 23\n35 24\n35 25\n35 26\n35 27\n35 28\n35 29\n35 30\n35 31\n35 32\n35 33\n35 34\n36 13\n36 14\n36 15\n36 16\n36 17\n36 18\n36 19\n36 20\n36 21\n36 22\n36 23\n36 24\n36 25\n36 26\n36 27\n36 28\n36 29\n36 30\n36 31\n36 32\n36 33\n36 34\n36 35\n37 13\n37 14\n37 15\n37 16\n37 17\n37 18\n37 19\n37 20\n37 21\n37 22\n37 23\n37 24\n37 25\n37 26\n37 27\n37 28\n37 29\n37 30\n37 31\n37 32\n37 33\n37 34\n37 35\n37 36\n38 13\n38 14\n38 15\n38 16\n38 17\n38 18\n38 19\n38 20\n38 21\n38 22\n38 23\n38 24\n38 25\n38 26\n38 27\n38 28\n38 29\n38 30\n38 31\n38 32\n38 33\n38 34\n38 35\n38 36\n38 37\n39 13\n39 14\n39 15\n39 16\n39 17\n39 18\n39 19\n39 20\n39 21\n39 22\n39 23\n39 24\n39 25\n39 26\n39 27\n39 28\n39 29\n39 30\n39 31\n39 32\n39 33\n39 34\n39 35\n39 36\n39 37\n39 38\n40 13\n40 14\n40 15\n40 16\n40 17\n40 18\n40 19\n40 20\n40 21\n40 22\n40 23\n40 24\n40 25\n40 26\n40 27\n40 28\n40 29\n40 30\n40 31\n40 32\n40 33\n40 34\n40 35\n40 36\n40 37\n40 38\n40 39\n41 13\n41 14\n41 15\n41 16\n41 17\n41 18\n41 19\n41 20\n41 21\n41 22\n41 23\n41 24\n41 25\n41 26\n41 27\n41 28\n41 29\n41 30\n41 31\n41 32\n41 33\n41 34\n41 35\n41 36\n41 37\n41 38\n41 39\n41 40\n42 13\n42 14\n42 15\n42 16\n42 17\n42 18\n42 19\n42 20\n42 21\n42 22\n42 23\n42 24\n42 25\n42 26\n42 27\n42 28\n42 29\n42 30\n42 31\n42 32\n42 33\n42 34\n42 35\n42 36\n42 37\n42 38\n42 39\n42 40\n42 41\n43 13\n43 14\n43 15\n43 16\n43 17\n43 18\n43 19\n43 20\n43 21\n43 22\n43 23\n43 24\n43 25\n43 26\n43 27\n43 28\n43 29\n43 30\n43 31\n43 32\n43 33\n43 34\n43 35\n43 36\n43 37\n43 38\n43 39\n43 40\n43 41\n43 42\n44 13\n44 14\n44 15\n44 16\n44 17\n44 18\n44 19\n44 20\n44 21\n44 22\n44 23\n44 24\n44 25\n44 26\n44 27\n44 28\n44 29\n44 30\n44 31\n44 32\n44 33\n44 34\n44 35\n44 36\n44 37\n44 38\n44 39\n44 40\n44 41\n44 42\n44 43\n45 13\n45 14\n45 15\n45 16\n45 17\n45 18\n45 19\n45 20\n45 21\n45 22\n45 23\n45 24\n45 25\n45 26\n45 27\n45 28\n45 29\n45 30\n45 31\n45 32\n45 33\n45 34\n45 35\n45 36\n45 37\n45 38\n45 39\n45 40\n45 41\n45 42\n45 43\n45 44\n46 13\n46 14\n46 15\n46 16\n46 17\n46 18\n46 19\n46 20\n46 21\n46 22\n46 23\n46 24\n46 25\n46 26\n46 27\n46 28\n46 29\n46 30\n46 31\n46 32\n46 33\n46 34\n46 35\n46 36\n46 37\n46 38\n46 39\n46 40\n46 41\n46 42\n46 43\n46 44\n46 45\n47 13\n47 14\n47 15\n47 16\n47 17\n47 18\n47 19\n47 20\n47 21\n47 22\n47 23\n47 24\n47 25\n47 26\n47 27\n47 28\n47 29\n47 30\n47 31\n47 32\n47 33\n47 34\n47 35\n47 36\n47 37\n47 38\n47 39\n47 40\n47 41\n47 42\n47 43\n47 44\n47 45\n47 46\n48 13\n48 14\n48 15\n48 16\n48 17\n48 18\n48 19\n48 20\n48 21\n48 22\n48 23\n48 24\n48 25\n48 26\n48 27\n48 28\n48 29\n48 30\n48 31\n48 32\n48 33\n48 34\n48 35\n48 36\n48 37\n48 38\n48 39\n48 40\n48 41\n48 42\n48 43\n48 44\n48 45\n48 46\n48 47\n49 13\n49 14\n49 15\n49 16\n49 17\n49 18\n49 19\n49 20\n49 21\n49 22\n49 23\n49 24\n49 25\n49 26\n49 27\n49 28\n49 29\n49 30\n49 31\n49 32\n49 33\n49 34\n49 35\n49 36\n49 37\n49 38\n49 39\n49 40\n49 41\n49 42\n49 43\n49 44\n49 45\n49 46\n49 47\n49 48\n50 13\n50 14\n50 15\n50 16\n50 17\n50 18\n50 19\n50 20\n50 21\n50 22\n50 23\n50 24\n50 25\n50 26\n50 27\n50 28\n50 29\n50 30\n50 31\n50 32\n50 33\n50 34\n50 35\n50 36\n50 37\n50 38\n50 39\n50 40\n50 41\n50 42\n50 43\n50 44\n50 45\n50 46\n50 47\n50 48\n50 49\n51 13\n51 14\n51 15\n51 16\n51 17\n51 18\n51 19\n51 20\n51 21\n51 22\n51 23\n51 24\n51 25\n51 26\n51 27\n51 28\n51 29\n51 30\n51 31\n51 32\n51 33\n51 34\n51 35\n51 36\n51 37\n51 38\n51 39\n51 40\n51 41\n51 42\n51 43\n51 44\n51 45\n51 46\n51 47\n51 48\n51 49\n51 50\n52 13\n52 14\n52 15\n52 16\n52 17\n52 18\n52 19\n52 20\n52 21\n52 22\n52 23\n52 24\n52 25\n52 26\n52 27\n52 28\n52 29\n52 30\n52 31\n52 32\n52 33\n52 34\n52 35\n52 36\n52 37\n52 38\n52 39\n52 40\n52 41\n52 42\n52 43\n52 44\n52 45\n52 46\n52 47\n52 48\n52 49\n52 50\n52 51\n53 13\n53 14\n53 15\n53 16\n53 17\n53 18\n53 19\n53 20\n53 21\n53 22\n53 23\n53 24\n53 25\n53 26\n53 27\n53 28\n53 29\n53 30\n53 31\n53 32\n53 33\n53 34\n53 35\n53 36\n53 37\n53 38\n53 39\n53 40\n53 41\n53 42\n53 43\n53 44\n53 45\n53 46\n53 47\n53 48\n53 49\n53 50\n53 51\n53 52\n54 13\n54 14\n54 15\n54 16\n54 17\n54 18\n54 19\n54 20\n54 21\n54 22\n54 23\n54 24\n54 25\n54 26\n54 27\n54 28\n54 29\n54 30\n54 31\n54 32\n54 33\n54 34\n54 35\n54 36\n54 37\n54 38\n54 39\n54 40\n54 41\n54 42\n54 43\n54 44\n54 45\n54 46\n54 47\n54 48\n54 49\n54 50\n54 51\n54 52\n54 53\n55 13\n55 14\n55 15\n55 16\n55 17\n55 18\n55 19\n55 20\n55 21\n55 22\n55 23\n55 24\n55 25\n55 26\n55 27\n55 28\n55 29\n55 30\n55 31\n55 32\n55 33\n55 34\n55 35\n55 36\n55 37\n55 38\n55 39\n55 40\n55 41\n55 42\n55 43\n55 44\n55 45\n55 46\n55 47\n55 48\n55 49\n55 50\n55 51\n55 52\n55 53\n55 54\n56 13\n56 14\n56 15\n56 16\n56 17\n56 18\n56 19\n56 20\n56 21\n56 22\n56 23\n56 24\n56 25\n56 26\n56 27\n56 28\n56 29\n56 30\n56 31\n56 32\n56 33\n56 34\n56 35\n56 36\n56 37\n56 38\n56 39\n56 40\n56 41\n56 42\n56 43\n56 44\n56 45\n56 46\n56 47\n56 48\n56 49\n56 50\n56 51\n56 52\n56 53\n56 54\n56 55\n57 13\n57 14\n57 15\n57 16\n57 17\n57 18\n57 19\n57 20\n57 21\n57 22\n57 23\n57 24\n57 25\n57 26\n57 27\n57 28\n57 29\n57 30\n57 31\n57 32\n57 33\n57 34\n57 35\n57 36\n57 37\n57 38\n57 39\n57 40\n57 41\n57 42\n57 43\n57 44\n57 45\n57 46\n57 47\n57 48\n57 49\n57 50\n57 51\n57 52\n57 53\n57 54\n57 55\n57 56\n58 13\n58 14\n58 15\n58 16\n58 17\n58 18\n58 19\n58 20\n58 21\n58 22\n58 23\n58 24\n58 25\n58 26\n58 27\n58 28\n58 29\n58 30\n58 31\n58 32\n58 33\n58 34\n58 35\n58 36\n58 37\n58 38\n58 39\n58 40\n58 41\n58 42\n58 43\n58 44\n58 45\n58 46\n58 47\n58 48\n58 49\n58 50\n58 51\n58 52\n58 53\n58 54\n58 55\n58 56\n58 57\n59 13\n59 14\n59 15\n59 16\n59 17\n59 18\n59 19\n59 20\n59 21\n59 22\n59 23\n59 24\n59 25\n59 26\n59 27\n59 28\n59 29\n59 30\n59 31\n59 32\n59 33\n59 34\n59 35\n59 36\n59 37\n59 38\n59 39\n59 40\n59 41\n59 42\n59 43\n59 44\n59 45\n59 46\n59 47\n59 48\n59 49\n59 50\n59 51\n59 52\n59 53\n59 54\n59 55\n59 56\n59 57\n59 58\n60 13\n60 14\n60 15\n60 16\n60 17\n60 18\n60 19\n60 20\n60 21\n60 22\n60 23\n60 24\n60 25\n60 26\n60 27\n60 28\n60 29\n60 30\n60 31\n60 32\n60 33\n60 34\n60 35\n60 36\n60 37\n60 38\n60 39\n60 40\n60 41\n60 42\n60 43\n60 44\n60 45\n60 46\n60 47\n60 48\n60 49\n60 50\n60 51\n60 52\n60 53\n60 54\n60 55\n60 56\n60 57\n60 58\n60 59\n61 13\n61 14\n61 15\n61 16\n61 17\n61 18\n61 19\n61 20\n61 21\n61 22\n61 23\n61 24\n61 25\n61 26\n61 27\n61 28\n61 29\n61 30\n61 31\n61 32\n61 33\n61 34\n61 35\n61 36\n61 37\n61 38\n61 39\n61 40\n61 41\n61 42\n61 43\n61 44\n61 45\n61 46\n61 47\n61 48\n61 49\n61 50\n61 51\n61 52\n61 53\n61 54\n61 55\n61 56\n61 57\n61 58\n61 59\n61 60\n62 13\n62 14\n62 15\n62 16\n62 17\n62 18\n62 19\n62 20\n62 21\n62 22\n62 23\n62 24\n62 25\n62 26\n62 27\n62 28\n62 29\n62 30\n62 31\n62 32\n62 33\n62 34\n62 35\n62 36\n62 37\n62 38\n62 39\n62 40\n62 41\n62 42\n62 43\n62 44\n62 45\n62 46\n62 47\n62 48\n62 49\n62 50\n62 51\n62 52\n62 53\n62 54\n62 55\n62 56\n62 57\n62 58\n62 59\n62 60\n62 61\n63 13\n63 14\n63 15\n63 16\n63 17\n63 18\n63 19\n63 20\n63 21\n63 22\n63 23\n63 24\n63 25\n63 26\n63 27\n63 28\n63 29\n63 30\n63 31\n63 32\n63 33\n63 34\n63 35\n63 36\n63 37\n63 38\n63 39\n63 40\n63 41\n63 42\n63 43\n63 44\n63 45\n63 46\n63 47\n63 48\n63 49\n63 50\n63 51\n63 52\n63 53\n63 54\n63 55\n63 56\n63 57\n63 58\n63 59\n63 60\n63 61\n63 62\n64 13\n64 14\n64 15\n64 16\n64 17\n64 18\n64 19\n64 20\n64 21\n64 22\n64 23\n64 24\n64 25\n64 26\n64 27\n64 28\n64 29\n64 30\n64 31\n64 32\n64 33\n64 34\n64 35\n64 36\n64 37\n64 38\n64 39\n64 40\n64 41\n64 42\n64 43\n64 44\n64 45\n64 46\n64 47\n64 48\n64 49\n64 50\n64 51\n64 52\n64 53\n64 54\n64 55\n64 56\n64 57\n64 58\n64 59\n64 60\n64 61\n64 62\n64 63\n65 13\n65 14\n65 15\n65 16\n65 17\n65 18\n65 19\n65 20\n65 21\n65 22\n65 23\n65 24\n65 25\n65 26\n65 27\n65 28\n65 29\n65 30\n65 31\n65 32\n65 33\n65 34\n65 35\n65 36\n65 37\n65 38\n65 39\n65 40\n65 41\n65 42\n65 43\n65 44\n65 45\n65 46\n65 47\n65 48\n65 49\n65 50\n65 51\n65 52\n65 53\n65 54\n65 55\n65 56\n65 57\n65 58\n65 59\n65 60\n65 61\n65 62\n65 63\n65 64\n66 13\n66 14\n66 15\n66 16\n66 17\n66 18\n66 19\n66 20\n66 21\n66 22\n66 23\n66 24\n66 25\n66 26\n66 27\n66 28\n66 29\n66 30\n66 31\n66 32\n66 33\n66 34\n66 35\n66 36\n66 37\n66 38\n66 39\n66 40\n66 41\n66 42\n66 43\n66 44\n66 45\n66 46\n66 47\n66 48\n66 49\n66 50\n66 51\n66 52\n66 53\n66 54\n66 55\n66 56\n66 57\n66 58\n66 59\n66 60\n66 61\n66 62\n66 63\n66 64\n66 65\n67 13\n67 14\n67 15\n67 16\n67 17\n67 18\n67 19\n67 20\n67 21\n67 22\n67 23\n67 24\n67 25\n67 26\n67 27\n67 28\n67 29\n67 30\n67 31\n67 32\n67 33\n67 34\n67 35\n67 36\n67 37\n67 38\n67 39\n67 40\n67 41\n67 42\n67 43\n67 44\n67 45\n67 46\n67 47\n67 48\n67 49\n67 50\n67 51\n67 52\n67 53\n67 54\n67 55\n67 56\n67 57\n67 58\n67 59\n67 60\n67 61\n67 62\n67 63\n67 64\n67 65\n67 66\n68 13\n68 14\n68 15\n68 16\n68 17\n68 18\n68 19\n68 20\n68 21\n68 22\n68 23\n68 24\n68 25\n68 26\n68 27\n68 28\n68 29\n68 30\n68 31\n68 32\n68 33\n68 34\n68 35\n68 36\n68 37\n68 38\n68 39\n68 40\n68 41\n68 42\n68 43\n68 44\n68 45\n68 46\n68 47\n68 48\n68 49\n68 50\n68 51\n68 52\n68 53\n68 54\n68 55\n68 56\n68 57\n68 58\n68 59\n68 60\n68 61\n68 62\n68 63\n68 64\n68 65\n68 66\n68 67\n69 13\n69 14\n69 15\n69 16\n69 17\n69 18\n69 19\n69 20\n69 21\n69 22\n69 23\n69 24\n69 25\n69 26\n69 27\n69 28\n69 29\n69 30\n69 31\n69 32\n69 33\n69 34\n69 35\n69 36\n69 37\n69 38\n69 39\n69 40\n69 41\n69 42\n69 43\n69 44\n69 45\n69 46\n69 47\n69 48\n69 49\n69 50\n69 51\n69 52\n69 53\n69 54\n69 55\n69 56\n69 57\n69 58\n69 59\n69 60\n69 61\n69 62\n69 63\n69 64\n69 65\n69 66\n69 67\n69 68\n70 13\n70 14\n70 15\n70 16\n70 17\n70 18\n70 19\n70 20\n70 21\n70 22\n70 23\n70 24\n70 25\n70 26\n70 27\n70 28\n70 29\n70 30\n70 31\n70 32\n70 33\n70 34\n70 35\n70 36\n70 37\n70 38\n70 39\n70 40\n70 41\n70 42\n70 43\n70 44\n70 45\n70 46\n70 47\n70 48\n70 49\n70 50\n70 51\n70 52\n70 53\n70 54\n70 55\n70 56\n70 57\n70 58\n70 59\n70 60\n70 61\n70 62\n70 63\n70 64\n70 65\n70 66\n70 67\n70 68\n70 69\n71 13\n71 14\n71 15\n71 16\n71 17\n71 18\n71 19\n71 20\n71 21\n71 22\n71 23\n71 24\n71 25\n71 26\n71 27\n71 28\n71 29\n71 30\n71 31\n71 32\n71 33\n71 34\n71 35\n71 36\n71 37\n71 38\n71 39\n71 40\n71 41\n71 42\n71 43\n71 44\n71 45\n71 46\n71 47\n71 48\n71 49\n71 50\n71 51\n71 52\n71 53\n71 54\n71 55\n71 56\n71 57\n71 58\n71 59\n71 60\n71 61\n71 62\n71 63\n71 64\n71 65\n71 66\n71 67\n71 68\n71 69\n71 70\n72 13\n72 14\n72 15\n72 16\n72 17\n72 18\n72 19\n72 20\n72 21\n72 22\n72 23\n72 24\n72 25\n72 26\n72 27\n72 28\n72 29\n72 30\n72 31\n72 32\n72 33\n72 34\n72 35\n72 36\n72 37\n72 38\n72 39\n72 40\n72 41\n72 42\n72 43\n72 44\n72 45\n72 46\n72 47\n72 48\n72 49\n72 50\n72 51\n72 52\n72 53\n72 54\n72 55\n72 56\n72 57\n72 58\n72 59\n72 60\n72 61\n72 62\n72 63\n72 64\n72 65\n72 66\n72 67\n72 68\n72 69\n72 70\n72 71\n73 13\n73 14\n73 15\n73 16\n73 17\n73 18\n73 19\n73 20\n73 21\n73 22\n73 23\n73 24\n73 25\n73 26\n73 27\n73 28\n73 29\n73 30\n73 31\n73 32\n73 33\n73 34\n73 35\n73 36\n73 37\n73 38\n73 39\n73 40\n73 41\n73 42\n73 43\n73 44\n73 45\n73 46\n73 47\n73 48\n73 49\n73 50\n73 51\n73 52\n73 53\n73 54\n73 55\n73 56\n73 57\n73 58\n73 59\n73 60\n73 61\n73 62\n73 63\n73 64\n73 65\n73 66\n73 67\n73 68\n73 69\n73 70\n73 71\n73 72\n74 13\n74 14\n74 15\n74 16\n74 17\n74 18\n74 19\n74 20\n74 21\n74 22\n74 23\n74 24\n74 25\n74 26\n74 27\n74 28\n74 29\n74 30\n74 31\n74 32\n74 33\n74 34\n74 35\n74 36\n74 37\n74 38\n74 39\n74 40\n74 41\n74 42\n74 43\n74 44\n74 45\n74 46\n74 47\n74 48\n74 49\n74 50\n74 51\n74 52\n74 53\n74 54\n74 55\n74 56\n74 57\n74 58\n74 59\n74 60\n74 61\n74 62\n74 63\n74 64\n74 65\n74 66\n74 67\n74 68\n74 69\n74 70\n74 71\n74 72\n74 73\n75 13\n75 14\n75 15\n75 16\n75 17\n75 18\n75 19\n75 20\n75 21\n75 22\n75 23\n75 24\n75 25\n75 26\n75 27\n75 28\n75 29\n75 30\n75 31\n75 32\n75 33\n75 34\n75 35\n75 36\n75 37\n75 38\n75 39\n75 40\n75 41\n75 42\n75 43\n75 44\n75 45\n75 46\n75 47\n75 48\n75 49\n75 50\n75 51\n75 52\n75 53\n75 54\n75 55\n75 56\n75 57\n75 58\n75 59\n75 60\n75 61\n75 62\n75 63\n75 64\n75 65\n75 66\n75 67\n75 68\n75 69\n75 70\n75 71\n75 72\n75 73\n75 74\n76 13\n76 14\n76 15\n76 16\n76 17\n76 18\n76 19\n76 20\n76 21\n76 22\n76 23\n76 24\n76 25\n76 26\n76 27\n76 28\n76 29\n76 30\n76 31\n76 32\n76 33\n76 34\n76 35\n76 36\n76 37\n76 38\n76 39\n76 40\n76 41\n76 42\n76 43\n76 44\n76 45\n76 46\n76 47\n76 48\n76 49\n76 50\n76 51\n76 52\n76 53\n76 54\n76 55\n76 56\n76 57\n76 58\n76 59\n76 60\n76 61\n76 62\n76 63\n76 64\n76 65\n76 66\n76 67\n76 68\n76 69\n76 70\n76 71\n76 72\n76 73\n76 74\n76 75\n77 13\n77 14\n77 15\n77 16\n77 17\n77 18\n77 19\n77 20\n77 21\n77 22\n77 23\n77 24\n77 25\n77 26\n77 27\n77 28\n77 29\n77 30\n77 31\n77 32\n77 33\n77 34\n77 35\n77 36\n77 37\n77 38\n77 39\n77 40\n77 41\n77 42\n77 43\n77 44\n77 45\n77 46\n77 47\n77 48\n77 49\n77 50\n77 51\n77 52\n77 53\n77 54\n77 55\n77 56\n77 57\n77 58\n77 59\n77 60\n77 61\n77 62\n77 63\n77 64\n77 65\n77 66\n77 67\n77 68\n77 69\n77 70\n77 71\n77 72\n77 73\n77 74\n77 75\n77 76\n78 13\n78 14\n78 15\n78 16\n78 17\n78 18\n78 19\n78 20\n78 21\n78 22\n78 23\n78 24\n78 25\n78 26\n78 27\n78 28\n78 29\n78 30\n78 31\n78 32\n78 33\n78 34\n78 35\n78 36\n78 37\n78 38\n78 39\n78 40\n78 41\n78 42\n78 43\n78 44\n78 45\n78 46\n78 47\n78 48\n78 49\n78 50\n78 51\n78 52\n78 53\n78 54\n78 55\n78 56\n78 57\n78 58\n78 59\n78 60\n78 61\n78 62\n78 63\n78 64\n78 65\n78 66\n78 67\n78 68\n78 69\n78 70\n78 71\n78 72\n78 73\n78 74\n78 75\n78 76\n78 77\n79 13\n79 14\n79 15\n79 16\n79 17\n79 18\n79 19\n79 20\n79 21\n79 22\n79 23\n79 24\n79 25\n79 26\n79 27\n79 28\n79 29\n79 30\n79 31\n79 32\n79 33\n79 34\n79 35\n79 36\n79 37\n79 38\n79 39\n79 40\n79 41\n79 42\n79 43\n79 44\n79 45\n79 46\n79 47\n79 48\n79 49\n79 50\n79 51\n79 52\n79 53\n79 54\n79 55\n79 56\n79 57\n79 58\n79 59\n79 60\n79 61\n79 62\n79 63\n79 64\n79 65\n79 66\n79 67\n79 68\n79 69\n79 70\n79 71\n79 72\n79 73\n79 74\n79 75\n79 76\n79 77\n79 78\n80 13\n80 14\n80 15\n80 16\n80 17\n80 18\n80 19\n80 20\n80 21\n80 22\n80 23\n80 24\n80 25\n80 26\n80 27\n80 28\n80 29\n80 30\n80 31\n80 32\n80 33\n80 34\n80 35\n80 36\n80 37\n80 38\n80 39\n80 40\n80 41\n80 42\n80 43\n80 44\n80 45\n80 46\n80 47\n80 48\n80 49\n80 50\n80 51\n80 52\n80 53\n80 54\n80 55\n80 56\n80 57\n80 58\n80 59\n80 60\n80 61\n80 62\n80 63\n80 64\n80 65\n80 66\n80 67\n80 68\n80 69\n80 70\n80 71\n80 72\n80 73\n80 74\n80 75\n80 76\n80 77\n80 78\n80 79\n81 13\n81 14\n81 15\n81 16\n81 17\n81 18\n81 19\n81 20\n81 21\n81 22\n81 23\n81 24\n81 25\n81 26\n81 27\n81 28\n81 29\n81 30\n81 31\n81 32\n81 33\n81 34\n81 35\n81 36\n81 37\n81 38\n81 39\n81 40\n81 41\n81 42\n81 43\n81 44\n81 45\n81 46\n81 47\n81 48\n81 49\n81 50\n81 51\n81 52\n81 53\n81 54\n81 55\n81 56\n81 57\n81 58\n81 59\n81 60\n81 61\n81 62\n81 63\n81 64\n81 65\n81 66\n81 67\n81 68\n81 69\n81 70\n81 71\n81 72\n81 73\n81 74\n81 75\n81 76\n81 77\n81 78\n81 79\n81 80\n82 13\n82 14\n82 15\n82 16\n82 17\n82 18\n82 19\n82 20\n82 21\n82 22\n82 23\n82 24\n82 25\n82 26\n82 27\n82 28\n82 29\n82 30\n82 31\n82 32\n82 33\n82 34\n82 35\n82 36\n82 37\n82 38\n82 39\n82 40\n82 41\n82 42\n82 43\n82 44\n82 45\n82 46\n82 47\n82 48\n82 49\n82 50\n82 51\n82 52\n82 53\n82 54\n82 55\n82 56\n82 57\n82 58\n82 59\n82 60\n82 61\n82 62\n82 63\n82 64\n82 65\n82 66\n82 67\n82 68\n82 69\n82 70\n82 71\n82 72\n82 73\n82 74\n82 75\n82 76\n82 77\n82 78\n82 79\n82 80\n82 81\n83 13\n83 14\n83 15\n83 16\n83 17\n83 18\n83 19\n83 20\n83 21\n83 22\n83 23\n83 24\n83 25\n83 26\n83 27\n83 28\n83 29\n83 30\n83 31\n83 32\n83 33\n83 34\n83 35\n83 36\n83 37\n83 38\n83 39\n83 40\n83 41\n83 42\n83 43\n83 44\n83 45\n83 46\n83 47\n83 48\n83 49\n83 50\n83 51\n83 52\n83 53\n83 54\n83 55\n83 56\n83 57\n83 58\n83 59\n83 60\n83 61\n83 62\n83 63\n83 64\n83 65\n83 66\n83 67\n83 68\n83 69\n83 70\n83 71\n83 72\n83 73\n83 74\n83 75\n83 76\n83 77\n83 78\n83 79\n83 80\n83 81\n83 82\n84 13\n84 14\n84 15\n84 16\n84 17\n84 18\n84 19\n84 20\n84 21\n84 22\n84 23\n84 24\n84 25\n84 26\n84 27\n84 28\n84 29\n84 30\n84 31\n84 32\n84 33\n84 34\n84 35\n84 36\n84 37\n84 38\n84 39\n84 40\n84 41\n84 42\n84 43\n84 44\n84 45\n84 46\n84 47\n84 48\n84 49\n84 50\n84 51\n84 52\n84 53\n84 54\n84 55\n84 56\n84 57\n84 58\n84 59\n84 60\n84 61\n84 62\n84 63\n84 64\n84 65\n84 66\n84 67\n84 68\n84 69\n84 70\n84 71\n84 72\n84 73\n84 74\n84 75\n84 76\n84 77\n84 78\n84 79\n84 80\n84 81\n84 82\n84 83\n85 13\n85 14\n85 15\n85 16\n85 17\n85 18\n85 19\n85 20\n85 21\n85 22\n85 23\n85 24\n85 25\n85 26\n85 27\n85 28\n85 29\n85 30\n85 31\n85 32\n85 33\n85 34\n85 35\n85 36\n85 37\n85 38\n85 39\n85 40\n85 41\n85 42\n85 43\n85 44\n85 45\n85 46\n85 47\n85 48\n85 49\n85 50\n85 51\n85 52\n85 53\n85 54\n85 55\n85 56\n85 57\n85 58\n85 59\n85 60\n85 61\n85 62\n85 63\n85 64\n85 65\n85 66\n85 67\n85 68\n85 69\n85 70\n85 71\n85 72\n85 73\n85 74\n85 75\n85 76\n85 77\n85 78\n85 79\n85 80\n85 81\n85 82\n85 83\n85 84\n86 13\n86 14\n86 15\n86 16\n86 17\n86 18\n86 19\n86 20\n86 21\n86 22\n86 23\n86 24\n86 25\n86 26\n86 27\n86 28\n86 29\n86 30\n86 31\n86 32\n86 33\n86 34\n86 35\n86 36\n86 37\n86 38\n86 39\n86 40\n86 41\n86 42\n86 43\n86 44\n86 45\n86 46\n86 47\n86 48\n86 49\n86 50\n86 51\n86 52\n86 53\n86 54\n86 55\n86 56\n86 57\n86 58\n86 59\n86 60\n86 61\n86 62\n86 63\n86 64\n86 65\n86 66\n86 67\n86 68\n86 69\n86 70\n86 71\n86 72\n86 73\n86 74\n86 75\n86 76\n86 77\n86 78\n86 79\n86 80\n86 81\n86 82\n86 83\n86 84\n86 85\n87 13\n87 14\n87 15\n87 16\n87 17\n87 18\n87 19\n87 20\n87 21\n87 22\n87 23\n87 24\n87 25\n87 26\n87 27\n87 28\n87 29\n87 30\n87 31\n87 32\n87 33\n87 34\n87 35\n87 36\n87 37\n87 38\n87 39\n87 40\n87 41\n87 42\n87 43\n87 44\n87 45\n87 46\n87 47\n87 48\n87 49\n87 50\n87 51\n87 52\n87 53\n87 54\n87 55\n87 56\n87 57\n87 58\n87 59\n87 60\n87 61\n87 62\n87 63\n87 64\n87 65\n87 66\n87 67\n87 68\n87 69\n87 70\n87 71\n87 72\n87 73\n87 74\n87 75\n87 76\n87 77\n87 78\n87 79\n87 80\n87 81\n87 82\n87 83\n87 84\n87 85\n87 86\n88 13\n88 14\n88 15\n88 16\n88 17\n88 18\n88 19\n88 20\n88 21\n88 22\n88 23\n88 24\n88 25\n88 26\n88 27\n88 28\n88 29\n88 30\n88 31\n88 32\n88 33\n88 34\n88 35\n88 36\n88 37\n88 38\n88 39\n88 40\n88 41\n88 42\n88 43\n88 44\n88 45\n88 46\n88 47\n88 48\n88 49\n88 50\n88 51\n88 52\n88 53\n88 54\n88 55\n88 56\n88 57\n88 58\n88 59\n88 60\n88 61\n88 62\n88 63\n88 64\n88 65\n88 66\n88 67\n88 68\n88 69\n88 70\n88 71\n88 72\n88 73\n88 74\n88 75\n88 76\n88 77\n88 78\n88 79\n88 80\n88 81\n88 82\n88 83\n88 84\n88 85\n88 86\n88 87\n89 13\n89 14\n89 15\n89 16\n89 17\n89 18\n89 19\n89 20\n89 21\n89 22\n89 23\n89 24\n89 25\n89 26\n89 27\n89 28\n89 29\n89 30\n89 31\n89 32\n89 33\n89 34\n89 35\n89 36\n89 37\n89 38\n89 39\n89 40\n89 41\n89 42\n89 43\n89 44\n89 45\n89 46\n89 47\n89 48\n89 49\n89 50\n89 51\n89 52\n89 53\n89 54\n89 55\n89 56\n89 57\n89 58\n89 59\n89 60\n89 61\n89 62\n89 63\n89 64\n89 65\n89 66\n89 67\n89 68\n89 69\n89 70\n89 71\n89 72\n89 73\n89 74\n89 75\n89 76\n89 77\n89 78\n89 79\n89 80\n89 81\n89 82\n89 83\n89 84\n89 85\n89 86\n89 87\n89 88\n90 13\n90 14\n90 15\n90 16\n90 17\n90 18\n90 19\n90 20\n90 21\n90 22\n90 23\n90 24\n90 25\n90 26\n90 27\n90 28\n90 29\n90 30\n90 31\n90 32\n90 33\n90 34\n90 35\n90 36\n90 37\n90 38\n90 39\n90 40\n90 41\n90 42\n90 43\n90 44\n90 45\n90 46\n90 47\n90 48\n90 49\n90 50\n90 51\n90 52\n90 53\n90 54\n90 55\n90 56\n90 57\n90 58\n90 59\n90 60\n90 61\n90 62\n90 63\n90 64\n90 65\n90 66\n90 67\n90 68\n90 69\n90 70\n90 71\n90 72\n90 73\n90 74\n90 75\n90 76\n90 77\n90 78\n90 79\n90 80\n90 81\n90 82\n90 83\n90 84\n90 85\n90 86\n90 87\n90 88\n90 89\n91 13\n91 14\n91 15\n91 16\n91 17\n91 18\n91 19\n91 20\n91 21\n91 22\n91 23\n91 24\n91 25\n91 26\n91 27\n91 28\n91 29\n91 30\n91 31\n91 32\n91 33\n91 34\n91 35\n91 36\n91 37\n91 38\n91 39\n91 40\n91 41\n91 42\n91 43\n91 44\n91 45\n91 46\n91 47\n91 48\n91 49\n91 50\n91 51\n91 52\n91 53\n91 54\n91 55\n91 56\n91 57\n91 58\n91 59\n91 60\n91 61\n91 62\n91 63\n91 64\n91 65\n91 66\n91 67\n91 68\n91 69\n91 70\n91 71\n91 72\n91 73\n91 74\n91 75\n91 76\n91 77\n91 78\n91 79\n91 80\n91 81\n91 82\n91 83\n91 84\n91 85\n91 86\n91 87\n91 88\n91 89\n91 90\n92 13\n92 14\n92 15\n92 16\n92 17\n92 18\n92 19\n92 20\n92 21\n92 22\n92 23\n92 24\n92 25\n92 26\n92 27\n92 28\n92 29\n92 30\n92 31\n92 32\n92 33\n92 34\n92 35\n92 36\n92 37\n92 38\n92 39\n92 40\n92 41\n92 42\n92 43\n92 44\n92 45\n92 46\n92 47\n92 48\n92 49\n92 50\n92 51\n92 52\n92 53\n92 54\n92 55\n92 56\n92 57\n92 58\n92 59\n92 60\n92 61\n92 62\n92 63\n92 64\n92 65\n92 66\n92 67\n92 68\n92 69\n92 70\n92 71\n92 72\n92 73\n92 74\n92 75\n92 76\n92 77\n92 78\n92 79\n92 80\n92 81\n92 82\n92 83\n92 84\n92 85\n92 86\n92 87\n92 88\n92 89\n92 90\n92 91\n93 13\n93 14\n93 15\n93 16\n93 17\n93 18\n93 19\n93 20\n93 21\n93 22\n93 23\n93 24\n93 25\n93 26\n93 27\n93 28\n93 29\n93 30\n93 31\n93 32\n93 33\n93 34\n93 35\n93 36\n93 37\n93 38\n93 39\n93 40\n93 41\n93 42\n93 43\n93 44\n93 45\n93 46\n93 47\n93 48\n93 49\n93 50\n93 51\n93 52\n93 53\n93 54\n93 55\n93 56\n93 57\n93 58\n93 59\n93 60\n93 61\n93 62\n93 63\n93 64\n93 65\n93 66\n93 67\n93 68\n93 69\n93 70\n93 71\n93 72\n93 73\n93 74\n93 75\n93 76\n93 77\n93 78\n93 79\n93 80\n93 81\n93 82\n93 83\n93 84\n93 85\n93 86\n93 87\n93 88\n93 89\n93 90\n93 91\n93 92\n94 13\n94 14\n94 15\n94 16\n94 17\n94 18\n94 19\n94 20\n94 21\n94 22\n94 23\n94 24\n94 25\n94 26\n94 27\n94 28\n94 29\n94 30\n94 31\n94 32\n94 33\n94 34\n94 35\n94 36\n94 37\n94 38\n94 39\n94 40\n94 41\n94 42\n94 43\n94 44\n94 45\n94 46\n94 47\n94 48\n94 49\n94 50\n94 51\n94 52\n94 53\n94 54\n94 55\n94 56\n94 57\n94 58\n94 59\n94 60\n94 61\n94 62\n94 63\n94 64\n94 65\n94 66\n94 67\n94 68\n94 69\n94 70\n94 71\n94 72\n94 73\n94 74\n94 75\n94 76\n94 77\n94 78\n94 79\n94 80\n94 81\n94 82\n94 83\n94 84\n94 85\n94 86\n94 87\n94 88\n94 89\n94 90\n94 91\n94 92\n94 93\n95 13\n95 14\n95 15\n95 16\n95 17\n95 18\n95 19\n95 20\n95 21\n95 22\n95 23\n95 24\n95 25\n95 26\n95 27\n95 28\n95 29\n95 30\n95 31\n95 32\n95 33\n95 34\n95 35\n95 36\n95 37\n95 38\n95 39\n95 40\n95 41\n95 42\n95 43\n95 44\n95 45\n95 46\n95 47\n95 48\n95 49\n95 50\n95 51\n95 52\n95 53\n95 54\n95 55\n95 56\n95 57\n95 58\n95 59\n95 60\n95 61\n95 62\n95 63\n95 64\n95 65\n95 66\n95 67\n95 68\n95 69\n95 70\n95 71\n95 72\n95 73\n95 74\n95 75\n95 76\n95 77\n95 78\n95 79\n95 80\n95 81\n95 82\n95 83\n95 84\n95 85\n95 86\n95 87\n95 88\n95 89\n95 90\n95 91\n95 92\n95 93\n95 94\n96 13\n96 14\n96 15\n96 16\n96 17\n96 18\n96 19\n96 20\n96 21\n96 22\n96 23\n96 24\n96 25\n96 26\n96 27\n96 28\n96 29\n96 30\n96 31\n96 32\n96 33\n96 34\n96 35\n96 36\n96 37\n96 38\n96 39\n96 40\n96 41\n96 42\n96 43\n96 44\n96 45\n96 46\n96 47\n96 48\n96 49\n96 50\n96 51\n96 52\n96 53\n96 54\n96 55\n96 56\n96 57\n96 58\n96 59\n96 60\n96 61\n96 62\n96 63\n96 64\n96 65\n96 66\n96 67\n96 68\n96 69\n96 70\n96 71\n96 72\n96 73\n96 74\n96 75\n96 76\n96 77\n96 78\n96 79\n96 80\n96 81\n96 82\n96 83\n96 84\n96 85\n96 86\n96 87\n96 88\n96 89\n96 90\n96 91\n96 92\n96 93\n96 94\n96 95\n97 13\n97 14\n97 15\n97 16\n97 17\n97 18\n97 19\n97 20\n97 21\n97 22\n97 23\n97 24\n97 25\n97 26\n97 27\n97 28\n97 29\n97 30\n97 31\n97 32\n97 33\n97 34\n97 35\n97 36\n97 37\n97 38\n97 39\n97 40\n97 41\n97 42\n97 43\n97 44\n97 45\n97 46\n97 47\n97 48\n97 49\n97 50\n97 51\n97 52\n97 53\n97 54\n97 55\n97 56\n97 57\n97 58\n97 59\n97 60\n97 61\n97 62\n97 63\n97 64\n97 65\n97 66\n97 67\n97 68\n97 69\n97 70\n97 71\n97 72\n97 73\n97 74\n97 75\n97 76\n97 77\n97 78\n97 79\n97 80\n97 81\n97 82\n97 83\n97 84\n97 85\n97 86\n97 87\n97 88\n97 89\n97 90\n97 91\n97 92\n97 93\n97 94\n97 95\n97 96\n98 13\n98 14\n98 15\n98 16\n98 17\n98 18\n98 19\n98 20\n98 21\n98 22\n98 23\n98 24\n98 25\n98 26\n98 27\n98 28\n98 29\n98 30\n98 31\n98 32\n98 33\n98 34\n98 35\n98 36\n98 37\n98 38\n98 39\n98 40\n98 41\n98 42\n98 43\n98 44\n98 45\n98 46\n98 47\n98 48\n98 49\n98 50\n98 51\n98 52\n98 53\n98 54\n98 55\n98 56\n98 57\n98 58\n98 59\n98 60\n98 61\n98 62\n98 63\n98 64\n98 65\n98 66\n98 67\n98 68\n98 69\n98 70\n98 71\n98 72\n98 73\n98 74\n98 75\n98 76\n98 77\n98 78\n98 79\n98 80\n98 81\n98 82\n98 83\n98 84\n98 85\n98 86\n98 87\n98 88\n98 89\n98 90\n98 91\n98 92\n98 93\n98 94\n98 95\n98 96\n98 97\n99 13\n99 14\n99 15\n99 16\n99 17\n99 18\n99 19\n99 20\n99 21\n99 22\n99 23\n99 24\n99 25\n99 26\n99 27\n99 28\n99 29\n99 30\n99 31\n99 32\n99 33\n99 34\n99 35\n99 36\n99 37\n99 38\n99 39\n99 40\n99 41\n99 42\n99 43\n99 44\n99 45\n99 46\n99 47\n99 48\n99 49\n99 50\n99 51\n99 52\n99 53\n99 54\n99 55\n99 56\n99 57\n99 58\n99 59\n99 60\n99 61\n99 62\n99 63\n99 64\n99 65\n99 66\n99 67\n99 68\n99 69\n99 70\n99 71\n99 72\n99 73\n99 74\n99 75\n99 76\n99 77\n99 78\n99 79\n99 80\n99 81\n99 82\n99 83\n99 84\n99 85\n99 86\n99 87\n99 88\n99 89\n99 90\n99 91\n99 92\n99 93\n99 94\n99 95\n99 96\n99 97\n99 98\n100 13\n100 14\n100 15\n100 16\n100 17\n100 18\n100 19\n100 20\n100 21\n100 22\n100 23\n100 24\n100 25\n100 26\n100 27\n100 28\n100 29\n100 30\n100 31\n100 32\n100 33\n100 34\n100 35\n100 36\n100 37\n100 38\n100 39\n100 40\n100 41\n100 42\n100 43\n100 44\n100 45\n100 46\n100 47\n100 48\n100 49\n100 50\n100 51\n100 52\n100 53\n100 54\n100 55\n100 56\n100 57\n100 58\n100 59\n100 60\n100 61\n100 62\n100 63\n100 64\n100 65\n100 66\n100 67\n100 68\n100 69\n100 70\n100 71\n100 72\n100 73\n100 74\n100 75\n100 76\n100 77\n100 78\n100 79\n100 80\n100 81\n100 82\n100 83\n100 84\n100 85\n100 86\n100 87\n100 88\n100 89\n100 90\n100 91\n100 92\n100 93\n100 94\n100 95\n100 96\n100 97\n100 98\n100 99\n" }, { "input": "100 100 1 1\n", "output": "4950\n2 1\n3 1\n3 2\n4 1\n4 2\n4 3\n5 1\n5 2\n5 3\n5 4\n6 1\n6 2\n6 3\n6 4\n6 5\n7 1\n7 2\n7 3\n7 4\n7 5\n7 6\n8 1\n8 2\n8 3\n8 4\n8 5\n8 6\n8 7\n9 1\n9 2\n9 3\n9 4\n9 5\n9 6\n9 7\n9 8\n10 1\n10 2\n10 3\n10 4\n10 5\n10 6\n10 7\n10 8\n10 9\n11 1\n11 2\n11 3\n11 4\n11 5\n11 6\n11 7\n11 8\n11 9\n11 10\n12 1\n12 2\n12 3\n12 4\n12 5\n12 6\n12 7\n12 8\n12 9\n12 10\n12 11\n13 1\n13 2\n13 3\n13 4\n13 5\n13 6\n13 7\n13 8\n13 9\n13 10\n13 11\n13 12\n14 1\n14 2\n14 3\n14 4\n14 5\n14 6\n14 7\n14 8\n14 9\n14 10\n14 11\n14 12\n14 13\n15 1\n15 2\n15 3\n15 4\n15 5\n15 6\n15 7\n15 8\n15 9\n15 10\n15 11\n15 12\n15 13\n15 14\n16 1\n16 2\n16 3\n16 4\n16 5\n16 6\n16 7\n16 8\n16 9\n16 10\n16 11\n16 12\n16 13\n16 14\n16 15\n17 1\n17 2\n17 3\n17 4\n17 5\n17 6\n17 7\n17 8\n17 9\n17 10\n17 11\n17 12\n17 13\n17 14\n17 15\n17 16\n18 1\n18 2\n18 3\n18 4\n18 5\n18 6\n18 7\n18 8\n18 9\n18 10\n18 11\n18 12\n18 13\n18 14\n18 15\n18 16\n18 17\n19 1\n19 2\n19 3\n19 4\n19 5\n19 6\n19 7\n19 8\n19 9\n19 10\n19 11\n19 12\n19 13\n19 14\n19 15\n19 16\n19 17\n19 18\n20 1\n20 2\n20 3\n20 4\n20 5\n20 6\n20 7\n20 8\n20 9\n20 10\n20 11\n20 12\n20 13\n20 14\n20 15\n20 16\n20 17\n20 18\n20 19\n21 1\n21 2\n21 3\n21 4\n21 5\n21 6\n21 7\n21 8\n21 9\n21 10\n21 11\n21 12\n21 13\n21 14\n21 15\n21 16\n21 17\n21 18\n21 19\n21 20\n22 1\n22 2\n22 3\n22 4\n22 5\n22 6\n22 7\n22 8\n22 9\n22 10\n22 11\n22 12\n22 13\n22 14\n22 15\n22 16\n22 17\n22 18\n22 19\n22 20\n22 21\n23 1\n23 2\n23 3\n23 4\n23 5\n23 6\n23 7\n23 8\n23 9\n23 10\n23 11\n23 12\n23 13\n23 14\n23 15\n23 16\n23 17\n23 18\n23 19\n23 20\n23 21\n23 22\n24 1\n24 2\n24 3\n24 4\n24 5\n24 6\n24 7\n24 8\n24 9\n24 10\n24 11\n24 12\n24 13\n24 14\n24 15\n24 16\n24 17\n24 18\n24 19\n24 20\n24 21\n24 22\n24 23\n25 1\n25 2\n25 3\n25 4\n25 5\n25 6\n25 7\n25 8\n25 9\n25 10\n25 11\n25 12\n25 13\n25 14\n25 15\n25 16\n25 17\n25 18\n25 19\n25 20\n25 21\n25 22\n25 23\n25 24\n26 1\n26 2\n26 3\n26 4\n26 5\n26 6\n26 7\n26 8\n26 9\n26 10\n26 11\n26 12\n26 13\n26 14\n26 15\n26 16\n26 17\n26 18\n26 19\n26 20\n26 21\n26 22\n26 23\n26 24\n26 25\n27 1\n27 2\n27 3\n27 4\n27 5\n27 6\n27 7\n27 8\n27 9\n27 10\n27 11\n27 12\n27 13\n27 14\n27 15\n27 16\n27 17\n27 18\n27 19\n27 20\n27 21\n27 22\n27 23\n27 24\n27 25\n27 26\n28 1\n28 2\n28 3\n28 4\n28 5\n28 6\n28 7\n28 8\n28 9\n28 10\n28 11\n28 12\n28 13\n28 14\n28 15\n28 16\n28 17\n28 18\n28 19\n28 20\n28 21\n28 22\n28 23\n28 24\n28 25\n28 26\n28 27\n29 1\n29 2\n29 3\n29 4\n29 5\n29 6\n29 7\n29 8\n29 9\n29 10\n29 11\n29 12\n29 13\n29 14\n29 15\n29 16\n29 17\n29 18\n29 19\n29 20\n29 21\n29 22\n29 23\n29 24\n29 25\n29 26\n29 27\n29 28\n30 1\n30 2\n30 3\n30 4\n30 5\n30 6\n30 7\n30 8\n30 9\n30 10\n30 11\n30 12\n30 13\n30 14\n30 15\n30 16\n30 17\n30 18\n30 19\n30 20\n30 21\n30 22\n30 23\n30 24\n30 25\n30 26\n30 27\n30 28\n30 29\n31 1\n31 2\n31 3\n31 4\n31 5\n31 6\n31 7\n31 8\n31 9\n31 10\n31 11\n31 12\n31 13\n31 14\n31 15\n31 16\n31 17\n31 18\n31 19\n31 20\n31 21\n31 22\n31 23\n31 24\n31 25\n31 26\n31 27\n31 28\n31 29\n31 30\n32 1\n32 2\n32 3\n32 4\n32 5\n32 6\n32 7\n32 8\n32 9\n32 10\n32 11\n32 12\n32 13\n32 14\n32 15\n32 16\n32 17\n32 18\n32 19\n32 20\n32 21\n32 22\n32 23\n32 24\n32 25\n32 26\n32 27\n32 28\n32 29\n32 30\n32 31\n33 1\n33 2\n33 3\n33 4\n33 5\n33 6\n33 7\n33 8\n33 9\n33 10\n33 11\n33 12\n33 13\n33 14\n33 15\n33 16\n33 17\n33 18\n33 19\n33 20\n33 21\n33 22\n33 23\n33 24\n33 25\n33 26\n33 27\n33 28\n33 29\n33 30\n33 31\n33 32\n34 1\n34 2\n34 3\n34 4\n34 5\n34 6\n34 7\n34 8\n34 9\n34 10\n34 11\n34 12\n34 13\n34 14\n34 15\n34 16\n34 17\n34 18\n34 19\n34 20\n34 21\n34 22\n34 23\n34 24\n34 25\n34 26\n34 27\n34 28\n34 29\n34 30\n34 31\n34 32\n34 33\n35 1\n35 2\n35 3\n35 4\n35 5\n35 6\n35 7\n35 8\n35 9\n35 10\n35 11\n35 12\n35 13\n35 14\n35 15\n35 16\n35 17\n35 18\n35 19\n35 20\n35 21\n35 22\n35 23\n35 24\n35 25\n35 26\n35 27\n35 28\n35 29\n35 30\n35 31\n35 32\n35 33\n35 34\n36 1\n36 2\n36 3\n36 4\n36 5\n36 6\n36 7\n36 8\n36 9\n36 10\n36 11\n36 12\n36 13\n36 14\n36 15\n36 16\n36 17\n36 18\n36 19\n36 20\n36 21\n36 22\n36 23\n36 24\n36 25\n36 26\n36 27\n36 28\n36 29\n36 30\n36 31\n36 32\n36 33\n36 34\n36 35\n37 1\n37 2\n37 3\n37 4\n37 5\n37 6\n37 7\n37 8\n37 9\n37 10\n37 11\n37 12\n37 13\n37 14\n37 15\n37 16\n37 17\n37 18\n37 19\n37 20\n37 21\n37 22\n37 23\n37 24\n37 25\n37 26\n37 27\n37 28\n37 29\n37 30\n37 31\n37 32\n37 33\n37 34\n37 35\n37 36\n38 1\n38 2\n38 3\n38 4\n38 5\n38 6\n38 7\n38 8\n38 9\n38 10\n38 11\n38 12\n38 13\n38 14\n38 15\n38 16\n38 17\n38 18\n38 19\n38 20\n38 21\n38 22\n38 23\n38 24\n38 25\n38 26\n38 27\n38 28\n38 29\n38 30\n38 31\n38 32\n38 33\n38 34\n38 35\n38 36\n38 37\n39 1\n39 2\n39 3\n39 4\n39 5\n39 6\n39 7\n39 8\n39 9\n39 10\n39 11\n39 12\n39 13\n39 14\n39 15\n39 16\n39 17\n39 18\n39 19\n39 20\n39 21\n39 22\n39 23\n39 24\n39 25\n39 26\n39 27\n39 28\n39 29\n39 30\n39 31\n39 32\n39 33\n39 34\n39 35\n39 36\n39 37\n39 38\n40 1\n40 2\n40 3\n40 4\n40 5\n40 6\n40 7\n40 8\n40 9\n40 10\n40 11\n40 12\n40 13\n40 14\n40 15\n40 16\n40 17\n40 18\n40 19\n40 20\n40 21\n40 22\n40 23\n40 24\n40 25\n40 26\n40 27\n40 28\n40 29\n40 30\n40 31\n40 32\n40 33\n40 34\n40 35\n40 36\n40 37\n40 38\n40 39\n41 1\n41 2\n41 3\n41 4\n41 5\n41 6\n41 7\n41 8\n41 9\n41 10\n41 11\n41 12\n41 13\n41 14\n41 15\n41 16\n41 17\n41 18\n41 19\n41 20\n41 21\n41 22\n41 23\n41 24\n41 25\n41 26\n41 27\n41 28\n41 29\n41 30\n41 31\n41 32\n41 33\n41 34\n41 35\n41 36\n41 37\n41 38\n41 39\n41 40\n42 1\n42 2\n42 3\n42 4\n42 5\n42 6\n42 7\n42 8\n42 9\n42 10\n42 11\n42 12\n42 13\n42 14\n42 15\n42 16\n42 17\n42 18\n42 19\n42 20\n42 21\n42 22\n42 23\n42 24\n42 25\n42 26\n42 27\n42 28\n42 29\n42 30\n42 31\n42 32\n42 33\n42 34\n42 35\n42 36\n42 37\n42 38\n42 39\n42 40\n42 41\n43 1\n43 2\n43 3\n43 4\n43 5\n43 6\n43 7\n43 8\n43 9\n43 10\n43 11\n43 12\n43 13\n43 14\n43 15\n43 16\n43 17\n43 18\n43 19\n43 20\n43 21\n43 22\n43 23\n43 24\n43 25\n43 26\n43 27\n43 28\n43 29\n43 30\n43 31\n43 32\n43 33\n43 34\n43 35\n43 36\n43 37\n43 38\n43 39\n43 40\n43 41\n43 42\n44 1\n44 2\n44 3\n44 4\n44 5\n44 6\n44 7\n44 8\n44 9\n44 10\n44 11\n44 12\n44 13\n44 14\n44 15\n44 16\n44 17\n44 18\n44 19\n44 20\n44 21\n44 22\n44 23\n44 24\n44 25\n44 26\n44 27\n44 28\n44 29\n44 30\n44 31\n44 32\n44 33\n44 34\n44 35\n44 36\n44 37\n44 38\n44 39\n44 40\n44 41\n44 42\n44 43\n45 1\n45 2\n45 3\n45 4\n45 5\n45 6\n45 7\n45 8\n45 9\n45 10\n45 11\n45 12\n45 13\n45 14\n45 15\n45 16\n45 17\n45 18\n45 19\n45 20\n45 21\n45 22\n45 23\n45 24\n45 25\n45 26\n45 27\n45 28\n45 29\n45 30\n45 31\n45 32\n45 33\n45 34\n45 35\n45 36\n45 37\n45 38\n45 39\n45 40\n45 41\n45 42\n45 43\n45 44\n46 1\n46 2\n46 3\n46 4\n46 5\n46 6\n46 7\n46 8\n46 9\n46 10\n46 11\n46 12\n46 13\n46 14\n46 15\n46 16\n46 17\n46 18\n46 19\n46 20\n46 21\n46 22\n46 23\n46 24\n46 25\n46 26\n46 27\n46 28\n46 29\n46 30\n46 31\n46 32\n46 33\n46 34\n46 35\n46 36\n46 37\n46 38\n46 39\n46 40\n46 41\n46 42\n46 43\n46 44\n46 45\n47 1\n47 2\n47 3\n47 4\n47 5\n47 6\n47 7\n47 8\n47 9\n47 10\n47 11\n47 12\n47 13\n47 14\n47 15\n47 16\n47 17\n47 18\n47 19\n47 20\n47 21\n47 22\n47 23\n47 24\n47 25\n47 26\n47 27\n47 28\n47 29\n47 30\n47 31\n47 32\n47 33\n47 34\n47 35\n47 36\n47 37\n47 38\n47 39\n47 40\n47 41\n47 42\n47 43\n47 44\n47 45\n47 46\n48 1\n48 2\n48 3\n48 4\n48 5\n48 6\n48 7\n48 8\n48 9\n48 10\n48 11\n48 12\n48 13\n48 14\n48 15\n48 16\n48 17\n48 18\n48 19\n48 20\n48 21\n48 22\n48 23\n48 24\n48 25\n48 26\n48 27\n48 28\n48 29\n48 30\n48 31\n48 32\n48 33\n48 34\n48 35\n48 36\n48 37\n48 38\n48 39\n48 40\n48 41\n48 42\n48 43\n48 44\n48 45\n48 46\n48 47\n49 1\n49 2\n49 3\n49 4\n49 5\n49 6\n49 7\n49 8\n49 9\n49 10\n49 11\n49 12\n49 13\n49 14\n49 15\n49 16\n49 17\n49 18\n49 19\n49 20\n49 21\n49 22\n49 23\n49 24\n49 25\n49 26\n49 27\n49 28\n49 29\n49 30\n49 31\n49 32\n49 33\n49 34\n49 35\n49 36\n49 37\n49 38\n49 39\n49 40\n49 41\n49 42\n49 43\n49 44\n49 45\n49 46\n49 47\n49 48\n50 1\n50 2\n50 3\n50 4\n50 5\n50 6\n50 7\n50 8\n50 9\n50 10\n50 11\n50 12\n50 13\n50 14\n50 15\n50 16\n50 17\n50 18\n50 19\n50 20\n50 21\n50 22\n50 23\n50 24\n50 25\n50 26\n50 27\n50 28\n50 29\n50 30\n50 31\n50 32\n50 33\n50 34\n50 35\n50 36\n50 37\n50 38\n50 39\n50 40\n50 41\n50 42\n50 43\n50 44\n50 45\n50 46\n50 47\n50 48\n50 49\n51 1\n51 2\n51 3\n51 4\n51 5\n51 6\n51 7\n51 8\n51 9\n51 10\n51 11\n51 12\n51 13\n51 14\n51 15\n51 16\n51 17\n51 18\n51 19\n51 20\n51 21\n51 22\n51 23\n51 24\n51 25\n51 26\n51 27\n51 28\n51 29\n51 30\n51 31\n51 32\n51 33\n51 34\n51 35\n51 36\n51 37\n51 38\n51 39\n51 40\n51 41\n51 42\n51 43\n51 44\n51 45\n51 46\n51 47\n51 48\n51 49\n51 50\n52 1\n52 2\n52 3\n52 4\n52 5\n52 6\n52 7\n52 8\n52 9\n52 10\n52 11\n52 12\n52 13\n52 14\n52 15\n52 16\n52 17\n52 18\n52 19\n52 20\n52 21\n52 22\n52 23\n52 24\n52 25\n52 26\n52 27\n52 28\n52 29\n52 30\n52 31\n52 32\n52 33\n52 34\n52 35\n52 36\n52 37\n52 38\n52 39\n52 40\n52 41\n52 42\n52 43\n52 44\n52 45\n52 46\n52 47\n52 48\n52 49\n52 50\n52 51\n53 1\n53 2\n53 3\n53 4\n53 5\n53 6\n53 7\n53 8\n53 9\n53 10\n53 11\n53 12\n53 13\n53 14\n53 15\n53 16\n53 17\n53 18\n53 19\n53 20\n53 21\n53 22\n53 23\n53 24\n53 25\n53 26\n53 27\n53 28\n53 29\n53 30\n53 31\n53 32\n53 33\n53 34\n53 35\n53 36\n53 37\n53 38\n53 39\n53 40\n53 41\n53 42\n53 43\n53 44\n53 45\n53 46\n53 47\n53 48\n53 49\n53 50\n53 51\n53 52\n54 1\n54 2\n54 3\n54 4\n54 5\n54 6\n54 7\n54 8\n54 9\n54 10\n54 11\n54 12\n54 13\n54 14\n54 15\n54 16\n54 17\n54 18\n54 19\n54 20\n54 21\n54 22\n54 23\n54 24\n54 25\n54 26\n54 27\n54 28\n54 29\n54 30\n54 31\n54 32\n54 33\n54 34\n54 35\n54 36\n54 37\n54 38\n54 39\n54 40\n54 41\n54 42\n54 43\n54 44\n54 45\n54 46\n54 47\n54 48\n54 49\n54 50\n54 51\n54 52\n54 53\n55 1\n55 2\n55 3\n55 4\n55 5\n55 6\n55 7\n55 8\n55 9\n55 10\n55 11\n55 12\n55 13\n55 14\n55 15\n55 16\n55 17\n55 18\n55 19\n55 20\n55 21\n55 22\n55 23\n55 24\n55 25\n55 26\n55 27\n55 28\n55 29\n55 30\n55 31\n55 32\n55 33\n55 34\n55 35\n55 36\n55 37\n55 38\n55 39\n55 40\n55 41\n55 42\n55 43\n55 44\n55 45\n55 46\n55 47\n55 48\n55 49\n55 50\n55 51\n55 52\n55 53\n55 54\n56 1\n56 2\n56 3\n56 4\n56 5\n56 6\n56 7\n56 8\n56 9\n56 10\n56 11\n56 12\n56 13\n56 14\n56 15\n56 16\n56 17\n56 18\n56 19\n56 20\n56 21\n56 22\n56 23\n56 24\n56 25\n56 26\n56 27\n56 28\n56 29\n56 30\n56 31\n56 32\n56 33\n56 34\n56 35\n56 36\n56 37\n56 38\n56 39\n56 40\n56 41\n56 42\n56 43\n56 44\n56 45\n56 46\n56 47\n56 48\n56 49\n56 50\n56 51\n56 52\n56 53\n56 54\n56 55\n57 1\n57 2\n57 3\n57 4\n57 5\n57 6\n57 7\n57 8\n57 9\n57 10\n57 11\n57 12\n57 13\n57 14\n57 15\n57 16\n57 17\n57 18\n57 19\n57 20\n57 21\n57 22\n57 23\n57 24\n57 25\n57 26\n57 27\n57 28\n57 29\n57 30\n57 31\n57 32\n57 33\n57 34\n57 35\n57 36\n57 37\n57 38\n57 39\n57 40\n57 41\n57 42\n57 43\n57 44\n57 45\n57 46\n57 47\n57 48\n57 49\n57 50\n57 51\n57 52\n57 53\n57 54\n57 55\n57 56\n58 1\n58 2\n58 3\n58 4\n58 5\n58 6\n58 7\n58 8\n58 9\n58 10\n58 11\n58 12\n58 13\n58 14\n58 15\n58 16\n58 17\n58 18\n58 19\n58 20\n58 21\n58 22\n58 23\n58 24\n58 25\n58 26\n58 27\n58 28\n58 29\n58 30\n58 31\n58 32\n58 33\n58 34\n58 35\n58 36\n58 37\n58 38\n58 39\n58 40\n58 41\n58 42\n58 43\n58 44\n58 45\n58 46\n58 47\n58 48\n58 49\n58 50\n58 51\n58 52\n58 53\n58 54\n58 55\n58 56\n58 57\n59 1\n59 2\n59 3\n59 4\n59 5\n59 6\n59 7\n59 8\n59 9\n59 10\n59 11\n59 12\n59 13\n59 14\n59 15\n59 16\n59 17\n59 18\n59 19\n59 20\n59 21\n59 22\n59 23\n59 24\n59 25\n59 26\n59 27\n59 28\n59 29\n59 30\n59 31\n59 32\n59 33\n59 34\n59 35\n59 36\n59 37\n59 38\n59 39\n59 40\n59 41\n59 42\n59 43\n59 44\n59 45\n59 46\n59 47\n59 48\n59 49\n59 50\n59 51\n59 52\n59 53\n59 54\n59 55\n59 56\n59 57\n59 58\n60 1\n60 2\n60 3\n60 4\n60 5\n60 6\n60 7\n60 8\n60 9\n60 10\n60 11\n60 12\n60 13\n60 14\n60 15\n60 16\n60 17\n60 18\n60 19\n60 20\n60 21\n60 22\n60 23\n60 24\n60 25\n60 26\n60 27\n60 28\n60 29\n60 30\n60 31\n60 32\n60 33\n60 34\n60 35\n60 36\n60 37\n60 38\n60 39\n60 40\n60 41\n60 42\n60 43\n60 44\n60 45\n60 46\n60 47\n60 48\n60 49\n60 50\n60 51\n60 52\n60 53\n60 54\n60 55\n60 56\n60 57\n60 58\n60 59\n61 1\n61 2\n61 3\n61 4\n61 5\n61 6\n61 7\n61 8\n61 9\n61 10\n61 11\n61 12\n61 13\n61 14\n61 15\n61 16\n61 17\n61 18\n61 19\n61 20\n61 21\n61 22\n61 23\n61 24\n61 25\n61 26\n61 27\n61 28\n61 29\n61 30\n61 31\n61 32\n61 33\n61 34\n61 35\n61 36\n61 37\n61 38\n61 39\n61 40\n61 41\n61 42\n61 43\n61 44\n61 45\n61 46\n61 47\n61 48\n61 49\n61 50\n61 51\n61 52\n61 53\n61 54\n61 55\n61 56\n61 57\n61 58\n61 59\n61 60\n62 1\n62 2\n62 3\n62 4\n62 5\n62 6\n62 7\n62 8\n62 9\n62 10\n62 11\n62 12\n62 13\n62 14\n62 15\n62 16\n62 17\n62 18\n62 19\n62 20\n62 21\n62 22\n62 23\n62 24\n62 25\n62 26\n62 27\n62 28\n62 29\n62 30\n62 31\n62 32\n62 33\n62 34\n62 35\n62 36\n62 37\n62 38\n62 39\n62 40\n62 41\n62 42\n62 43\n62 44\n62 45\n62 46\n62 47\n62 48\n62 49\n62 50\n62 51\n62 52\n62 53\n62 54\n62 55\n62 56\n62 57\n62 58\n62 59\n62 60\n62 61\n63 1\n63 2\n63 3\n63 4\n63 5\n63 6\n63 7\n63 8\n63 9\n63 10\n63 11\n63 12\n63 13\n63 14\n63 15\n63 16\n63 17\n63 18\n63 19\n63 20\n63 21\n63 22\n63 23\n63 24\n63 25\n63 26\n63 27\n63 28\n63 29\n63 30\n63 31\n63 32\n63 33\n63 34\n63 35\n63 36\n63 37\n63 38\n63 39\n63 40\n63 41\n63 42\n63 43\n63 44\n63 45\n63 46\n63 47\n63 48\n63 49\n63 50\n63 51\n63 52\n63 53\n63 54\n63 55\n63 56\n63 57\n63 58\n63 59\n63 60\n63 61\n63 62\n64 1\n64 2\n64 3\n64 4\n64 5\n64 6\n64 7\n64 8\n64 9\n64 10\n64 11\n64 12\n64 13\n64 14\n64 15\n64 16\n64 17\n64 18\n64 19\n64 20\n64 21\n64 22\n64 23\n64 24\n64 25\n64 26\n64 27\n64 28\n64 29\n64 30\n64 31\n64 32\n64 33\n64 34\n64 35\n64 36\n64 37\n64 38\n64 39\n64 40\n64 41\n64 42\n64 43\n64 44\n64 45\n64 46\n64 47\n64 48\n64 49\n64 50\n64 51\n64 52\n64 53\n64 54\n64 55\n64 56\n64 57\n64 58\n64 59\n64 60\n64 61\n64 62\n64 63\n65 1\n65 2\n65 3\n65 4\n65 5\n65 6\n65 7\n65 8\n65 9\n65 10\n65 11\n65 12\n65 13\n65 14\n65 15\n65 16\n65 17\n65 18\n65 19\n65 20\n65 21\n65 22\n65 23\n65 24\n65 25\n65 26\n65 27\n65 28\n65 29\n65 30\n65 31\n65 32\n65 33\n65 34\n65 35\n65 36\n65 37\n65 38\n65 39\n65 40\n65 41\n65 42\n65 43\n65 44\n65 45\n65 46\n65 47\n65 48\n65 49\n65 50\n65 51\n65 52\n65 53\n65 54\n65 55\n65 56\n65 57\n65 58\n65 59\n65 60\n65 61\n65 62\n65 63\n65 64\n66 1\n66 2\n66 3\n66 4\n66 5\n66 6\n66 7\n66 8\n66 9\n66 10\n66 11\n66 12\n66 13\n66 14\n66 15\n66 16\n66 17\n66 18\n66 19\n66 20\n66 21\n66 22\n66 23\n66 24\n66 25\n66 26\n66 27\n66 28\n66 29\n66 30\n66 31\n66 32\n66 33\n66 34\n66 35\n66 36\n66 37\n66 38\n66 39\n66 40\n66 41\n66 42\n66 43\n66 44\n66 45\n66 46\n66 47\n66 48\n66 49\n66 50\n66 51\n66 52\n66 53\n66 54\n66 55\n66 56\n66 57\n66 58\n66 59\n66 60\n66 61\n66 62\n66 63\n66 64\n66 65\n67 1\n67 2\n67 3\n67 4\n67 5\n67 6\n67 7\n67 8\n67 9\n67 10\n67 11\n67 12\n67 13\n67 14\n67 15\n67 16\n67 17\n67 18\n67 19\n67 20\n67 21\n67 22\n67 23\n67 24\n67 25\n67 26\n67 27\n67 28\n67 29\n67 30\n67 31\n67 32\n67 33\n67 34\n67 35\n67 36\n67 37\n67 38\n67 39\n67 40\n67 41\n67 42\n67 43\n67 44\n67 45\n67 46\n67 47\n67 48\n67 49\n67 50\n67 51\n67 52\n67 53\n67 54\n67 55\n67 56\n67 57\n67 58\n67 59\n67 60\n67 61\n67 62\n67 63\n67 64\n67 65\n67 66\n68 1\n68 2\n68 3\n68 4\n68 5\n68 6\n68 7\n68 8\n68 9\n68 10\n68 11\n68 12\n68 13\n68 14\n68 15\n68 16\n68 17\n68 18\n68 19\n68 20\n68 21\n68 22\n68 23\n68 24\n68 25\n68 26\n68 27\n68 28\n68 29\n68 30\n68 31\n68 32\n68 33\n68 34\n68 35\n68 36\n68 37\n68 38\n68 39\n68 40\n68 41\n68 42\n68 43\n68 44\n68 45\n68 46\n68 47\n68 48\n68 49\n68 50\n68 51\n68 52\n68 53\n68 54\n68 55\n68 56\n68 57\n68 58\n68 59\n68 60\n68 61\n68 62\n68 63\n68 64\n68 65\n68 66\n68 67\n69 1\n69 2\n69 3\n69 4\n69 5\n69 6\n69 7\n69 8\n69 9\n69 10\n69 11\n69 12\n69 13\n69 14\n69 15\n69 16\n69 17\n69 18\n69 19\n69 20\n69 21\n69 22\n69 23\n69 24\n69 25\n69 26\n69 27\n69 28\n69 29\n69 30\n69 31\n69 32\n69 33\n69 34\n69 35\n69 36\n69 37\n69 38\n69 39\n69 40\n69 41\n69 42\n69 43\n69 44\n69 45\n69 46\n69 47\n69 48\n69 49\n69 50\n69 51\n69 52\n69 53\n69 54\n69 55\n69 56\n69 57\n69 58\n69 59\n69 60\n69 61\n69 62\n69 63\n69 64\n69 65\n69 66\n69 67\n69 68\n70 1\n70 2\n70 3\n70 4\n70 5\n70 6\n70 7\n70 8\n70 9\n70 10\n70 11\n70 12\n70 13\n70 14\n70 15\n70 16\n70 17\n70 18\n70 19\n70 20\n70 21\n70 22\n70 23\n70 24\n70 25\n70 26\n70 27\n70 28\n70 29\n70 30\n70 31\n70 32\n70 33\n70 34\n70 35\n70 36\n70 37\n70 38\n70 39\n70 40\n70 41\n70 42\n70 43\n70 44\n70 45\n70 46\n70 47\n70 48\n70 49\n70 50\n70 51\n70 52\n70 53\n70 54\n70 55\n70 56\n70 57\n70 58\n70 59\n70 60\n70 61\n70 62\n70 63\n70 64\n70 65\n70 66\n70 67\n70 68\n70 69\n71 1\n71 2\n71 3\n71 4\n71 5\n71 6\n71 7\n71 8\n71 9\n71 10\n71 11\n71 12\n71 13\n71 14\n71 15\n71 16\n71 17\n71 18\n71 19\n71 20\n71 21\n71 22\n71 23\n71 24\n71 25\n71 26\n71 27\n71 28\n71 29\n71 30\n71 31\n71 32\n71 33\n71 34\n71 35\n71 36\n71 37\n71 38\n71 39\n71 40\n71 41\n71 42\n71 43\n71 44\n71 45\n71 46\n71 47\n71 48\n71 49\n71 50\n71 51\n71 52\n71 53\n71 54\n71 55\n71 56\n71 57\n71 58\n71 59\n71 60\n71 61\n71 62\n71 63\n71 64\n71 65\n71 66\n71 67\n71 68\n71 69\n71 70\n72 1\n72 2\n72 3\n72 4\n72 5\n72 6\n72 7\n72 8\n72 9\n72 10\n72 11\n72 12\n72 13\n72 14\n72 15\n72 16\n72 17\n72 18\n72 19\n72 20\n72 21\n72 22\n72 23\n72 24\n72 25\n72 26\n72 27\n72 28\n72 29\n72 30\n72 31\n72 32\n72 33\n72 34\n72 35\n72 36\n72 37\n72 38\n72 39\n72 40\n72 41\n72 42\n72 43\n72 44\n72 45\n72 46\n72 47\n72 48\n72 49\n72 50\n72 51\n72 52\n72 53\n72 54\n72 55\n72 56\n72 57\n72 58\n72 59\n72 60\n72 61\n72 62\n72 63\n72 64\n72 65\n72 66\n72 67\n72 68\n72 69\n72 70\n72 71\n73 1\n73 2\n73 3\n73 4\n73 5\n73 6\n73 7\n73 8\n73 9\n73 10\n73 11\n73 12\n73 13\n73 14\n73 15\n73 16\n73 17\n73 18\n73 19\n73 20\n73 21\n73 22\n73 23\n73 24\n73 25\n73 26\n73 27\n73 28\n73 29\n73 30\n73 31\n73 32\n73 33\n73 34\n73 35\n73 36\n73 37\n73 38\n73 39\n73 40\n73 41\n73 42\n73 43\n73 44\n73 45\n73 46\n73 47\n73 48\n73 49\n73 50\n73 51\n73 52\n73 53\n73 54\n73 55\n73 56\n73 57\n73 58\n73 59\n73 60\n73 61\n73 62\n73 63\n73 64\n73 65\n73 66\n73 67\n73 68\n73 69\n73 70\n73 71\n73 72\n74 1\n74 2\n74 3\n74 4\n74 5\n74 6\n74 7\n74 8\n74 9\n74 10\n74 11\n74 12\n74 13\n74 14\n74 15\n74 16\n74 17\n74 18\n74 19\n74 20\n74 21\n74 22\n74 23\n74 24\n74 25\n74 26\n74 27\n74 28\n74 29\n74 30\n74 31\n74 32\n74 33\n74 34\n74 35\n74 36\n74 37\n74 38\n74 39\n74 40\n74 41\n74 42\n74 43\n74 44\n74 45\n74 46\n74 47\n74 48\n74 49\n74 50\n74 51\n74 52\n74 53\n74 54\n74 55\n74 56\n74 57\n74 58\n74 59\n74 60\n74 61\n74 62\n74 63\n74 64\n74 65\n74 66\n74 67\n74 68\n74 69\n74 70\n74 71\n74 72\n74 73\n75 1\n75 2\n75 3\n75 4\n75 5\n75 6\n75 7\n75 8\n75 9\n75 10\n75 11\n75 12\n75 13\n75 14\n75 15\n75 16\n75 17\n75 18\n75 19\n75 20\n75 21\n75 22\n75 23\n75 24\n75 25\n75 26\n75 27\n75 28\n75 29\n75 30\n75 31\n75 32\n75 33\n75 34\n75 35\n75 36\n75 37\n75 38\n75 39\n75 40\n75 41\n75 42\n75 43\n75 44\n75 45\n75 46\n75 47\n75 48\n75 49\n75 50\n75 51\n75 52\n75 53\n75 54\n75 55\n75 56\n75 57\n75 58\n75 59\n75 60\n75 61\n75 62\n75 63\n75 64\n75 65\n75 66\n75 67\n75 68\n75 69\n75 70\n75 71\n75 72\n75 73\n75 74\n76 1\n76 2\n76 3\n76 4\n76 5\n76 6\n76 7\n76 8\n76 9\n76 10\n76 11\n76 12\n76 13\n76 14\n76 15\n76 16\n76 17\n76 18\n76 19\n76 20\n76 21\n76 22\n76 23\n76 24\n76 25\n76 26\n76 27\n76 28\n76 29\n76 30\n76 31\n76 32\n76 33\n76 34\n76 35\n76 36\n76 37\n76 38\n76 39\n76 40\n76 41\n76 42\n76 43\n76 44\n76 45\n76 46\n76 47\n76 48\n76 49\n76 50\n76 51\n76 52\n76 53\n76 54\n76 55\n76 56\n76 57\n76 58\n76 59\n76 60\n76 61\n76 62\n76 63\n76 64\n76 65\n76 66\n76 67\n76 68\n76 69\n76 70\n76 71\n76 72\n76 73\n76 74\n76 75\n77 1\n77 2\n77 3\n77 4\n77 5\n77 6\n77 7\n77 8\n77 9\n77 10\n77 11\n77 12\n77 13\n77 14\n77 15\n77 16\n77 17\n77 18\n77 19\n77 20\n77 21\n77 22\n77 23\n77 24\n77 25\n77 26\n77 27\n77 28\n77 29\n77 30\n77 31\n77 32\n77 33\n77 34\n77 35\n77 36\n77 37\n77 38\n77 39\n77 40\n77 41\n77 42\n77 43\n77 44\n77 45\n77 46\n77 47\n77 48\n77 49\n77 50\n77 51\n77 52\n77 53\n77 54\n77 55\n77 56\n77 57\n77 58\n77 59\n77 60\n77 61\n77 62\n77 63\n77 64\n77 65\n77 66\n77 67\n77 68\n77 69\n77 70\n77 71\n77 72\n77 73\n77 74\n77 75\n77 76\n78 1\n78 2\n78 3\n78 4\n78 5\n78 6\n78 7\n78 8\n78 9\n78 10\n78 11\n78 12\n78 13\n78 14\n78 15\n78 16\n78 17\n78 18\n78 19\n78 20\n78 21\n78 22\n78 23\n78 24\n78 25\n78 26\n78 27\n78 28\n78 29\n78 30\n78 31\n78 32\n78 33\n78 34\n78 35\n78 36\n78 37\n78 38\n78 39\n78 40\n78 41\n78 42\n78 43\n78 44\n78 45\n78 46\n78 47\n78 48\n78 49\n78 50\n78 51\n78 52\n78 53\n78 54\n78 55\n78 56\n78 57\n78 58\n78 59\n78 60\n78 61\n78 62\n78 63\n78 64\n78 65\n78 66\n78 67\n78 68\n78 69\n78 70\n78 71\n78 72\n78 73\n78 74\n78 75\n78 76\n78 77\n79 1\n79 2\n79 3\n79 4\n79 5\n79 6\n79 7\n79 8\n79 9\n79 10\n79 11\n79 12\n79 13\n79 14\n79 15\n79 16\n79 17\n79 18\n79 19\n79 20\n79 21\n79 22\n79 23\n79 24\n79 25\n79 26\n79 27\n79 28\n79 29\n79 30\n79 31\n79 32\n79 33\n79 34\n79 35\n79 36\n79 37\n79 38\n79 39\n79 40\n79 41\n79 42\n79 43\n79 44\n79 45\n79 46\n79 47\n79 48\n79 49\n79 50\n79 51\n79 52\n79 53\n79 54\n79 55\n79 56\n79 57\n79 58\n79 59\n79 60\n79 61\n79 62\n79 63\n79 64\n79 65\n79 66\n79 67\n79 68\n79 69\n79 70\n79 71\n79 72\n79 73\n79 74\n79 75\n79 76\n79 77\n79 78\n80 1\n80 2\n80 3\n80 4\n80 5\n80 6\n80 7\n80 8\n80 9\n80 10\n80 11\n80 12\n80 13\n80 14\n80 15\n80 16\n80 17\n80 18\n80 19\n80 20\n80 21\n80 22\n80 23\n80 24\n80 25\n80 26\n80 27\n80 28\n80 29\n80 30\n80 31\n80 32\n80 33\n80 34\n80 35\n80 36\n80 37\n80 38\n80 39\n80 40\n80 41\n80 42\n80 43\n80 44\n80 45\n80 46\n80 47\n80 48\n80 49\n80 50\n80 51\n80 52\n80 53\n80 54\n80 55\n80 56\n80 57\n80 58\n80 59\n80 60\n80 61\n80 62\n80 63\n80 64\n80 65\n80 66\n80 67\n80 68\n80 69\n80 70\n80 71\n80 72\n80 73\n80 74\n80 75\n80 76\n80 77\n80 78\n80 79\n81 1\n81 2\n81 3\n81 4\n81 5\n81 6\n81 7\n81 8\n81 9\n81 10\n81 11\n81 12\n81 13\n81 14\n81 15\n81 16\n81 17\n81 18\n81 19\n81 20\n81 21\n81 22\n81 23\n81 24\n81 25\n81 26\n81 27\n81 28\n81 29\n81 30\n81 31\n81 32\n81 33\n81 34\n81 35\n81 36\n81 37\n81 38\n81 39\n81 40\n81 41\n81 42\n81 43\n81 44\n81 45\n81 46\n81 47\n81 48\n81 49\n81 50\n81 51\n81 52\n81 53\n81 54\n81 55\n81 56\n81 57\n81 58\n81 59\n81 60\n81 61\n81 62\n81 63\n81 64\n81 65\n81 66\n81 67\n81 68\n81 69\n81 70\n81 71\n81 72\n81 73\n81 74\n81 75\n81 76\n81 77\n81 78\n81 79\n81 80\n82 1\n82 2\n82 3\n82 4\n82 5\n82 6\n82 7\n82 8\n82 9\n82 10\n82 11\n82 12\n82 13\n82 14\n82 15\n82 16\n82 17\n82 18\n82 19\n82 20\n82 21\n82 22\n82 23\n82 24\n82 25\n82 26\n82 27\n82 28\n82 29\n82 30\n82 31\n82 32\n82 33\n82 34\n82 35\n82 36\n82 37\n82 38\n82 39\n82 40\n82 41\n82 42\n82 43\n82 44\n82 45\n82 46\n82 47\n82 48\n82 49\n82 50\n82 51\n82 52\n82 53\n82 54\n82 55\n82 56\n82 57\n82 58\n82 59\n82 60\n82 61\n82 62\n82 63\n82 64\n82 65\n82 66\n82 67\n82 68\n82 69\n82 70\n82 71\n82 72\n82 73\n82 74\n82 75\n82 76\n82 77\n82 78\n82 79\n82 80\n82 81\n83 1\n83 2\n83 3\n83 4\n83 5\n83 6\n83 7\n83 8\n83 9\n83 10\n83 11\n83 12\n83 13\n83 14\n83 15\n83 16\n83 17\n83 18\n83 19\n83 20\n83 21\n83 22\n83 23\n83 24\n83 25\n83 26\n83 27\n83 28\n83 29\n83 30\n83 31\n83 32\n83 33\n83 34\n83 35\n83 36\n83 37\n83 38\n83 39\n83 40\n83 41\n83 42\n83 43\n83 44\n83 45\n83 46\n83 47\n83 48\n83 49\n83 50\n83 51\n83 52\n83 53\n83 54\n83 55\n83 56\n83 57\n83 58\n83 59\n83 60\n83 61\n83 62\n83 63\n83 64\n83 65\n83 66\n83 67\n83 68\n83 69\n83 70\n83 71\n83 72\n83 73\n83 74\n83 75\n83 76\n83 77\n83 78\n83 79\n83 80\n83 81\n83 82\n84 1\n84 2\n84 3\n84 4\n84 5\n84 6\n84 7\n84 8\n84 9\n84 10\n84 11\n84 12\n84 13\n84 14\n84 15\n84 16\n84 17\n84 18\n84 19\n84 20\n84 21\n84 22\n84 23\n84 24\n84 25\n84 26\n84 27\n84 28\n84 29\n84 30\n84 31\n84 32\n84 33\n84 34\n84 35\n84 36\n84 37\n84 38\n84 39\n84 40\n84 41\n84 42\n84 43\n84 44\n84 45\n84 46\n84 47\n84 48\n84 49\n84 50\n84 51\n84 52\n84 53\n84 54\n84 55\n84 56\n84 57\n84 58\n84 59\n84 60\n84 61\n84 62\n84 63\n84 64\n84 65\n84 66\n84 67\n84 68\n84 69\n84 70\n84 71\n84 72\n84 73\n84 74\n84 75\n84 76\n84 77\n84 78\n84 79\n84 80\n84 81\n84 82\n84 83\n85 1\n85 2\n85 3\n85 4\n85 5\n85 6\n85 7\n85 8\n85 9\n85 10\n85 11\n85 12\n85 13\n85 14\n85 15\n85 16\n85 17\n85 18\n85 19\n85 20\n85 21\n85 22\n85 23\n85 24\n85 25\n85 26\n85 27\n85 28\n85 29\n85 30\n85 31\n85 32\n85 33\n85 34\n85 35\n85 36\n85 37\n85 38\n85 39\n85 40\n85 41\n85 42\n85 43\n85 44\n85 45\n85 46\n85 47\n85 48\n85 49\n85 50\n85 51\n85 52\n85 53\n85 54\n85 55\n85 56\n85 57\n85 58\n85 59\n85 60\n85 61\n85 62\n85 63\n85 64\n85 65\n85 66\n85 67\n85 68\n85 69\n85 70\n85 71\n85 72\n85 73\n85 74\n85 75\n85 76\n85 77\n85 78\n85 79\n85 80\n85 81\n85 82\n85 83\n85 84\n86 1\n86 2\n86 3\n86 4\n86 5\n86 6\n86 7\n86 8\n86 9\n86 10\n86 11\n86 12\n86 13\n86 14\n86 15\n86 16\n86 17\n86 18\n86 19\n86 20\n86 21\n86 22\n86 23\n86 24\n86 25\n86 26\n86 27\n86 28\n86 29\n86 30\n86 31\n86 32\n86 33\n86 34\n86 35\n86 36\n86 37\n86 38\n86 39\n86 40\n86 41\n86 42\n86 43\n86 44\n86 45\n86 46\n86 47\n86 48\n86 49\n86 50\n86 51\n86 52\n86 53\n86 54\n86 55\n86 56\n86 57\n86 58\n86 59\n86 60\n86 61\n86 62\n86 63\n86 64\n86 65\n86 66\n86 67\n86 68\n86 69\n86 70\n86 71\n86 72\n86 73\n86 74\n86 75\n86 76\n86 77\n86 78\n86 79\n86 80\n86 81\n86 82\n86 83\n86 84\n86 85\n87 1\n87 2\n87 3\n87 4\n87 5\n87 6\n87 7\n87 8\n87 9\n87 10\n87 11\n87 12\n87 13\n87 14\n87 15\n87 16\n87 17\n87 18\n87 19\n87 20\n87 21\n87 22\n87 23\n87 24\n87 25\n87 26\n87 27\n87 28\n87 29\n87 30\n87 31\n87 32\n87 33\n87 34\n87 35\n87 36\n87 37\n87 38\n87 39\n87 40\n87 41\n87 42\n87 43\n87 44\n87 45\n87 46\n87 47\n87 48\n87 49\n87 50\n87 51\n87 52\n87 53\n87 54\n87 55\n87 56\n87 57\n87 58\n87 59\n87 60\n87 61\n87 62\n87 63\n87 64\n87 65\n87 66\n87 67\n87 68\n87 69\n87 70\n87 71\n87 72\n87 73\n87 74\n87 75\n87 76\n87 77\n87 78\n87 79\n87 80\n87 81\n87 82\n87 83\n87 84\n87 85\n87 86\n88 1\n88 2\n88 3\n88 4\n88 5\n88 6\n88 7\n88 8\n88 9\n88 10\n88 11\n88 12\n88 13\n88 14\n88 15\n88 16\n88 17\n88 18\n88 19\n88 20\n88 21\n88 22\n88 23\n88 24\n88 25\n88 26\n88 27\n88 28\n88 29\n88 30\n88 31\n88 32\n88 33\n88 34\n88 35\n88 36\n88 37\n88 38\n88 39\n88 40\n88 41\n88 42\n88 43\n88 44\n88 45\n88 46\n88 47\n88 48\n88 49\n88 50\n88 51\n88 52\n88 53\n88 54\n88 55\n88 56\n88 57\n88 58\n88 59\n88 60\n88 61\n88 62\n88 63\n88 64\n88 65\n88 66\n88 67\n88 68\n88 69\n88 70\n88 71\n88 72\n88 73\n88 74\n88 75\n88 76\n88 77\n88 78\n88 79\n88 80\n88 81\n88 82\n88 83\n88 84\n88 85\n88 86\n88 87\n89 1\n89 2\n89 3\n89 4\n89 5\n89 6\n89 7\n89 8\n89 9\n89 10\n89 11\n89 12\n89 13\n89 14\n89 15\n89 16\n89 17\n89 18\n89 19\n89 20\n89 21\n89 22\n89 23\n89 24\n89 25\n89 26\n89 27\n89 28\n89 29\n89 30\n89 31\n89 32\n89 33\n89 34\n89 35\n89 36\n89 37\n89 38\n89 39\n89 40\n89 41\n89 42\n89 43\n89 44\n89 45\n89 46\n89 47\n89 48\n89 49\n89 50\n89 51\n89 52\n89 53\n89 54\n89 55\n89 56\n89 57\n89 58\n89 59\n89 60\n89 61\n89 62\n89 63\n89 64\n89 65\n89 66\n89 67\n89 68\n89 69\n89 70\n89 71\n89 72\n89 73\n89 74\n89 75\n89 76\n89 77\n89 78\n89 79\n89 80\n89 81\n89 82\n89 83\n89 84\n89 85\n89 86\n89 87\n89 88\n90 1\n90 2\n90 3\n90 4\n90 5\n90 6\n90 7\n90 8\n90 9\n90 10\n90 11\n90 12\n90 13\n90 14\n90 15\n90 16\n90 17\n90 18\n90 19\n90 20\n90 21\n90 22\n90 23\n90 24\n90 25\n90 26\n90 27\n90 28\n90 29\n90 30\n90 31\n90 32\n90 33\n90 34\n90 35\n90 36\n90 37\n90 38\n90 39\n90 40\n90 41\n90 42\n90 43\n90 44\n90 45\n90 46\n90 47\n90 48\n90 49\n90 50\n90 51\n90 52\n90 53\n90 54\n90 55\n90 56\n90 57\n90 58\n90 59\n90 60\n90 61\n90 62\n90 63\n90 64\n90 65\n90 66\n90 67\n90 68\n90 69\n90 70\n90 71\n90 72\n90 73\n90 74\n90 75\n90 76\n90 77\n90 78\n90 79\n90 80\n90 81\n90 82\n90 83\n90 84\n90 85\n90 86\n90 87\n90 88\n90 89\n91 1\n91 2\n91 3\n91 4\n91 5\n91 6\n91 7\n91 8\n91 9\n91 10\n91 11\n91 12\n91 13\n91 14\n91 15\n91 16\n91 17\n91 18\n91 19\n91 20\n91 21\n91 22\n91 23\n91 24\n91 25\n91 26\n91 27\n91 28\n91 29\n91 30\n91 31\n91 32\n91 33\n91 34\n91 35\n91 36\n91 37\n91 38\n91 39\n91 40\n91 41\n91 42\n91 43\n91 44\n91 45\n91 46\n91 47\n91 48\n91 49\n91 50\n91 51\n91 52\n91 53\n91 54\n91 55\n91 56\n91 57\n91 58\n91 59\n91 60\n91 61\n91 62\n91 63\n91 64\n91 65\n91 66\n91 67\n91 68\n91 69\n91 70\n91 71\n91 72\n91 73\n91 74\n91 75\n91 76\n91 77\n91 78\n91 79\n91 80\n91 81\n91 82\n91 83\n91 84\n91 85\n91 86\n91 87\n91 88\n91 89\n91 90\n92 1\n92 2\n92 3\n92 4\n92 5\n92 6\n92 7\n92 8\n92 9\n92 10\n92 11\n92 12\n92 13\n92 14\n92 15\n92 16\n92 17\n92 18\n92 19\n92 20\n92 21\n92 22\n92 23\n92 24\n92 25\n92 26\n92 27\n92 28\n92 29\n92 30\n92 31\n92 32\n92 33\n92 34\n92 35\n92 36\n92 37\n92 38\n92 39\n92 40\n92 41\n92 42\n92 43\n92 44\n92 45\n92 46\n92 47\n92 48\n92 49\n92 50\n92 51\n92 52\n92 53\n92 54\n92 55\n92 56\n92 57\n92 58\n92 59\n92 60\n92 61\n92 62\n92 63\n92 64\n92 65\n92 66\n92 67\n92 68\n92 69\n92 70\n92 71\n92 72\n92 73\n92 74\n92 75\n92 76\n92 77\n92 78\n92 79\n92 80\n92 81\n92 82\n92 83\n92 84\n92 85\n92 86\n92 87\n92 88\n92 89\n92 90\n92 91\n93 1\n93 2\n93 3\n93 4\n93 5\n93 6\n93 7\n93 8\n93 9\n93 10\n93 11\n93 12\n93 13\n93 14\n93 15\n93 16\n93 17\n93 18\n93 19\n93 20\n93 21\n93 22\n93 23\n93 24\n93 25\n93 26\n93 27\n93 28\n93 29\n93 30\n93 31\n93 32\n93 33\n93 34\n93 35\n93 36\n93 37\n93 38\n93 39\n93 40\n93 41\n93 42\n93 43\n93 44\n93 45\n93 46\n93 47\n93 48\n93 49\n93 50\n93 51\n93 52\n93 53\n93 54\n93 55\n93 56\n93 57\n93 58\n93 59\n93 60\n93 61\n93 62\n93 63\n93 64\n93 65\n93 66\n93 67\n93 68\n93 69\n93 70\n93 71\n93 72\n93 73\n93 74\n93 75\n93 76\n93 77\n93 78\n93 79\n93 80\n93 81\n93 82\n93 83\n93 84\n93 85\n93 86\n93 87\n93 88\n93 89\n93 90\n93 91\n93 92\n94 1\n94 2\n94 3\n94 4\n94 5\n94 6\n94 7\n94 8\n94 9\n94 10\n94 11\n94 12\n94 13\n94 14\n94 15\n94 16\n94 17\n94 18\n94 19\n94 20\n94 21\n94 22\n94 23\n94 24\n94 25\n94 26\n94 27\n94 28\n94 29\n94 30\n94 31\n94 32\n94 33\n94 34\n94 35\n94 36\n94 37\n94 38\n94 39\n94 40\n94 41\n94 42\n94 43\n94 44\n94 45\n94 46\n94 47\n94 48\n94 49\n94 50\n94 51\n94 52\n94 53\n94 54\n94 55\n94 56\n94 57\n94 58\n94 59\n94 60\n94 61\n94 62\n94 63\n94 64\n94 65\n94 66\n94 67\n94 68\n94 69\n94 70\n94 71\n94 72\n94 73\n94 74\n94 75\n94 76\n94 77\n94 78\n94 79\n94 80\n94 81\n94 82\n94 83\n94 84\n94 85\n94 86\n94 87\n94 88\n94 89\n94 90\n94 91\n94 92\n94 93\n95 1\n95 2\n95 3\n95 4\n95 5\n95 6\n95 7\n95 8\n95 9\n95 10\n95 11\n95 12\n95 13\n95 14\n95 15\n95 16\n95 17\n95 18\n95 19\n95 20\n95 21\n95 22\n95 23\n95 24\n95 25\n95 26\n95 27\n95 28\n95 29\n95 30\n95 31\n95 32\n95 33\n95 34\n95 35\n95 36\n95 37\n95 38\n95 39\n95 40\n95 41\n95 42\n95 43\n95 44\n95 45\n95 46\n95 47\n95 48\n95 49\n95 50\n95 51\n95 52\n95 53\n95 54\n95 55\n95 56\n95 57\n95 58\n95 59\n95 60\n95 61\n95 62\n95 63\n95 64\n95 65\n95 66\n95 67\n95 68\n95 69\n95 70\n95 71\n95 72\n95 73\n95 74\n95 75\n95 76\n95 77\n95 78\n95 79\n95 80\n95 81\n95 82\n95 83\n95 84\n95 85\n95 86\n95 87\n95 88\n95 89\n95 90\n95 91\n95 92\n95 93\n95 94\n96 1\n96 2\n96 3\n96 4\n96 5\n96 6\n96 7\n96 8\n96 9\n96 10\n96 11\n96 12\n96 13\n96 14\n96 15\n96 16\n96 17\n96 18\n96 19\n96 20\n96 21\n96 22\n96 23\n96 24\n96 25\n96 26\n96 27\n96 28\n96 29\n96 30\n96 31\n96 32\n96 33\n96 34\n96 35\n96 36\n96 37\n96 38\n96 39\n96 40\n96 41\n96 42\n96 43\n96 44\n96 45\n96 46\n96 47\n96 48\n96 49\n96 50\n96 51\n96 52\n96 53\n96 54\n96 55\n96 56\n96 57\n96 58\n96 59\n96 60\n96 61\n96 62\n96 63\n96 64\n96 65\n96 66\n96 67\n96 68\n96 69\n96 70\n96 71\n96 72\n96 73\n96 74\n96 75\n96 76\n96 77\n96 78\n96 79\n96 80\n96 81\n96 82\n96 83\n96 84\n96 85\n96 86\n96 87\n96 88\n96 89\n96 90\n96 91\n96 92\n96 93\n96 94\n96 95\n97 1\n97 2\n97 3\n97 4\n97 5\n97 6\n97 7\n97 8\n97 9\n97 10\n97 11\n97 12\n97 13\n97 14\n97 15\n97 16\n97 17\n97 18\n97 19\n97 20\n97 21\n97 22\n97 23\n97 24\n97 25\n97 26\n97 27\n97 28\n97 29\n97 30\n97 31\n97 32\n97 33\n97 34\n97 35\n97 36\n97 37\n97 38\n97 39\n97 40\n97 41\n97 42\n97 43\n97 44\n97 45\n97 46\n97 47\n97 48\n97 49\n97 50\n97 51\n97 52\n97 53\n97 54\n97 55\n97 56\n97 57\n97 58\n97 59\n97 60\n97 61\n97 62\n97 63\n97 64\n97 65\n97 66\n97 67\n97 68\n97 69\n97 70\n97 71\n97 72\n97 73\n97 74\n97 75\n97 76\n97 77\n97 78\n97 79\n97 80\n97 81\n97 82\n97 83\n97 84\n97 85\n97 86\n97 87\n97 88\n97 89\n97 90\n97 91\n97 92\n97 93\n97 94\n97 95\n97 96\n98 1\n98 2\n98 3\n98 4\n98 5\n98 6\n98 7\n98 8\n98 9\n98 10\n98 11\n98 12\n98 13\n98 14\n98 15\n98 16\n98 17\n98 18\n98 19\n98 20\n98 21\n98 22\n98 23\n98 24\n98 25\n98 26\n98 27\n98 28\n98 29\n98 30\n98 31\n98 32\n98 33\n98 34\n98 35\n98 36\n98 37\n98 38\n98 39\n98 40\n98 41\n98 42\n98 43\n98 44\n98 45\n98 46\n98 47\n98 48\n98 49\n98 50\n98 51\n98 52\n98 53\n98 54\n98 55\n98 56\n98 57\n98 58\n98 59\n98 60\n98 61\n98 62\n98 63\n98 64\n98 65\n98 66\n98 67\n98 68\n98 69\n98 70\n98 71\n98 72\n98 73\n98 74\n98 75\n98 76\n98 77\n98 78\n98 79\n98 80\n98 81\n98 82\n98 83\n98 84\n98 85\n98 86\n98 87\n98 88\n98 89\n98 90\n98 91\n98 92\n98 93\n98 94\n98 95\n98 96\n98 97\n99 1\n99 2\n99 3\n99 4\n99 5\n99 6\n99 7\n99 8\n99 9\n99 10\n99 11\n99 12\n99 13\n99 14\n99 15\n99 16\n99 17\n99 18\n99 19\n99 20\n99 21\n99 22\n99 23\n99 24\n99 25\n99 26\n99 27\n99 28\n99 29\n99 30\n99 31\n99 32\n99 33\n99 34\n99 35\n99 36\n99 37\n99 38\n99 39\n99 40\n99 41\n99 42\n99 43\n99 44\n99 45\n99 46\n99 47\n99 48\n99 49\n99 50\n99 51\n99 52\n99 53\n99 54\n99 55\n99 56\n99 57\n99 58\n99 59\n99 60\n99 61\n99 62\n99 63\n99 64\n99 65\n99 66\n99 67\n99 68\n99 69\n99 70\n99 71\n99 72\n99 73\n99 74\n99 75\n99 76\n99 77\n99 78\n99 79\n99 80\n99 81\n99 82\n99 83\n99 84\n99 85\n99 86\n99 87\n99 88\n99 89\n99 90\n99 91\n99 92\n99 93\n99 94\n99 95\n99 96\n99 97\n99 98\n100 1\n100 2\n100 3\n100 4\n100 5\n100 6\n100 7\n100 8\n100 9\n100 10\n100 11\n100 12\n100 13\n100 14\n100 15\n100 16\n100 17\n100 18\n100 19\n100 20\n100 21\n100 22\n100 23\n100 24\n100 25\n100 26\n100 27\n100 28\n100 29\n100 30\n100 31\n100 32\n100 33\n100 34\n100 35\n100 36\n100 37\n100 38\n100 39\n100 40\n100 41\n100 42\n100 43\n100 44\n100 45\n100 46\n100 47\n100 48\n100 49\n100 50\n100 51\n100 52\n100 53\n100 54\n100 55\n100 56\n100 57\n100 58\n100 59\n100 60\n100 61\n100 62\n100 63\n100 64\n100 65\n100 66\n100 67\n100 68\n100 69\n100 70\n100 71\n100 72\n100 73\n100 74\n100 75\n100 76\n100 77\n100 78\n100 79\n100 80\n100 81\n100 82\n100 83\n100 84\n100 85\n100 86\n100 87\n100 88\n100 89\n100 90\n100 91\n100 92\n100 93\n100 94\n100 95\n100 96\n100 97\n100 98\n100 99\n" }, { "input": "99 99 1 1\n", "output": "4851\n2 1\n3 1\n3 2\n4 1\n4 2\n4 3\n5 1\n5 2\n5 3\n5 4\n6 1\n6 2\n6 3\n6 4\n6 5\n7 1\n7 2\n7 3\n7 4\n7 5\n7 6\n8 1\n8 2\n8 3\n8 4\n8 5\n8 6\n8 7\n9 1\n9 2\n9 3\n9 4\n9 5\n9 6\n9 7\n9 8\n10 1\n10 2\n10 3\n10 4\n10 5\n10 6\n10 7\n10 8\n10 9\n11 1\n11 2\n11 3\n11 4\n11 5\n11 6\n11 7\n11 8\n11 9\n11 10\n12 1\n12 2\n12 3\n12 4\n12 5\n12 6\n12 7\n12 8\n12 9\n12 10\n12 11\n13 1\n13 2\n13 3\n13 4\n13 5\n13 6\n13 7\n13 8\n13 9\n13 10\n13 11\n13 12\n14 1\n14 2\n14 3\n14 4\n14 5\n14 6\n14 7\n14 8\n14 9\n14 10\n14 11\n14 12\n14 13\n15 1\n15 2\n15 3\n15 4\n15 5\n15 6\n15 7\n15 8\n15 9\n15 10\n15 11\n15 12\n15 13\n15 14\n16 1\n16 2\n16 3\n16 4\n16 5\n16 6\n16 7\n16 8\n16 9\n16 10\n16 11\n16 12\n16 13\n16 14\n16 15\n17 1\n17 2\n17 3\n17 4\n17 5\n17 6\n17 7\n17 8\n17 9\n17 10\n17 11\n17 12\n17 13\n17 14\n17 15\n17 16\n18 1\n18 2\n18 3\n18 4\n18 5\n18 6\n18 7\n18 8\n18 9\n18 10\n18 11\n18 12\n18 13\n18 14\n18 15\n18 16\n18 17\n19 1\n19 2\n19 3\n19 4\n19 5\n19 6\n19 7\n19 8\n19 9\n19 10\n19 11\n19 12\n19 13\n19 14\n19 15\n19 16\n19 17\n19 18\n20 1\n20 2\n20 3\n20 4\n20 5\n20 6\n20 7\n20 8\n20 9\n20 10\n20 11\n20 12\n20 13\n20 14\n20 15\n20 16\n20 17\n20 18\n20 19\n21 1\n21 2\n21 3\n21 4\n21 5\n21 6\n21 7\n21 8\n21 9\n21 10\n21 11\n21 12\n21 13\n21 14\n21 15\n21 16\n21 17\n21 18\n21 19\n21 20\n22 1\n22 2\n22 3\n22 4\n22 5\n22 6\n22 7\n22 8\n22 9\n22 10\n22 11\n22 12\n22 13\n22 14\n22 15\n22 16\n22 17\n22 18\n22 19\n22 20\n22 21\n23 1\n23 2\n23 3\n23 4\n23 5\n23 6\n23 7\n23 8\n23 9\n23 10\n23 11\n23 12\n23 13\n23 14\n23 15\n23 16\n23 17\n23 18\n23 19\n23 20\n23 21\n23 22\n24 1\n24 2\n24 3\n24 4\n24 5\n24 6\n24 7\n24 8\n24 9\n24 10\n24 11\n24 12\n24 13\n24 14\n24 15\n24 16\n24 17\n24 18\n24 19\n24 20\n24 21\n24 22\n24 23\n25 1\n25 2\n25 3\n25 4\n25 5\n25 6\n25 7\n25 8\n25 9\n25 10\n25 11\n25 12\n25 13\n25 14\n25 15\n25 16\n25 17\n25 18\n25 19\n25 20\n25 21\n25 22\n25 23\n25 24\n26 1\n26 2\n26 3\n26 4\n26 5\n26 6\n26 7\n26 8\n26 9\n26 10\n26 11\n26 12\n26 13\n26 14\n26 15\n26 16\n26 17\n26 18\n26 19\n26 20\n26 21\n26 22\n26 23\n26 24\n26 25\n27 1\n27 2\n27 3\n27 4\n27 5\n27 6\n27 7\n27 8\n27 9\n27 10\n27 11\n27 12\n27 13\n27 14\n27 15\n27 16\n27 17\n27 18\n27 19\n27 20\n27 21\n27 22\n27 23\n27 24\n27 25\n27 26\n28 1\n28 2\n28 3\n28 4\n28 5\n28 6\n28 7\n28 8\n28 9\n28 10\n28 11\n28 12\n28 13\n28 14\n28 15\n28 16\n28 17\n28 18\n28 19\n28 20\n28 21\n28 22\n28 23\n28 24\n28 25\n28 26\n28 27\n29 1\n29 2\n29 3\n29 4\n29 5\n29 6\n29 7\n29 8\n29 9\n29 10\n29 11\n29 12\n29 13\n29 14\n29 15\n29 16\n29 17\n29 18\n29 19\n29 20\n29 21\n29 22\n29 23\n29 24\n29 25\n29 26\n29 27\n29 28\n30 1\n30 2\n30 3\n30 4\n30 5\n30 6\n30 7\n30 8\n30 9\n30 10\n30 11\n30 12\n30 13\n30 14\n30 15\n30 16\n30 17\n30 18\n30 19\n30 20\n30 21\n30 22\n30 23\n30 24\n30 25\n30 26\n30 27\n30 28\n30 29\n31 1\n31 2\n31 3\n31 4\n31 5\n31 6\n31 7\n31 8\n31 9\n31 10\n31 11\n31 12\n31 13\n31 14\n31 15\n31 16\n31 17\n31 18\n31 19\n31 20\n31 21\n31 22\n31 23\n31 24\n31 25\n31 26\n31 27\n31 28\n31 29\n31 30\n32 1\n32 2\n32 3\n32 4\n32 5\n32 6\n32 7\n32 8\n32 9\n32 10\n32 11\n32 12\n32 13\n32 14\n32 15\n32 16\n32 17\n32 18\n32 19\n32 20\n32 21\n32 22\n32 23\n32 24\n32 25\n32 26\n32 27\n32 28\n32 29\n32 30\n32 31\n33 1\n33 2\n33 3\n33 4\n33 5\n33 6\n33 7\n33 8\n33 9\n33 10\n33 11\n33 12\n33 13\n33 14\n33 15\n33 16\n33 17\n33 18\n33 19\n33 20\n33 21\n33 22\n33 23\n33 24\n33 25\n33 26\n33 27\n33 28\n33 29\n33 30\n33 31\n33 32\n34 1\n34 2\n34 3\n34 4\n34 5\n34 6\n34 7\n34 8\n34 9\n34 10\n34 11\n34 12\n34 13\n34 14\n34 15\n34 16\n34 17\n34 18\n34 19\n34 20\n34 21\n34 22\n34 23\n34 24\n34 25\n34 26\n34 27\n34 28\n34 29\n34 30\n34 31\n34 32\n34 33\n35 1\n35 2\n35 3\n35 4\n35 5\n35 6\n35 7\n35 8\n35 9\n35 10\n35 11\n35 12\n35 13\n35 14\n35 15\n35 16\n35 17\n35 18\n35 19\n35 20\n35 21\n35 22\n35 23\n35 24\n35 25\n35 26\n35 27\n35 28\n35 29\n35 30\n35 31\n35 32\n35 33\n35 34\n36 1\n36 2\n36 3\n36 4\n36 5\n36 6\n36 7\n36 8\n36 9\n36 10\n36 11\n36 12\n36 13\n36 14\n36 15\n36 16\n36 17\n36 18\n36 19\n36 20\n36 21\n36 22\n36 23\n36 24\n36 25\n36 26\n36 27\n36 28\n36 29\n36 30\n36 31\n36 32\n36 33\n36 34\n36 35\n37 1\n37 2\n37 3\n37 4\n37 5\n37 6\n37 7\n37 8\n37 9\n37 10\n37 11\n37 12\n37 13\n37 14\n37 15\n37 16\n37 17\n37 18\n37 19\n37 20\n37 21\n37 22\n37 23\n37 24\n37 25\n37 26\n37 27\n37 28\n37 29\n37 30\n37 31\n37 32\n37 33\n37 34\n37 35\n37 36\n38 1\n38 2\n38 3\n38 4\n38 5\n38 6\n38 7\n38 8\n38 9\n38 10\n38 11\n38 12\n38 13\n38 14\n38 15\n38 16\n38 17\n38 18\n38 19\n38 20\n38 21\n38 22\n38 23\n38 24\n38 25\n38 26\n38 27\n38 28\n38 29\n38 30\n38 31\n38 32\n38 33\n38 34\n38 35\n38 36\n38 37\n39 1\n39 2\n39 3\n39 4\n39 5\n39 6\n39 7\n39 8\n39 9\n39 10\n39 11\n39 12\n39 13\n39 14\n39 15\n39 16\n39 17\n39 18\n39 19\n39 20\n39 21\n39 22\n39 23\n39 24\n39 25\n39 26\n39 27\n39 28\n39 29\n39 30\n39 31\n39 32\n39 33\n39 34\n39 35\n39 36\n39 37\n39 38\n40 1\n40 2\n40 3\n40 4\n40 5\n40 6\n40 7\n40 8\n40 9\n40 10\n40 11\n40 12\n40 13\n40 14\n40 15\n40 16\n40 17\n40 18\n40 19\n40 20\n40 21\n40 22\n40 23\n40 24\n40 25\n40 26\n40 27\n40 28\n40 29\n40 30\n40 31\n40 32\n40 33\n40 34\n40 35\n40 36\n40 37\n40 38\n40 39\n41 1\n41 2\n41 3\n41 4\n41 5\n41 6\n41 7\n41 8\n41 9\n41 10\n41 11\n41 12\n41 13\n41 14\n41 15\n41 16\n41 17\n41 18\n41 19\n41 20\n41 21\n41 22\n41 23\n41 24\n41 25\n41 26\n41 27\n41 28\n41 29\n41 30\n41 31\n41 32\n41 33\n41 34\n41 35\n41 36\n41 37\n41 38\n41 39\n41 40\n42 1\n42 2\n42 3\n42 4\n42 5\n42 6\n42 7\n42 8\n42 9\n42 10\n42 11\n42 12\n42 13\n42 14\n42 15\n42 16\n42 17\n42 18\n42 19\n42 20\n42 21\n42 22\n42 23\n42 24\n42 25\n42 26\n42 27\n42 28\n42 29\n42 30\n42 31\n42 32\n42 33\n42 34\n42 35\n42 36\n42 37\n42 38\n42 39\n42 40\n42 41\n43 1\n43 2\n43 3\n43 4\n43 5\n43 6\n43 7\n43 8\n43 9\n43 10\n43 11\n43 12\n43 13\n43 14\n43 15\n43 16\n43 17\n43 18\n43 19\n43 20\n43 21\n43 22\n43 23\n43 24\n43 25\n43 26\n43 27\n43 28\n43 29\n43 30\n43 31\n43 32\n43 33\n43 34\n43 35\n43 36\n43 37\n43 38\n43 39\n43 40\n43 41\n43 42\n44 1\n44 2\n44 3\n44 4\n44 5\n44 6\n44 7\n44 8\n44 9\n44 10\n44 11\n44 12\n44 13\n44 14\n44 15\n44 16\n44 17\n44 18\n44 19\n44 20\n44 21\n44 22\n44 23\n44 24\n44 25\n44 26\n44 27\n44 28\n44 29\n44 30\n44 31\n44 32\n44 33\n44 34\n44 35\n44 36\n44 37\n44 38\n44 39\n44 40\n44 41\n44 42\n44 43\n45 1\n45 2\n45 3\n45 4\n45 5\n45 6\n45 7\n45 8\n45 9\n45 10\n45 11\n45 12\n45 13\n45 14\n45 15\n45 16\n45 17\n45 18\n45 19\n45 20\n45 21\n45 22\n45 23\n45 24\n45 25\n45 26\n45 27\n45 28\n45 29\n45 30\n45 31\n45 32\n45 33\n45 34\n45 35\n45 36\n45 37\n45 38\n45 39\n45 40\n45 41\n45 42\n45 43\n45 44\n46 1\n46 2\n46 3\n46 4\n46 5\n46 6\n46 7\n46 8\n46 9\n46 10\n46 11\n46 12\n46 13\n46 14\n46 15\n46 16\n46 17\n46 18\n46 19\n46 20\n46 21\n46 22\n46 23\n46 24\n46 25\n46 26\n46 27\n46 28\n46 29\n46 30\n46 31\n46 32\n46 33\n46 34\n46 35\n46 36\n46 37\n46 38\n46 39\n46 40\n46 41\n46 42\n46 43\n46 44\n46 45\n47 1\n47 2\n47 3\n47 4\n47 5\n47 6\n47 7\n47 8\n47 9\n47 10\n47 11\n47 12\n47 13\n47 14\n47 15\n47 16\n47 17\n47 18\n47 19\n47 20\n47 21\n47 22\n47 23\n47 24\n47 25\n47 26\n47 27\n47 28\n47 29\n47 30\n47 31\n47 32\n47 33\n47 34\n47 35\n47 36\n47 37\n47 38\n47 39\n47 40\n47 41\n47 42\n47 43\n47 44\n47 45\n47 46\n48 1\n48 2\n48 3\n48 4\n48 5\n48 6\n48 7\n48 8\n48 9\n48 10\n48 11\n48 12\n48 13\n48 14\n48 15\n48 16\n48 17\n48 18\n48 19\n48 20\n48 21\n48 22\n48 23\n48 24\n48 25\n48 26\n48 27\n48 28\n48 29\n48 30\n48 31\n48 32\n48 33\n48 34\n48 35\n48 36\n48 37\n48 38\n48 39\n48 40\n48 41\n48 42\n48 43\n48 44\n48 45\n48 46\n48 47\n49 1\n49 2\n49 3\n49 4\n49 5\n49 6\n49 7\n49 8\n49 9\n49 10\n49 11\n49 12\n49 13\n49 14\n49 15\n49 16\n49 17\n49 18\n49 19\n49 20\n49 21\n49 22\n49 23\n49 24\n49 25\n49 26\n49 27\n49 28\n49 29\n49 30\n49 31\n49 32\n49 33\n49 34\n49 35\n49 36\n49 37\n49 38\n49 39\n49 40\n49 41\n49 42\n49 43\n49 44\n49 45\n49 46\n49 47\n49 48\n50 1\n50 2\n50 3\n50 4\n50 5\n50 6\n50 7\n50 8\n50 9\n50 10\n50 11\n50 12\n50 13\n50 14\n50 15\n50 16\n50 17\n50 18\n50 19\n50 20\n50 21\n50 22\n50 23\n50 24\n50 25\n50 26\n50 27\n50 28\n50 29\n50 30\n50 31\n50 32\n50 33\n50 34\n50 35\n50 36\n50 37\n50 38\n50 39\n50 40\n50 41\n50 42\n50 43\n50 44\n50 45\n50 46\n50 47\n50 48\n50 49\n51 1\n51 2\n51 3\n51 4\n51 5\n51 6\n51 7\n51 8\n51 9\n51 10\n51 11\n51 12\n51 13\n51 14\n51 15\n51 16\n51 17\n51 18\n51 19\n51 20\n51 21\n51 22\n51 23\n51 24\n51 25\n51 26\n51 27\n51 28\n51 29\n51 30\n51 31\n51 32\n51 33\n51 34\n51 35\n51 36\n51 37\n51 38\n51 39\n51 40\n51 41\n51 42\n51 43\n51 44\n51 45\n51 46\n51 47\n51 48\n51 49\n51 50\n52 1\n52 2\n52 3\n52 4\n52 5\n52 6\n52 7\n52 8\n52 9\n52 10\n52 11\n52 12\n52 13\n52 14\n52 15\n52 16\n52 17\n52 18\n52 19\n52 20\n52 21\n52 22\n52 23\n52 24\n52 25\n52 26\n52 27\n52 28\n52 29\n52 30\n52 31\n52 32\n52 33\n52 34\n52 35\n52 36\n52 37\n52 38\n52 39\n52 40\n52 41\n52 42\n52 43\n52 44\n52 45\n52 46\n52 47\n52 48\n52 49\n52 50\n52 51\n53 1\n53 2\n53 3\n53 4\n53 5\n53 6\n53 7\n53 8\n53 9\n53 10\n53 11\n53 12\n53 13\n53 14\n53 15\n53 16\n53 17\n53 18\n53 19\n53 20\n53 21\n53 22\n53 23\n53 24\n53 25\n53 26\n53 27\n53 28\n53 29\n53 30\n53 31\n53 32\n53 33\n53 34\n53 35\n53 36\n53 37\n53 38\n53 39\n53 40\n53 41\n53 42\n53 43\n53 44\n53 45\n53 46\n53 47\n53 48\n53 49\n53 50\n53 51\n53 52\n54 1\n54 2\n54 3\n54 4\n54 5\n54 6\n54 7\n54 8\n54 9\n54 10\n54 11\n54 12\n54 13\n54 14\n54 15\n54 16\n54 17\n54 18\n54 19\n54 20\n54 21\n54 22\n54 23\n54 24\n54 25\n54 26\n54 27\n54 28\n54 29\n54 30\n54 31\n54 32\n54 33\n54 34\n54 35\n54 36\n54 37\n54 38\n54 39\n54 40\n54 41\n54 42\n54 43\n54 44\n54 45\n54 46\n54 47\n54 48\n54 49\n54 50\n54 51\n54 52\n54 53\n55 1\n55 2\n55 3\n55 4\n55 5\n55 6\n55 7\n55 8\n55 9\n55 10\n55 11\n55 12\n55 13\n55 14\n55 15\n55 16\n55 17\n55 18\n55 19\n55 20\n55 21\n55 22\n55 23\n55 24\n55 25\n55 26\n55 27\n55 28\n55 29\n55 30\n55 31\n55 32\n55 33\n55 34\n55 35\n55 36\n55 37\n55 38\n55 39\n55 40\n55 41\n55 42\n55 43\n55 44\n55 45\n55 46\n55 47\n55 48\n55 49\n55 50\n55 51\n55 52\n55 53\n55 54\n56 1\n56 2\n56 3\n56 4\n56 5\n56 6\n56 7\n56 8\n56 9\n56 10\n56 11\n56 12\n56 13\n56 14\n56 15\n56 16\n56 17\n56 18\n56 19\n56 20\n56 21\n56 22\n56 23\n56 24\n56 25\n56 26\n56 27\n56 28\n56 29\n56 30\n56 31\n56 32\n56 33\n56 34\n56 35\n56 36\n56 37\n56 38\n56 39\n56 40\n56 41\n56 42\n56 43\n56 44\n56 45\n56 46\n56 47\n56 48\n56 49\n56 50\n56 51\n56 52\n56 53\n56 54\n56 55\n57 1\n57 2\n57 3\n57 4\n57 5\n57 6\n57 7\n57 8\n57 9\n57 10\n57 11\n57 12\n57 13\n57 14\n57 15\n57 16\n57 17\n57 18\n57 19\n57 20\n57 21\n57 22\n57 23\n57 24\n57 25\n57 26\n57 27\n57 28\n57 29\n57 30\n57 31\n57 32\n57 33\n57 34\n57 35\n57 36\n57 37\n57 38\n57 39\n57 40\n57 41\n57 42\n57 43\n57 44\n57 45\n57 46\n57 47\n57 48\n57 49\n57 50\n57 51\n57 52\n57 53\n57 54\n57 55\n57 56\n58 1\n58 2\n58 3\n58 4\n58 5\n58 6\n58 7\n58 8\n58 9\n58 10\n58 11\n58 12\n58 13\n58 14\n58 15\n58 16\n58 17\n58 18\n58 19\n58 20\n58 21\n58 22\n58 23\n58 24\n58 25\n58 26\n58 27\n58 28\n58 29\n58 30\n58 31\n58 32\n58 33\n58 34\n58 35\n58 36\n58 37\n58 38\n58 39\n58 40\n58 41\n58 42\n58 43\n58 44\n58 45\n58 46\n58 47\n58 48\n58 49\n58 50\n58 51\n58 52\n58 53\n58 54\n58 55\n58 56\n58 57\n59 1\n59 2\n59 3\n59 4\n59 5\n59 6\n59 7\n59 8\n59 9\n59 10\n59 11\n59 12\n59 13\n59 14\n59 15\n59 16\n59 17\n59 18\n59 19\n59 20\n59 21\n59 22\n59 23\n59 24\n59 25\n59 26\n59 27\n59 28\n59 29\n59 30\n59 31\n59 32\n59 33\n59 34\n59 35\n59 36\n59 37\n59 38\n59 39\n59 40\n59 41\n59 42\n59 43\n59 44\n59 45\n59 46\n59 47\n59 48\n59 49\n59 50\n59 51\n59 52\n59 53\n59 54\n59 55\n59 56\n59 57\n59 58\n60 1\n60 2\n60 3\n60 4\n60 5\n60 6\n60 7\n60 8\n60 9\n60 10\n60 11\n60 12\n60 13\n60 14\n60 15\n60 16\n60 17\n60 18\n60 19\n60 20\n60 21\n60 22\n60 23\n60 24\n60 25\n60 26\n60 27\n60 28\n60 29\n60 30\n60 31\n60 32\n60 33\n60 34\n60 35\n60 36\n60 37\n60 38\n60 39\n60 40\n60 41\n60 42\n60 43\n60 44\n60 45\n60 46\n60 47\n60 48\n60 49\n60 50\n60 51\n60 52\n60 53\n60 54\n60 55\n60 56\n60 57\n60 58\n60 59\n61 1\n61 2\n61 3\n61 4\n61 5\n61 6\n61 7\n61 8\n61 9\n61 10\n61 11\n61 12\n61 13\n61 14\n61 15\n61 16\n61 17\n61 18\n61 19\n61 20\n61 21\n61 22\n61 23\n61 24\n61 25\n61 26\n61 27\n61 28\n61 29\n61 30\n61 31\n61 32\n61 33\n61 34\n61 35\n61 36\n61 37\n61 38\n61 39\n61 40\n61 41\n61 42\n61 43\n61 44\n61 45\n61 46\n61 47\n61 48\n61 49\n61 50\n61 51\n61 52\n61 53\n61 54\n61 55\n61 56\n61 57\n61 58\n61 59\n61 60\n62 1\n62 2\n62 3\n62 4\n62 5\n62 6\n62 7\n62 8\n62 9\n62 10\n62 11\n62 12\n62 13\n62 14\n62 15\n62 16\n62 17\n62 18\n62 19\n62 20\n62 21\n62 22\n62 23\n62 24\n62 25\n62 26\n62 27\n62 28\n62 29\n62 30\n62 31\n62 32\n62 33\n62 34\n62 35\n62 36\n62 37\n62 38\n62 39\n62 40\n62 41\n62 42\n62 43\n62 44\n62 45\n62 46\n62 47\n62 48\n62 49\n62 50\n62 51\n62 52\n62 53\n62 54\n62 55\n62 56\n62 57\n62 58\n62 59\n62 60\n62 61\n63 1\n63 2\n63 3\n63 4\n63 5\n63 6\n63 7\n63 8\n63 9\n63 10\n63 11\n63 12\n63 13\n63 14\n63 15\n63 16\n63 17\n63 18\n63 19\n63 20\n63 21\n63 22\n63 23\n63 24\n63 25\n63 26\n63 27\n63 28\n63 29\n63 30\n63 31\n63 32\n63 33\n63 34\n63 35\n63 36\n63 37\n63 38\n63 39\n63 40\n63 41\n63 42\n63 43\n63 44\n63 45\n63 46\n63 47\n63 48\n63 49\n63 50\n63 51\n63 52\n63 53\n63 54\n63 55\n63 56\n63 57\n63 58\n63 59\n63 60\n63 61\n63 62\n64 1\n64 2\n64 3\n64 4\n64 5\n64 6\n64 7\n64 8\n64 9\n64 10\n64 11\n64 12\n64 13\n64 14\n64 15\n64 16\n64 17\n64 18\n64 19\n64 20\n64 21\n64 22\n64 23\n64 24\n64 25\n64 26\n64 27\n64 28\n64 29\n64 30\n64 31\n64 32\n64 33\n64 34\n64 35\n64 36\n64 37\n64 38\n64 39\n64 40\n64 41\n64 42\n64 43\n64 44\n64 45\n64 46\n64 47\n64 48\n64 49\n64 50\n64 51\n64 52\n64 53\n64 54\n64 55\n64 56\n64 57\n64 58\n64 59\n64 60\n64 61\n64 62\n64 63\n65 1\n65 2\n65 3\n65 4\n65 5\n65 6\n65 7\n65 8\n65 9\n65 10\n65 11\n65 12\n65 13\n65 14\n65 15\n65 16\n65 17\n65 18\n65 19\n65 20\n65 21\n65 22\n65 23\n65 24\n65 25\n65 26\n65 27\n65 28\n65 29\n65 30\n65 31\n65 32\n65 33\n65 34\n65 35\n65 36\n65 37\n65 38\n65 39\n65 40\n65 41\n65 42\n65 43\n65 44\n65 45\n65 46\n65 47\n65 48\n65 49\n65 50\n65 51\n65 52\n65 53\n65 54\n65 55\n65 56\n65 57\n65 58\n65 59\n65 60\n65 61\n65 62\n65 63\n65 64\n66 1\n66 2\n66 3\n66 4\n66 5\n66 6\n66 7\n66 8\n66 9\n66 10\n66 11\n66 12\n66 13\n66 14\n66 15\n66 16\n66 17\n66 18\n66 19\n66 20\n66 21\n66 22\n66 23\n66 24\n66 25\n66 26\n66 27\n66 28\n66 29\n66 30\n66 31\n66 32\n66 33\n66 34\n66 35\n66 36\n66 37\n66 38\n66 39\n66 40\n66 41\n66 42\n66 43\n66 44\n66 45\n66 46\n66 47\n66 48\n66 49\n66 50\n66 51\n66 52\n66 53\n66 54\n66 55\n66 56\n66 57\n66 58\n66 59\n66 60\n66 61\n66 62\n66 63\n66 64\n66 65\n67 1\n67 2\n67 3\n67 4\n67 5\n67 6\n67 7\n67 8\n67 9\n67 10\n67 11\n67 12\n67 13\n67 14\n67 15\n67 16\n67 17\n67 18\n67 19\n67 20\n67 21\n67 22\n67 23\n67 24\n67 25\n67 26\n67 27\n67 28\n67 29\n67 30\n67 31\n67 32\n67 33\n67 34\n67 35\n67 36\n67 37\n67 38\n67 39\n67 40\n67 41\n67 42\n67 43\n67 44\n67 45\n67 46\n67 47\n67 48\n67 49\n67 50\n67 51\n67 52\n67 53\n67 54\n67 55\n67 56\n67 57\n67 58\n67 59\n67 60\n67 61\n67 62\n67 63\n67 64\n67 65\n67 66\n68 1\n68 2\n68 3\n68 4\n68 5\n68 6\n68 7\n68 8\n68 9\n68 10\n68 11\n68 12\n68 13\n68 14\n68 15\n68 16\n68 17\n68 18\n68 19\n68 20\n68 21\n68 22\n68 23\n68 24\n68 25\n68 26\n68 27\n68 28\n68 29\n68 30\n68 31\n68 32\n68 33\n68 34\n68 35\n68 36\n68 37\n68 38\n68 39\n68 40\n68 41\n68 42\n68 43\n68 44\n68 45\n68 46\n68 47\n68 48\n68 49\n68 50\n68 51\n68 52\n68 53\n68 54\n68 55\n68 56\n68 57\n68 58\n68 59\n68 60\n68 61\n68 62\n68 63\n68 64\n68 65\n68 66\n68 67\n69 1\n69 2\n69 3\n69 4\n69 5\n69 6\n69 7\n69 8\n69 9\n69 10\n69 11\n69 12\n69 13\n69 14\n69 15\n69 16\n69 17\n69 18\n69 19\n69 20\n69 21\n69 22\n69 23\n69 24\n69 25\n69 26\n69 27\n69 28\n69 29\n69 30\n69 31\n69 32\n69 33\n69 34\n69 35\n69 36\n69 37\n69 38\n69 39\n69 40\n69 41\n69 42\n69 43\n69 44\n69 45\n69 46\n69 47\n69 48\n69 49\n69 50\n69 51\n69 52\n69 53\n69 54\n69 55\n69 56\n69 57\n69 58\n69 59\n69 60\n69 61\n69 62\n69 63\n69 64\n69 65\n69 66\n69 67\n69 68\n70 1\n70 2\n70 3\n70 4\n70 5\n70 6\n70 7\n70 8\n70 9\n70 10\n70 11\n70 12\n70 13\n70 14\n70 15\n70 16\n70 17\n70 18\n70 19\n70 20\n70 21\n70 22\n70 23\n70 24\n70 25\n70 26\n70 27\n70 28\n70 29\n70 30\n70 31\n70 32\n70 33\n70 34\n70 35\n70 36\n70 37\n70 38\n70 39\n70 40\n70 41\n70 42\n70 43\n70 44\n70 45\n70 46\n70 47\n70 48\n70 49\n70 50\n70 51\n70 52\n70 53\n70 54\n70 55\n70 56\n70 57\n70 58\n70 59\n70 60\n70 61\n70 62\n70 63\n70 64\n70 65\n70 66\n70 67\n70 68\n70 69\n71 1\n71 2\n71 3\n71 4\n71 5\n71 6\n71 7\n71 8\n71 9\n71 10\n71 11\n71 12\n71 13\n71 14\n71 15\n71 16\n71 17\n71 18\n71 19\n71 20\n71 21\n71 22\n71 23\n71 24\n71 25\n71 26\n71 27\n71 28\n71 29\n71 30\n71 31\n71 32\n71 33\n71 34\n71 35\n71 36\n71 37\n71 38\n71 39\n71 40\n71 41\n71 42\n71 43\n71 44\n71 45\n71 46\n71 47\n71 48\n71 49\n71 50\n71 51\n71 52\n71 53\n71 54\n71 55\n71 56\n71 57\n71 58\n71 59\n71 60\n71 61\n71 62\n71 63\n71 64\n71 65\n71 66\n71 67\n71 68\n71 69\n71 70\n72 1\n72 2\n72 3\n72 4\n72 5\n72 6\n72 7\n72 8\n72 9\n72 10\n72 11\n72 12\n72 13\n72 14\n72 15\n72 16\n72 17\n72 18\n72 19\n72 20\n72 21\n72 22\n72 23\n72 24\n72 25\n72 26\n72 27\n72 28\n72 29\n72 30\n72 31\n72 32\n72 33\n72 34\n72 35\n72 36\n72 37\n72 38\n72 39\n72 40\n72 41\n72 42\n72 43\n72 44\n72 45\n72 46\n72 47\n72 48\n72 49\n72 50\n72 51\n72 52\n72 53\n72 54\n72 55\n72 56\n72 57\n72 58\n72 59\n72 60\n72 61\n72 62\n72 63\n72 64\n72 65\n72 66\n72 67\n72 68\n72 69\n72 70\n72 71\n73 1\n73 2\n73 3\n73 4\n73 5\n73 6\n73 7\n73 8\n73 9\n73 10\n73 11\n73 12\n73 13\n73 14\n73 15\n73 16\n73 17\n73 18\n73 19\n73 20\n73 21\n73 22\n73 23\n73 24\n73 25\n73 26\n73 27\n73 28\n73 29\n73 30\n73 31\n73 32\n73 33\n73 34\n73 35\n73 36\n73 37\n73 38\n73 39\n73 40\n73 41\n73 42\n73 43\n73 44\n73 45\n73 46\n73 47\n73 48\n73 49\n73 50\n73 51\n73 52\n73 53\n73 54\n73 55\n73 56\n73 57\n73 58\n73 59\n73 60\n73 61\n73 62\n73 63\n73 64\n73 65\n73 66\n73 67\n73 68\n73 69\n73 70\n73 71\n73 72\n74 1\n74 2\n74 3\n74 4\n74 5\n74 6\n74 7\n74 8\n74 9\n74 10\n74 11\n74 12\n74 13\n74 14\n74 15\n74 16\n74 17\n74 18\n74 19\n74 20\n74 21\n74 22\n74 23\n74 24\n74 25\n74 26\n74 27\n74 28\n74 29\n74 30\n74 31\n74 32\n74 33\n74 34\n74 35\n74 36\n74 37\n74 38\n74 39\n74 40\n74 41\n74 42\n74 43\n74 44\n74 45\n74 46\n74 47\n74 48\n74 49\n74 50\n74 51\n74 52\n74 53\n74 54\n74 55\n74 56\n74 57\n74 58\n74 59\n74 60\n74 61\n74 62\n74 63\n74 64\n74 65\n74 66\n74 67\n74 68\n74 69\n74 70\n74 71\n74 72\n74 73\n75 1\n75 2\n75 3\n75 4\n75 5\n75 6\n75 7\n75 8\n75 9\n75 10\n75 11\n75 12\n75 13\n75 14\n75 15\n75 16\n75 17\n75 18\n75 19\n75 20\n75 21\n75 22\n75 23\n75 24\n75 25\n75 26\n75 27\n75 28\n75 29\n75 30\n75 31\n75 32\n75 33\n75 34\n75 35\n75 36\n75 37\n75 38\n75 39\n75 40\n75 41\n75 42\n75 43\n75 44\n75 45\n75 46\n75 47\n75 48\n75 49\n75 50\n75 51\n75 52\n75 53\n75 54\n75 55\n75 56\n75 57\n75 58\n75 59\n75 60\n75 61\n75 62\n75 63\n75 64\n75 65\n75 66\n75 67\n75 68\n75 69\n75 70\n75 71\n75 72\n75 73\n75 74\n76 1\n76 2\n76 3\n76 4\n76 5\n76 6\n76 7\n76 8\n76 9\n76 10\n76 11\n76 12\n76 13\n76 14\n76 15\n76 16\n76 17\n76 18\n76 19\n76 20\n76 21\n76 22\n76 23\n76 24\n76 25\n76 26\n76 27\n76 28\n76 29\n76 30\n76 31\n76 32\n76 33\n76 34\n76 35\n76 36\n76 37\n76 38\n76 39\n76 40\n76 41\n76 42\n76 43\n76 44\n76 45\n76 46\n76 47\n76 48\n76 49\n76 50\n76 51\n76 52\n76 53\n76 54\n76 55\n76 56\n76 57\n76 58\n76 59\n76 60\n76 61\n76 62\n76 63\n76 64\n76 65\n76 66\n76 67\n76 68\n76 69\n76 70\n76 71\n76 72\n76 73\n76 74\n76 75\n77 1\n77 2\n77 3\n77 4\n77 5\n77 6\n77 7\n77 8\n77 9\n77 10\n77 11\n77 12\n77 13\n77 14\n77 15\n77 16\n77 17\n77 18\n77 19\n77 20\n77 21\n77 22\n77 23\n77 24\n77 25\n77 26\n77 27\n77 28\n77 29\n77 30\n77 31\n77 32\n77 33\n77 34\n77 35\n77 36\n77 37\n77 38\n77 39\n77 40\n77 41\n77 42\n77 43\n77 44\n77 45\n77 46\n77 47\n77 48\n77 49\n77 50\n77 51\n77 52\n77 53\n77 54\n77 55\n77 56\n77 57\n77 58\n77 59\n77 60\n77 61\n77 62\n77 63\n77 64\n77 65\n77 66\n77 67\n77 68\n77 69\n77 70\n77 71\n77 72\n77 73\n77 74\n77 75\n77 76\n78 1\n78 2\n78 3\n78 4\n78 5\n78 6\n78 7\n78 8\n78 9\n78 10\n78 11\n78 12\n78 13\n78 14\n78 15\n78 16\n78 17\n78 18\n78 19\n78 20\n78 21\n78 22\n78 23\n78 24\n78 25\n78 26\n78 27\n78 28\n78 29\n78 30\n78 31\n78 32\n78 33\n78 34\n78 35\n78 36\n78 37\n78 38\n78 39\n78 40\n78 41\n78 42\n78 43\n78 44\n78 45\n78 46\n78 47\n78 48\n78 49\n78 50\n78 51\n78 52\n78 53\n78 54\n78 55\n78 56\n78 57\n78 58\n78 59\n78 60\n78 61\n78 62\n78 63\n78 64\n78 65\n78 66\n78 67\n78 68\n78 69\n78 70\n78 71\n78 72\n78 73\n78 74\n78 75\n78 76\n78 77\n79 1\n79 2\n79 3\n79 4\n79 5\n79 6\n79 7\n79 8\n79 9\n79 10\n79 11\n79 12\n79 13\n79 14\n79 15\n79 16\n79 17\n79 18\n79 19\n79 20\n79 21\n79 22\n79 23\n79 24\n79 25\n79 26\n79 27\n79 28\n79 29\n79 30\n79 31\n79 32\n79 33\n79 34\n79 35\n79 36\n79 37\n79 38\n79 39\n79 40\n79 41\n79 42\n79 43\n79 44\n79 45\n79 46\n79 47\n79 48\n79 49\n79 50\n79 51\n79 52\n79 53\n79 54\n79 55\n79 56\n79 57\n79 58\n79 59\n79 60\n79 61\n79 62\n79 63\n79 64\n79 65\n79 66\n79 67\n79 68\n79 69\n79 70\n79 71\n79 72\n79 73\n79 74\n79 75\n79 76\n79 77\n79 78\n80 1\n80 2\n80 3\n80 4\n80 5\n80 6\n80 7\n80 8\n80 9\n80 10\n80 11\n80 12\n80 13\n80 14\n80 15\n80 16\n80 17\n80 18\n80 19\n80 20\n80 21\n80 22\n80 23\n80 24\n80 25\n80 26\n80 27\n80 28\n80 29\n80 30\n80 31\n80 32\n80 33\n80 34\n80 35\n80 36\n80 37\n80 38\n80 39\n80 40\n80 41\n80 42\n80 43\n80 44\n80 45\n80 46\n80 47\n80 48\n80 49\n80 50\n80 51\n80 52\n80 53\n80 54\n80 55\n80 56\n80 57\n80 58\n80 59\n80 60\n80 61\n80 62\n80 63\n80 64\n80 65\n80 66\n80 67\n80 68\n80 69\n80 70\n80 71\n80 72\n80 73\n80 74\n80 75\n80 76\n80 77\n80 78\n80 79\n81 1\n81 2\n81 3\n81 4\n81 5\n81 6\n81 7\n81 8\n81 9\n81 10\n81 11\n81 12\n81 13\n81 14\n81 15\n81 16\n81 17\n81 18\n81 19\n81 20\n81 21\n81 22\n81 23\n81 24\n81 25\n81 26\n81 27\n81 28\n81 29\n81 30\n81 31\n81 32\n81 33\n81 34\n81 35\n81 36\n81 37\n81 38\n81 39\n81 40\n81 41\n81 42\n81 43\n81 44\n81 45\n81 46\n81 47\n81 48\n81 49\n81 50\n81 51\n81 52\n81 53\n81 54\n81 55\n81 56\n81 57\n81 58\n81 59\n81 60\n81 61\n81 62\n81 63\n81 64\n81 65\n81 66\n81 67\n81 68\n81 69\n81 70\n81 71\n81 72\n81 73\n81 74\n81 75\n81 76\n81 77\n81 78\n81 79\n81 80\n82 1\n82 2\n82 3\n82 4\n82 5\n82 6\n82 7\n82 8\n82 9\n82 10\n82 11\n82 12\n82 13\n82 14\n82 15\n82 16\n82 17\n82 18\n82 19\n82 20\n82 21\n82 22\n82 23\n82 24\n82 25\n82 26\n82 27\n82 28\n82 29\n82 30\n82 31\n82 32\n82 33\n82 34\n82 35\n82 36\n82 37\n82 38\n82 39\n82 40\n82 41\n82 42\n82 43\n82 44\n82 45\n82 46\n82 47\n82 48\n82 49\n82 50\n82 51\n82 52\n82 53\n82 54\n82 55\n82 56\n82 57\n82 58\n82 59\n82 60\n82 61\n82 62\n82 63\n82 64\n82 65\n82 66\n82 67\n82 68\n82 69\n82 70\n82 71\n82 72\n82 73\n82 74\n82 75\n82 76\n82 77\n82 78\n82 79\n82 80\n82 81\n83 1\n83 2\n83 3\n83 4\n83 5\n83 6\n83 7\n83 8\n83 9\n83 10\n83 11\n83 12\n83 13\n83 14\n83 15\n83 16\n83 17\n83 18\n83 19\n83 20\n83 21\n83 22\n83 23\n83 24\n83 25\n83 26\n83 27\n83 28\n83 29\n83 30\n83 31\n83 32\n83 33\n83 34\n83 35\n83 36\n83 37\n83 38\n83 39\n83 40\n83 41\n83 42\n83 43\n83 44\n83 45\n83 46\n83 47\n83 48\n83 49\n83 50\n83 51\n83 52\n83 53\n83 54\n83 55\n83 56\n83 57\n83 58\n83 59\n83 60\n83 61\n83 62\n83 63\n83 64\n83 65\n83 66\n83 67\n83 68\n83 69\n83 70\n83 71\n83 72\n83 73\n83 74\n83 75\n83 76\n83 77\n83 78\n83 79\n83 80\n83 81\n83 82\n84 1\n84 2\n84 3\n84 4\n84 5\n84 6\n84 7\n84 8\n84 9\n84 10\n84 11\n84 12\n84 13\n84 14\n84 15\n84 16\n84 17\n84 18\n84 19\n84 20\n84 21\n84 22\n84 23\n84 24\n84 25\n84 26\n84 27\n84 28\n84 29\n84 30\n84 31\n84 32\n84 33\n84 34\n84 35\n84 36\n84 37\n84 38\n84 39\n84 40\n84 41\n84 42\n84 43\n84 44\n84 45\n84 46\n84 47\n84 48\n84 49\n84 50\n84 51\n84 52\n84 53\n84 54\n84 55\n84 56\n84 57\n84 58\n84 59\n84 60\n84 61\n84 62\n84 63\n84 64\n84 65\n84 66\n84 67\n84 68\n84 69\n84 70\n84 71\n84 72\n84 73\n84 74\n84 75\n84 76\n84 77\n84 78\n84 79\n84 80\n84 81\n84 82\n84 83\n85 1\n85 2\n85 3\n85 4\n85 5\n85 6\n85 7\n85 8\n85 9\n85 10\n85 11\n85 12\n85 13\n85 14\n85 15\n85 16\n85 17\n85 18\n85 19\n85 20\n85 21\n85 22\n85 23\n85 24\n85 25\n85 26\n85 27\n85 28\n85 29\n85 30\n85 31\n85 32\n85 33\n85 34\n85 35\n85 36\n85 37\n85 38\n85 39\n85 40\n85 41\n85 42\n85 43\n85 44\n85 45\n85 46\n85 47\n85 48\n85 49\n85 50\n85 51\n85 52\n85 53\n85 54\n85 55\n85 56\n85 57\n85 58\n85 59\n85 60\n85 61\n85 62\n85 63\n85 64\n85 65\n85 66\n85 67\n85 68\n85 69\n85 70\n85 71\n85 72\n85 73\n85 74\n85 75\n85 76\n85 77\n85 78\n85 79\n85 80\n85 81\n85 82\n85 83\n85 84\n86 1\n86 2\n86 3\n86 4\n86 5\n86 6\n86 7\n86 8\n86 9\n86 10\n86 11\n86 12\n86 13\n86 14\n86 15\n86 16\n86 17\n86 18\n86 19\n86 20\n86 21\n86 22\n86 23\n86 24\n86 25\n86 26\n86 27\n86 28\n86 29\n86 30\n86 31\n86 32\n86 33\n86 34\n86 35\n86 36\n86 37\n86 38\n86 39\n86 40\n86 41\n86 42\n86 43\n86 44\n86 45\n86 46\n86 47\n86 48\n86 49\n86 50\n86 51\n86 52\n86 53\n86 54\n86 55\n86 56\n86 57\n86 58\n86 59\n86 60\n86 61\n86 62\n86 63\n86 64\n86 65\n86 66\n86 67\n86 68\n86 69\n86 70\n86 71\n86 72\n86 73\n86 74\n86 75\n86 76\n86 77\n86 78\n86 79\n86 80\n86 81\n86 82\n86 83\n86 84\n86 85\n87 1\n87 2\n87 3\n87 4\n87 5\n87 6\n87 7\n87 8\n87 9\n87 10\n87 11\n87 12\n87 13\n87 14\n87 15\n87 16\n87 17\n87 18\n87 19\n87 20\n87 21\n87 22\n87 23\n87 24\n87 25\n87 26\n87 27\n87 28\n87 29\n87 30\n87 31\n87 32\n87 33\n87 34\n87 35\n87 36\n87 37\n87 38\n87 39\n87 40\n87 41\n87 42\n87 43\n87 44\n87 45\n87 46\n87 47\n87 48\n87 49\n87 50\n87 51\n87 52\n87 53\n87 54\n87 55\n87 56\n87 57\n87 58\n87 59\n87 60\n87 61\n87 62\n87 63\n87 64\n87 65\n87 66\n87 67\n87 68\n87 69\n87 70\n87 71\n87 72\n87 73\n87 74\n87 75\n87 76\n87 77\n87 78\n87 79\n87 80\n87 81\n87 82\n87 83\n87 84\n87 85\n87 86\n88 1\n88 2\n88 3\n88 4\n88 5\n88 6\n88 7\n88 8\n88 9\n88 10\n88 11\n88 12\n88 13\n88 14\n88 15\n88 16\n88 17\n88 18\n88 19\n88 20\n88 21\n88 22\n88 23\n88 24\n88 25\n88 26\n88 27\n88 28\n88 29\n88 30\n88 31\n88 32\n88 33\n88 34\n88 35\n88 36\n88 37\n88 38\n88 39\n88 40\n88 41\n88 42\n88 43\n88 44\n88 45\n88 46\n88 47\n88 48\n88 49\n88 50\n88 51\n88 52\n88 53\n88 54\n88 55\n88 56\n88 57\n88 58\n88 59\n88 60\n88 61\n88 62\n88 63\n88 64\n88 65\n88 66\n88 67\n88 68\n88 69\n88 70\n88 71\n88 72\n88 73\n88 74\n88 75\n88 76\n88 77\n88 78\n88 79\n88 80\n88 81\n88 82\n88 83\n88 84\n88 85\n88 86\n88 87\n89 1\n89 2\n89 3\n89 4\n89 5\n89 6\n89 7\n89 8\n89 9\n89 10\n89 11\n89 12\n89 13\n89 14\n89 15\n89 16\n89 17\n89 18\n89 19\n89 20\n89 21\n89 22\n89 23\n89 24\n89 25\n89 26\n89 27\n89 28\n89 29\n89 30\n89 31\n89 32\n89 33\n89 34\n89 35\n89 36\n89 37\n89 38\n89 39\n89 40\n89 41\n89 42\n89 43\n89 44\n89 45\n89 46\n89 47\n89 48\n89 49\n89 50\n89 51\n89 52\n89 53\n89 54\n89 55\n89 56\n89 57\n89 58\n89 59\n89 60\n89 61\n89 62\n89 63\n89 64\n89 65\n89 66\n89 67\n89 68\n89 69\n89 70\n89 71\n89 72\n89 73\n89 74\n89 75\n89 76\n89 77\n89 78\n89 79\n89 80\n89 81\n89 82\n89 83\n89 84\n89 85\n89 86\n89 87\n89 88\n90 1\n90 2\n90 3\n90 4\n90 5\n90 6\n90 7\n90 8\n90 9\n90 10\n90 11\n90 12\n90 13\n90 14\n90 15\n90 16\n90 17\n90 18\n90 19\n90 20\n90 21\n90 22\n90 23\n90 24\n90 25\n90 26\n90 27\n90 28\n90 29\n90 30\n90 31\n90 32\n90 33\n90 34\n90 35\n90 36\n90 37\n90 38\n90 39\n90 40\n90 41\n90 42\n90 43\n90 44\n90 45\n90 46\n90 47\n90 48\n90 49\n90 50\n90 51\n90 52\n90 53\n90 54\n90 55\n90 56\n90 57\n90 58\n90 59\n90 60\n90 61\n90 62\n90 63\n90 64\n90 65\n90 66\n90 67\n90 68\n90 69\n90 70\n90 71\n90 72\n90 73\n90 74\n90 75\n90 76\n90 77\n90 78\n90 79\n90 80\n90 81\n90 82\n90 83\n90 84\n90 85\n90 86\n90 87\n90 88\n90 89\n91 1\n91 2\n91 3\n91 4\n91 5\n91 6\n91 7\n91 8\n91 9\n91 10\n91 11\n91 12\n91 13\n91 14\n91 15\n91 16\n91 17\n91 18\n91 19\n91 20\n91 21\n91 22\n91 23\n91 24\n91 25\n91 26\n91 27\n91 28\n91 29\n91 30\n91 31\n91 32\n91 33\n91 34\n91 35\n91 36\n91 37\n91 38\n91 39\n91 40\n91 41\n91 42\n91 43\n91 44\n91 45\n91 46\n91 47\n91 48\n91 49\n91 50\n91 51\n91 52\n91 53\n91 54\n91 55\n91 56\n91 57\n91 58\n91 59\n91 60\n91 61\n91 62\n91 63\n91 64\n91 65\n91 66\n91 67\n91 68\n91 69\n91 70\n91 71\n91 72\n91 73\n91 74\n91 75\n91 76\n91 77\n91 78\n91 79\n91 80\n91 81\n91 82\n91 83\n91 84\n91 85\n91 86\n91 87\n91 88\n91 89\n91 90\n92 1\n92 2\n92 3\n92 4\n92 5\n92 6\n92 7\n92 8\n92 9\n92 10\n92 11\n92 12\n92 13\n92 14\n92 15\n92 16\n92 17\n92 18\n92 19\n92 20\n92 21\n92 22\n92 23\n92 24\n92 25\n92 26\n92 27\n92 28\n92 29\n92 30\n92 31\n92 32\n92 33\n92 34\n92 35\n92 36\n92 37\n92 38\n92 39\n92 40\n92 41\n92 42\n92 43\n92 44\n92 45\n92 46\n92 47\n92 48\n92 49\n92 50\n92 51\n92 52\n92 53\n92 54\n92 55\n92 56\n92 57\n92 58\n92 59\n92 60\n92 61\n92 62\n92 63\n92 64\n92 65\n92 66\n92 67\n92 68\n92 69\n92 70\n92 71\n92 72\n92 73\n92 74\n92 75\n92 76\n92 77\n92 78\n92 79\n92 80\n92 81\n92 82\n92 83\n92 84\n92 85\n92 86\n92 87\n92 88\n92 89\n92 90\n92 91\n93 1\n93 2\n93 3\n93 4\n93 5\n93 6\n93 7\n93 8\n93 9\n93 10\n93 11\n93 12\n93 13\n93 14\n93 15\n93 16\n93 17\n93 18\n93 19\n93 20\n93 21\n93 22\n93 23\n93 24\n93 25\n93 26\n93 27\n93 28\n93 29\n93 30\n93 31\n93 32\n93 33\n93 34\n93 35\n93 36\n93 37\n93 38\n93 39\n93 40\n93 41\n93 42\n93 43\n93 44\n93 45\n93 46\n93 47\n93 48\n93 49\n93 50\n93 51\n93 52\n93 53\n93 54\n93 55\n93 56\n93 57\n93 58\n93 59\n93 60\n93 61\n93 62\n93 63\n93 64\n93 65\n93 66\n93 67\n93 68\n93 69\n93 70\n93 71\n93 72\n93 73\n93 74\n93 75\n93 76\n93 77\n93 78\n93 79\n93 80\n93 81\n93 82\n93 83\n93 84\n93 85\n93 86\n93 87\n93 88\n93 89\n93 90\n93 91\n93 92\n94 1\n94 2\n94 3\n94 4\n94 5\n94 6\n94 7\n94 8\n94 9\n94 10\n94 11\n94 12\n94 13\n94 14\n94 15\n94 16\n94 17\n94 18\n94 19\n94 20\n94 21\n94 22\n94 23\n94 24\n94 25\n94 26\n94 27\n94 28\n94 29\n94 30\n94 31\n94 32\n94 33\n94 34\n94 35\n94 36\n94 37\n94 38\n94 39\n94 40\n94 41\n94 42\n94 43\n94 44\n94 45\n94 46\n94 47\n94 48\n94 49\n94 50\n94 51\n94 52\n94 53\n94 54\n94 55\n94 56\n94 57\n94 58\n94 59\n94 60\n94 61\n94 62\n94 63\n94 64\n94 65\n94 66\n94 67\n94 68\n94 69\n94 70\n94 71\n94 72\n94 73\n94 74\n94 75\n94 76\n94 77\n94 78\n94 79\n94 80\n94 81\n94 82\n94 83\n94 84\n94 85\n94 86\n94 87\n94 88\n94 89\n94 90\n94 91\n94 92\n94 93\n95 1\n95 2\n95 3\n95 4\n95 5\n95 6\n95 7\n95 8\n95 9\n95 10\n95 11\n95 12\n95 13\n95 14\n95 15\n95 16\n95 17\n95 18\n95 19\n95 20\n95 21\n95 22\n95 23\n95 24\n95 25\n95 26\n95 27\n95 28\n95 29\n95 30\n95 31\n95 32\n95 33\n95 34\n95 35\n95 36\n95 37\n95 38\n95 39\n95 40\n95 41\n95 42\n95 43\n95 44\n95 45\n95 46\n95 47\n95 48\n95 49\n95 50\n95 51\n95 52\n95 53\n95 54\n95 55\n95 56\n95 57\n95 58\n95 59\n95 60\n95 61\n95 62\n95 63\n95 64\n95 65\n95 66\n95 67\n95 68\n95 69\n95 70\n95 71\n95 72\n95 73\n95 74\n95 75\n95 76\n95 77\n95 78\n95 79\n95 80\n95 81\n95 82\n95 83\n95 84\n95 85\n95 86\n95 87\n95 88\n95 89\n95 90\n95 91\n95 92\n95 93\n95 94\n96 1\n96 2\n96 3\n96 4\n96 5\n96 6\n96 7\n96 8\n96 9\n96 10\n96 11\n96 12\n96 13\n96 14\n96 15\n96 16\n96 17\n96 18\n96 19\n96 20\n96 21\n96 22\n96 23\n96 24\n96 25\n96 26\n96 27\n96 28\n96 29\n96 30\n96 31\n96 32\n96 33\n96 34\n96 35\n96 36\n96 37\n96 38\n96 39\n96 40\n96 41\n96 42\n96 43\n96 44\n96 45\n96 46\n96 47\n96 48\n96 49\n96 50\n96 51\n96 52\n96 53\n96 54\n96 55\n96 56\n96 57\n96 58\n96 59\n96 60\n96 61\n96 62\n96 63\n96 64\n96 65\n96 66\n96 67\n96 68\n96 69\n96 70\n96 71\n96 72\n96 73\n96 74\n96 75\n96 76\n96 77\n96 78\n96 79\n96 80\n96 81\n96 82\n96 83\n96 84\n96 85\n96 86\n96 87\n96 88\n96 89\n96 90\n96 91\n96 92\n96 93\n96 94\n96 95\n97 1\n97 2\n97 3\n97 4\n97 5\n97 6\n97 7\n97 8\n97 9\n97 10\n97 11\n97 12\n97 13\n97 14\n97 15\n97 16\n97 17\n97 18\n97 19\n97 20\n97 21\n97 22\n97 23\n97 24\n97 25\n97 26\n97 27\n97 28\n97 29\n97 30\n97 31\n97 32\n97 33\n97 34\n97 35\n97 36\n97 37\n97 38\n97 39\n97 40\n97 41\n97 42\n97 43\n97 44\n97 45\n97 46\n97 47\n97 48\n97 49\n97 50\n97 51\n97 52\n97 53\n97 54\n97 55\n97 56\n97 57\n97 58\n97 59\n97 60\n97 61\n97 62\n97 63\n97 64\n97 65\n97 66\n97 67\n97 68\n97 69\n97 70\n97 71\n97 72\n97 73\n97 74\n97 75\n97 76\n97 77\n97 78\n97 79\n97 80\n97 81\n97 82\n97 83\n97 84\n97 85\n97 86\n97 87\n97 88\n97 89\n97 90\n97 91\n97 92\n97 93\n97 94\n97 95\n97 96\n98 1\n98 2\n98 3\n98 4\n98 5\n98 6\n98 7\n98 8\n98 9\n98 10\n98 11\n98 12\n98 13\n98 14\n98 15\n98 16\n98 17\n98 18\n98 19\n98 20\n98 21\n98 22\n98 23\n98 24\n98 25\n98 26\n98 27\n98 28\n98 29\n98 30\n98 31\n98 32\n98 33\n98 34\n98 35\n98 36\n98 37\n98 38\n98 39\n98 40\n98 41\n98 42\n98 43\n98 44\n98 45\n98 46\n98 47\n98 48\n98 49\n98 50\n98 51\n98 52\n98 53\n98 54\n98 55\n98 56\n98 57\n98 58\n98 59\n98 60\n98 61\n98 62\n98 63\n98 64\n98 65\n98 66\n98 67\n98 68\n98 69\n98 70\n98 71\n98 72\n98 73\n98 74\n98 75\n98 76\n98 77\n98 78\n98 79\n98 80\n98 81\n98 82\n98 83\n98 84\n98 85\n98 86\n98 87\n98 88\n98 89\n98 90\n98 91\n98 92\n98 93\n98 94\n98 95\n98 96\n98 97\n99 1\n99 2\n99 3\n99 4\n99 5\n99 6\n99 7\n99 8\n99 9\n99 10\n99 11\n99 12\n99 13\n99 14\n99 15\n99 16\n99 17\n99 18\n99 19\n99 20\n99 21\n99 22\n99 23\n99 24\n99 25\n99 26\n99 27\n99 28\n99 29\n99 30\n99 31\n99 32\n99 33\n99 34\n99 35\n99 36\n99 37\n99 38\n99 39\n99 40\n99 41\n99 42\n99 43\n99 44\n99 45\n99 46\n99 47\n99 48\n99 49\n99 50\n99 51\n99 52\n99 53\n99 54\n99 55\n99 56\n99 57\n99 58\n99 59\n99 60\n99 61\n99 62\n99 63\n99 64\n99 65\n99 66\n99 67\n99 68\n99 69\n99 70\n99 71\n99 72\n99 73\n99 74\n99 75\n99 76\n99 77\n99 78\n99 79\n99 80\n99 81\n99 82\n99 83\n99 84\n99 85\n99 86\n99 87\n99 88\n99 89\n99 90\n99 91\n99 92\n99 93\n99 94\n99 95\n99 96\n99 97\n99 98\n" }, { "input": "1 1 1 1\n", "output": "0\n" }, { "input": "100 90 100 83\n", "output": "8\n100 83\n100 84\n100 85\n100 86\n100 87\n100 88\n100 89\n100 90\n" }, { "input": "5 5 3 2\n", "output": "6\n3 2\n4 2\n4 3\n5 2\n5 3\n5 4\n" }, { "input": "99 99 1 1\n", "output": "4851\n2 1\n3 1\n3 2\n4 1\n4 2\n4 3\n5 1\n5 2\n5 3\n5 4\n6 1\n6 2\n6 3\n6 4\n6 5\n7 1\n7 2\n7 3\n7 4\n7 5\n7 6\n8 1\n8 2\n8 3\n8 4\n8 5\n8 6\n8 7\n9 1\n9 2\n9 3\n9 4\n9 5\n9 6\n9 7\n9 8\n10 1\n10 2\n10 3\n10 4\n10 5\n10 6\n10 7\n10 8\n10 9\n11 1\n11 2\n11 3\n11 4\n11 5\n11 6\n11 7\n11 8\n11 9\n11 10\n12 1\n12 2\n12 3\n12 4\n12 5\n12 6\n12 7\n12 8\n12 9\n12 10\n12 11\n13 1\n13 2\n13 3\n13 4\n13 5\n13 6\n13 7\n13 8\n13 9\n13 10\n13 11\n13 12\n14 1\n14 2\n14 3\n14 4\n14 5\n14 6\n14 7\n14 8\n14 9\n14 10\n14 11\n14 12\n14 13\n15 1\n15 2\n15 3\n15 4\n15 5\n15 6\n15 7\n15 8\n15 9\n15 10\n15 11\n15 12\n15 13\n15 14\n16 1\n16 2\n16 3\n16 4\n16 5\n16 6\n16 7\n16 8\n16 9\n16 10\n16 11\n16 12\n16 13\n16 14\n16 15\n17 1\n17 2\n17 3\n17 4\n17 5\n17 6\n17 7\n17 8\n17 9\n17 10\n17 11\n17 12\n17 13\n17 14\n17 15\n17 16\n18 1\n18 2\n18 3\n18 4\n18 5\n18 6\n18 7\n18 8\n18 9\n18 10\n18 11\n18 12\n18 13\n18 14\n18 15\n18 16\n18 17\n19 1\n19 2\n19 3\n19 4\n19 5\n19 6\n19 7\n19 8\n19 9\n19 10\n19 11\n19 12\n19 13\n19 14\n19 15\n19 16\n19 17\n19 18\n20 1\n20 2\n20 3\n20 4\n20 5\n20 6\n20 7\n20 8\n20 9\n20 10\n20 11\n20 12\n20 13\n20 14\n20 15\n20 16\n20 17\n20 18\n20 19\n21 1\n21 2\n21 3\n21 4\n21 5\n21 6\n21 7\n21 8\n21 9\n21 10\n21 11\n21 12\n21 13\n21 14\n21 15\n21 16\n21 17\n21 18\n21 19\n21 20\n22 1\n22 2\n22 3\n22 4\n22 5\n22 6\n22 7\n22 8\n22 9\n22 10\n22 11\n22 12\n22 13\n22 14\n22 15\n22 16\n22 17\n22 18\n22 19\n22 20\n22 21\n23 1\n23 2\n23 3\n23 4\n23 5\n23 6\n23 7\n23 8\n23 9\n23 10\n23 11\n23 12\n23 13\n23 14\n23 15\n23 16\n23 17\n23 18\n23 19\n23 20\n23 21\n23 22\n24 1\n24 2\n24 3\n24 4\n24 5\n24 6\n24 7\n24 8\n24 9\n24 10\n24 11\n24 12\n24 13\n24 14\n24 15\n24 16\n24 17\n24 18\n24 19\n24 20\n24 21\n24 22\n24 23\n25 1\n25 2\n25 3\n25 4\n25 5\n25 6\n25 7\n25 8\n25 9\n25 10\n25 11\n25 12\n25 13\n25 14\n25 15\n25 16\n25 17\n25 18\n25 19\n25 20\n25 21\n25 22\n25 23\n25 24\n26 1\n26 2\n26 3\n26 4\n26 5\n26 6\n26 7\n26 8\n26 9\n26 10\n26 11\n26 12\n26 13\n26 14\n26 15\n26 16\n26 17\n26 18\n26 19\n26 20\n26 21\n26 22\n26 23\n26 24\n26 25\n27 1\n27 2\n27 3\n27 4\n27 5\n27 6\n27 7\n27 8\n27 9\n27 10\n27 11\n27 12\n27 13\n27 14\n27 15\n27 16\n27 17\n27 18\n27 19\n27 20\n27 21\n27 22\n27 23\n27 24\n27 25\n27 26\n28 1\n28 2\n28 3\n28 4\n28 5\n28 6\n28 7\n28 8\n28 9\n28 10\n28 11\n28 12\n28 13\n28 14\n28 15\n28 16\n28 17\n28 18\n28 19\n28 20\n28 21\n28 22\n28 23\n28 24\n28 25\n28 26\n28 27\n29 1\n29 2\n29 3\n29 4\n29 5\n29 6\n29 7\n29 8\n29 9\n29 10\n29 11\n29 12\n29 13\n29 14\n29 15\n29 16\n29 17\n29 18\n29 19\n29 20\n29 21\n29 22\n29 23\n29 24\n29 25\n29 26\n29 27\n29 28\n30 1\n30 2\n30 3\n30 4\n30 5\n30 6\n30 7\n30 8\n30 9\n30 10\n30 11\n30 12\n30 13\n30 14\n30 15\n30 16\n30 17\n30 18\n30 19\n30 20\n30 21\n30 22\n30 23\n30 24\n30 25\n30 26\n30 27\n30 28\n30 29\n31 1\n31 2\n31 3\n31 4\n31 5\n31 6\n31 7\n31 8\n31 9\n31 10\n31 11\n31 12\n31 13\n31 14\n31 15\n31 16\n31 17\n31 18\n31 19\n31 20\n31 21\n31 22\n31 23\n31 24\n31 25\n31 26\n31 27\n31 28\n31 29\n31 30\n32 1\n32 2\n32 3\n32 4\n32 5\n32 6\n32 7\n32 8\n32 9\n32 10\n32 11\n32 12\n32 13\n32 14\n32 15\n32 16\n32 17\n32 18\n32 19\n32 20\n32 21\n32 22\n32 23\n32 24\n32 25\n32 26\n32 27\n32 28\n32 29\n32 30\n32 31\n33 1\n33 2\n33 3\n33 4\n33 5\n33 6\n33 7\n33 8\n33 9\n33 10\n33 11\n33 12\n33 13\n33 14\n33 15\n33 16\n33 17\n33 18\n33 19\n33 20\n33 21\n33 22\n33 23\n33 24\n33 25\n33 26\n33 27\n33 28\n33 29\n33 30\n33 31\n33 32\n34 1\n34 2\n34 3\n34 4\n34 5\n34 6\n34 7\n34 8\n34 9\n34 10\n34 11\n34 12\n34 13\n34 14\n34 15\n34 16\n34 17\n34 18\n34 19\n34 20\n34 21\n34 22\n34 23\n34 24\n34 25\n34 26\n34 27\n34 28\n34 29\n34 30\n34 31\n34 32\n34 33\n35 1\n35 2\n35 3\n35 4\n35 5\n35 6\n35 7\n35 8\n35 9\n35 10\n35 11\n35 12\n35 13\n35 14\n35 15\n35 16\n35 17\n35 18\n35 19\n35 20\n35 21\n35 22\n35 23\n35 24\n35 25\n35 26\n35 27\n35 28\n35 29\n35 30\n35 31\n35 32\n35 33\n35 34\n36 1\n36 2\n36 3\n36 4\n36 5\n36 6\n36 7\n36 8\n36 9\n36 10\n36 11\n36 12\n36 13\n36 14\n36 15\n36 16\n36 17\n36 18\n36 19\n36 20\n36 21\n36 22\n36 23\n36 24\n36 25\n36 26\n36 27\n36 28\n36 29\n36 30\n36 31\n36 32\n36 33\n36 34\n36 35\n37 1\n37 2\n37 3\n37 4\n37 5\n37 6\n37 7\n37 8\n37 9\n37 10\n37 11\n37 12\n37 13\n37 14\n37 15\n37 16\n37 17\n37 18\n37 19\n37 20\n37 21\n37 22\n37 23\n37 24\n37 25\n37 26\n37 27\n37 28\n37 29\n37 30\n37 31\n37 32\n37 33\n37 34\n37 35\n37 36\n38 1\n38 2\n38 3\n38 4\n38 5\n38 6\n38 7\n38 8\n38 9\n38 10\n38 11\n38 12\n38 13\n38 14\n38 15\n38 16\n38 17\n38 18\n38 19\n38 20\n38 21\n38 22\n38 23\n38 24\n38 25\n38 26\n38 27\n38 28\n38 29\n38 30\n38 31\n38 32\n38 33\n38 34\n38 35\n38 36\n38 37\n39 1\n39 2\n39 3\n39 4\n39 5\n39 6\n39 7\n39 8\n39 9\n39 10\n39 11\n39 12\n39 13\n39 14\n39 15\n39 16\n39 17\n39 18\n39 19\n39 20\n39 21\n39 22\n39 23\n39 24\n39 25\n39 26\n39 27\n39 28\n39 29\n39 30\n39 31\n39 32\n39 33\n39 34\n39 35\n39 36\n39 37\n39 38\n40 1\n40 2\n40 3\n40 4\n40 5\n40 6\n40 7\n40 8\n40 9\n40 10\n40 11\n40 12\n40 13\n40 14\n40 15\n40 16\n40 17\n40 18\n40 19\n40 20\n40 21\n40 22\n40 23\n40 24\n40 25\n40 26\n40 27\n40 28\n40 29\n40 30\n40 31\n40 32\n40 33\n40 34\n40 35\n40 36\n40 37\n40 38\n40 39\n41 1\n41 2\n41 3\n41 4\n41 5\n41 6\n41 7\n41 8\n41 9\n41 10\n41 11\n41 12\n41 13\n41 14\n41 15\n41 16\n41 17\n41 18\n41 19\n41 20\n41 21\n41 22\n41 23\n41 24\n41 25\n41 26\n41 27\n41 28\n41 29\n41 30\n41 31\n41 32\n41 33\n41 34\n41 35\n41 36\n41 37\n41 38\n41 39\n41 40\n42 1\n42 2\n42 3\n42 4\n42 5\n42 6\n42 7\n42 8\n42 9\n42 10\n42 11\n42 12\n42 13\n42 14\n42 15\n42 16\n42 17\n42 18\n42 19\n42 20\n42 21\n42 22\n42 23\n42 24\n42 25\n42 26\n42 27\n42 28\n42 29\n42 30\n42 31\n42 32\n42 33\n42 34\n42 35\n42 36\n42 37\n42 38\n42 39\n42 40\n42 41\n43 1\n43 2\n43 3\n43 4\n43 5\n43 6\n43 7\n43 8\n43 9\n43 10\n43 11\n43 12\n43 13\n43 14\n43 15\n43 16\n43 17\n43 18\n43 19\n43 20\n43 21\n43 22\n43 23\n43 24\n43 25\n43 26\n43 27\n43 28\n43 29\n43 30\n43 31\n43 32\n43 33\n43 34\n43 35\n43 36\n43 37\n43 38\n43 39\n43 40\n43 41\n43 42\n44 1\n44 2\n44 3\n44 4\n44 5\n44 6\n44 7\n44 8\n44 9\n44 10\n44 11\n44 12\n44 13\n44 14\n44 15\n44 16\n44 17\n44 18\n44 19\n44 20\n44 21\n44 22\n44 23\n44 24\n44 25\n44 26\n44 27\n44 28\n44 29\n44 30\n44 31\n44 32\n44 33\n44 34\n44 35\n44 36\n44 37\n44 38\n44 39\n44 40\n44 41\n44 42\n44 43\n45 1\n45 2\n45 3\n45 4\n45 5\n45 6\n45 7\n45 8\n45 9\n45 10\n45 11\n45 12\n45 13\n45 14\n45 15\n45 16\n45 17\n45 18\n45 19\n45 20\n45 21\n45 22\n45 23\n45 24\n45 25\n45 26\n45 27\n45 28\n45 29\n45 30\n45 31\n45 32\n45 33\n45 34\n45 35\n45 36\n45 37\n45 38\n45 39\n45 40\n45 41\n45 42\n45 43\n45 44\n46 1\n46 2\n46 3\n46 4\n46 5\n46 6\n46 7\n46 8\n46 9\n46 10\n46 11\n46 12\n46 13\n46 14\n46 15\n46 16\n46 17\n46 18\n46 19\n46 20\n46 21\n46 22\n46 23\n46 24\n46 25\n46 26\n46 27\n46 28\n46 29\n46 30\n46 31\n46 32\n46 33\n46 34\n46 35\n46 36\n46 37\n46 38\n46 39\n46 40\n46 41\n46 42\n46 43\n46 44\n46 45\n47 1\n47 2\n47 3\n47 4\n47 5\n47 6\n47 7\n47 8\n47 9\n47 10\n47 11\n47 12\n47 13\n47 14\n47 15\n47 16\n47 17\n47 18\n47 19\n47 20\n47 21\n47 22\n47 23\n47 24\n47 25\n47 26\n47 27\n47 28\n47 29\n47 30\n47 31\n47 32\n47 33\n47 34\n47 35\n47 36\n47 37\n47 38\n47 39\n47 40\n47 41\n47 42\n47 43\n47 44\n47 45\n47 46\n48 1\n48 2\n48 3\n48 4\n48 5\n48 6\n48 7\n48 8\n48 9\n48 10\n48 11\n48 12\n48 13\n48 14\n48 15\n48 16\n48 17\n48 18\n48 19\n48 20\n48 21\n48 22\n48 23\n48 24\n48 25\n48 26\n48 27\n48 28\n48 29\n48 30\n48 31\n48 32\n48 33\n48 34\n48 35\n48 36\n48 37\n48 38\n48 39\n48 40\n48 41\n48 42\n48 43\n48 44\n48 45\n48 46\n48 47\n49 1\n49 2\n49 3\n49 4\n49 5\n49 6\n49 7\n49 8\n49 9\n49 10\n49 11\n49 12\n49 13\n49 14\n49 15\n49 16\n49 17\n49 18\n49 19\n49 20\n49 21\n49 22\n49 23\n49 24\n49 25\n49 26\n49 27\n49 28\n49 29\n49 30\n49 31\n49 32\n49 33\n49 34\n49 35\n49 36\n49 37\n49 38\n49 39\n49 40\n49 41\n49 42\n49 43\n49 44\n49 45\n49 46\n49 47\n49 48\n50 1\n50 2\n50 3\n50 4\n50 5\n50 6\n50 7\n50 8\n50 9\n50 10\n50 11\n50 12\n50 13\n50 14\n50 15\n50 16\n50 17\n50 18\n50 19\n50 20\n50 21\n50 22\n50 23\n50 24\n50 25\n50 26\n50 27\n50 28\n50 29\n50 30\n50 31\n50 32\n50 33\n50 34\n50 35\n50 36\n50 37\n50 38\n50 39\n50 40\n50 41\n50 42\n50 43\n50 44\n50 45\n50 46\n50 47\n50 48\n50 49\n51 1\n51 2\n51 3\n51 4\n51 5\n51 6\n51 7\n51 8\n51 9\n51 10\n51 11\n51 12\n51 13\n51 14\n51 15\n51 16\n51 17\n51 18\n51 19\n51 20\n51 21\n51 22\n51 23\n51 24\n51 25\n51 26\n51 27\n51 28\n51 29\n51 30\n51 31\n51 32\n51 33\n51 34\n51 35\n51 36\n51 37\n51 38\n51 39\n51 40\n51 41\n51 42\n51 43\n51 44\n51 45\n51 46\n51 47\n51 48\n51 49\n51 50\n52 1\n52 2\n52 3\n52 4\n52 5\n52 6\n52 7\n52 8\n52 9\n52 10\n52 11\n52 12\n52 13\n52 14\n52 15\n52 16\n52 17\n52 18\n52 19\n52 20\n52 21\n52 22\n52 23\n52 24\n52 25\n52 26\n52 27\n52 28\n52 29\n52 30\n52 31\n52 32\n52 33\n52 34\n52 35\n52 36\n52 37\n52 38\n52 39\n52 40\n52 41\n52 42\n52 43\n52 44\n52 45\n52 46\n52 47\n52 48\n52 49\n52 50\n52 51\n53 1\n53 2\n53 3\n53 4\n53 5\n53 6\n53 7\n53 8\n53 9\n53 10\n53 11\n53 12\n53 13\n53 14\n53 15\n53 16\n53 17\n53 18\n53 19\n53 20\n53 21\n53 22\n53 23\n53 24\n53 25\n53 26\n53 27\n53 28\n53 29\n53 30\n53 31\n53 32\n53 33\n53 34\n53 35\n53 36\n53 37\n53 38\n53 39\n53 40\n53 41\n53 42\n53 43\n53 44\n53 45\n53 46\n53 47\n53 48\n53 49\n53 50\n53 51\n53 52\n54 1\n54 2\n54 3\n54 4\n54 5\n54 6\n54 7\n54 8\n54 9\n54 10\n54 11\n54 12\n54 13\n54 14\n54 15\n54 16\n54 17\n54 18\n54 19\n54 20\n54 21\n54 22\n54 23\n54 24\n54 25\n54 26\n54 27\n54 28\n54 29\n54 30\n54 31\n54 32\n54 33\n54 34\n54 35\n54 36\n54 37\n54 38\n54 39\n54 40\n54 41\n54 42\n54 43\n54 44\n54 45\n54 46\n54 47\n54 48\n54 49\n54 50\n54 51\n54 52\n54 53\n55 1\n55 2\n55 3\n55 4\n55 5\n55 6\n55 7\n55 8\n55 9\n55 10\n55 11\n55 12\n55 13\n55 14\n55 15\n55 16\n55 17\n55 18\n55 19\n55 20\n55 21\n55 22\n55 23\n55 24\n55 25\n55 26\n55 27\n55 28\n55 29\n55 30\n55 31\n55 32\n55 33\n55 34\n55 35\n55 36\n55 37\n55 38\n55 39\n55 40\n55 41\n55 42\n55 43\n55 44\n55 45\n55 46\n55 47\n55 48\n55 49\n55 50\n55 51\n55 52\n55 53\n55 54\n56 1\n56 2\n56 3\n56 4\n56 5\n56 6\n56 7\n56 8\n56 9\n56 10\n56 11\n56 12\n56 13\n56 14\n56 15\n56 16\n56 17\n56 18\n56 19\n56 20\n56 21\n56 22\n56 23\n56 24\n56 25\n56 26\n56 27\n56 28\n56 29\n56 30\n56 31\n56 32\n56 33\n56 34\n56 35\n56 36\n56 37\n56 38\n56 39\n56 40\n56 41\n56 42\n56 43\n56 44\n56 45\n56 46\n56 47\n56 48\n56 49\n56 50\n56 51\n56 52\n56 53\n56 54\n56 55\n57 1\n57 2\n57 3\n57 4\n57 5\n57 6\n57 7\n57 8\n57 9\n57 10\n57 11\n57 12\n57 13\n57 14\n57 15\n57 16\n57 17\n57 18\n57 19\n57 20\n57 21\n57 22\n57 23\n57 24\n57 25\n57 26\n57 27\n57 28\n57 29\n57 30\n57 31\n57 32\n57 33\n57 34\n57 35\n57 36\n57 37\n57 38\n57 39\n57 40\n57 41\n57 42\n57 43\n57 44\n57 45\n57 46\n57 47\n57 48\n57 49\n57 50\n57 51\n57 52\n57 53\n57 54\n57 55\n57 56\n58 1\n58 2\n58 3\n58 4\n58 5\n58 6\n58 7\n58 8\n58 9\n58 10\n58 11\n58 12\n58 13\n58 14\n58 15\n58 16\n58 17\n58 18\n58 19\n58 20\n58 21\n58 22\n58 23\n58 24\n58 25\n58 26\n58 27\n58 28\n58 29\n58 30\n58 31\n58 32\n58 33\n58 34\n58 35\n58 36\n58 37\n58 38\n58 39\n58 40\n58 41\n58 42\n58 43\n58 44\n58 45\n58 46\n58 47\n58 48\n58 49\n58 50\n58 51\n58 52\n58 53\n58 54\n58 55\n58 56\n58 57\n59 1\n59 2\n59 3\n59 4\n59 5\n59 6\n59 7\n59 8\n59 9\n59 10\n59 11\n59 12\n59 13\n59 14\n59 15\n59 16\n59 17\n59 18\n59 19\n59 20\n59 21\n59 22\n59 23\n59 24\n59 25\n59 26\n59 27\n59 28\n59 29\n59 30\n59 31\n59 32\n59 33\n59 34\n59 35\n59 36\n59 37\n59 38\n59 39\n59 40\n59 41\n59 42\n59 43\n59 44\n59 45\n59 46\n59 47\n59 48\n59 49\n59 50\n59 51\n59 52\n59 53\n59 54\n59 55\n59 56\n59 57\n59 58\n60 1\n60 2\n60 3\n60 4\n60 5\n60 6\n60 7\n60 8\n60 9\n60 10\n60 11\n60 12\n60 13\n60 14\n60 15\n60 16\n60 17\n60 18\n60 19\n60 20\n60 21\n60 22\n60 23\n60 24\n60 25\n60 26\n60 27\n60 28\n60 29\n60 30\n60 31\n60 32\n60 33\n60 34\n60 35\n60 36\n60 37\n60 38\n60 39\n60 40\n60 41\n60 42\n60 43\n60 44\n60 45\n60 46\n60 47\n60 48\n60 49\n60 50\n60 51\n60 52\n60 53\n60 54\n60 55\n60 56\n60 57\n60 58\n60 59\n61 1\n61 2\n61 3\n61 4\n61 5\n61 6\n61 7\n61 8\n61 9\n61 10\n61 11\n61 12\n61 13\n61 14\n61 15\n61 16\n61 17\n61 18\n61 19\n61 20\n61 21\n61 22\n61 23\n61 24\n61 25\n61 26\n61 27\n61 28\n61 29\n61 30\n61 31\n61 32\n61 33\n61 34\n61 35\n61 36\n61 37\n61 38\n61 39\n61 40\n61 41\n61 42\n61 43\n61 44\n61 45\n61 46\n61 47\n61 48\n61 49\n61 50\n61 51\n61 52\n61 53\n61 54\n61 55\n61 56\n61 57\n61 58\n61 59\n61 60\n62 1\n62 2\n62 3\n62 4\n62 5\n62 6\n62 7\n62 8\n62 9\n62 10\n62 11\n62 12\n62 13\n62 14\n62 15\n62 16\n62 17\n62 18\n62 19\n62 20\n62 21\n62 22\n62 23\n62 24\n62 25\n62 26\n62 27\n62 28\n62 29\n62 30\n62 31\n62 32\n62 33\n62 34\n62 35\n62 36\n62 37\n62 38\n62 39\n62 40\n62 41\n62 42\n62 43\n62 44\n62 45\n62 46\n62 47\n62 48\n62 49\n62 50\n62 51\n62 52\n62 53\n62 54\n62 55\n62 56\n62 57\n62 58\n62 59\n62 60\n62 61\n63 1\n63 2\n63 3\n63 4\n63 5\n63 6\n63 7\n63 8\n63 9\n63 10\n63 11\n63 12\n63 13\n63 14\n63 15\n63 16\n63 17\n63 18\n63 19\n63 20\n63 21\n63 22\n63 23\n63 24\n63 25\n63 26\n63 27\n63 28\n63 29\n63 30\n63 31\n63 32\n63 33\n63 34\n63 35\n63 36\n63 37\n63 38\n63 39\n63 40\n63 41\n63 42\n63 43\n63 44\n63 45\n63 46\n63 47\n63 48\n63 49\n63 50\n63 51\n63 52\n63 53\n63 54\n63 55\n63 56\n63 57\n63 58\n63 59\n63 60\n63 61\n63 62\n64 1\n64 2\n64 3\n64 4\n64 5\n64 6\n64 7\n64 8\n64 9\n64 10\n64 11\n64 12\n64 13\n64 14\n64 15\n64 16\n64 17\n64 18\n64 19\n64 20\n64 21\n64 22\n64 23\n64 24\n64 25\n64 26\n64 27\n64 28\n64 29\n64 30\n64 31\n64 32\n64 33\n64 34\n64 35\n64 36\n64 37\n64 38\n64 39\n64 40\n64 41\n64 42\n64 43\n64 44\n64 45\n64 46\n64 47\n64 48\n64 49\n64 50\n64 51\n64 52\n64 53\n64 54\n64 55\n64 56\n64 57\n64 58\n64 59\n64 60\n64 61\n64 62\n64 63\n65 1\n65 2\n65 3\n65 4\n65 5\n65 6\n65 7\n65 8\n65 9\n65 10\n65 11\n65 12\n65 13\n65 14\n65 15\n65 16\n65 17\n65 18\n65 19\n65 20\n65 21\n65 22\n65 23\n65 24\n65 25\n65 26\n65 27\n65 28\n65 29\n65 30\n65 31\n65 32\n65 33\n65 34\n65 35\n65 36\n65 37\n65 38\n65 39\n65 40\n65 41\n65 42\n65 43\n65 44\n65 45\n65 46\n65 47\n65 48\n65 49\n65 50\n65 51\n65 52\n65 53\n65 54\n65 55\n65 56\n65 57\n65 58\n65 59\n65 60\n65 61\n65 62\n65 63\n65 64\n66 1\n66 2\n66 3\n66 4\n66 5\n66 6\n66 7\n66 8\n66 9\n66 10\n66 11\n66 12\n66 13\n66 14\n66 15\n66 16\n66 17\n66 18\n66 19\n66 20\n66 21\n66 22\n66 23\n66 24\n66 25\n66 26\n66 27\n66 28\n66 29\n66 30\n66 31\n66 32\n66 33\n66 34\n66 35\n66 36\n66 37\n66 38\n66 39\n66 40\n66 41\n66 42\n66 43\n66 44\n66 45\n66 46\n66 47\n66 48\n66 49\n66 50\n66 51\n66 52\n66 53\n66 54\n66 55\n66 56\n66 57\n66 58\n66 59\n66 60\n66 61\n66 62\n66 63\n66 64\n66 65\n67 1\n67 2\n67 3\n67 4\n67 5\n67 6\n67 7\n67 8\n67 9\n67 10\n67 11\n67 12\n67 13\n67 14\n67 15\n67 16\n67 17\n67 18\n67 19\n67 20\n67 21\n67 22\n67 23\n67 24\n67 25\n67 26\n67 27\n67 28\n67 29\n67 30\n67 31\n67 32\n67 33\n67 34\n67 35\n67 36\n67 37\n67 38\n67 39\n67 40\n67 41\n67 42\n67 43\n67 44\n67 45\n67 46\n67 47\n67 48\n67 49\n67 50\n67 51\n67 52\n67 53\n67 54\n67 55\n67 56\n67 57\n67 58\n67 59\n67 60\n67 61\n67 62\n67 63\n67 64\n67 65\n67 66\n68 1\n68 2\n68 3\n68 4\n68 5\n68 6\n68 7\n68 8\n68 9\n68 10\n68 11\n68 12\n68 13\n68 14\n68 15\n68 16\n68 17\n68 18\n68 19\n68 20\n68 21\n68 22\n68 23\n68 24\n68 25\n68 26\n68 27\n68 28\n68 29\n68 30\n68 31\n68 32\n68 33\n68 34\n68 35\n68 36\n68 37\n68 38\n68 39\n68 40\n68 41\n68 42\n68 43\n68 44\n68 45\n68 46\n68 47\n68 48\n68 49\n68 50\n68 51\n68 52\n68 53\n68 54\n68 55\n68 56\n68 57\n68 58\n68 59\n68 60\n68 61\n68 62\n68 63\n68 64\n68 65\n68 66\n68 67\n69 1\n69 2\n69 3\n69 4\n69 5\n69 6\n69 7\n69 8\n69 9\n69 10\n69 11\n69 12\n69 13\n69 14\n69 15\n69 16\n69 17\n69 18\n69 19\n69 20\n69 21\n69 22\n69 23\n69 24\n69 25\n69 26\n69 27\n69 28\n69 29\n69 30\n69 31\n69 32\n69 33\n69 34\n69 35\n69 36\n69 37\n69 38\n69 39\n69 40\n69 41\n69 42\n69 43\n69 44\n69 45\n69 46\n69 47\n69 48\n69 49\n69 50\n69 51\n69 52\n69 53\n69 54\n69 55\n69 56\n69 57\n69 58\n69 59\n69 60\n69 61\n69 62\n69 63\n69 64\n69 65\n69 66\n69 67\n69 68\n70 1\n70 2\n70 3\n70 4\n70 5\n70 6\n70 7\n70 8\n70 9\n70 10\n70 11\n70 12\n70 13\n70 14\n70 15\n70 16\n70 17\n70 18\n70 19\n70 20\n70 21\n70 22\n70 23\n70 24\n70 25\n70 26\n70 27\n70 28\n70 29\n70 30\n70 31\n70 32\n70 33\n70 34\n70 35\n70 36\n70 37\n70 38\n70 39\n70 40\n70 41\n70 42\n70 43\n70 44\n70 45\n70 46\n70 47\n70 48\n70 49\n70 50\n70 51\n70 52\n70 53\n70 54\n70 55\n70 56\n70 57\n70 58\n70 59\n70 60\n70 61\n70 62\n70 63\n70 64\n70 65\n70 66\n70 67\n70 68\n70 69\n71 1\n71 2\n71 3\n71 4\n71 5\n71 6\n71 7\n71 8\n71 9\n71 10\n71 11\n71 12\n71 13\n71 14\n71 15\n71 16\n71 17\n71 18\n71 19\n71 20\n71 21\n71 22\n71 23\n71 24\n71 25\n71 26\n71 27\n71 28\n71 29\n71 30\n71 31\n71 32\n71 33\n71 34\n71 35\n71 36\n71 37\n71 38\n71 39\n71 40\n71 41\n71 42\n71 43\n71 44\n71 45\n71 46\n71 47\n71 48\n71 49\n71 50\n71 51\n71 52\n71 53\n71 54\n71 55\n71 56\n71 57\n71 58\n71 59\n71 60\n71 61\n71 62\n71 63\n71 64\n71 65\n71 66\n71 67\n71 68\n71 69\n71 70\n72 1\n72 2\n72 3\n72 4\n72 5\n72 6\n72 7\n72 8\n72 9\n72 10\n72 11\n72 12\n72 13\n72 14\n72 15\n72 16\n72 17\n72 18\n72 19\n72 20\n72 21\n72 22\n72 23\n72 24\n72 25\n72 26\n72 27\n72 28\n72 29\n72 30\n72 31\n72 32\n72 33\n72 34\n72 35\n72 36\n72 37\n72 38\n72 39\n72 40\n72 41\n72 42\n72 43\n72 44\n72 45\n72 46\n72 47\n72 48\n72 49\n72 50\n72 51\n72 52\n72 53\n72 54\n72 55\n72 56\n72 57\n72 58\n72 59\n72 60\n72 61\n72 62\n72 63\n72 64\n72 65\n72 66\n72 67\n72 68\n72 69\n72 70\n72 71\n73 1\n73 2\n73 3\n73 4\n73 5\n73 6\n73 7\n73 8\n73 9\n73 10\n73 11\n73 12\n73 13\n73 14\n73 15\n73 16\n73 17\n73 18\n73 19\n73 20\n73 21\n73 22\n73 23\n73 24\n73 25\n73 26\n73 27\n73 28\n73 29\n73 30\n73 31\n73 32\n73 33\n73 34\n73 35\n73 36\n73 37\n73 38\n73 39\n73 40\n73 41\n73 42\n73 43\n73 44\n73 45\n73 46\n73 47\n73 48\n73 49\n73 50\n73 51\n73 52\n73 53\n73 54\n73 55\n73 56\n73 57\n73 58\n73 59\n73 60\n73 61\n73 62\n73 63\n73 64\n73 65\n73 66\n73 67\n73 68\n73 69\n73 70\n73 71\n73 72\n74 1\n74 2\n74 3\n74 4\n74 5\n74 6\n74 7\n74 8\n74 9\n74 10\n74 11\n74 12\n74 13\n74 14\n74 15\n74 16\n74 17\n74 18\n74 19\n74 20\n74 21\n74 22\n74 23\n74 24\n74 25\n74 26\n74 27\n74 28\n74 29\n74 30\n74 31\n74 32\n74 33\n74 34\n74 35\n74 36\n74 37\n74 38\n74 39\n74 40\n74 41\n74 42\n74 43\n74 44\n74 45\n74 46\n74 47\n74 48\n74 49\n74 50\n74 51\n74 52\n74 53\n74 54\n74 55\n74 56\n74 57\n74 58\n74 59\n74 60\n74 61\n74 62\n74 63\n74 64\n74 65\n74 66\n74 67\n74 68\n74 69\n74 70\n74 71\n74 72\n74 73\n75 1\n75 2\n75 3\n75 4\n75 5\n75 6\n75 7\n75 8\n75 9\n75 10\n75 11\n75 12\n75 13\n75 14\n75 15\n75 16\n75 17\n75 18\n75 19\n75 20\n75 21\n75 22\n75 23\n75 24\n75 25\n75 26\n75 27\n75 28\n75 29\n75 30\n75 31\n75 32\n75 33\n75 34\n75 35\n75 36\n75 37\n75 38\n75 39\n75 40\n75 41\n75 42\n75 43\n75 44\n75 45\n75 46\n75 47\n75 48\n75 49\n75 50\n75 51\n75 52\n75 53\n75 54\n75 55\n75 56\n75 57\n75 58\n75 59\n75 60\n75 61\n75 62\n75 63\n75 64\n75 65\n75 66\n75 67\n75 68\n75 69\n75 70\n75 71\n75 72\n75 73\n75 74\n76 1\n76 2\n76 3\n76 4\n76 5\n76 6\n76 7\n76 8\n76 9\n76 10\n76 11\n76 12\n76 13\n76 14\n76 15\n76 16\n76 17\n76 18\n76 19\n76 20\n76 21\n76 22\n76 23\n76 24\n76 25\n76 26\n76 27\n76 28\n76 29\n76 30\n76 31\n76 32\n76 33\n76 34\n76 35\n76 36\n76 37\n76 38\n76 39\n76 40\n76 41\n76 42\n76 43\n76 44\n76 45\n76 46\n76 47\n76 48\n76 49\n76 50\n76 51\n76 52\n76 53\n76 54\n76 55\n76 56\n76 57\n76 58\n76 59\n76 60\n76 61\n76 62\n76 63\n76 64\n76 65\n76 66\n76 67\n76 68\n76 69\n76 70\n76 71\n76 72\n76 73\n76 74\n76 75\n77 1\n77 2\n77 3\n77 4\n77 5\n77 6\n77 7\n77 8\n77 9\n77 10\n77 11\n77 12\n77 13\n77 14\n77 15\n77 16\n77 17\n77 18\n77 19\n77 20\n77 21\n77 22\n77 23\n77 24\n77 25\n77 26\n77 27\n77 28\n77 29\n77 30\n77 31\n77 32\n77 33\n77 34\n77 35\n77 36\n77 37\n77 38\n77 39\n77 40\n77 41\n77 42\n77 43\n77 44\n77 45\n77 46\n77 47\n77 48\n77 49\n77 50\n77 51\n77 52\n77 53\n77 54\n77 55\n77 56\n77 57\n77 58\n77 59\n77 60\n77 61\n77 62\n77 63\n77 64\n77 65\n77 66\n77 67\n77 68\n77 69\n77 70\n77 71\n77 72\n77 73\n77 74\n77 75\n77 76\n78 1\n78 2\n78 3\n78 4\n78 5\n78 6\n78 7\n78 8\n78 9\n78 10\n78 11\n78 12\n78 13\n78 14\n78 15\n78 16\n78 17\n78 18\n78 19\n78 20\n78 21\n78 22\n78 23\n78 24\n78 25\n78 26\n78 27\n78 28\n78 29\n78 30\n78 31\n78 32\n78 33\n78 34\n78 35\n78 36\n78 37\n78 38\n78 39\n78 40\n78 41\n78 42\n78 43\n78 44\n78 45\n78 46\n78 47\n78 48\n78 49\n78 50\n78 51\n78 52\n78 53\n78 54\n78 55\n78 56\n78 57\n78 58\n78 59\n78 60\n78 61\n78 62\n78 63\n78 64\n78 65\n78 66\n78 67\n78 68\n78 69\n78 70\n78 71\n78 72\n78 73\n78 74\n78 75\n78 76\n78 77\n79 1\n79 2\n79 3\n79 4\n79 5\n79 6\n79 7\n79 8\n79 9\n79 10\n79 11\n79 12\n79 13\n79 14\n79 15\n79 16\n79 17\n79 18\n79 19\n79 20\n79 21\n79 22\n79 23\n79 24\n79 25\n79 26\n79 27\n79 28\n79 29\n79 30\n79 31\n79 32\n79 33\n79 34\n79 35\n79 36\n79 37\n79 38\n79 39\n79 40\n79 41\n79 42\n79 43\n79 44\n79 45\n79 46\n79 47\n79 48\n79 49\n79 50\n79 51\n79 52\n79 53\n79 54\n79 55\n79 56\n79 57\n79 58\n79 59\n79 60\n79 61\n79 62\n79 63\n79 64\n79 65\n79 66\n79 67\n79 68\n79 69\n79 70\n79 71\n79 72\n79 73\n79 74\n79 75\n79 76\n79 77\n79 78\n80 1\n80 2\n80 3\n80 4\n80 5\n80 6\n80 7\n80 8\n80 9\n80 10\n80 11\n80 12\n80 13\n80 14\n80 15\n80 16\n80 17\n80 18\n80 19\n80 20\n80 21\n80 22\n80 23\n80 24\n80 25\n80 26\n80 27\n80 28\n80 29\n80 30\n80 31\n80 32\n80 33\n80 34\n80 35\n80 36\n80 37\n80 38\n80 39\n80 40\n80 41\n80 42\n80 43\n80 44\n80 45\n80 46\n80 47\n80 48\n80 49\n80 50\n80 51\n80 52\n80 53\n80 54\n80 55\n80 56\n80 57\n80 58\n80 59\n80 60\n80 61\n80 62\n80 63\n80 64\n80 65\n80 66\n80 67\n80 68\n80 69\n80 70\n80 71\n80 72\n80 73\n80 74\n80 75\n80 76\n80 77\n80 78\n80 79\n81 1\n81 2\n81 3\n81 4\n81 5\n81 6\n81 7\n81 8\n81 9\n81 10\n81 11\n81 12\n81 13\n81 14\n81 15\n81 16\n81 17\n81 18\n81 19\n81 20\n81 21\n81 22\n81 23\n81 24\n81 25\n81 26\n81 27\n81 28\n81 29\n81 30\n81 31\n81 32\n81 33\n81 34\n81 35\n81 36\n81 37\n81 38\n81 39\n81 40\n81 41\n81 42\n81 43\n81 44\n81 45\n81 46\n81 47\n81 48\n81 49\n81 50\n81 51\n81 52\n81 53\n81 54\n81 55\n81 56\n81 57\n81 58\n81 59\n81 60\n81 61\n81 62\n81 63\n81 64\n81 65\n81 66\n81 67\n81 68\n81 69\n81 70\n81 71\n81 72\n81 73\n81 74\n81 75\n81 76\n81 77\n81 78\n81 79\n81 80\n82 1\n82 2\n82 3\n82 4\n82 5\n82 6\n82 7\n82 8\n82 9\n82 10\n82 11\n82 12\n82 13\n82 14\n82 15\n82 16\n82 17\n82 18\n82 19\n82 20\n82 21\n82 22\n82 23\n82 24\n82 25\n82 26\n82 27\n82 28\n82 29\n82 30\n82 31\n82 32\n82 33\n82 34\n82 35\n82 36\n82 37\n82 38\n82 39\n82 40\n82 41\n82 42\n82 43\n82 44\n82 45\n82 46\n82 47\n82 48\n82 49\n82 50\n82 51\n82 52\n82 53\n82 54\n82 55\n82 56\n82 57\n82 58\n82 59\n82 60\n82 61\n82 62\n82 63\n82 64\n82 65\n82 66\n82 67\n82 68\n82 69\n82 70\n82 71\n82 72\n82 73\n82 74\n82 75\n82 76\n82 77\n82 78\n82 79\n82 80\n82 81\n83 1\n83 2\n83 3\n83 4\n83 5\n83 6\n83 7\n83 8\n83 9\n83 10\n83 11\n83 12\n83 13\n83 14\n83 15\n83 16\n83 17\n83 18\n83 19\n83 20\n83 21\n83 22\n83 23\n83 24\n83 25\n83 26\n83 27\n83 28\n83 29\n83 30\n83 31\n83 32\n83 33\n83 34\n83 35\n83 36\n83 37\n83 38\n83 39\n83 40\n83 41\n83 42\n83 43\n83 44\n83 45\n83 46\n83 47\n83 48\n83 49\n83 50\n83 51\n83 52\n83 53\n83 54\n83 55\n83 56\n83 57\n83 58\n83 59\n83 60\n83 61\n83 62\n83 63\n83 64\n83 65\n83 66\n83 67\n83 68\n83 69\n83 70\n83 71\n83 72\n83 73\n83 74\n83 75\n83 76\n83 77\n83 78\n83 79\n83 80\n83 81\n83 82\n84 1\n84 2\n84 3\n84 4\n84 5\n84 6\n84 7\n84 8\n84 9\n84 10\n84 11\n84 12\n84 13\n84 14\n84 15\n84 16\n84 17\n84 18\n84 19\n84 20\n84 21\n84 22\n84 23\n84 24\n84 25\n84 26\n84 27\n84 28\n84 29\n84 30\n84 31\n84 32\n84 33\n84 34\n84 35\n84 36\n84 37\n84 38\n84 39\n84 40\n84 41\n84 42\n84 43\n84 44\n84 45\n84 46\n84 47\n84 48\n84 49\n84 50\n84 51\n84 52\n84 53\n84 54\n84 55\n84 56\n84 57\n84 58\n84 59\n84 60\n84 61\n84 62\n84 63\n84 64\n84 65\n84 66\n84 67\n84 68\n84 69\n84 70\n84 71\n84 72\n84 73\n84 74\n84 75\n84 76\n84 77\n84 78\n84 79\n84 80\n84 81\n84 82\n84 83\n85 1\n85 2\n85 3\n85 4\n85 5\n85 6\n85 7\n85 8\n85 9\n85 10\n85 11\n85 12\n85 13\n85 14\n85 15\n85 16\n85 17\n85 18\n85 19\n85 20\n85 21\n85 22\n85 23\n85 24\n85 25\n85 26\n85 27\n85 28\n85 29\n85 30\n85 31\n85 32\n85 33\n85 34\n85 35\n85 36\n85 37\n85 38\n85 39\n85 40\n85 41\n85 42\n85 43\n85 44\n85 45\n85 46\n85 47\n85 48\n85 49\n85 50\n85 51\n85 52\n85 53\n85 54\n85 55\n85 56\n85 57\n85 58\n85 59\n85 60\n85 61\n85 62\n85 63\n85 64\n85 65\n85 66\n85 67\n85 68\n85 69\n85 70\n85 71\n85 72\n85 73\n85 74\n85 75\n85 76\n85 77\n85 78\n85 79\n85 80\n85 81\n85 82\n85 83\n85 84\n86 1\n86 2\n86 3\n86 4\n86 5\n86 6\n86 7\n86 8\n86 9\n86 10\n86 11\n86 12\n86 13\n86 14\n86 15\n86 16\n86 17\n86 18\n86 19\n86 20\n86 21\n86 22\n86 23\n86 24\n86 25\n86 26\n86 27\n86 28\n86 29\n86 30\n86 31\n86 32\n86 33\n86 34\n86 35\n86 36\n86 37\n86 38\n86 39\n86 40\n86 41\n86 42\n86 43\n86 44\n86 45\n86 46\n86 47\n86 48\n86 49\n86 50\n86 51\n86 52\n86 53\n86 54\n86 55\n86 56\n86 57\n86 58\n86 59\n86 60\n86 61\n86 62\n86 63\n86 64\n86 65\n86 66\n86 67\n86 68\n86 69\n86 70\n86 71\n86 72\n86 73\n86 74\n86 75\n86 76\n86 77\n86 78\n86 79\n86 80\n86 81\n86 82\n86 83\n86 84\n86 85\n87 1\n87 2\n87 3\n87 4\n87 5\n87 6\n87 7\n87 8\n87 9\n87 10\n87 11\n87 12\n87 13\n87 14\n87 15\n87 16\n87 17\n87 18\n87 19\n87 20\n87 21\n87 22\n87 23\n87 24\n87 25\n87 26\n87 27\n87 28\n87 29\n87 30\n87 31\n87 32\n87 33\n87 34\n87 35\n87 36\n87 37\n87 38\n87 39\n87 40\n87 41\n87 42\n87 43\n87 44\n87 45\n87 46\n87 47\n87 48\n87 49\n87 50\n87 51\n87 52\n87 53\n87 54\n87 55\n87 56\n87 57\n87 58\n87 59\n87 60\n87 61\n87 62\n87 63\n87 64\n87 65\n87 66\n87 67\n87 68\n87 69\n87 70\n87 71\n87 72\n87 73\n87 74\n87 75\n87 76\n87 77\n87 78\n87 79\n87 80\n87 81\n87 82\n87 83\n87 84\n87 85\n87 86\n88 1\n88 2\n88 3\n88 4\n88 5\n88 6\n88 7\n88 8\n88 9\n88 10\n88 11\n88 12\n88 13\n88 14\n88 15\n88 16\n88 17\n88 18\n88 19\n88 20\n88 21\n88 22\n88 23\n88 24\n88 25\n88 26\n88 27\n88 28\n88 29\n88 30\n88 31\n88 32\n88 33\n88 34\n88 35\n88 36\n88 37\n88 38\n88 39\n88 40\n88 41\n88 42\n88 43\n88 44\n88 45\n88 46\n88 47\n88 48\n88 49\n88 50\n88 51\n88 52\n88 53\n88 54\n88 55\n88 56\n88 57\n88 58\n88 59\n88 60\n88 61\n88 62\n88 63\n88 64\n88 65\n88 66\n88 67\n88 68\n88 69\n88 70\n88 71\n88 72\n88 73\n88 74\n88 75\n88 76\n88 77\n88 78\n88 79\n88 80\n88 81\n88 82\n88 83\n88 84\n88 85\n88 86\n88 87\n89 1\n89 2\n89 3\n89 4\n89 5\n89 6\n89 7\n89 8\n89 9\n89 10\n89 11\n89 12\n89 13\n89 14\n89 15\n89 16\n89 17\n89 18\n89 19\n89 20\n89 21\n89 22\n89 23\n89 24\n89 25\n89 26\n89 27\n89 28\n89 29\n89 30\n89 31\n89 32\n89 33\n89 34\n89 35\n89 36\n89 37\n89 38\n89 39\n89 40\n89 41\n89 42\n89 43\n89 44\n89 45\n89 46\n89 47\n89 48\n89 49\n89 50\n89 51\n89 52\n89 53\n89 54\n89 55\n89 56\n89 57\n89 58\n89 59\n89 60\n89 61\n89 62\n89 63\n89 64\n89 65\n89 66\n89 67\n89 68\n89 69\n89 70\n89 71\n89 72\n89 73\n89 74\n89 75\n89 76\n89 77\n89 78\n89 79\n89 80\n89 81\n89 82\n89 83\n89 84\n89 85\n89 86\n89 87\n89 88\n90 1\n90 2\n90 3\n90 4\n90 5\n90 6\n90 7\n90 8\n90 9\n90 10\n90 11\n90 12\n90 13\n90 14\n90 15\n90 16\n90 17\n90 18\n90 19\n90 20\n90 21\n90 22\n90 23\n90 24\n90 25\n90 26\n90 27\n90 28\n90 29\n90 30\n90 31\n90 32\n90 33\n90 34\n90 35\n90 36\n90 37\n90 38\n90 39\n90 40\n90 41\n90 42\n90 43\n90 44\n90 45\n90 46\n90 47\n90 48\n90 49\n90 50\n90 51\n90 52\n90 53\n90 54\n90 55\n90 56\n90 57\n90 58\n90 59\n90 60\n90 61\n90 62\n90 63\n90 64\n90 65\n90 66\n90 67\n90 68\n90 69\n90 70\n90 71\n90 72\n90 73\n90 74\n90 75\n90 76\n90 77\n90 78\n90 79\n90 80\n90 81\n90 82\n90 83\n90 84\n90 85\n90 86\n90 87\n90 88\n90 89\n91 1\n91 2\n91 3\n91 4\n91 5\n91 6\n91 7\n91 8\n91 9\n91 10\n91 11\n91 12\n91 13\n91 14\n91 15\n91 16\n91 17\n91 18\n91 19\n91 20\n91 21\n91 22\n91 23\n91 24\n91 25\n91 26\n91 27\n91 28\n91 29\n91 30\n91 31\n91 32\n91 33\n91 34\n91 35\n91 36\n91 37\n91 38\n91 39\n91 40\n91 41\n91 42\n91 43\n91 44\n91 45\n91 46\n91 47\n91 48\n91 49\n91 50\n91 51\n91 52\n91 53\n91 54\n91 55\n91 56\n91 57\n91 58\n91 59\n91 60\n91 61\n91 62\n91 63\n91 64\n91 65\n91 66\n91 67\n91 68\n91 69\n91 70\n91 71\n91 72\n91 73\n91 74\n91 75\n91 76\n91 77\n91 78\n91 79\n91 80\n91 81\n91 82\n91 83\n91 84\n91 85\n91 86\n91 87\n91 88\n91 89\n91 90\n92 1\n92 2\n92 3\n92 4\n92 5\n92 6\n92 7\n92 8\n92 9\n92 10\n92 11\n92 12\n92 13\n92 14\n92 15\n92 16\n92 17\n92 18\n92 19\n92 20\n92 21\n92 22\n92 23\n92 24\n92 25\n92 26\n92 27\n92 28\n92 29\n92 30\n92 31\n92 32\n92 33\n92 34\n92 35\n92 36\n92 37\n92 38\n92 39\n92 40\n92 41\n92 42\n92 43\n92 44\n92 45\n92 46\n92 47\n92 48\n92 49\n92 50\n92 51\n92 52\n92 53\n92 54\n92 55\n92 56\n92 57\n92 58\n92 59\n92 60\n92 61\n92 62\n92 63\n92 64\n92 65\n92 66\n92 67\n92 68\n92 69\n92 70\n92 71\n92 72\n92 73\n92 74\n92 75\n92 76\n92 77\n92 78\n92 79\n92 80\n92 81\n92 82\n92 83\n92 84\n92 85\n92 86\n92 87\n92 88\n92 89\n92 90\n92 91\n93 1\n93 2\n93 3\n93 4\n93 5\n93 6\n93 7\n93 8\n93 9\n93 10\n93 11\n93 12\n93 13\n93 14\n93 15\n93 16\n93 17\n93 18\n93 19\n93 20\n93 21\n93 22\n93 23\n93 24\n93 25\n93 26\n93 27\n93 28\n93 29\n93 30\n93 31\n93 32\n93 33\n93 34\n93 35\n93 36\n93 37\n93 38\n93 39\n93 40\n93 41\n93 42\n93 43\n93 44\n93 45\n93 46\n93 47\n93 48\n93 49\n93 50\n93 51\n93 52\n93 53\n93 54\n93 55\n93 56\n93 57\n93 58\n93 59\n93 60\n93 61\n93 62\n93 63\n93 64\n93 65\n93 66\n93 67\n93 68\n93 69\n93 70\n93 71\n93 72\n93 73\n93 74\n93 75\n93 76\n93 77\n93 78\n93 79\n93 80\n93 81\n93 82\n93 83\n93 84\n93 85\n93 86\n93 87\n93 88\n93 89\n93 90\n93 91\n93 92\n94 1\n94 2\n94 3\n94 4\n94 5\n94 6\n94 7\n94 8\n94 9\n94 10\n94 11\n94 12\n94 13\n94 14\n94 15\n94 16\n94 17\n94 18\n94 19\n94 20\n94 21\n94 22\n94 23\n94 24\n94 25\n94 26\n94 27\n94 28\n94 29\n94 30\n94 31\n94 32\n94 33\n94 34\n94 35\n94 36\n94 37\n94 38\n94 39\n94 40\n94 41\n94 42\n94 43\n94 44\n94 45\n94 46\n94 47\n94 48\n94 49\n94 50\n94 51\n94 52\n94 53\n94 54\n94 55\n94 56\n94 57\n94 58\n94 59\n94 60\n94 61\n94 62\n94 63\n94 64\n94 65\n94 66\n94 67\n94 68\n94 69\n94 70\n94 71\n94 72\n94 73\n94 74\n94 75\n94 76\n94 77\n94 78\n94 79\n94 80\n94 81\n94 82\n94 83\n94 84\n94 85\n94 86\n94 87\n94 88\n94 89\n94 90\n94 91\n94 92\n94 93\n95 1\n95 2\n95 3\n95 4\n95 5\n95 6\n95 7\n95 8\n95 9\n95 10\n95 11\n95 12\n95 13\n95 14\n95 15\n95 16\n95 17\n95 18\n95 19\n95 20\n95 21\n95 22\n95 23\n95 24\n95 25\n95 26\n95 27\n95 28\n95 29\n95 30\n95 31\n95 32\n95 33\n95 34\n95 35\n95 36\n95 37\n95 38\n95 39\n95 40\n95 41\n95 42\n95 43\n95 44\n95 45\n95 46\n95 47\n95 48\n95 49\n95 50\n95 51\n95 52\n95 53\n95 54\n95 55\n95 56\n95 57\n95 58\n95 59\n95 60\n95 61\n95 62\n95 63\n95 64\n95 65\n95 66\n95 67\n95 68\n95 69\n95 70\n95 71\n95 72\n95 73\n95 74\n95 75\n95 76\n95 77\n95 78\n95 79\n95 80\n95 81\n95 82\n95 83\n95 84\n95 85\n95 86\n95 87\n95 88\n95 89\n95 90\n95 91\n95 92\n95 93\n95 94\n96 1\n96 2\n96 3\n96 4\n96 5\n96 6\n96 7\n96 8\n96 9\n96 10\n96 11\n96 12\n96 13\n96 14\n96 15\n96 16\n96 17\n96 18\n96 19\n96 20\n96 21\n96 22\n96 23\n96 24\n96 25\n96 26\n96 27\n96 28\n96 29\n96 30\n96 31\n96 32\n96 33\n96 34\n96 35\n96 36\n96 37\n96 38\n96 39\n96 40\n96 41\n96 42\n96 43\n96 44\n96 45\n96 46\n96 47\n96 48\n96 49\n96 50\n96 51\n96 52\n96 53\n96 54\n96 55\n96 56\n96 57\n96 58\n96 59\n96 60\n96 61\n96 62\n96 63\n96 64\n96 65\n96 66\n96 67\n96 68\n96 69\n96 70\n96 71\n96 72\n96 73\n96 74\n96 75\n96 76\n96 77\n96 78\n96 79\n96 80\n96 81\n96 82\n96 83\n96 84\n96 85\n96 86\n96 87\n96 88\n96 89\n96 90\n96 91\n96 92\n96 93\n96 94\n96 95\n97 1\n97 2\n97 3\n97 4\n97 5\n97 6\n97 7\n97 8\n97 9\n97 10\n97 11\n97 12\n97 13\n97 14\n97 15\n97 16\n97 17\n97 18\n97 19\n97 20\n97 21\n97 22\n97 23\n97 24\n97 25\n97 26\n97 27\n97 28\n97 29\n97 30\n97 31\n97 32\n97 33\n97 34\n97 35\n97 36\n97 37\n97 38\n97 39\n97 40\n97 41\n97 42\n97 43\n97 44\n97 45\n97 46\n97 47\n97 48\n97 49\n97 50\n97 51\n97 52\n97 53\n97 54\n97 55\n97 56\n97 57\n97 58\n97 59\n97 60\n97 61\n97 62\n97 63\n97 64\n97 65\n97 66\n97 67\n97 68\n97 69\n97 70\n97 71\n97 72\n97 73\n97 74\n97 75\n97 76\n97 77\n97 78\n97 79\n97 80\n97 81\n97 82\n97 83\n97 84\n97 85\n97 86\n97 87\n97 88\n97 89\n97 90\n97 91\n97 92\n97 93\n97 94\n97 95\n97 96\n98 1\n98 2\n98 3\n98 4\n98 5\n98 6\n98 7\n98 8\n98 9\n98 10\n98 11\n98 12\n98 13\n98 14\n98 15\n98 16\n98 17\n98 18\n98 19\n98 20\n98 21\n98 22\n98 23\n98 24\n98 25\n98 26\n98 27\n98 28\n98 29\n98 30\n98 31\n98 32\n98 33\n98 34\n98 35\n98 36\n98 37\n98 38\n98 39\n98 40\n98 41\n98 42\n98 43\n98 44\n98 45\n98 46\n98 47\n98 48\n98 49\n98 50\n98 51\n98 52\n98 53\n98 54\n98 55\n98 56\n98 57\n98 58\n98 59\n98 60\n98 61\n98 62\n98 63\n98 64\n98 65\n98 66\n98 67\n98 68\n98 69\n98 70\n98 71\n98 72\n98 73\n98 74\n98 75\n98 76\n98 77\n98 78\n98 79\n98 80\n98 81\n98 82\n98 83\n98 84\n98 85\n98 86\n98 87\n98 88\n98 89\n98 90\n98 91\n98 92\n98 93\n98 94\n98 95\n98 96\n98 97\n99 1\n99 2\n99 3\n99 4\n99 5\n99 6\n99 7\n99 8\n99 9\n99 10\n99 11\n99 12\n99 13\n99 14\n99 15\n99 16\n99 17\n99 18\n99 19\n99 20\n99 21\n99 22\n99 23\n99 24\n99 25\n99 26\n99 27\n99 28\n99 29\n99 30\n99 31\n99 32\n99 33\n99 34\n99 35\n99 36\n99 37\n99 38\n99 39\n99 40\n99 41\n99 42\n99 43\n99 44\n99 45\n99 46\n99 47\n99 48\n99 49\n99 50\n99 51\n99 52\n99 53\n99 54\n99 55\n99 56\n99 57\n99 58\n99 59\n99 60\n99 61\n99 62\n99 63\n99 64\n99 65\n99 66\n99 67\n99 68\n99 69\n99 70\n99 71\n99 72\n99 73\n99 74\n99 75\n99 76\n99 77\n99 78\n99 79\n99 80\n99 81\n99 82\n99 83\n99 84\n99 85\n99 86\n99 87\n99 88\n99 89\n99 90\n99 91\n99 92\n99 93\n99 94\n99 95\n99 96\n99 97\n99 98\n" }, { "input": "100 39 70 5\n", "output": "1085\n70 5\n70 6\n70 7\n70 8\n70 9\n70 10\n70 11\n70 12\n70 13\n70 14\n70 15\n70 16\n70 17\n70 18\n70 19\n70 20\n70 21\n70 22\n70 23\n70 24\n70 25\n70 26\n70 27\n70 28\n70 29\n70 30\n70 31\n70 32\n70 33\n70 34\n70 35\n70 36\n70 37\n70 38\n70 39\n71 5\n71 6\n71 7\n71 8\n71 9\n71 10\n71 11\n71 12\n71 13\n71 14\n71 15\n71 16\n71 17\n71 18\n71 19\n71 20\n71 21\n71 22\n71 23\n71 24\n71 25\n71 26\n71 27\n71 28\n71 29\n71 30\n71 31\n71 32\n71 33\n71 34\n71 35\n71 36\n71 37\n71 38\n71 39\n72 5\n72 6\n72 7\n72 8\n72 9\n72 10\n72 11\n72 12\n72 13\n72 14\n72 15\n72 16\n72 17\n72 18\n72 19\n72 20\n72 21\n72 22\n72 23\n72 24\n72 25\n72 26\n72 27\n72 28\n72 29\n72 30\n72 31\n72 32\n72 33\n72 34\n72 35\n72 36\n72 37\n72 38\n72 39\n73 5\n73 6\n73 7\n73 8\n73 9\n73 10\n73 11\n73 12\n73 13\n73 14\n73 15\n73 16\n73 17\n73 18\n73 19\n73 20\n73 21\n73 22\n73 23\n73 24\n73 25\n73 26\n73 27\n73 28\n73 29\n73 30\n73 31\n73 32\n73 33\n73 34\n73 35\n73 36\n73 37\n73 38\n73 39\n74 5\n74 6\n74 7\n74 8\n74 9\n74 10\n74 11\n74 12\n74 13\n74 14\n74 15\n74 16\n74 17\n74 18\n74 19\n74 20\n74 21\n74 22\n74 23\n74 24\n74 25\n74 26\n74 27\n74 28\n74 29\n74 30\n74 31\n74 32\n74 33\n74 34\n74 35\n74 36\n74 37\n74 38\n74 39\n75 5\n75 6\n75 7\n75 8\n75 9\n75 10\n75 11\n75 12\n75 13\n75 14\n75 15\n75 16\n75 17\n75 18\n75 19\n75 20\n75 21\n75 22\n75 23\n75 24\n75 25\n75 26\n75 27\n75 28\n75 29\n75 30\n75 31\n75 32\n75 33\n75 34\n75 35\n75 36\n75 37\n75 38\n75 39\n76 5\n76 6\n76 7\n76 8\n76 9\n76 10\n76 11\n76 12\n76 13\n76 14\n76 15\n76 16\n76 17\n76 18\n76 19\n76 20\n76 21\n76 22\n76 23\n76 24\n76 25\n76 26\n76 27\n76 28\n76 29\n76 30\n76 31\n76 32\n76 33\n76 34\n76 35\n76 36\n76 37\n76 38\n76 39\n77 5\n77 6\n77 7\n77 8\n77 9\n77 10\n77 11\n77 12\n77 13\n77 14\n77 15\n77 16\n77 17\n77 18\n77 19\n77 20\n77 21\n77 22\n77 23\n77 24\n77 25\n77 26\n77 27\n77 28\n77 29\n77 30\n77 31\n77 32\n77 33\n77 34\n77 35\n77 36\n77 37\n77 38\n77 39\n78 5\n78 6\n78 7\n78 8\n78 9\n78 10\n78 11\n78 12\n78 13\n78 14\n78 15\n78 16\n78 17\n78 18\n78 19\n78 20\n78 21\n78 22\n78 23\n78 24\n78 25\n78 26\n78 27\n78 28\n78 29\n78 30\n78 31\n78 32\n78 33\n78 34\n78 35\n78 36\n78 37\n78 38\n78 39\n79 5\n79 6\n79 7\n79 8\n79 9\n79 10\n79 11\n79 12\n79 13\n79 14\n79 15\n79 16\n79 17\n79 18\n79 19\n79 20\n79 21\n79 22\n79 23\n79 24\n79 25\n79 26\n79 27\n79 28\n79 29\n79 30\n79 31\n79 32\n79 33\n79 34\n79 35\n79 36\n79 37\n79 38\n79 39\n80 5\n80 6\n80 7\n80 8\n80 9\n80 10\n80 11\n80 12\n80 13\n80 14\n80 15\n80 16\n80 17\n80 18\n80 19\n80 20\n80 21\n80 22\n80 23\n80 24\n80 25\n80 26\n80 27\n80 28\n80 29\n80 30\n80 31\n80 32\n80 33\n80 34\n80 35\n80 36\n80 37\n80 38\n80 39\n81 5\n81 6\n81 7\n81 8\n81 9\n81 10\n81 11\n81 12\n81 13\n81 14\n81 15\n81 16\n81 17\n81 18\n81 19\n81 20\n81 21\n81 22\n81 23\n81 24\n81 25\n81 26\n81 27\n81 28\n81 29\n81 30\n81 31\n81 32\n81 33\n81 34\n81 35\n81 36\n81 37\n81 38\n81 39\n82 5\n82 6\n82 7\n82 8\n82 9\n82 10\n82 11\n82 12\n82 13\n82 14\n82 15\n82 16\n82 17\n82 18\n82 19\n82 20\n82 21\n82 22\n82 23\n82 24\n82 25\n82 26\n82 27\n82 28\n82 29\n82 30\n82 31\n82 32\n82 33\n82 34\n82 35\n82 36\n82 37\n82 38\n82 39\n83 5\n83 6\n83 7\n83 8\n83 9\n83 10\n83 11\n83 12\n83 13\n83 14\n83 15\n83 16\n83 17\n83 18\n83 19\n83 20\n83 21\n83 22\n83 23\n83 24\n83 25\n83 26\n83 27\n83 28\n83 29\n83 30\n83 31\n83 32\n83 33\n83 34\n83 35\n83 36\n83 37\n83 38\n83 39\n84 5\n84 6\n84 7\n84 8\n84 9\n84 10\n84 11\n84 12\n84 13\n84 14\n84 15\n84 16\n84 17\n84 18\n84 19\n84 20\n84 21\n84 22\n84 23\n84 24\n84 25\n84 26\n84 27\n84 28\n84 29\n84 30\n84 31\n84 32\n84 33\n84 34\n84 35\n84 36\n84 37\n84 38\n84 39\n85 5\n85 6\n85 7\n85 8\n85 9\n85 10\n85 11\n85 12\n85 13\n85 14\n85 15\n85 16\n85 17\n85 18\n85 19\n85 20\n85 21\n85 22\n85 23\n85 24\n85 25\n85 26\n85 27\n85 28\n85 29\n85 30\n85 31\n85 32\n85 33\n85 34\n85 35\n85 36\n85 37\n85 38\n85 39\n86 5\n86 6\n86 7\n86 8\n86 9\n86 10\n86 11\n86 12\n86 13\n86 14\n86 15\n86 16\n86 17\n86 18\n86 19\n86 20\n86 21\n86 22\n86 23\n86 24\n86 25\n86 26\n86 27\n86 28\n86 29\n86 30\n86 31\n86 32\n86 33\n86 34\n86 35\n86 36\n86 37\n86 38\n86 39\n87 5\n87 6\n87 7\n87 8\n87 9\n87 10\n87 11\n87 12\n87 13\n87 14\n87 15\n87 16\n87 17\n87 18\n87 19\n87 20\n87 21\n87 22\n87 23\n87 24\n87 25\n87 26\n87 27\n87 28\n87 29\n87 30\n87 31\n87 32\n87 33\n87 34\n87 35\n87 36\n87 37\n87 38\n87 39\n88 5\n88 6\n88 7\n88 8\n88 9\n88 10\n88 11\n88 12\n88 13\n88 14\n88 15\n88 16\n88 17\n88 18\n88 19\n88 20\n88 21\n88 22\n88 23\n88 24\n88 25\n88 26\n88 27\n88 28\n88 29\n88 30\n88 31\n88 32\n88 33\n88 34\n88 35\n88 36\n88 37\n88 38\n88 39\n89 5\n89 6\n89 7\n89 8\n89 9\n89 10\n89 11\n89 12\n89 13\n89 14\n89 15\n89 16\n89 17\n89 18\n89 19\n89 20\n89 21\n89 22\n89 23\n89 24\n89 25\n89 26\n89 27\n89 28\n89 29\n89 30\n89 31\n89 32\n89 33\n89 34\n89 35\n89 36\n89 37\n89 38\n89 39\n90 5\n90 6\n90 7\n90 8\n90 9\n90 10\n90 11\n90 12\n90 13\n90 14\n90 15\n90 16\n90 17\n90 18\n90 19\n90 20\n90 21\n90 22\n90 23\n90 24\n90 25\n90 26\n90 27\n90 28\n90 29\n90 30\n90 31\n90 32\n90 33\n90 34\n90 35\n90 36\n90 37\n90 38\n90 39\n91 5\n91 6\n91 7\n91 8\n91 9\n91 10\n91 11\n91 12\n91 13\n91 14\n91 15\n91 16\n91 17\n91 18\n91 19\n91 20\n91 21\n91 22\n91 23\n91 24\n91 25\n91 26\n91 27\n91 28\n91 29\n91 30\n91 31\n91 32\n91 33\n91 34\n91 35\n91 36\n91 37\n91 38\n91 39\n92 5\n92 6\n92 7\n92 8\n92 9\n92 10\n92 11\n92 12\n92 13\n92 14\n92 15\n92 16\n92 17\n92 18\n92 19\n92 20\n92 21\n92 22\n92 23\n92 24\n92 25\n92 26\n92 27\n92 28\n92 29\n92 30\n92 31\n92 32\n92 33\n92 34\n92 35\n92 36\n92 37\n92 38\n92 39\n93 5\n93 6\n93 7\n93 8\n93 9\n93 10\n93 11\n93 12\n93 13\n93 14\n93 15\n93 16\n93 17\n93 18\n93 19\n93 20\n93 21\n93 22\n93 23\n93 24\n93 25\n93 26\n93 27\n93 28\n93 29\n93 30\n93 31\n93 32\n93 33\n93 34\n93 35\n93 36\n93 37\n93 38\n93 39\n94 5\n94 6\n94 7\n94 8\n94 9\n94 10\n94 11\n94 12\n94 13\n94 14\n94 15\n94 16\n94 17\n94 18\n94 19\n94 20\n94 21\n94 22\n94 23\n94 24\n94 25\n94 26\n94 27\n94 28\n94 29\n94 30\n94 31\n94 32\n94 33\n94 34\n94 35\n94 36\n94 37\n94 38\n94 39\n95 5\n95 6\n95 7\n95 8\n95 9\n95 10\n95 11\n95 12\n95 13\n95 14\n95 15\n95 16\n95 17\n95 18\n95 19\n95 20\n95 21\n95 22\n95 23\n95 24\n95 25\n95 26\n95 27\n95 28\n95 29\n95 30\n95 31\n95 32\n95 33\n95 34\n95 35\n95 36\n95 37\n95 38\n95 39\n96 5\n96 6\n96 7\n96 8\n96 9\n96 10\n96 11\n96 12\n96 13\n96 14\n96 15\n96 16\n96 17\n96 18\n96 19\n96 20\n96 21\n96 22\n96 23\n96 24\n96 25\n96 26\n96 27\n96 28\n96 29\n96 30\n96 31\n96 32\n96 33\n96 34\n96 35\n96 36\n96 37\n96 38\n96 39\n97 5\n97 6\n97 7\n97 8\n97 9\n97 10\n97 11\n97 12\n97 13\n97 14\n97 15\n97 16\n97 17\n97 18\n97 19\n97 20\n97 21\n97 22\n97 23\n97 24\n97 25\n97 26\n97 27\n97 28\n97 29\n97 30\n97 31\n97 32\n97 33\n97 34\n97 35\n97 36\n97 37\n97 38\n97 39\n98 5\n98 6\n98 7\n98 8\n98 9\n98 10\n98 11\n98 12\n98 13\n98 14\n98 15\n98 16\n98 17\n98 18\n98 19\n98 20\n98 21\n98 22\n98 23\n98 24\n98 25\n98 26\n98 27\n98 28\n98 29\n98 30\n98 31\n98 32\n98 33\n98 34\n98 35\n98 36\n98 37\n98 38\n98 39\n99 5\n99 6\n99 7\n99 8\n99 9\n99 10\n99 11\n99 12\n99 13\n99 14\n99 15\n99 16\n99 17\n99 18\n99 19\n99 20\n99 21\n99 22\n99 23\n99 24\n99 25\n99 26\n99 27\n99 28\n99 29\n99 30\n99 31\n99 32\n99 33\n99 34\n99 35\n99 36\n99 37\n99 38\n99 39\n100 5\n100 6\n100 7\n100 8\n100 9\n100 10\n100 11\n100 12\n100 13\n100 14\n100 15\n100 16\n100 17\n100 18\n100 19\n100 20\n100 21\n100 22\n100 23\n100 24\n100 25\n100 26\n100 27\n100 28\n100 29\n100 30\n100 31\n100 32\n100 33\n100 34\n100 35\n100 36\n100 37\n100 38\n100 39\n" }, { "input": "50 50 1 30\n", "output": "210\n31 30\n32 30\n32 31\n33 30\n33 31\n33 32\n34 30\n34 31\n34 32\n34 33\n35 30\n35 31\n35 32\n35 33\n35 34\n36 30\n36 31\n36 32\n36 33\n36 34\n36 35\n37 30\n37 31\n37 32\n37 33\n37 34\n37 35\n37 36\n38 30\n38 31\n38 32\n38 33\n38 34\n38 35\n38 36\n38 37\n39 30\n39 31\n39 32\n39 33\n39 34\n39 35\n39 36\n39 37\n39 38\n40 30\n40 31\n40 32\n40 33\n40 34\n40 35\n40 36\n40 37\n40 38\n40 39\n41 30\n41 31\n41 32\n41 33\n41 34\n41 35\n41 36\n41 37\n41 38\n41 39\n41 40\n42 30\n42 31\n42 32\n42 33\n42 34\n42 35\n42 36\n42 37\n42 38\n42 39\n42 40\n42 41\n43 30\n43 31\n43 32\n43 33\n43 34\n43 35\n43 36\n43 37\n43 38\n43 39\n43 40\n43 41\n43 42\n44 30\n44 31\n44 32\n44 33\n44 34\n44 35\n44 36\n44 37\n44 38\n44 39\n44 40\n44 41\n44 42\n44 43\n45 30\n45 31\n45 32\n45 33\n45 34\n45 35\n45 36\n45 37\n45 38\n45 39\n45 40\n45 41\n45 42\n45 43\n45 44\n46 30\n46 31\n46 32\n46 33\n46 34\n46 35\n46 36\n46 37\n46 38\n46 39\n46 40\n46 41\n46 42\n46 43\n46 44\n46 45\n47 30\n47 31\n47 32\n47 33\n47 34\n47 35\n47 36\n47 37\n47 38\n47 39\n47 40\n47 41\n47 42\n47 43\n47 44\n47 45\n47 46\n48 30\n48 31\n48 32\n48 33\n48 34\n48 35\n48 36\n48 37\n48 38\n48 39\n48 40\n48 41\n48 42\n48 43\n48 44\n48 45\n48 46\n48 47\n49 30\n49 31\n49 32\n49 33\n49 34\n49 35\n49 36\n49 37\n49 38\n49 39\n49 40\n49 41\n49 42\n49 43\n49 44\n49 45\n49 46\n49 47\n49 48\n50 30\n50 31\n50 32\n50 33\n50 34\n50 35\n50 36\n50 37\n50 38\n50 39\n50 40\n50 41\n50 42\n50 43\n50 44\n50 45\n50 46\n50 47\n50 48\n50 49\n" }, { "input": "60 50 30 40\n", "output": "165\n41 40\n42 40\n42 41\n43 40\n43 41\n43 42\n44 40\n44 41\n44 42\n44 43\n45 40\n45 41\n45 42\n45 43\n45 44\n46 40\n46 41\n46 42\n46 43\n46 44\n46 45\n47 40\n47 41\n47 42\n47 43\n47 44\n47 45\n47 46\n48 40\n48 41\n48 42\n48 43\n48 44\n48 45\n48 46\n48 47\n49 40\n49 41\n49 42\n49 43\n49 44\n49 45\n49 46\n49 47\n49 48\n50 40\n50 41\n50 42\n50 43\n50 44\n50 45\n50 46\n50 47\n50 48\n50 49\n51 40\n51 41\n51 42\n51 43\n51 44\n51 45\n51 46\n51 47\n51 48\n51 49\n51 50\n52 40\n52 41\n52 42\n52 43\n52 44\n52 45\n52 46\n52 47\n52 48\n52 49\n52 50\n53 40\n53 41\n53 42\n53 43\n53 44\n53 45\n53 46\n53 47\n53 48\n53 49\n53 50\n54 40\n54 41\n54 42\n54 43\n54 44\n54 45\n54 46\n54 47\n54 48\n54 49\n54 50\n55 40\n55 41\n55 42\n55 43\n55 44\n55 45\n55 46\n55 47\n55 48\n55 49\n55 50\n56 40\n56 41\n56 42\n56 43\n56 44\n56 45\n56 46\n56 47\n56 48\n56 49\n56 50\n57 40\n57 41\n57 42\n57 43\n57 44\n57 45\n57 46\n57 47\n57 48\n57 49\n57 50\n58 40\n58 41\n58 42\n58 43\n58 44\n58 45\n58 46\n58 47\n58 48\n58 49\n58 50\n59 40\n59 41\n59 42\n59 43\n59 44\n59 45\n59 46\n59 47\n59 48\n59 49\n59 50\n60 40\n60 41\n60 42\n60 43\n60 44\n60 45\n60 46\n60 47\n60 48\n60 49\n60 50\n" }, { "input": "10 6 3 4\n", "output": "15\n5 4\n6 4\n6 5\n7 4\n7 5\n7 6\n8 4\n8 5\n8 6\n9 4\n9 5\n9 6\n10 4\n10 5\n10 6\n" }, { "input": "100 100 100 5\n", "output": "95\n100 5\n100 6\n100 7\n100 8\n100 9\n100 10\n100 11\n100 12\n100 13\n100 14\n100 15\n100 16\n100 17\n100 18\n100 19\n100 20\n100 21\n100 22\n100 23\n100 24\n100 25\n100 26\n100 27\n100 28\n100 29\n100 30\n100 31\n100 32\n100 33\n100 34\n100 35\n100 36\n100 37\n100 38\n100 39\n100 40\n100 41\n100 42\n100 43\n100 44\n100 45\n100 46\n100 47\n100 48\n100 49\n100 50\n100 51\n100 52\n100 53\n100 54\n100 55\n100 56\n100 57\n100 58\n100 59\n100 60\n100 61\n100 62\n100 63\n100 64\n100 65\n100 66\n100 67\n100 68\n100 69\n100 70\n100 71\n100 72\n100 73\n100 74\n100 75\n100 76\n100 77\n100 78\n100 79\n100 80\n100 81\n100 82\n100 83\n100 84\n100 85\n100 86\n100 87\n100 88\n100 89\n100 90\n100 91\n100 92\n100 93\n100 94\n100 95\n100 96\n100 97\n100 98\n100 99\n" }, { "input": "100 39 70 5\n", "output": "1085\n70 5\n70 6\n70 7\n70 8\n70 9\n70 10\n70 11\n70 12\n70 13\n70 14\n70 15\n70 16\n70 17\n70 18\n70 19\n70 20\n70 21\n70 22\n70 23\n70 24\n70 25\n70 26\n70 27\n70 28\n70 29\n70 30\n70 31\n70 32\n70 33\n70 34\n70 35\n70 36\n70 37\n70 38\n70 39\n71 5\n71 6\n71 7\n71 8\n71 9\n71 10\n71 11\n71 12\n71 13\n71 14\n71 15\n71 16\n71 17\n71 18\n71 19\n71 20\n71 21\n71 22\n71 23\n71 24\n71 25\n71 26\n71 27\n71 28\n71 29\n71 30\n71 31\n71 32\n71 33\n71 34\n71 35\n71 36\n71 37\n71 38\n71 39\n72 5\n72 6\n72 7\n72 8\n72 9\n72 10\n72 11\n72 12\n72 13\n72 14\n72 15\n72 16\n72 17\n72 18\n72 19\n72 20\n72 21\n72 22\n72 23\n72 24\n72 25\n72 26\n72 27\n72 28\n72 29\n72 30\n72 31\n72 32\n72 33\n72 34\n72 35\n72 36\n72 37\n72 38\n72 39\n73 5\n73 6\n73 7\n73 8\n73 9\n73 10\n73 11\n73 12\n73 13\n73 14\n73 15\n73 16\n73 17\n73 18\n73 19\n73 20\n73 21\n73 22\n73 23\n73 24\n73 25\n73 26\n73 27\n73 28\n73 29\n73 30\n73 31\n73 32\n73 33\n73 34\n73 35\n73 36\n73 37\n73 38\n73 39\n74 5\n74 6\n74 7\n74 8\n74 9\n74 10\n74 11\n74 12\n74 13\n74 14\n74 15\n74 16\n74 17\n74 18\n74 19\n74 20\n74 21\n74 22\n74 23\n74 24\n74 25\n74 26\n74 27\n74 28\n74 29\n74 30\n74 31\n74 32\n74 33\n74 34\n74 35\n74 36\n74 37\n74 38\n74 39\n75 5\n75 6\n75 7\n75 8\n75 9\n75 10\n75 11\n75 12\n75 13\n75 14\n75 15\n75 16\n75 17\n75 18\n75 19\n75 20\n75 21\n75 22\n75 23\n75 24\n75 25\n75 26\n75 27\n75 28\n75 29\n75 30\n75 31\n75 32\n75 33\n75 34\n75 35\n75 36\n75 37\n75 38\n75 39\n76 5\n76 6\n76 7\n76 8\n76 9\n76 10\n76 11\n76 12\n76 13\n76 14\n76 15\n76 16\n76 17\n76 18\n76 19\n76 20\n76 21\n76 22\n76 23\n76 24\n76 25\n76 26\n76 27\n76 28\n76 29\n76 30\n76 31\n76 32\n76 33\n76 34\n76 35\n76 36\n76 37\n76 38\n76 39\n77 5\n77 6\n77 7\n77 8\n77 9\n77 10\n77 11\n77 12\n77 13\n77 14\n77 15\n77 16\n77 17\n77 18\n77 19\n77 20\n77 21\n77 22\n77 23\n77 24\n77 25\n77 26\n77 27\n77 28\n77 29\n77 30\n77 31\n77 32\n77 33\n77 34\n77 35\n77 36\n77 37\n77 38\n77 39\n78 5\n78 6\n78 7\n78 8\n78 9\n78 10\n78 11\n78 12\n78 13\n78 14\n78 15\n78 16\n78 17\n78 18\n78 19\n78 20\n78 21\n78 22\n78 23\n78 24\n78 25\n78 26\n78 27\n78 28\n78 29\n78 30\n78 31\n78 32\n78 33\n78 34\n78 35\n78 36\n78 37\n78 38\n78 39\n79 5\n79 6\n79 7\n79 8\n79 9\n79 10\n79 11\n79 12\n79 13\n79 14\n79 15\n79 16\n79 17\n79 18\n79 19\n79 20\n79 21\n79 22\n79 23\n79 24\n79 25\n79 26\n79 27\n79 28\n79 29\n79 30\n79 31\n79 32\n79 33\n79 34\n79 35\n79 36\n79 37\n79 38\n79 39\n80 5\n80 6\n80 7\n80 8\n80 9\n80 10\n80 11\n80 12\n80 13\n80 14\n80 15\n80 16\n80 17\n80 18\n80 19\n80 20\n80 21\n80 22\n80 23\n80 24\n80 25\n80 26\n80 27\n80 28\n80 29\n80 30\n80 31\n80 32\n80 33\n80 34\n80 35\n80 36\n80 37\n80 38\n80 39\n81 5\n81 6\n81 7\n81 8\n81 9\n81 10\n81 11\n81 12\n81 13\n81 14\n81 15\n81 16\n81 17\n81 18\n81 19\n81 20\n81 21\n81 22\n81 23\n81 24\n81 25\n81 26\n81 27\n81 28\n81 29\n81 30\n81 31\n81 32\n81 33\n81 34\n81 35\n81 36\n81 37\n81 38\n81 39\n82 5\n82 6\n82 7\n82 8\n82 9\n82 10\n82 11\n82 12\n82 13\n82 14\n82 15\n82 16\n82 17\n82 18\n82 19\n82 20\n82 21\n82 22\n82 23\n82 24\n82 25\n82 26\n82 27\n82 28\n82 29\n82 30\n82 31\n82 32\n82 33\n82 34\n82 35\n82 36\n82 37\n82 38\n82 39\n83 5\n83 6\n83 7\n83 8\n83 9\n83 10\n83 11\n83 12\n83 13\n83 14\n83 15\n83 16\n83 17\n83 18\n83 19\n83 20\n83 21\n83 22\n83 23\n83 24\n83 25\n83 26\n83 27\n83 28\n83 29\n83 30\n83 31\n83 32\n83 33\n83 34\n83 35\n83 36\n83 37\n83 38\n83 39\n84 5\n84 6\n84 7\n84 8\n84 9\n84 10\n84 11\n84 12\n84 13\n84 14\n84 15\n84 16\n84 17\n84 18\n84 19\n84 20\n84 21\n84 22\n84 23\n84 24\n84 25\n84 26\n84 27\n84 28\n84 29\n84 30\n84 31\n84 32\n84 33\n84 34\n84 35\n84 36\n84 37\n84 38\n84 39\n85 5\n85 6\n85 7\n85 8\n85 9\n85 10\n85 11\n85 12\n85 13\n85 14\n85 15\n85 16\n85 17\n85 18\n85 19\n85 20\n85 21\n85 22\n85 23\n85 24\n85 25\n85 26\n85 27\n85 28\n85 29\n85 30\n85 31\n85 32\n85 33\n85 34\n85 35\n85 36\n85 37\n85 38\n85 39\n86 5\n86 6\n86 7\n86 8\n86 9\n86 10\n86 11\n86 12\n86 13\n86 14\n86 15\n86 16\n86 17\n86 18\n86 19\n86 20\n86 21\n86 22\n86 23\n86 24\n86 25\n86 26\n86 27\n86 28\n86 29\n86 30\n86 31\n86 32\n86 33\n86 34\n86 35\n86 36\n86 37\n86 38\n86 39\n87 5\n87 6\n87 7\n87 8\n87 9\n87 10\n87 11\n87 12\n87 13\n87 14\n87 15\n87 16\n87 17\n87 18\n87 19\n87 20\n87 21\n87 22\n87 23\n87 24\n87 25\n87 26\n87 27\n87 28\n87 29\n87 30\n87 31\n87 32\n87 33\n87 34\n87 35\n87 36\n87 37\n87 38\n87 39\n88 5\n88 6\n88 7\n88 8\n88 9\n88 10\n88 11\n88 12\n88 13\n88 14\n88 15\n88 16\n88 17\n88 18\n88 19\n88 20\n88 21\n88 22\n88 23\n88 24\n88 25\n88 26\n88 27\n88 28\n88 29\n88 30\n88 31\n88 32\n88 33\n88 34\n88 35\n88 36\n88 37\n88 38\n88 39\n89 5\n89 6\n89 7\n89 8\n89 9\n89 10\n89 11\n89 12\n89 13\n89 14\n89 15\n89 16\n89 17\n89 18\n89 19\n89 20\n89 21\n89 22\n89 23\n89 24\n89 25\n89 26\n89 27\n89 28\n89 29\n89 30\n89 31\n89 32\n89 33\n89 34\n89 35\n89 36\n89 37\n89 38\n89 39\n90 5\n90 6\n90 7\n90 8\n90 9\n90 10\n90 11\n90 12\n90 13\n90 14\n90 15\n90 16\n90 17\n90 18\n90 19\n90 20\n90 21\n90 22\n90 23\n90 24\n90 25\n90 26\n90 27\n90 28\n90 29\n90 30\n90 31\n90 32\n90 33\n90 34\n90 35\n90 36\n90 37\n90 38\n90 39\n91 5\n91 6\n91 7\n91 8\n91 9\n91 10\n91 11\n91 12\n91 13\n91 14\n91 15\n91 16\n91 17\n91 18\n91 19\n91 20\n91 21\n91 22\n91 23\n91 24\n91 25\n91 26\n91 27\n91 28\n91 29\n91 30\n91 31\n91 32\n91 33\n91 34\n91 35\n91 36\n91 37\n91 38\n91 39\n92 5\n92 6\n92 7\n92 8\n92 9\n92 10\n92 11\n92 12\n92 13\n92 14\n92 15\n92 16\n92 17\n92 18\n92 19\n92 20\n92 21\n92 22\n92 23\n92 24\n92 25\n92 26\n92 27\n92 28\n92 29\n92 30\n92 31\n92 32\n92 33\n92 34\n92 35\n92 36\n92 37\n92 38\n92 39\n93 5\n93 6\n93 7\n93 8\n93 9\n93 10\n93 11\n93 12\n93 13\n93 14\n93 15\n93 16\n93 17\n93 18\n93 19\n93 20\n93 21\n93 22\n93 23\n93 24\n93 25\n93 26\n93 27\n93 28\n93 29\n93 30\n93 31\n93 32\n93 33\n93 34\n93 35\n93 36\n93 37\n93 38\n93 39\n94 5\n94 6\n94 7\n94 8\n94 9\n94 10\n94 11\n94 12\n94 13\n94 14\n94 15\n94 16\n94 17\n94 18\n94 19\n94 20\n94 21\n94 22\n94 23\n94 24\n94 25\n94 26\n94 27\n94 28\n94 29\n94 30\n94 31\n94 32\n94 33\n94 34\n94 35\n94 36\n94 37\n94 38\n94 39\n95 5\n95 6\n95 7\n95 8\n95 9\n95 10\n95 11\n95 12\n95 13\n95 14\n95 15\n95 16\n95 17\n95 18\n95 19\n95 20\n95 21\n95 22\n95 23\n95 24\n95 25\n95 26\n95 27\n95 28\n95 29\n95 30\n95 31\n95 32\n95 33\n95 34\n95 35\n95 36\n95 37\n95 38\n95 39\n96 5\n96 6\n96 7\n96 8\n96 9\n96 10\n96 11\n96 12\n96 13\n96 14\n96 15\n96 16\n96 17\n96 18\n96 19\n96 20\n96 21\n96 22\n96 23\n96 24\n96 25\n96 26\n96 27\n96 28\n96 29\n96 30\n96 31\n96 32\n96 33\n96 34\n96 35\n96 36\n96 37\n96 38\n96 39\n97 5\n97 6\n97 7\n97 8\n97 9\n97 10\n97 11\n97 12\n97 13\n97 14\n97 15\n97 16\n97 17\n97 18\n97 19\n97 20\n97 21\n97 22\n97 23\n97 24\n97 25\n97 26\n97 27\n97 28\n97 29\n97 30\n97 31\n97 32\n97 33\n97 34\n97 35\n97 36\n97 37\n97 38\n97 39\n98 5\n98 6\n98 7\n98 8\n98 9\n98 10\n98 11\n98 12\n98 13\n98 14\n98 15\n98 16\n98 17\n98 18\n98 19\n98 20\n98 21\n98 22\n98 23\n98 24\n98 25\n98 26\n98 27\n98 28\n98 29\n98 30\n98 31\n98 32\n98 33\n98 34\n98 35\n98 36\n98 37\n98 38\n98 39\n99 5\n99 6\n99 7\n99 8\n99 9\n99 10\n99 11\n99 12\n99 13\n99 14\n99 15\n99 16\n99 17\n99 18\n99 19\n99 20\n99 21\n99 22\n99 23\n99 24\n99 25\n99 26\n99 27\n99 28\n99 29\n99 30\n99 31\n99 32\n99 33\n99 34\n99 35\n99 36\n99 37\n99 38\n99 39\n100 5\n100 6\n100 7\n100 8\n100 9\n100 10\n100 11\n100 12\n100 13\n100 14\n100 15\n100 16\n100 17\n100 18\n100 19\n100 20\n100 21\n100 22\n100 23\n100 24\n100 25\n100 26\n100 27\n100 28\n100 29\n100 30\n100 31\n100 32\n100 33\n100 34\n100 35\n100 36\n100 37\n100 38\n100 39\n" }, { "input": "80 100 1 50\n", "output": "465\n51 50\n52 50\n52 51\n53 50\n53 51\n53 52\n54 50\n54 51\n54 52\n54 53\n55 50\n55 51\n55 52\n55 53\n55 54\n56 50\n56 51\n56 52\n56 53\n56 54\n56 55\n57 50\n57 51\n57 52\n57 53\n57 54\n57 55\n57 56\n58 50\n58 51\n58 52\n58 53\n58 54\n58 55\n58 56\n58 57\n59 50\n59 51\n59 52\n59 53\n59 54\n59 55\n59 56\n59 57\n59 58\n60 50\n60 51\n60 52\n60 53\n60 54\n60 55\n60 56\n60 57\n60 58\n60 59\n61 50\n61 51\n61 52\n61 53\n61 54\n61 55\n61 56\n61 57\n61 58\n61 59\n61 60\n62 50\n62 51\n62 52\n62 53\n62 54\n62 55\n62 56\n62 57\n62 58\n62 59\n62 60\n62 61\n63 50\n63 51\n63 52\n63 53\n63 54\n63 55\n63 56\n63 57\n63 58\n63 59\n63 60\n63 61\n63 62\n64 50\n64 51\n64 52\n64 53\n64 54\n64 55\n64 56\n64 57\n64 58\n64 59\n64 60\n64 61\n64 62\n64 63\n65 50\n65 51\n65 52\n65 53\n65 54\n65 55\n65 56\n65 57\n65 58\n65 59\n65 60\n65 61\n65 62\n65 63\n65 64\n66 50\n66 51\n66 52\n66 53\n66 54\n66 55\n66 56\n66 57\n66 58\n66 59\n66 60\n66 61\n66 62\n66 63\n66 64\n66 65\n67 50\n67 51\n67 52\n67 53\n67 54\n67 55\n67 56\n67 57\n67 58\n67 59\n67 60\n67 61\n67 62\n67 63\n67 64\n67 65\n67 66\n68 50\n68 51\n68 52\n68 53\n68 54\n68 55\n68 56\n68 57\n68 58\n68 59\n68 60\n68 61\n68 62\n68 63\n68 64\n68 65\n68 66\n68 67\n69 50\n69 51\n69 52\n69 53\n69 54\n69 55\n69 56\n69 57\n69 58\n69 59\n69 60\n69 61\n69 62\n69 63\n69 64\n69 65\n69 66\n69 67\n69 68\n70 50\n70 51\n70 52\n70 53\n70 54\n70 55\n70 56\n70 57\n70 58\n70 59\n70 60\n70 61\n70 62\n70 63\n70 64\n70 65\n70 66\n70 67\n70 68\n70 69\n71 50\n71 51\n71 52\n71 53\n71 54\n71 55\n71 56\n71 57\n71 58\n71 59\n71 60\n71 61\n71 62\n71 63\n71 64\n71 65\n71 66\n71 67\n71 68\n71 69\n71 70\n72 50\n72 51\n72 52\n72 53\n72 54\n72 55\n72 56\n72 57\n72 58\n72 59\n72 60\n72 61\n72 62\n72 63\n72 64\n72 65\n72 66\n72 67\n72 68\n72 69\n72 70\n72 71\n73 50\n73 51\n73 52\n73 53\n73 54\n73 55\n73 56\n73 57\n73 58\n73 59\n73 60\n73 61\n73 62\n73 63\n73 64\n73 65\n73 66\n73 67\n73 68\n73 69\n73 70\n73 71\n73 72\n74 50\n74 51\n74 52\n74 53\n74 54\n74 55\n74 56\n74 57\n74 58\n74 59\n74 60\n74 61\n74 62\n74 63\n74 64\n74 65\n74 66\n74 67\n74 68\n74 69\n74 70\n74 71\n74 72\n74 73\n75 50\n75 51\n75 52\n75 53\n75 54\n75 55\n75 56\n75 57\n75 58\n75 59\n75 60\n75 61\n75 62\n75 63\n75 64\n75 65\n75 66\n75 67\n75 68\n75 69\n75 70\n75 71\n75 72\n75 73\n75 74\n76 50\n76 51\n76 52\n76 53\n76 54\n76 55\n76 56\n76 57\n76 58\n76 59\n76 60\n76 61\n76 62\n76 63\n76 64\n76 65\n76 66\n76 67\n76 68\n76 69\n76 70\n76 71\n76 72\n76 73\n76 74\n76 75\n77 50\n77 51\n77 52\n77 53\n77 54\n77 55\n77 56\n77 57\n77 58\n77 59\n77 60\n77 61\n77 62\n77 63\n77 64\n77 65\n77 66\n77 67\n77 68\n77 69\n77 70\n77 71\n77 72\n77 73\n77 74\n77 75\n77 76\n78 50\n78 51\n78 52\n78 53\n78 54\n78 55\n78 56\n78 57\n78 58\n78 59\n78 60\n78 61\n78 62\n78 63\n78 64\n78 65\n78 66\n78 67\n78 68\n78 69\n78 70\n78 71\n78 72\n78 73\n78 74\n78 75\n78 76\n78 77\n79 50\n79 51\n79 52\n79 53\n79 54\n79 55\n79 56\n79 57\n79 58\n79 59\n79 60\n79 61\n79 62\n79 63\n79 64\n79 65\n79 66\n79 67\n79 68\n79 69\n79 70\n79 71\n79 72\n79 73\n79 74\n79 75\n79 76\n79 77\n79 78\n80 50\n80 51\n80 52\n80 53\n80 54\n80 55\n80 56\n80 57\n80 58\n80 59\n80 60\n80 61\n80 62\n80 63\n80 64\n80 65\n80 66\n80 67\n80 68\n80 69\n80 70\n80 71\n80 72\n80 73\n80 74\n80 75\n80 76\n80 77\n80 78\n80 79\n" }, { "input": "10 10 1 1\n", "output": "45\n2 1\n3 1\n3 2\n4 1\n4 2\n4 3\n5 1\n5 2\n5 3\n5 4\n6 1\n6 2\n6 3\n6 4\n6 5\n7 1\n7 2\n7 3\n7 4\n7 5\n7 6\n8 1\n8 2\n8 3\n8 4\n8 5\n8 6\n8 7\n9 1\n9 2\n9 3\n9 4\n9 5\n9 6\n9 7\n9 8\n10 1\n10 2\n10 3\n10 4\n10 5\n10 6\n10 7\n10 8\n10 9\n" }, { "input": "100 100 1 1\n", "output": "4950\n2 1\n3 1\n3 2\n4 1\n4 2\n4 3\n5 1\n5 2\n5 3\n5 4\n6 1\n6 2\n6 3\n6 4\n6 5\n7 1\n7 2\n7 3\n7 4\n7 5\n7 6\n8 1\n8 2\n8 3\n8 4\n8 5\n8 6\n8 7\n9 1\n9 2\n9 3\n9 4\n9 5\n9 6\n9 7\n9 8\n10 1\n10 2\n10 3\n10 4\n10 5\n10 6\n10 7\n10 8\n10 9\n11 1\n11 2\n11 3\n11 4\n11 5\n11 6\n11 7\n11 8\n11 9\n11 10\n12 1\n12 2\n12 3\n12 4\n12 5\n12 6\n12 7\n12 8\n12 9\n12 10\n12 11\n13 1\n13 2\n13 3\n13 4\n13 5\n13 6\n13 7\n13 8\n13 9\n13 10\n13 11\n13 12\n14 1\n14 2\n14 3\n14 4\n14 5\n14 6\n14 7\n14 8\n14 9\n14 10\n14 11\n14 12\n14 13\n15 1\n15 2\n15 3\n15 4\n15 5\n15 6\n15 7\n15 8\n15 9\n15 10\n15 11\n15 12\n15 13\n15 14\n16 1\n16 2\n16 3\n16 4\n16 5\n16 6\n16 7\n16 8\n16 9\n16 10\n16 11\n16 12\n16 13\n16 14\n16 15\n17 1\n17 2\n17 3\n17 4\n17 5\n17 6\n17 7\n17 8\n17 9\n17 10\n17 11\n17 12\n17 13\n17 14\n17 15\n17 16\n18 1\n18 2\n18 3\n18 4\n18 5\n18 6\n18 7\n18 8\n18 9\n18 10\n18 11\n18 12\n18 13\n18 14\n18 15\n18 16\n18 17\n19 1\n19 2\n19 3\n19 4\n19 5\n19 6\n19 7\n19 8\n19 9\n19 10\n19 11\n19 12\n19 13\n19 14\n19 15\n19 16\n19 17\n19 18\n20 1\n20 2\n20 3\n20 4\n20 5\n20 6\n20 7\n20 8\n20 9\n20 10\n20 11\n20 12\n20 13\n20 14\n20 15\n20 16\n20 17\n20 18\n20 19\n21 1\n21 2\n21 3\n21 4\n21 5\n21 6\n21 7\n21 8\n21 9\n21 10\n21 11\n21 12\n21 13\n21 14\n21 15\n21 16\n21 17\n21 18\n21 19\n21 20\n22 1\n22 2\n22 3\n22 4\n22 5\n22 6\n22 7\n22 8\n22 9\n22 10\n22 11\n22 12\n22 13\n22 14\n22 15\n22 16\n22 17\n22 18\n22 19\n22 20\n22 21\n23 1\n23 2\n23 3\n23 4\n23 5\n23 6\n23 7\n23 8\n23 9\n23 10\n23 11\n23 12\n23 13\n23 14\n23 15\n23 16\n23 17\n23 18\n23 19\n23 20\n23 21\n23 22\n24 1\n24 2\n24 3\n24 4\n24 5\n24 6\n24 7\n24 8\n24 9\n24 10\n24 11\n24 12\n24 13\n24 14\n24 15\n24 16\n24 17\n24 18\n24 19\n24 20\n24 21\n24 22\n24 23\n25 1\n25 2\n25 3\n25 4\n25 5\n25 6\n25 7\n25 8\n25 9\n25 10\n25 11\n25 12\n25 13\n25 14\n25 15\n25 16\n25 17\n25 18\n25 19\n25 20\n25 21\n25 22\n25 23\n25 24\n26 1\n26 2\n26 3\n26 4\n26 5\n26 6\n26 7\n26 8\n26 9\n26 10\n26 11\n26 12\n26 13\n26 14\n26 15\n26 16\n26 17\n26 18\n26 19\n26 20\n26 21\n26 22\n26 23\n26 24\n26 25\n27 1\n27 2\n27 3\n27 4\n27 5\n27 6\n27 7\n27 8\n27 9\n27 10\n27 11\n27 12\n27 13\n27 14\n27 15\n27 16\n27 17\n27 18\n27 19\n27 20\n27 21\n27 22\n27 23\n27 24\n27 25\n27 26\n28 1\n28 2\n28 3\n28 4\n28 5\n28 6\n28 7\n28 8\n28 9\n28 10\n28 11\n28 12\n28 13\n28 14\n28 15\n28 16\n28 17\n28 18\n28 19\n28 20\n28 21\n28 22\n28 23\n28 24\n28 25\n28 26\n28 27\n29 1\n29 2\n29 3\n29 4\n29 5\n29 6\n29 7\n29 8\n29 9\n29 10\n29 11\n29 12\n29 13\n29 14\n29 15\n29 16\n29 17\n29 18\n29 19\n29 20\n29 21\n29 22\n29 23\n29 24\n29 25\n29 26\n29 27\n29 28\n30 1\n30 2\n30 3\n30 4\n30 5\n30 6\n30 7\n30 8\n30 9\n30 10\n30 11\n30 12\n30 13\n30 14\n30 15\n30 16\n30 17\n30 18\n30 19\n30 20\n30 21\n30 22\n30 23\n30 24\n30 25\n30 26\n30 27\n30 28\n30 29\n31 1\n31 2\n31 3\n31 4\n31 5\n31 6\n31 7\n31 8\n31 9\n31 10\n31 11\n31 12\n31 13\n31 14\n31 15\n31 16\n31 17\n31 18\n31 19\n31 20\n31 21\n31 22\n31 23\n31 24\n31 25\n31 26\n31 27\n31 28\n31 29\n31 30\n32 1\n32 2\n32 3\n32 4\n32 5\n32 6\n32 7\n32 8\n32 9\n32 10\n32 11\n32 12\n32 13\n32 14\n32 15\n32 16\n32 17\n32 18\n32 19\n32 20\n32 21\n32 22\n32 23\n32 24\n32 25\n32 26\n32 27\n32 28\n32 29\n32 30\n32 31\n33 1\n33 2\n33 3\n33 4\n33 5\n33 6\n33 7\n33 8\n33 9\n33 10\n33 11\n33 12\n33 13\n33 14\n33 15\n33 16\n33 17\n33 18\n33 19\n33 20\n33 21\n33 22\n33 23\n33 24\n33 25\n33 26\n33 27\n33 28\n33 29\n33 30\n33 31\n33 32\n34 1\n34 2\n34 3\n34 4\n34 5\n34 6\n34 7\n34 8\n34 9\n34 10\n34 11\n34 12\n34 13\n34 14\n34 15\n34 16\n34 17\n34 18\n34 19\n34 20\n34 21\n34 22\n34 23\n34 24\n34 25\n34 26\n34 27\n34 28\n34 29\n34 30\n34 31\n34 32\n34 33\n35 1\n35 2\n35 3\n35 4\n35 5\n35 6\n35 7\n35 8\n35 9\n35 10\n35 11\n35 12\n35 13\n35 14\n35 15\n35 16\n35 17\n35 18\n35 19\n35 20\n35 21\n35 22\n35 23\n35 24\n35 25\n35 26\n35 27\n35 28\n35 29\n35 30\n35 31\n35 32\n35 33\n35 34\n36 1\n36 2\n36 3\n36 4\n36 5\n36 6\n36 7\n36 8\n36 9\n36 10\n36 11\n36 12\n36 13\n36 14\n36 15\n36 16\n36 17\n36 18\n36 19\n36 20\n36 21\n36 22\n36 23\n36 24\n36 25\n36 26\n36 27\n36 28\n36 29\n36 30\n36 31\n36 32\n36 33\n36 34\n36 35\n37 1\n37 2\n37 3\n37 4\n37 5\n37 6\n37 7\n37 8\n37 9\n37 10\n37 11\n37 12\n37 13\n37 14\n37 15\n37 16\n37 17\n37 18\n37 19\n37 20\n37 21\n37 22\n37 23\n37 24\n37 25\n37 26\n37 27\n37 28\n37 29\n37 30\n37 31\n37 32\n37 33\n37 34\n37 35\n37 36\n38 1\n38 2\n38 3\n38 4\n38 5\n38 6\n38 7\n38 8\n38 9\n38 10\n38 11\n38 12\n38 13\n38 14\n38 15\n38 16\n38 17\n38 18\n38 19\n38 20\n38 21\n38 22\n38 23\n38 24\n38 25\n38 26\n38 27\n38 28\n38 29\n38 30\n38 31\n38 32\n38 33\n38 34\n38 35\n38 36\n38 37\n39 1\n39 2\n39 3\n39 4\n39 5\n39 6\n39 7\n39 8\n39 9\n39 10\n39 11\n39 12\n39 13\n39 14\n39 15\n39 16\n39 17\n39 18\n39 19\n39 20\n39 21\n39 22\n39 23\n39 24\n39 25\n39 26\n39 27\n39 28\n39 29\n39 30\n39 31\n39 32\n39 33\n39 34\n39 35\n39 36\n39 37\n39 38\n40 1\n40 2\n40 3\n40 4\n40 5\n40 6\n40 7\n40 8\n40 9\n40 10\n40 11\n40 12\n40 13\n40 14\n40 15\n40 16\n40 17\n40 18\n40 19\n40 20\n40 21\n40 22\n40 23\n40 24\n40 25\n40 26\n40 27\n40 28\n40 29\n40 30\n40 31\n40 32\n40 33\n40 34\n40 35\n40 36\n40 37\n40 38\n40 39\n41 1\n41 2\n41 3\n41 4\n41 5\n41 6\n41 7\n41 8\n41 9\n41 10\n41 11\n41 12\n41 13\n41 14\n41 15\n41 16\n41 17\n41 18\n41 19\n41 20\n41 21\n41 22\n41 23\n41 24\n41 25\n41 26\n41 27\n41 28\n41 29\n41 30\n41 31\n41 32\n41 33\n41 34\n41 35\n41 36\n41 37\n41 38\n41 39\n41 40\n42 1\n42 2\n42 3\n42 4\n42 5\n42 6\n42 7\n42 8\n42 9\n42 10\n42 11\n42 12\n42 13\n42 14\n42 15\n42 16\n42 17\n42 18\n42 19\n42 20\n42 21\n42 22\n42 23\n42 24\n42 25\n42 26\n42 27\n42 28\n42 29\n42 30\n42 31\n42 32\n42 33\n42 34\n42 35\n42 36\n42 37\n42 38\n42 39\n42 40\n42 41\n43 1\n43 2\n43 3\n43 4\n43 5\n43 6\n43 7\n43 8\n43 9\n43 10\n43 11\n43 12\n43 13\n43 14\n43 15\n43 16\n43 17\n43 18\n43 19\n43 20\n43 21\n43 22\n43 23\n43 24\n43 25\n43 26\n43 27\n43 28\n43 29\n43 30\n43 31\n43 32\n43 33\n43 34\n43 35\n43 36\n43 37\n43 38\n43 39\n43 40\n43 41\n43 42\n44 1\n44 2\n44 3\n44 4\n44 5\n44 6\n44 7\n44 8\n44 9\n44 10\n44 11\n44 12\n44 13\n44 14\n44 15\n44 16\n44 17\n44 18\n44 19\n44 20\n44 21\n44 22\n44 23\n44 24\n44 25\n44 26\n44 27\n44 28\n44 29\n44 30\n44 31\n44 32\n44 33\n44 34\n44 35\n44 36\n44 37\n44 38\n44 39\n44 40\n44 41\n44 42\n44 43\n45 1\n45 2\n45 3\n45 4\n45 5\n45 6\n45 7\n45 8\n45 9\n45 10\n45 11\n45 12\n45 13\n45 14\n45 15\n45 16\n45 17\n45 18\n45 19\n45 20\n45 21\n45 22\n45 23\n45 24\n45 25\n45 26\n45 27\n45 28\n45 29\n45 30\n45 31\n45 32\n45 33\n45 34\n45 35\n45 36\n45 37\n45 38\n45 39\n45 40\n45 41\n45 42\n45 43\n45 44\n46 1\n46 2\n46 3\n46 4\n46 5\n46 6\n46 7\n46 8\n46 9\n46 10\n46 11\n46 12\n46 13\n46 14\n46 15\n46 16\n46 17\n46 18\n46 19\n46 20\n46 21\n46 22\n46 23\n46 24\n46 25\n46 26\n46 27\n46 28\n46 29\n46 30\n46 31\n46 32\n46 33\n46 34\n46 35\n46 36\n46 37\n46 38\n46 39\n46 40\n46 41\n46 42\n46 43\n46 44\n46 45\n47 1\n47 2\n47 3\n47 4\n47 5\n47 6\n47 7\n47 8\n47 9\n47 10\n47 11\n47 12\n47 13\n47 14\n47 15\n47 16\n47 17\n47 18\n47 19\n47 20\n47 21\n47 22\n47 23\n47 24\n47 25\n47 26\n47 27\n47 28\n47 29\n47 30\n47 31\n47 32\n47 33\n47 34\n47 35\n47 36\n47 37\n47 38\n47 39\n47 40\n47 41\n47 42\n47 43\n47 44\n47 45\n47 46\n48 1\n48 2\n48 3\n48 4\n48 5\n48 6\n48 7\n48 8\n48 9\n48 10\n48 11\n48 12\n48 13\n48 14\n48 15\n48 16\n48 17\n48 18\n48 19\n48 20\n48 21\n48 22\n48 23\n48 24\n48 25\n48 26\n48 27\n48 28\n48 29\n48 30\n48 31\n48 32\n48 33\n48 34\n48 35\n48 36\n48 37\n48 38\n48 39\n48 40\n48 41\n48 42\n48 43\n48 44\n48 45\n48 46\n48 47\n49 1\n49 2\n49 3\n49 4\n49 5\n49 6\n49 7\n49 8\n49 9\n49 10\n49 11\n49 12\n49 13\n49 14\n49 15\n49 16\n49 17\n49 18\n49 19\n49 20\n49 21\n49 22\n49 23\n49 24\n49 25\n49 26\n49 27\n49 28\n49 29\n49 30\n49 31\n49 32\n49 33\n49 34\n49 35\n49 36\n49 37\n49 38\n49 39\n49 40\n49 41\n49 42\n49 43\n49 44\n49 45\n49 46\n49 47\n49 48\n50 1\n50 2\n50 3\n50 4\n50 5\n50 6\n50 7\n50 8\n50 9\n50 10\n50 11\n50 12\n50 13\n50 14\n50 15\n50 16\n50 17\n50 18\n50 19\n50 20\n50 21\n50 22\n50 23\n50 24\n50 25\n50 26\n50 27\n50 28\n50 29\n50 30\n50 31\n50 32\n50 33\n50 34\n50 35\n50 36\n50 37\n50 38\n50 39\n50 40\n50 41\n50 42\n50 43\n50 44\n50 45\n50 46\n50 47\n50 48\n50 49\n51 1\n51 2\n51 3\n51 4\n51 5\n51 6\n51 7\n51 8\n51 9\n51 10\n51 11\n51 12\n51 13\n51 14\n51 15\n51 16\n51 17\n51 18\n51 19\n51 20\n51 21\n51 22\n51 23\n51 24\n51 25\n51 26\n51 27\n51 28\n51 29\n51 30\n51 31\n51 32\n51 33\n51 34\n51 35\n51 36\n51 37\n51 38\n51 39\n51 40\n51 41\n51 42\n51 43\n51 44\n51 45\n51 46\n51 47\n51 48\n51 49\n51 50\n52 1\n52 2\n52 3\n52 4\n52 5\n52 6\n52 7\n52 8\n52 9\n52 10\n52 11\n52 12\n52 13\n52 14\n52 15\n52 16\n52 17\n52 18\n52 19\n52 20\n52 21\n52 22\n52 23\n52 24\n52 25\n52 26\n52 27\n52 28\n52 29\n52 30\n52 31\n52 32\n52 33\n52 34\n52 35\n52 36\n52 37\n52 38\n52 39\n52 40\n52 41\n52 42\n52 43\n52 44\n52 45\n52 46\n52 47\n52 48\n52 49\n52 50\n52 51\n53 1\n53 2\n53 3\n53 4\n53 5\n53 6\n53 7\n53 8\n53 9\n53 10\n53 11\n53 12\n53 13\n53 14\n53 15\n53 16\n53 17\n53 18\n53 19\n53 20\n53 21\n53 22\n53 23\n53 24\n53 25\n53 26\n53 27\n53 28\n53 29\n53 30\n53 31\n53 32\n53 33\n53 34\n53 35\n53 36\n53 37\n53 38\n53 39\n53 40\n53 41\n53 42\n53 43\n53 44\n53 45\n53 46\n53 47\n53 48\n53 49\n53 50\n53 51\n53 52\n54 1\n54 2\n54 3\n54 4\n54 5\n54 6\n54 7\n54 8\n54 9\n54 10\n54 11\n54 12\n54 13\n54 14\n54 15\n54 16\n54 17\n54 18\n54 19\n54 20\n54 21\n54 22\n54 23\n54 24\n54 25\n54 26\n54 27\n54 28\n54 29\n54 30\n54 31\n54 32\n54 33\n54 34\n54 35\n54 36\n54 37\n54 38\n54 39\n54 40\n54 41\n54 42\n54 43\n54 44\n54 45\n54 46\n54 47\n54 48\n54 49\n54 50\n54 51\n54 52\n54 53\n55 1\n55 2\n55 3\n55 4\n55 5\n55 6\n55 7\n55 8\n55 9\n55 10\n55 11\n55 12\n55 13\n55 14\n55 15\n55 16\n55 17\n55 18\n55 19\n55 20\n55 21\n55 22\n55 23\n55 24\n55 25\n55 26\n55 27\n55 28\n55 29\n55 30\n55 31\n55 32\n55 33\n55 34\n55 35\n55 36\n55 37\n55 38\n55 39\n55 40\n55 41\n55 42\n55 43\n55 44\n55 45\n55 46\n55 47\n55 48\n55 49\n55 50\n55 51\n55 52\n55 53\n55 54\n56 1\n56 2\n56 3\n56 4\n56 5\n56 6\n56 7\n56 8\n56 9\n56 10\n56 11\n56 12\n56 13\n56 14\n56 15\n56 16\n56 17\n56 18\n56 19\n56 20\n56 21\n56 22\n56 23\n56 24\n56 25\n56 26\n56 27\n56 28\n56 29\n56 30\n56 31\n56 32\n56 33\n56 34\n56 35\n56 36\n56 37\n56 38\n56 39\n56 40\n56 41\n56 42\n56 43\n56 44\n56 45\n56 46\n56 47\n56 48\n56 49\n56 50\n56 51\n56 52\n56 53\n56 54\n56 55\n57 1\n57 2\n57 3\n57 4\n57 5\n57 6\n57 7\n57 8\n57 9\n57 10\n57 11\n57 12\n57 13\n57 14\n57 15\n57 16\n57 17\n57 18\n57 19\n57 20\n57 21\n57 22\n57 23\n57 24\n57 25\n57 26\n57 27\n57 28\n57 29\n57 30\n57 31\n57 32\n57 33\n57 34\n57 35\n57 36\n57 37\n57 38\n57 39\n57 40\n57 41\n57 42\n57 43\n57 44\n57 45\n57 46\n57 47\n57 48\n57 49\n57 50\n57 51\n57 52\n57 53\n57 54\n57 55\n57 56\n58 1\n58 2\n58 3\n58 4\n58 5\n58 6\n58 7\n58 8\n58 9\n58 10\n58 11\n58 12\n58 13\n58 14\n58 15\n58 16\n58 17\n58 18\n58 19\n58 20\n58 21\n58 22\n58 23\n58 24\n58 25\n58 26\n58 27\n58 28\n58 29\n58 30\n58 31\n58 32\n58 33\n58 34\n58 35\n58 36\n58 37\n58 38\n58 39\n58 40\n58 41\n58 42\n58 43\n58 44\n58 45\n58 46\n58 47\n58 48\n58 49\n58 50\n58 51\n58 52\n58 53\n58 54\n58 55\n58 56\n58 57\n59 1\n59 2\n59 3\n59 4\n59 5\n59 6\n59 7\n59 8\n59 9\n59 10\n59 11\n59 12\n59 13\n59 14\n59 15\n59 16\n59 17\n59 18\n59 19\n59 20\n59 21\n59 22\n59 23\n59 24\n59 25\n59 26\n59 27\n59 28\n59 29\n59 30\n59 31\n59 32\n59 33\n59 34\n59 35\n59 36\n59 37\n59 38\n59 39\n59 40\n59 41\n59 42\n59 43\n59 44\n59 45\n59 46\n59 47\n59 48\n59 49\n59 50\n59 51\n59 52\n59 53\n59 54\n59 55\n59 56\n59 57\n59 58\n60 1\n60 2\n60 3\n60 4\n60 5\n60 6\n60 7\n60 8\n60 9\n60 10\n60 11\n60 12\n60 13\n60 14\n60 15\n60 16\n60 17\n60 18\n60 19\n60 20\n60 21\n60 22\n60 23\n60 24\n60 25\n60 26\n60 27\n60 28\n60 29\n60 30\n60 31\n60 32\n60 33\n60 34\n60 35\n60 36\n60 37\n60 38\n60 39\n60 40\n60 41\n60 42\n60 43\n60 44\n60 45\n60 46\n60 47\n60 48\n60 49\n60 50\n60 51\n60 52\n60 53\n60 54\n60 55\n60 56\n60 57\n60 58\n60 59\n61 1\n61 2\n61 3\n61 4\n61 5\n61 6\n61 7\n61 8\n61 9\n61 10\n61 11\n61 12\n61 13\n61 14\n61 15\n61 16\n61 17\n61 18\n61 19\n61 20\n61 21\n61 22\n61 23\n61 24\n61 25\n61 26\n61 27\n61 28\n61 29\n61 30\n61 31\n61 32\n61 33\n61 34\n61 35\n61 36\n61 37\n61 38\n61 39\n61 40\n61 41\n61 42\n61 43\n61 44\n61 45\n61 46\n61 47\n61 48\n61 49\n61 50\n61 51\n61 52\n61 53\n61 54\n61 55\n61 56\n61 57\n61 58\n61 59\n61 60\n62 1\n62 2\n62 3\n62 4\n62 5\n62 6\n62 7\n62 8\n62 9\n62 10\n62 11\n62 12\n62 13\n62 14\n62 15\n62 16\n62 17\n62 18\n62 19\n62 20\n62 21\n62 22\n62 23\n62 24\n62 25\n62 26\n62 27\n62 28\n62 29\n62 30\n62 31\n62 32\n62 33\n62 34\n62 35\n62 36\n62 37\n62 38\n62 39\n62 40\n62 41\n62 42\n62 43\n62 44\n62 45\n62 46\n62 47\n62 48\n62 49\n62 50\n62 51\n62 52\n62 53\n62 54\n62 55\n62 56\n62 57\n62 58\n62 59\n62 60\n62 61\n63 1\n63 2\n63 3\n63 4\n63 5\n63 6\n63 7\n63 8\n63 9\n63 10\n63 11\n63 12\n63 13\n63 14\n63 15\n63 16\n63 17\n63 18\n63 19\n63 20\n63 21\n63 22\n63 23\n63 24\n63 25\n63 26\n63 27\n63 28\n63 29\n63 30\n63 31\n63 32\n63 33\n63 34\n63 35\n63 36\n63 37\n63 38\n63 39\n63 40\n63 41\n63 42\n63 43\n63 44\n63 45\n63 46\n63 47\n63 48\n63 49\n63 50\n63 51\n63 52\n63 53\n63 54\n63 55\n63 56\n63 57\n63 58\n63 59\n63 60\n63 61\n63 62\n64 1\n64 2\n64 3\n64 4\n64 5\n64 6\n64 7\n64 8\n64 9\n64 10\n64 11\n64 12\n64 13\n64 14\n64 15\n64 16\n64 17\n64 18\n64 19\n64 20\n64 21\n64 22\n64 23\n64 24\n64 25\n64 26\n64 27\n64 28\n64 29\n64 30\n64 31\n64 32\n64 33\n64 34\n64 35\n64 36\n64 37\n64 38\n64 39\n64 40\n64 41\n64 42\n64 43\n64 44\n64 45\n64 46\n64 47\n64 48\n64 49\n64 50\n64 51\n64 52\n64 53\n64 54\n64 55\n64 56\n64 57\n64 58\n64 59\n64 60\n64 61\n64 62\n64 63\n65 1\n65 2\n65 3\n65 4\n65 5\n65 6\n65 7\n65 8\n65 9\n65 10\n65 11\n65 12\n65 13\n65 14\n65 15\n65 16\n65 17\n65 18\n65 19\n65 20\n65 21\n65 22\n65 23\n65 24\n65 25\n65 26\n65 27\n65 28\n65 29\n65 30\n65 31\n65 32\n65 33\n65 34\n65 35\n65 36\n65 37\n65 38\n65 39\n65 40\n65 41\n65 42\n65 43\n65 44\n65 45\n65 46\n65 47\n65 48\n65 49\n65 50\n65 51\n65 52\n65 53\n65 54\n65 55\n65 56\n65 57\n65 58\n65 59\n65 60\n65 61\n65 62\n65 63\n65 64\n66 1\n66 2\n66 3\n66 4\n66 5\n66 6\n66 7\n66 8\n66 9\n66 10\n66 11\n66 12\n66 13\n66 14\n66 15\n66 16\n66 17\n66 18\n66 19\n66 20\n66 21\n66 22\n66 23\n66 24\n66 25\n66 26\n66 27\n66 28\n66 29\n66 30\n66 31\n66 32\n66 33\n66 34\n66 35\n66 36\n66 37\n66 38\n66 39\n66 40\n66 41\n66 42\n66 43\n66 44\n66 45\n66 46\n66 47\n66 48\n66 49\n66 50\n66 51\n66 52\n66 53\n66 54\n66 55\n66 56\n66 57\n66 58\n66 59\n66 60\n66 61\n66 62\n66 63\n66 64\n66 65\n67 1\n67 2\n67 3\n67 4\n67 5\n67 6\n67 7\n67 8\n67 9\n67 10\n67 11\n67 12\n67 13\n67 14\n67 15\n67 16\n67 17\n67 18\n67 19\n67 20\n67 21\n67 22\n67 23\n67 24\n67 25\n67 26\n67 27\n67 28\n67 29\n67 30\n67 31\n67 32\n67 33\n67 34\n67 35\n67 36\n67 37\n67 38\n67 39\n67 40\n67 41\n67 42\n67 43\n67 44\n67 45\n67 46\n67 47\n67 48\n67 49\n67 50\n67 51\n67 52\n67 53\n67 54\n67 55\n67 56\n67 57\n67 58\n67 59\n67 60\n67 61\n67 62\n67 63\n67 64\n67 65\n67 66\n68 1\n68 2\n68 3\n68 4\n68 5\n68 6\n68 7\n68 8\n68 9\n68 10\n68 11\n68 12\n68 13\n68 14\n68 15\n68 16\n68 17\n68 18\n68 19\n68 20\n68 21\n68 22\n68 23\n68 24\n68 25\n68 26\n68 27\n68 28\n68 29\n68 30\n68 31\n68 32\n68 33\n68 34\n68 35\n68 36\n68 37\n68 38\n68 39\n68 40\n68 41\n68 42\n68 43\n68 44\n68 45\n68 46\n68 47\n68 48\n68 49\n68 50\n68 51\n68 52\n68 53\n68 54\n68 55\n68 56\n68 57\n68 58\n68 59\n68 60\n68 61\n68 62\n68 63\n68 64\n68 65\n68 66\n68 67\n69 1\n69 2\n69 3\n69 4\n69 5\n69 6\n69 7\n69 8\n69 9\n69 10\n69 11\n69 12\n69 13\n69 14\n69 15\n69 16\n69 17\n69 18\n69 19\n69 20\n69 21\n69 22\n69 23\n69 24\n69 25\n69 26\n69 27\n69 28\n69 29\n69 30\n69 31\n69 32\n69 33\n69 34\n69 35\n69 36\n69 37\n69 38\n69 39\n69 40\n69 41\n69 42\n69 43\n69 44\n69 45\n69 46\n69 47\n69 48\n69 49\n69 50\n69 51\n69 52\n69 53\n69 54\n69 55\n69 56\n69 57\n69 58\n69 59\n69 60\n69 61\n69 62\n69 63\n69 64\n69 65\n69 66\n69 67\n69 68\n70 1\n70 2\n70 3\n70 4\n70 5\n70 6\n70 7\n70 8\n70 9\n70 10\n70 11\n70 12\n70 13\n70 14\n70 15\n70 16\n70 17\n70 18\n70 19\n70 20\n70 21\n70 22\n70 23\n70 24\n70 25\n70 26\n70 27\n70 28\n70 29\n70 30\n70 31\n70 32\n70 33\n70 34\n70 35\n70 36\n70 37\n70 38\n70 39\n70 40\n70 41\n70 42\n70 43\n70 44\n70 45\n70 46\n70 47\n70 48\n70 49\n70 50\n70 51\n70 52\n70 53\n70 54\n70 55\n70 56\n70 57\n70 58\n70 59\n70 60\n70 61\n70 62\n70 63\n70 64\n70 65\n70 66\n70 67\n70 68\n70 69\n71 1\n71 2\n71 3\n71 4\n71 5\n71 6\n71 7\n71 8\n71 9\n71 10\n71 11\n71 12\n71 13\n71 14\n71 15\n71 16\n71 17\n71 18\n71 19\n71 20\n71 21\n71 22\n71 23\n71 24\n71 25\n71 26\n71 27\n71 28\n71 29\n71 30\n71 31\n71 32\n71 33\n71 34\n71 35\n71 36\n71 37\n71 38\n71 39\n71 40\n71 41\n71 42\n71 43\n71 44\n71 45\n71 46\n71 47\n71 48\n71 49\n71 50\n71 51\n71 52\n71 53\n71 54\n71 55\n71 56\n71 57\n71 58\n71 59\n71 60\n71 61\n71 62\n71 63\n71 64\n71 65\n71 66\n71 67\n71 68\n71 69\n71 70\n72 1\n72 2\n72 3\n72 4\n72 5\n72 6\n72 7\n72 8\n72 9\n72 10\n72 11\n72 12\n72 13\n72 14\n72 15\n72 16\n72 17\n72 18\n72 19\n72 20\n72 21\n72 22\n72 23\n72 24\n72 25\n72 26\n72 27\n72 28\n72 29\n72 30\n72 31\n72 32\n72 33\n72 34\n72 35\n72 36\n72 37\n72 38\n72 39\n72 40\n72 41\n72 42\n72 43\n72 44\n72 45\n72 46\n72 47\n72 48\n72 49\n72 50\n72 51\n72 52\n72 53\n72 54\n72 55\n72 56\n72 57\n72 58\n72 59\n72 60\n72 61\n72 62\n72 63\n72 64\n72 65\n72 66\n72 67\n72 68\n72 69\n72 70\n72 71\n73 1\n73 2\n73 3\n73 4\n73 5\n73 6\n73 7\n73 8\n73 9\n73 10\n73 11\n73 12\n73 13\n73 14\n73 15\n73 16\n73 17\n73 18\n73 19\n73 20\n73 21\n73 22\n73 23\n73 24\n73 25\n73 26\n73 27\n73 28\n73 29\n73 30\n73 31\n73 32\n73 33\n73 34\n73 35\n73 36\n73 37\n73 38\n73 39\n73 40\n73 41\n73 42\n73 43\n73 44\n73 45\n73 46\n73 47\n73 48\n73 49\n73 50\n73 51\n73 52\n73 53\n73 54\n73 55\n73 56\n73 57\n73 58\n73 59\n73 60\n73 61\n73 62\n73 63\n73 64\n73 65\n73 66\n73 67\n73 68\n73 69\n73 70\n73 71\n73 72\n74 1\n74 2\n74 3\n74 4\n74 5\n74 6\n74 7\n74 8\n74 9\n74 10\n74 11\n74 12\n74 13\n74 14\n74 15\n74 16\n74 17\n74 18\n74 19\n74 20\n74 21\n74 22\n74 23\n74 24\n74 25\n74 26\n74 27\n74 28\n74 29\n74 30\n74 31\n74 32\n74 33\n74 34\n74 35\n74 36\n74 37\n74 38\n74 39\n74 40\n74 41\n74 42\n74 43\n74 44\n74 45\n74 46\n74 47\n74 48\n74 49\n74 50\n74 51\n74 52\n74 53\n74 54\n74 55\n74 56\n74 57\n74 58\n74 59\n74 60\n74 61\n74 62\n74 63\n74 64\n74 65\n74 66\n74 67\n74 68\n74 69\n74 70\n74 71\n74 72\n74 73\n75 1\n75 2\n75 3\n75 4\n75 5\n75 6\n75 7\n75 8\n75 9\n75 10\n75 11\n75 12\n75 13\n75 14\n75 15\n75 16\n75 17\n75 18\n75 19\n75 20\n75 21\n75 22\n75 23\n75 24\n75 25\n75 26\n75 27\n75 28\n75 29\n75 30\n75 31\n75 32\n75 33\n75 34\n75 35\n75 36\n75 37\n75 38\n75 39\n75 40\n75 41\n75 42\n75 43\n75 44\n75 45\n75 46\n75 47\n75 48\n75 49\n75 50\n75 51\n75 52\n75 53\n75 54\n75 55\n75 56\n75 57\n75 58\n75 59\n75 60\n75 61\n75 62\n75 63\n75 64\n75 65\n75 66\n75 67\n75 68\n75 69\n75 70\n75 71\n75 72\n75 73\n75 74\n76 1\n76 2\n76 3\n76 4\n76 5\n76 6\n76 7\n76 8\n76 9\n76 10\n76 11\n76 12\n76 13\n76 14\n76 15\n76 16\n76 17\n76 18\n76 19\n76 20\n76 21\n76 22\n76 23\n76 24\n76 25\n76 26\n76 27\n76 28\n76 29\n76 30\n76 31\n76 32\n76 33\n76 34\n76 35\n76 36\n76 37\n76 38\n76 39\n76 40\n76 41\n76 42\n76 43\n76 44\n76 45\n76 46\n76 47\n76 48\n76 49\n76 50\n76 51\n76 52\n76 53\n76 54\n76 55\n76 56\n76 57\n76 58\n76 59\n76 60\n76 61\n76 62\n76 63\n76 64\n76 65\n76 66\n76 67\n76 68\n76 69\n76 70\n76 71\n76 72\n76 73\n76 74\n76 75\n77 1\n77 2\n77 3\n77 4\n77 5\n77 6\n77 7\n77 8\n77 9\n77 10\n77 11\n77 12\n77 13\n77 14\n77 15\n77 16\n77 17\n77 18\n77 19\n77 20\n77 21\n77 22\n77 23\n77 24\n77 25\n77 26\n77 27\n77 28\n77 29\n77 30\n77 31\n77 32\n77 33\n77 34\n77 35\n77 36\n77 37\n77 38\n77 39\n77 40\n77 41\n77 42\n77 43\n77 44\n77 45\n77 46\n77 47\n77 48\n77 49\n77 50\n77 51\n77 52\n77 53\n77 54\n77 55\n77 56\n77 57\n77 58\n77 59\n77 60\n77 61\n77 62\n77 63\n77 64\n77 65\n77 66\n77 67\n77 68\n77 69\n77 70\n77 71\n77 72\n77 73\n77 74\n77 75\n77 76\n78 1\n78 2\n78 3\n78 4\n78 5\n78 6\n78 7\n78 8\n78 9\n78 10\n78 11\n78 12\n78 13\n78 14\n78 15\n78 16\n78 17\n78 18\n78 19\n78 20\n78 21\n78 22\n78 23\n78 24\n78 25\n78 26\n78 27\n78 28\n78 29\n78 30\n78 31\n78 32\n78 33\n78 34\n78 35\n78 36\n78 37\n78 38\n78 39\n78 40\n78 41\n78 42\n78 43\n78 44\n78 45\n78 46\n78 47\n78 48\n78 49\n78 50\n78 51\n78 52\n78 53\n78 54\n78 55\n78 56\n78 57\n78 58\n78 59\n78 60\n78 61\n78 62\n78 63\n78 64\n78 65\n78 66\n78 67\n78 68\n78 69\n78 70\n78 71\n78 72\n78 73\n78 74\n78 75\n78 76\n78 77\n79 1\n79 2\n79 3\n79 4\n79 5\n79 6\n79 7\n79 8\n79 9\n79 10\n79 11\n79 12\n79 13\n79 14\n79 15\n79 16\n79 17\n79 18\n79 19\n79 20\n79 21\n79 22\n79 23\n79 24\n79 25\n79 26\n79 27\n79 28\n79 29\n79 30\n79 31\n79 32\n79 33\n79 34\n79 35\n79 36\n79 37\n79 38\n79 39\n79 40\n79 41\n79 42\n79 43\n79 44\n79 45\n79 46\n79 47\n79 48\n79 49\n79 50\n79 51\n79 52\n79 53\n79 54\n79 55\n79 56\n79 57\n79 58\n79 59\n79 60\n79 61\n79 62\n79 63\n79 64\n79 65\n79 66\n79 67\n79 68\n79 69\n79 70\n79 71\n79 72\n79 73\n79 74\n79 75\n79 76\n79 77\n79 78\n80 1\n80 2\n80 3\n80 4\n80 5\n80 6\n80 7\n80 8\n80 9\n80 10\n80 11\n80 12\n80 13\n80 14\n80 15\n80 16\n80 17\n80 18\n80 19\n80 20\n80 21\n80 22\n80 23\n80 24\n80 25\n80 26\n80 27\n80 28\n80 29\n80 30\n80 31\n80 32\n80 33\n80 34\n80 35\n80 36\n80 37\n80 38\n80 39\n80 40\n80 41\n80 42\n80 43\n80 44\n80 45\n80 46\n80 47\n80 48\n80 49\n80 50\n80 51\n80 52\n80 53\n80 54\n80 55\n80 56\n80 57\n80 58\n80 59\n80 60\n80 61\n80 62\n80 63\n80 64\n80 65\n80 66\n80 67\n80 68\n80 69\n80 70\n80 71\n80 72\n80 73\n80 74\n80 75\n80 76\n80 77\n80 78\n80 79\n81 1\n81 2\n81 3\n81 4\n81 5\n81 6\n81 7\n81 8\n81 9\n81 10\n81 11\n81 12\n81 13\n81 14\n81 15\n81 16\n81 17\n81 18\n81 19\n81 20\n81 21\n81 22\n81 23\n81 24\n81 25\n81 26\n81 27\n81 28\n81 29\n81 30\n81 31\n81 32\n81 33\n81 34\n81 35\n81 36\n81 37\n81 38\n81 39\n81 40\n81 41\n81 42\n81 43\n81 44\n81 45\n81 46\n81 47\n81 48\n81 49\n81 50\n81 51\n81 52\n81 53\n81 54\n81 55\n81 56\n81 57\n81 58\n81 59\n81 60\n81 61\n81 62\n81 63\n81 64\n81 65\n81 66\n81 67\n81 68\n81 69\n81 70\n81 71\n81 72\n81 73\n81 74\n81 75\n81 76\n81 77\n81 78\n81 79\n81 80\n82 1\n82 2\n82 3\n82 4\n82 5\n82 6\n82 7\n82 8\n82 9\n82 10\n82 11\n82 12\n82 13\n82 14\n82 15\n82 16\n82 17\n82 18\n82 19\n82 20\n82 21\n82 22\n82 23\n82 24\n82 25\n82 26\n82 27\n82 28\n82 29\n82 30\n82 31\n82 32\n82 33\n82 34\n82 35\n82 36\n82 37\n82 38\n82 39\n82 40\n82 41\n82 42\n82 43\n82 44\n82 45\n82 46\n82 47\n82 48\n82 49\n82 50\n82 51\n82 52\n82 53\n82 54\n82 55\n82 56\n82 57\n82 58\n82 59\n82 60\n82 61\n82 62\n82 63\n82 64\n82 65\n82 66\n82 67\n82 68\n82 69\n82 70\n82 71\n82 72\n82 73\n82 74\n82 75\n82 76\n82 77\n82 78\n82 79\n82 80\n82 81\n83 1\n83 2\n83 3\n83 4\n83 5\n83 6\n83 7\n83 8\n83 9\n83 10\n83 11\n83 12\n83 13\n83 14\n83 15\n83 16\n83 17\n83 18\n83 19\n83 20\n83 21\n83 22\n83 23\n83 24\n83 25\n83 26\n83 27\n83 28\n83 29\n83 30\n83 31\n83 32\n83 33\n83 34\n83 35\n83 36\n83 37\n83 38\n83 39\n83 40\n83 41\n83 42\n83 43\n83 44\n83 45\n83 46\n83 47\n83 48\n83 49\n83 50\n83 51\n83 52\n83 53\n83 54\n83 55\n83 56\n83 57\n83 58\n83 59\n83 60\n83 61\n83 62\n83 63\n83 64\n83 65\n83 66\n83 67\n83 68\n83 69\n83 70\n83 71\n83 72\n83 73\n83 74\n83 75\n83 76\n83 77\n83 78\n83 79\n83 80\n83 81\n83 82\n84 1\n84 2\n84 3\n84 4\n84 5\n84 6\n84 7\n84 8\n84 9\n84 10\n84 11\n84 12\n84 13\n84 14\n84 15\n84 16\n84 17\n84 18\n84 19\n84 20\n84 21\n84 22\n84 23\n84 24\n84 25\n84 26\n84 27\n84 28\n84 29\n84 30\n84 31\n84 32\n84 33\n84 34\n84 35\n84 36\n84 37\n84 38\n84 39\n84 40\n84 41\n84 42\n84 43\n84 44\n84 45\n84 46\n84 47\n84 48\n84 49\n84 50\n84 51\n84 52\n84 53\n84 54\n84 55\n84 56\n84 57\n84 58\n84 59\n84 60\n84 61\n84 62\n84 63\n84 64\n84 65\n84 66\n84 67\n84 68\n84 69\n84 70\n84 71\n84 72\n84 73\n84 74\n84 75\n84 76\n84 77\n84 78\n84 79\n84 80\n84 81\n84 82\n84 83\n85 1\n85 2\n85 3\n85 4\n85 5\n85 6\n85 7\n85 8\n85 9\n85 10\n85 11\n85 12\n85 13\n85 14\n85 15\n85 16\n85 17\n85 18\n85 19\n85 20\n85 21\n85 22\n85 23\n85 24\n85 25\n85 26\n85 27\n85 28\n85 29\n85 30\n85 31\n85 32\n85 33\n85 34\n85 35\n85 36\n85 37\n85 38\n85 39\n85 40\n85 41\n85 42\n85 43\n85 44\n85 45\n85 46\n85 47\n85 48\n85 49\n85 50\n85 51\n85 52\n85 53\n85 54\n85 55\n85 56\n85 57\n85 58\n85 59\n85 60\n85 61\n85 62\n85 63\n85 64\n85 65\n85 66\n85 67\n85 68\n85 69\n85 70\n85 71\n85 72\n85 73\n85 74\n85 75\n85 76\n85 77\n85 78\n85 79\n85 80\n85 81\n85 82\n85 83\n85 84\n86 1\n86 2\n86 3\n86 4\n86 5\n86 6\n86 7\n86 8\n86 9\n86 10\n86 11\n86 12\n86 13\n86 14\n86 15\n86 16\n86 17\n86 18\n86 19\n86 20\n86 21\n86 22\n86 23\n86 24\n86 25\n86 26\n86 27\n86 28\n86 29\n86 30\n86 31\n86 32\n86 33\n86 34\n86 35\n86 36\n86 37\n86 38\n86 39\n86 40\n86 41\n86 42\n86 43\n86 44\n86 45\n86 46\n86 47\n86 48\n86 49\n86 50\n86 51\n86 52\n86 53\n86 54\n86 55\n86 56\n86 57\n86 58\n86 59\n86 60\n86 61\n86 62\n86 63\n86 64\n86 65\n86 66\n86 67\n86 68\n86 69\n86 70\n86 71\n86 72\n86 73\n86 74\n86 75\n86 76\n86 77\n86 78\n86 79\n86 80\n86 81\n86 82\n86 83\n86 84\n86 85\n87 1\n87 2\n87 3\n87 4\n87 5\n87 6\n87 7\n87 8\n87 9\n87 10\n87 11\n87 12\n87 13\n87 14\n87 15\n87 16\n87 17\n87 18\n87 19\n87 20\n87 21\n87 22\n87 23\n87 24\n87 25\n87 26\n87 27\n87 28\n87 29\n87 30\n87 31\n87 32\n87 33\n87 34\n87 35\n87 36\n87 37\n87 38\n87 39\n87 40\n87 41\n87 42\n87 43\n87 44\n87 45\n87 46\n87 47\n87 48\n87 49\n87 50\n87 51\n87 52\n87 53\n87 54\n87 55\n87 56\n87 57\n87 58\n87 59\n87 60\n87 61\n87 62\n87 63\n87 64\n87 65\n87 66\n87 67\n87 68\n87 69\n87 70\n87 71\n87 72\n87 73\n87 74\n87 75\n87 76\n87 77\n87 78\n87 79\n87 80\n87 81\n87 82\n87 83\n87 84\n87 85\n87 86\n88 1\n88 2\n88 3\n88 4\n88 5\n88 6\n88 7\n88 8\n88 9\n88 10\n88 11\n88 12\n88 13\n88 14\n88 15\n88 16\n88 17\n88 18\n88 19\n88 20\n88 21\n88 22\n88 23\n88 24\n88 25\n88 26\n88 27\n88 28\n88 29\n88 30\n88 31\n88 32\n88 33\n88 34\n88 35\n88 36\n88 37\n88 38\n88 39\n88 40\n88 41\n88 42\n88 43\n88 44\n88 45\n88 46\n88 47\n88 48\n88 49\n88 50\n88 51\n88 52\n88 53\n88 54\n88 55\n88 56\n88 57\n88 58\n88 59\n88 60\n88 61\n88 62\n88 63\n88 64\n88 65\n88 66\n88 67\n88 68\n88 69\n88 70\n88 71\n88 72\n88 73\n88 74\n88 75\n88 76\n88 77\n88 78\n88 79\n88 80\n88 81\n88 82\n88 83\n88 84\n88 85\n88 86\n88 87\n89 1\n89 2\n89 3\n89 4\n89 5\n89 6\n89 7\n89 8\n89 9\n89 10\n89 11\n89 12\n89 13\n89 14\n89 15\n89 16\n89 17\n89 18\n89 19\n89 20\n89 21\n89 22\n89 23\n89 24\n89 25\n89 26\n89 27\n89 28\n89 29\n89 30\n89 31\n89 32\n89 33\n89 34\n89 35\n89 36\n89 37\n89 38\n89 39\n89 40\n89 41\n89 42\n89 43\n89 44\n89 45\n89 46\n89 47\n89 48\n89 49\n89 50\n89 51\n89 52\n89 53\n89 54\n89 55\n89 56\n89 57\n89 58\n89 59\n89 60\n89 61\n89 62\n89 63\n89 64\n89 65\n89 66\n89 67\n89 68\n89 69\n89 70\n89 71\n89 72\n89 73\n89 74\n89 75\n89 76\n89 77\n89 78\n89 79\n89 80\n89 81\n89 82\n89 83\n89 84\n89 85\n89 86\n89 87\n89 88\n90 1\n90 2\n90 3\n90 4\n90 5\n90 6\n90 7\n90 8\n90 9\n90 10\n90 11\n90 12\n90 13\n90 14\n90 15\n90 16\n90 17\n90 18\n90 19\n90 20\n90 21\n90 22\n90 23\n90 24\n90 25\n90 26\n90 27\n90 28\n90 29\n90 30\n90 31\n90 32\n90 33\n90 34\n90 35\n90 36\n90 37\n90 38\n90 39\n90 40\n90 41\n90 42\n90 43\n90 44\n90 45\n90 46\n90 47\n90 48\n90 49\n90 50\n90 51\n90 52\n90 53\n90 54\n90 55\n90 56\n90 57\n90 58\n90 59\n90 60\n90 61\n90 62\n90 63\n90 64\n90 65\n90 66\n90 67\n90 68\n90 69\n90 70\n90 71\n90 72\n90 73\n90 74\n90 75\n90 76\n90 77\n90 78\n90 79\n90 80\n90 81\n90 82\n90 83\n90 84\n90 85\n90 86\n90 87\n90 88\n90 89\n91 1\n91 2\n91 3\n91 4\n91 5\n91 6\n91 7\n91 8\n91 9\n91 10\n91 11\n91 12\n91 13\n91 14\n91 15\n91 16\n91 17\n91 18\n91 19\n91 20\n91 21\n91 22\n91 23\n91 24\n91 25\n91 26\n91 27\n91 28\n91 29\n91 30\n91 31\n91 32\n91 33\n91 34\n91 35\n91 36\n91 37\n91 38\n91 39\n91 40\n91 41\n91 42\n91 43\n91 44\n91 45\n91 46\n91 47\n91 48\n91 49\n91 50\n91 51\n91 52\n91 53\n91 54\n91 55\n91 56\n91 57\n91 58\n91 59\n91 60\n91 61\n91 62\n91 63\n91 64\n91 65\n91 66\n91 67\n91 68\n91 69\n91 70\n91 71\n91 72\n91 73\n91 74\n91 75\n91 76\n91 77\n91 78\n91 79\n91 80\n91 81\n91 82\n91 83\n91 84\n91 85\n91 86\n91 87\n91 88\n91 89\n91 90\n92 1\n92 2\n92 3\n92 4\n92 5\n92 6\n92 7\n92 8\n92 9\n92 10\n92 11\n92 12\n92 13\n92 14\n92 15\n92 16\n92 17\n92 18\n92 19\n92 20\n92 21\n92 22\n92 23\n92 24\n92 25\n92 26\n92 27\n92 28\n92 29\n92 30\n92 31\n92 32\n92 33\n92 34\n92 35\n92 36\n92 37\n92 38\n92 39\n92 40\n92 41\n92 42\n92 43\n92 44\n92 45\n92 46\n92 47\n92 48\n92 49\n92 50\n92 51\n92 52\n92 53\n92 54\n92 55\n92 56\n92 57\n92 58\n92 59\n92 60\n92 61\n92 62\n92 63\n92 64\n92 65\n92 66\n92 67\n92 68\n92 69\n92 70\n92 71\n92 72\n92 73\n92 74\n92 75\n92 76\n92 77\n92 78\n92 79\n92 80\n92 81\n92 82\n92 83\n92 84\n92 85\n92 86\n92 87\n92 88\n92 89\n92 90\n92 91\n93 1\n93 2\n93 3\n93 4\n93 5\n93 6\n93 7\n93 8\n93 9\n93 10\n93 11\n93 12\n93 13\n93 14\n93 15\n93 16\n93 17\n93 18\n93 19\n93 20\n93 21\n93 22\n93 23\n93 24\n93 25\n93 26\n93 27\n93 28\n93 29\n93 30\n93 31\n93 32\n93 33\n93 34\n93 35\n93 36\n93 37\n93 38\n93 39\n93 40\n93 41\n93 42\n93 43\n93 44\n93 45\n93 46\n93 47\n93 48\n93 49\n93 50\n93 51\n93 52\n93 53\n93 54\n93 55\n93 56\n93 57\n93 58\n93 59\n93 60\n93 61\n93 62\n93 63\n93 64\n93 65\n93 66\n93 67\n93 68\n93 69\n93 70\n93 71\n93 72\n93 73\n93 74\n93 75\n93 76\n93 77\n93 78\n93 79\n93 80\n93 81\n93 82\n93 83\n93 84\n93 85\n93 86\n93 87\n93 88\n93 89\n93 90\n93 91\n93 92\n94 1\n94 2\n94 3\n94 4\n94 5\n94 6\n94 7\n94 8\n94 9\n94 10\n94 11\n94 12\n94 13\n94 14\n94 15\n94 16\n94 17\n94 18\n94 19\n94 20\n94 21\n94 22\n94 23\n94 24\n94 25\n94 26\n94 27\n94 28\n94 29\n94 30\n94 31\n94 32\n94 33\n94 34\n94 35\n94 36\n94 37\n94 38\n94 39\n94 40\n94 41\n94 42\n94 43\n94 44\n94 45\n94 46\n94 47\n94 48\n94 49\n94 50\n94 51\n94 52\n94 53\n94 54\n94 55\n94 56\n94 57\n94 58\n94 59\n94 60\n94 61\n94 62\n94 63\n94 64\n94 65\n94 66\n94 67\n94 68\n94 69\n94 70\n94 71\n94 72\n94 73\n94 74\n94 75\n94 76\n94 77\n94 78\n94 79\n94 80\n94 81\n94 82\n94 83\n94 84\n94 85\n94 86\n94 87\n94 88\n94 89\n94 90\n94 91\n94 92\n94 93\n95 1\n95 2\n95 3\n95 4\n95 5\n95 6\n95 7\n95 8\n95 9\n95 10\n95 11\n95 12\n95 13\n95 14\n95 15\n95 16\n95 17\n95 18\n95 19\n95 20\n95 21\n95 22\n95 23\n95 24\n95 25\n95 26\n95 27\n95 28\n95 29\n95 30\n95 31\n95 32\n95 33\n95 34\n95 35\n95 36\n95 37\n95 38\n95 39\n95 40\n95 41\n95 42\n95 43\n95 44\n95 45\n95 46\n95 47\n95 48\n95 49\n95 50\n95 51\n95 52\n95 53\n95 54\n95 55\n95 56\n95 57\n95 58\n95 59\n95 60\n95 61\n95 62\n95 63\n95 64\n95 65\n95 66\n95 67\n95 68\n95 69\n95 70\n95 71\n95 72\n95 73\n95 74\n95 75\n95 76\n95 77\n95 78\n95 79\n95 80\n95 81\n95 82\n95 83\n95 84\n95 85\n95 86\n95 87\n95 88\n95 89\n95 90\n95 91\n95 92\n95 93\n95 94\n96 1\n96 2\n96 3\n96 4\n96 5\n96 6\n96 7\n96 8\n96 9\n96 10\n96 11\n96 12\n96 13\n96 14\n96 15\n96 16\n96 17\n96 18\n96 19\n96 20\n96 21\n96 22\n96 23\n96 24\n96 25\n96 26\n96 27\n96 28\n96 29\n96 30\n96 31\n96 32\n96 33\n96 34\n96 35\n96 36\n96 37\n96 38\n96 39\n96 40\n96 41\n96 42\n96 43\n96 44\n96 45\n96 46\n96 47\n96 48\n96 49\n96 50\n96 51\n96 52\n96 53\n96 54\n96 55\n96 56\n96 57\n96 58\n96 59\n96 60\n96 61\n96 62\n96 63\n96 64\n96 65\n96 66\n96 67\n96 68\n96 69\n96 70\n96 71\n96 72\n96 73\n96 74\n96 75\n96 76\n96 77\n96 78\n96 79\n96 80\n96 81\n96 82\n96 83\n96 84\n96 85\n96 86\n96 87\n96 88\n96 89\n96 90\n96 91\n96 92\n96 93\n96 94\n96 95\n97 1\n97 2\n97 3\n97 4\n97 5\n97 6\n97 7\n97 8\n97 9\n97 10\n97 11\n97 12\n97 13\n97 14\n97 15\n97 16\n97 17\n97 18\n97 19\n97 20\n97 21\n97 22\n97 23\n97 24\n97 25\n97 26\n97 27\n97 28\n97 29\n97 30\n97 31\n97 32\n97 33\n97 34\n97 35\n97 36\n97 37\n97 38\n97 39\n97 40\n97 41\n97 42\n97 43\n97 44\n97 45\n97 46\n97 47\n97 48\n97 49\n97 50\n97 51\n97 52\n97 53\n97 54\n97 55\n97 56\n97 57\n97 58\n97 59\n97 60\n97 61\n97 62\n97 63\n97 64\n97 65\n97 66\n97 67\n97 68\n97 69\n97 70\n97 71\n97 72\n97 73\n97 74\n97 75\n97 76\n97 77\n97 78\n97 79\n97 80\n97 81\n97 82\n97 83\n97 84\n97 85\n97 86\n97 87\n97 88\n97 89\n97 90\n97 91\n97 92\n97 93\n97 94\n97 95\n97 96\n98 1\n98 2\n98 3\n98 4\n98 5\n98 6\n98 7\n98 8\n98 9\n98 10\n98 11\n98 12\n98 13\n98 14\n98 15\n98 16\n98 17\n98 18\n98 19\n98 20\n98 21\n98 22\n98 23\n98 24\n98 25\n98 26\n98 27\n98 28\n98 29\n98 30\n98 31\n98 32\n98 33\n98 34\n98 35\n98 36\n98 37\n98 38\n98 39\n98 40\n98 41\n98 42\n98 43\n98 44\n98 45\n98 46\n98 47\n98 48\n98 49\n98 50\n98 51\n98 52\n98 53\n98 54\n98 55\n98 56\n98 57\n98 58\n98 59\n98 60\n98 61\n98 62\n98 63\n98 64\n98 65\n98 66\n98 67\n98 68\n98 69\n98 70\n98 71\n98 72\n98 73\n98 74\n98 75\n98 76\n98 77\n98 78\n98 79\n98 80\n98 81\n98 82\n98 83\n98 84\n98 85\n98 86\n98 87\n98 88\n98 89\n98 90\n98 91\n98 92\n98 93\n98 94\n98 95\n98 96\n98 97\n99 1\n99 2\n99 3\n99 4\n99 5\n99 6\n99 7\n99 8\n99 9\n99 10\n99 11\n99 12\n99 13\n99 14\n99 15\n99 16\n99 17\n99 18\n99 19\n99 20\n99 21\n99 22\n99 23\n99 24\n99 25\n99 26\n99 27\n99 28\n99 29\n99 30\n99 31\n99 32\n99 33\n99 34\n99 35\n99 36\n99 37\n99 38\n99 39\n99 40\n99 41\n99 42\n99 43\n99 44\n99 45\n99 46\n99 47\n99 48\n99 49\n99 50\n99 51\n99 52\n99 53\n99 54\n99 55\n99 56\n99 57\n99 58\n99 59\n99 60\n99 61\n99 62\n99 63\n99 64\n99 65\n99 66\n99 67\n99 68\n99 69\n99 70\n99 71\n99 72\n99 73\n99 74\n99 75\n99 76\n99 77\n99 78\n99 79\n99 80\n99 81\n99 82\n99 83\n99 84\n99 85\n99 86\n99 87\n99 88\n99 89\n99 90\n99 91\n99 92\n99 93\n99 94\n99 95\n99 96\n99 97\n99 98\n100 1\n100 2\n100 3\n100 4\n100 5\n100 6\n100 7\n100 8\n100 9\n100 10\n100 11\n100 12\n100 13\n100 14\n100 15\n100 16\n100 17\n100 18\n100 19\n100 20\n100 21\n100 22\n100 23\n100 24\n100 25\n100 26\n100 27\n100 28\n100 29\n100 30\n100 31\n100 32\n100 33\n100 34\n100 35\n100 36\n100 37\n100 38\n100 39\n100 40\n100 41\n100 42\n100 43\n100 44\n100 45\n100 46\n100 47\n100 48\n100 49\n100 50\n100 51\n100 52\n100 53\n100 54\n100 55\n100 56\n100 57\n100 58\n100 59\n100 60\n100 61\n100 62\n100 63\n100 64\n100 65\n100 66\n100 67\n100 68\n100 69\n100 70\n100 71\n100 72\n100 73\n100 74\n100 75\n100 76\n100 77\n100 78\n100 79\n100 80\n100 81\n100 82\n100 83\n100 84\n100 85\n100 86\n100 87\n100 88\n100 89\n100 90\n100 91\n100 92\n100 93\n100 94\n100 95\n100 96\n100 97\n100 98\n100 99\n" } ]
code_contests
python
0
8636fbcba6126f23907676c90a00c27b
Consider a table G of size n × m such that G(i, j) = GCD(i, j) for all 1 ≤ i ≤ n, 1 ≤ j ≤ m. GCD(a, b) is the greatest common divisor of numbers a and b. You have a sequence of positive integer numbers a1, a2, ..., ak. We say that this sequence occurs in table G if it coincides with consecutive elements in some row, starting from some position. More formally, such numbers 1 ≤ i ≤ n and 1 ≤ j ≤ m - k + 1 should exist that G(i, j + l - 1) = al for all 1 ≤ l ≤ k. Determine if the sequence a occurs in table G. Input The first line contains three space-separated integers n, m and k (1 ≤ n, m ≤ 1012; 1 ≤ k ≤ 10000). The second line contains k space-separated integers a1, a2, ..., ak (1 ≤ ai ≤ 1012). Output Print a single word "YES", if the given sequence occurs in table G, otherwise print "NO". Examples Input 100 100 5 5 2 1 2 1 Output YES Input 100 8 5 5 2 1 2 1 Output NO Input 100 100 7 1 2 3 4 5 6 7 Output NO Note Sample 1. The tenth row of table G starts from sequence {1, 2, 1, 2, 5, 2, 1, 2, 1, 10}. As you can see, elements from fifth to ninth coincide with sequence a. Sample 2. This time the width of table G equals 8. Sequence a doesn't occur there. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
from math import gcd def LCM(a, b): if min(a, b) == 0: return max(a, b) return a // gcd(a, b) * b class Eqn(): def __init__(self, r, mod): self.r = r self.mod = mod def bye(): print("NO") exit(0) def exgcd(a, b): if b == 0: return (1, 0) xp, yp = exgcd(b, a % b) x = yp y = xp - a // b * yp return (x, y) def merge(a, b): newmode = LCM(a.mod, b.mod) if (a.r - b.r) % gcd(a.mod, b.mod) != 0: bye() newr = exgcd(a.mod, b.mod)[0] * (b.r - a.r) // gcd(a.mod, b.mod) * a.mod + a.r newr %= newmode return Eqn(newr, newmode) x, y = 0, 0 n, m, k = [int(i) for i in input().split()] a = [int(i) for i in input().split()] for i in a: x = LCM(x, i) if x > n: bye() cur = Eqn(0, 1) for i in range(0, len(a)): cur = merge(cur, Eqn((-i) % a[i], a[i])) y = cur.r if y == 0: y += x for i in range(0, len(a)): if gcd(x, y + i) != a[i]: bye() if x > n or y + k - 1 > m: bye() print("YES")
python
code_algorithm
[ { "input": "100 8 5\n5 2 1 2 1\n", "output": "NO\n" }, { "input": "100 100 7\n1 2 3 4 5 6 7\n", "output": "NO\n" }, { "input": "100 100 5\n5 2 1 2 1\n", "output": "YES\n" }, { "input": "1000000000000 1000000000000 10\n99991 99992 99993 99994 99995 99996 99997 99998 99999 31000000000\n", "output": "NO\n" }, { "input": "991234567890 927215128595 5\n6 11 8 3 2000000014\n", "output": "YES\n" }, { "input": "54275126675 128566125 50\n1 1 3 1 1 3 7 1 9 1 11 3 13 7 3 1 1 27 1 1 21 11 1 3 1 13 9 7 1 3 1 1 33 1 7 9 37 1 39 1 1 21 1 11 27 1 1 3 7 1\n", "output": "YES\n" }, { "input": "1000000000000 1000000000000 40\n2 1 8 1 10 1 4 1 2 5 16 1 2 1 20 1 2 1 8 5 2 1 4 1 10 1 64 1 2 5 4 1 2 1 500 1 2 1 4 5\n", "output": "NO\n" }, { "input": "999999999999 999999999999 2\n20145182300 20145182301\n", "output": "NO\n" }, { "input": "1000000000000 1000000000000 4\n1 2 1 100000000000\n", "output": "YES\n" }, { "input": "1000000000000 1000000000000 116\n1587924000 7 2 3 4 5 6 1 56 9 10 1 12 13 2 105 16 1 18 1 620 3 14 1 24 25 26 27 4 203 30 1 32 3 2 5 252 1 2 39 40 1 6 7 4 45 2 1 48 1 350 93 52 1 54 5 8 21 58 1 60 1 2 9 224 65 6 1 4 3 10 7 72 1 2 75 4 1 546 1 80 81 62 1 12 35 2 87 8 1 90 13 28 3 2 5 96 1 2 63 100 1 6 1 104 15 14 1 108 1 10 3 16 217 6 5\n", "output": "YES\n" }, { "input": "5 5 5\n1 1 1 1 1\n", "output": "YES\n" }, { "input": "11 10 1\n11\n", "output": "NO\n" }, { "input": "991234567890 182000001269 5\n6 11 8 3 2000000014\n", "output": "NO\n" }, { "input": "108 942 35\n1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 31 1 3 1 1 3 1 1 3 1 1\n", "output": "YES\n" }, { "input": "1000000000000 1000000000000 6\n1 6 5 2 3 2\n", "output": "YES\n" }, { "input": "1000000000000 1000000000000 100\n2 9 2 1 6 1 2 3 2 1 18 1 2 3 2 1 6 1 2 9 2 1 6 1 2 3 2 1 18 1 74 3 2 1 6 1 2 9 2 1 6 1 2 3 2 1 18 1 2 3 2 1 6 1 2 9 2 1 12 1 2 3 2 1 18 1 2 111 2 1 6 1 2 9 2 1 6 1 2 3 2 1 18 1 2 3 2 1 6 1 2 9 2 1 6 1 2 3 2 1\n", "output": "NO\n" }, { "input": "1000000000000 1000000000000 40\n2 1 8 1 10 1 4 1 2 25 16 1 2 1 20 1 2 1 8 5 2 1 4 1 10 1 128 1 2 5 4 1 2 1 1000 1 2 1 4 5\n", "output": "YES\n" }, { "input": "100000 49999 2\n50000 1\n", "output": "NO\n" }, { "input": "1000000000000 1000000000000 100\n2 9 2 1 6 1 2 3 2 1 18 1 2 3 2 1 6 1 2 9 2 1 6 1 2 3 2 1 18 1 74 3 2 1 6 1 2 9 2 1 6 1 2 3 2 1 18 1 2 3 2 1 6 1 2 9 2 1 6 1 2 3 2 1 18 1 2 111 2 1 6 1 2 9 2 1 6 1 2 3 2 1 18 1 2 3 2 1 6 1 2 9 2 1 6 1 2 3 2 1\n", "output": "YES\n" }, { "input": "1000000000000 1000000000000 100\n2 9 2 1 6 1 2 3 2 1 18 1 2 3 2 1 6 1 2 9 2 1 6 1 2 3 2 1 18 1 74 3 2 1 6 1 2 9 2 1 6 1 2 3 2 1 18 1 2 3 2 1 6 1 2 9 2 1 6 1 2 3 2 1 18 1 2 111 2 1 6 1 2 9 2 1 6 1 2 3 2 1 9 1 2 3 2 1 6 1 2 9 2 1 6 1 2 3 2 1\n", "output": "NO\n" }, { "input": "1000000000000 1000000000000 59\n1 1 3 1 5 3 1 1 3 5 1 3 1 1 15 1 1 3 1 5 3 1 1 3 5 1 3 1 1 15 1 1 3 1 5 3 1 1 3 5 1 3 1 1 15 1 1 3 1 5 3 1 1 3 5 1 3 1 1\n", "output": "YES\n" }, { "input": "100 100 10\n3 5 1 1 1 1 1 1 1 9\n", "output": "NO\n" }, { "input": "1000000000000 1000000000000 6\n8 21 2 1 12 1\n", "output": "YES\n" }, { "input": "1000000000000 1000000000000 2\n1 1000000000000\n", "output": "YES\n" } ]
code_contests
python
0
0f772bcdc9f8291a2f9c9fe565194b85
Little Chris is a huge fan of linear algebra. This time he has been given a homework about the unusual square of a square matrix. The dot product of two integer number vectors x and y of size n is the sum of the products of the corresponding components of the vectors. The unusual square of an n × n square matrix A is defined as the sum of n dot products. The i-th of them is the dot product of the i-th row vector and the i-th column vector in the matrix A. Fortunately for Chris, he has to work only in GF(2)! This means that all operations (addition, multiplication) are calculated modulo 2. In fact, the matrix A is binary: each element of A is either 0 or 1. For example, consider the following matrix A: <image> The unusual square of A is equal to (1·1 + 1·0 + 1·1) + (0·1 + 1·1 + 1·0) + (1·1 + 0·1 + 0·0) = 0 + 1 + 1 = 0. However, there is much more to the homework. Chris has to process q queries; each query can be one of the following: 1. given a row index i, flip all the values in the i-th row in A; 2. given a column index i, flip all the values in the i-th column in A; 3. find the unusual square of A. To flip a bit value w means to change it to 1 - w, i.e., 1 changes to 0 and 0 changes to 1. Given the initial matrix A, output the answers for each query of the third type! Can you solve Chris's homework? Input The first line of input contains an integer n (1 ≤ n ≤ 1000), the number of rows and the number of columns in the matrix A. The next n lines describe the matrix: the i-th line contains n space-separated bits and describes the i-th row of A. The j-th number of the i-th line aij (0 ≤ aij ≤ 1) is the element on the intersection of the i-th row and the j-th column of A. The next line of input contains an integer q (1 ≤ q ≤ 106), the number of queries. Each of the next q lines describes a single query, which can be one of the following: * 1 i — flip the values of the i-th row; * 2 i — flip the values of the i-th column; * 3 — output the unusual square of A. Note: since the size of the input and output could be very large, don't use slow output techniques in your language. For example, do not use input and output streams (cin, cout) in C++. Output Let the number of the 3rd type queries in the input be m. Output a single string s of length m, where the i-th symbol of s is the value of the unusual square of A for the i-th query of the 3rd type as it appears in the input. Examples Input 3 1 1 1 0 1 1 1 0 0 12 3 2 3 3 2 2 2 2 1 3 3 3 1 2 2 1 1 1 3 Output 01001 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
# from operator import and_, xor # from functools import reduce # from itertools import chain from sys import stdin input = stdin.readline n = int(input()) l = list(list(map(int, input().split())) for _ in range(n)) q = int(input()) output = [] ans = 0 # We don't care about anything except for the trace of the matrix # Why? write the matrix with symbols not 0's and 1's for i in range(n): ans ^= l[i][i] for i in range(q): command = input() if command[0] == '3': output.append(ans) else: ans^=1 # Why? first, put in mind that all we care about is the trace of the matrix # We will flip either the column or the row, we will be facing two possibilities # either to subtract from the original answer or do addition ... well thanks to GF(2) # both of the operations are just XORing print(''.join([*map(str, output)]))
python
code_algorithm
[ { "input": "3\n1 1 1\n0 1 1\n1 0 0\n12\n3\n2 3\n3\n2 2\n2 2\n1 3\n3\n3\n1 2\n2 1\n1 1\n3\n", "output": "01001\n" }, { "input": "1\n0\n5\n1 1\n3\n1 1\n1 1\n3\n", "output": "11\n" }, { "input": "2\n1 0\n1 1\n6\n1 2\n3\n2 1\n3\n1 1\n3\n", "output": "101\n" }, { "input": "3\n0 0 0\n0 0 1\n0 1 1\n3\n1 2\n1 3\n1 1\n", "output": "\n" }, { "input": "2\n1 1\n1 0\n5\n3\n1 1\n3\n2 1\n3\n", "output": "101\n" }, { "input": "3\n1 0 1\n0 1 1\n1 0 1\n4\n3\n3\n3\n3\n", "output": "1111\n" }, { "input": "5\n1 0 1 0 1\n0 1 0 1 0\n1 0 1 0 1\n0 1 0 1 0\n1 0 1 0 1\n7\n3\n2 4\n1 3\n3\n2 5\n1 5\n3\n", "output": "111\n" }, { "input": "2\n1 0\n1 0\n4\n1 2\n3\n1 2\n3\n", "output": "01\n" }, { "input": "1\n1\n9\n1 1\n3\n1 1\n1 1\n3\n1 1\n3\n1 1\n3\n", "output": "0010\n" }, { "input": "2\n1 0\n0 1\n1\n3\n", "output": "0\n" }, { "input": "2\n0 0\n0 0\n2\n1 1\n3\n", "output": "1\n" }, { "input": "4\n1 1 0 0\n1 1 0 0\n0 0 0 0\n0 0 0 0\n2\n1 1\n3\n", "output": "1\n" }, { "input": "2\n0 1\n1 0\n7\n3\n3\n2 2\n3\n2 2\n2 1\n3\n", "output": "0011\n" }, { "input": "2\n0 0\n0 0\n9\n3\n1 2\n2 2\n1 1\n2 1\n3\n1 2\n1 1\n3\n", "output": "000\n" } ]
code_contests
python
0.1
c75c19fa24a04c26837daf3ed92ad24d
You have a string s = s1s2...s|s|, where |s| is the length of string s, and si its i-th character. Let's introduce several definitions: * A substring s[i..j] (1 ≤ i ≤ j ≤ |s|) of string s is string sisi + 1...sj. * The prefix of string s of length l (1 ≤ l ≤ |s|) is string s[1..l]. * The suffix of string s of length l (1 ≤ l ≤ |s|) is string s[|s| - l + 1..|s|]. Your task is, for any prefix of string s which matches a suffix of string s, print the number of times it occurs in string s as a substring. Input The single line contains a sequence of characters s1s2...s|s| (1 ≤ |s| ≤ 105) — string s. The string only consists of uppercase English letters. Output In the first line, print integer k (0 ≤ k ≤ |s|) — the number of prefixes that match a suffix of string s. Next print k lines, in each line print two integers li ci. Numbers li ci mean that the prefix of the length li matches the suffix of length li and occurs in string s as a substring ci times. Print pairs li ci in the order of increasing li. Examples Input ABACABA Output 3 1 4 3 2 7 1 Input AAA Output 3 1 3 2 2 3 1 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
def zeta(s): n = len(s) z = [0]*n l,r = 0,0 for i in range(1,n): if(i<=r): z[i] = min(r-i+1,z[i-l]) while(i+z[i]<n and s[z[i]]==s[i+z[i]]): z[i]+=1 if(i+z[i]-1>r): l=i r = i+z[i]-1 return z s = input() n = len(s) z = zeta(s) l = [0]*n for i in z: l[i]+=1 cum = [l[-1]] for i in range(n-2,-1,-1): cum.append(l[i]+cum[-1]) cum = cum[::-1] ans = [(n,1)] for i in range(n-1,0,-1): if(i+z[i]==n): ans.append((n-i,cum[n-i]+1)) print(len(ans)) for i in sorted(ans): print(*i)
python
code_algorithm
[ { "input": "AAA\n", "output": "3\n1 3\n2 2\n3 1\n" }, { "input": "ABACABA\n", "output": "3\n1 4\n3 2\n7 1\n" }, { "input": "ZZ\n", "output": "2\n1 2\n2 1\n" }, { "input": "A\n", "output": "1\n1 1\n" }, { "input": "AXAXA\n", "output": "3\n1 3\n3 2\n5 1\n" }, { "input": "AB\n", "output": "1\n2 1\n" }, { "input": "AAAAAAAAAAAAAAAAXAAAAAAAAAAAAAAAAAAAAAAA\n", "output": "17\n1 39\n2 37\n3 35\n4 33\n5 31\n6 29\n7 27\n8 25\n9 23\n10 21\n11 19\n12 17\n13 15\n14 13\n15 11\n16 9\n40 1\n" }, { "input": "GERALDPAVELGERALDPAVEL\n", "output": "2\n11 2\n22 1\n" }, { "input": "CODEFORCES\n", "output": "1\n10 1\n" } ]
code_contests
python
0
b9da6142390ddc820b95ad28a5c7c9dd
Alex doesn't like boredom. That's why whenever he gets bored, he comes up with games. One long winter evening he came up with a game and decided to play it. Given a sequence a consisting of n integers. The player can make several steps. In a single step he can choose an element of the sequence (let's denote it ak) and delete it, at that all elements equal to ak + 1 and ak - 1 also must be deleted from the sequence. That step brings ak points to the player. Alex is a perfectionist, so he decided to get as many points as possible. Help him. Input The first line contains integer n (1 ≤ n ≤ 105) that shows how many numbers are in Alex's sequence. The second line contains n integers a1, a2, ..., an (1 ≤ ai ≤ 105). Output Print a single integer — the maximum number of points that Alex can earn. Examples Input 2 1 2 Output 2 Input 3 1 2 3 Output 4 Input 9 1 2 1 3 2 2 2 2 3 Output 10 Note Consider the third test example. At first step we need to choose any element equal to 2. After that step our sequence looks like this [2, 2, 2, 2]. Then we do 4 steps, on each step we choose any element equals to 2. In total we earn 10 points. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n = int(input()) l = input().split() g = [0]*100000 for i in l: g[int(i)-1] += 1 ''' p = [] a = [] for i in range(100000): b = g[i] if b!=0: a.append((i+1)*b) else: if a != []: p.append(a) a = [] def f(v): if v==[]: return 0 elif len(v)==1: return v[0] elif len(v)==2: return max(v) else: return max(v[0]+f(v[2:]),v[1]+f(v[3:])) c = 0 for q in p: c += f(q) print(c) ''' x,y = 0,0 for i in range(100000): x,y = max((i+1)*g[i]+y,x),x print(x)
python
code_algorithm
[ { "input": "3\n1 2 3\n", "output": "4\n" }, { "input": "9\n1 2 1 3 2 2 2 2 3\n", "output": "10\n" }, { "input": "2\n1 2\n", "output": "2\n" }, { "input": "100\n2 10 9 1 2 6 7 2 2 8 9 9 9 5 6 2 5 1 1 10 7 4 5 5 8 1 9 4 10 1 9 3 1 8 4 10 8 8 2 4 6 5 1 4 2 2 1 2 8 5 3 9 4 10 10 7 8 6 1 8 2 6 7 1 6 7 3 10 10 3 7 7 6 9 6 8 8 10 4 6 4 3 3 3 2 3 10 6 8 5 5 10 3 7 3 1 1 1 5 5\n", "output": "312\n" }, { "input": "100\n7 6 3 8 8 3 10 5 3 8 6 4 6 9 6 7 3 9 10 7 5 5 9 10 7 2 3 8 9 5 4 7 9 3 6 4 9 10 7 6 8 7 6 6 10 3 7 4 5 7 7 5 1 5 4 8 7 3 3 4 7 8 5 9 2 2 3 1 6 4 6 6 6 1 7 10 7 4 5 3 9 2 4 1 5 10 9 3 9 6 8 5 2 1 10 4 8 5 10 9\n", "output": "298\n" }, { "input": "10\n1 7 1 4 9 10 8 2 9 9\n", "output": "40\n" }, { "input": "100\n5 6 10 7 1 7 10 1 9 1 5 1 4 1 3 3 7 9 1 6 1 6 5 7 1 6 3 1 3 6 3 8 2 4 1 5 2 10 7 3 10 4 10 1 5 4 2 9 7 9 5 7 10 4 1 4 8 9 3 1 3 7 7 4 3 7 7 10 6 9 5 5 6 5 3 9 8 8 5 5 4 10 9 4 10 4 1 8 3 5 4 10 9 3 10 4 10 7 10 9\n", "output": "324\n" }, { "input": "100\n4 9 7 10 4 7 2 6 1 9 1 8 7 5 5 7 6 7 9 8 10 5 3 5 7 10 3 2 1 3 8 9 4 10 4 7 6 4 9 6 7 1 9 4 3 5 8 9 2 7 10 5 7 5 3 8 10 3 8 9 3 4 3 10 6 5 1 8 3 2 5 8 4 7 5 3 3 2 6 9 9 8 2 7 6 3 2 2 8 8 4 5 6 9 2 3 2 2 5 2\n", "output": "287\n" }, { "input": "10\n10 5 8 9 5 6 8 7 2 8\n", "output": "46\n" }, { "input": "100\n6 6 8 9 7 9 6 9 5 7 7 4 5 3 9 1 10 3 4 5 8 9 6 5 6 4 10 9 1 4 1 7 1 4 9 10 8 2 9 9 10 5 8 9 5 6 8 7 2 8 7 6 2 6 10 8 6 2 5 5 3 2 8 8 5 3 6 2 1 4 7 2 7 3 7 4 10 10 7 5 4 7 5 10 7 1 1 10 7 7 7 2 3 4 2 8 4 7 4 4\n", "output": "296\n" }, { "input": "5\n4 2 3 2 5\n", "output": "9\n" }, { "input": "100\n4 8 10 1 8 8 8 1 10 3 1 8 6 8 6 1 10 3 3 3 3 7 2 1 1 6 10 1 7 9 8 10 3 8 6 2 1 6 5 6 10 8 9 7 4 3 10 5 3 9 10 5 10 8 8 5 7 8 9 5 3 9 9 2 7 8 1 10 4 9 2 8 10 10 5 8 5 1 7 3 4 5 2 5 9 3 2 5 6 2 3 10 1 5 9 6 10 4 10 8\n", "output": "380\n" }, { "input": "5\n3 3 4 5 4\n", "output": "11\n" }, { "input": "100\n7 5 1 8 5 6 6 2 6 2 7 7 3 6 2 4 4 2 10 2 2 2 10 6 6 1 5 10 9 1 5 9 8 9 4 1 10 5 7 5 7 6 4 8 8 1 7 8 3 8 2 1 8 4 10 3 5 6 6 10 9 6 5 1 10 7 6 9 9 2 10 10 9 1 2 1 7 7 4 10 1 10 5 5 3 8 9 8 1 4 10 2 4 5 4 4 1 6 2 9\n", "output": "328\n" }, { "input": "100\n10 5 8 4 4 4 1 4 5 8 3 10 2 4 1 10 8 1 1 6 8 4 2 9 1 3 1 7 7 9 3 5 5 8 6 9 9 4 8 1 3 3 2 6 1 5 4 5 3 5 5 6 7 5 7 9 3 5 4 9 2 6 8 1 1 7 7 3 8 9 8 7 3 2 4 1 6 1 3 9 4 2 2 8 5 10 1 8 8 5 1 5 6 9 4 5 6 5 10 2\n", "output": "265\n" }, { "input": "10\n1 1 1 1 1 1 2 3 4 4\n", "output": "14\n" }, { "input": "1\n100000\n", "output": "100000\n" }, { "input": "5\n5 3 5 3 4\n", "output": "16\n" }, { "input": "100\n6 1 5 7 10 10 2 7 3 7 2 10 7 6 3 5 5 5 3 7 2 4 2 7 7 4 2 8 2 10 4 7 9 1 1 7 9 7 1 10 10 9 5 6 10 1 7 5 8 1 1 5 3 10 2 4 3 5 2 7 4 9 5 10 1 3 7 6 6 9 3 6 6 10 1 10 6 1 10 3 4 1 7 9 2 7 8 9 3 3 2 4 6 6 1 2 9 4 1 2\n", "output": "313\n" }, { "input": "10\n8 9 6 5 6 4 10 9 1 4\n", "output": "39\n" }, { "input": "10\n7 4 5 3 9 1 10 3 4 5\n", "output": "34\n" } ]
code_contests
python
0.6
305215dbf1df4fb3940774f0f14bc4df
Recently personal training sessions have finished in the Berland State University Olympiad Programmer Training Centre. By the results of these training sessions teams are composed for the oncoming team contest season. Each team consists of three people. All the students of the Centre possess numbers from 1 to 3n, and all the teams possess numbers from 1 to n. The splitting of students into teams is performed in the following manner: while there are people who are not part of a team, a person with the best total score is chosen among them (the captain of a new team), this person chooses for himself two teammates from those who is left according to his list of priorities. The list of every person's priorities is represented as a permutation from the rest of 3n - 1 students who attend the centre, besides himself. You are given the results of personal training sessions which are a permutation of numbers from 1 to 3n, where the i-th number is the number of student who has won the i-th place. No two students share a place. You are also given the arrangement of the already formed teams in the order in which they has been created. Your task is to determine the list of priorities for the student number k. If there are several priority lists, choose the lexicographically minimal one. Input The first line contains an integer n (1 ≤ n ≤ 105) which is the number of resulting teams. The second line contains 3n space-separated integers from 1 to 3n which are the results of personal training sessions. It is guaranteed that every student appears in the results exactly once. Then follow n lines each containing three integers from 1 to 3n — each line describes the members of a given team. The members of one team can be listed in any order, but the teams themselves are listed in the order in which they were created. It is guaranteed that the arrangement is correct, that is that every student is a member of exactly one team and those teams could really be created from the given results using the method described above. The last line contains number k (1 ≤ k ≤ 3n) which is the number of a student for who the list of priorities should be found. Output Print 3n - 1 numbers — the lexicographically smallest list of priorities for the student number k. The lexicographical comparison is performed by the standard < operator in modern programming languages. The list a is lexicographically less that the list b if exists such an i (1 ≤ i ≤ 3n), that ai < bi, and for any j (1 ≤ j < i) aj = bj. Note, that the list 1 9 10 is lexicographically less than the list 1 10 9. That is, the comparison of lists is different from the comparison of lines. Examples Input 3 5 4 1 2 6 3 7 8 9 5 6 2 9 3 4 1 7 8 4 Output 2 3 5 6 9 1 7 8 Input 3 5 4 1 2 6 3 7 8 9 5 6 2 9 3 4 1 7 8 8 Output 1 2 3 4 5 6 7 9 Input 2 4 1 3 2 5 6 4 6 5 1 2 3 4 Output 5 6 1 2 3 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
import sys I = lambda: int(input()) RL = readline = lambda: sys.stdin.readline().strip('\n') RM = readmap = lambda x = int: map(x,readline().split(' ')) def f(l,x): if x==l[0]: return l[1],l[2] if x==l[1]: return l[0],l[2] if x==l[2]: return l[0],l[1] return -1 def delrank(x): global pre,nxt prex,nxtx = pre[x],nxt[x] nxt[prex] = nxtx pre[nxtx] = prex n = I() N = 3*n rank = [*RM()]+[N+1] tris = [tuple(RM()) for i in range(n)] k = I() pre,nxt = list(range(N+2)), list(range(N+2)) temp0 = 0 for i in range(N+1): temp1 = rank[i] pre[temp1],nxt[temp0] = temp0,temp1 temp0 = temp1 for ind,tri in enumerate(tris): leader = nxt[0] x,y = f(tri,leader) if k in tri: if leader != k: l = [i for i in range(1,N+1) if i!=k] else: #condition here is element in l3 should be after max(x,y) #so sort l1+l2 first cut the portion after max(x,y) and add #it to l3 and sort the new l3 l1 = [i for tri in tris[:ind] for i in tri] l2 = [x,y] l3 = [i for tri in tris[ind+1:] for i in tri] l0 = sorted(l1 + l2) ind = l0.index(max(x,y)) l = l0[:ind+1] + sorted(l0[ind+1:]+l3) #print(leader,l1,l2,l3) print(' '.join([str(i) for i in l])) sys.exit(0) for i in tri: delrank(i) ''' 7 4 19 14 8 21 16 2 18 1 15 3 17 13 5 6 10 9 7 12 11 20 4 19 10 14 8 3 21 17 9 16 6 12 2 13 20 18 1 7 15 5 11 21 ''' quit() #E Shortest Path def rec(u,v): '''to recursivley visit the edge previous to this edge''' if v: rec(pre[u][v],u);print(v,end=' ') from collections import deque n,m,k = RM() adj = [[] for i in range(n+1)] dist = [[int(1e9)]*(n+1) for i in range(n+1)] pre = [[0]*(n+1) for i in range(n+1)] bad = set() for _ in range(m): x,y = RM() adj[x].append(y) adj[y].append(x) for _ in range(k): bad.add(tuple(RM())) dist[0][1] = 0 q = deque([(0,1)]) while q: u,v = q.popleft() d = dist[u][v] + 1 for w in adj[v]: if d<dist[v][w] and not (u,v,w) in bad: dist[v][w] = d pre[v][w] = u q.append((v,w)) if w == n: print(d) rec(v,w) print() sys.exit(0) print(-1)
python
code_algorithm
[ { "input": "2\n4 1 3 2 5 6\n4 6 5\n1 2 3\n4\n", "output": "5 6 1 2 3\n" }, { "input": "3\n5 4 1 2 6 3 7 8 9\n5 6 2\n9 3 4\n1 7 8\n4\n", "output": "2 3 5 6 9 1 7 8\n" }, { "input": "3\n5 4 1 2 6 3 7 8 9\n5 6 2\n9 3 4\n1 7 8\n8\n", "output": "1 2 3 4 5 6 7 9\n" }, { "input": "1\n2 3 1\n2 3 1\n2\n", "output": "1 3\n" }, { "input": "3\n1 2 3 4 5 6 7 8 9\n1 2 3\n4 5 9\n6 7 8\n5\n", "output": "1 2 3 4 6 7 8 9\n" }, { "input": "2\n6 4 5 1 3 2\n6 1 3\n4 5 2\n6\n", "output": "1 3 2 4 5\n" }, { "input": "5\n5 3 2 7 12 9 4 14 1 10 8 13 6 15 11\n5 3 9\n2 7 12\n4 10 15\n14 8 13\n1 6 11\n13\n", "output": "1 2 3 4 5 6 7 8 9 10 11 12 14 15\n" }, { "input": "3\n2 9 5 8 7 1 3 6 4\n2 5 1\n9 7 6\n8 3 4\n9\n", "output": "1 2 5 6 7 3 4 8\n" }, { "input": "6\n6 4 10 16 14 11 13 1 7 17 18 15 5 3 9 12 2 8\n6 10 1\n4 3 9\n16 11 13\n14 15 2\n7 18 5\n17 12 8\n7\n", "output": "1 2 3 4 5 6 9 10 11 13 14 15 16 18 8 12 17\n" }, { "input": "2\n2 3 4 5 6 1\n2 3 4\n5 6 1\n1\n", "output": "2 3 4 5 6\n" }, { "input": "4\n4 8 3 1 7 12 10 9 11 2 5 6\n4 8 3\n1 12 2\n7 11 6\n10 9 5\n10\n", "output": "1 2 3 4 5 6 7 8 9 11 12\n" }, { "input": "7\n4 19 14 8 21 16 2 18 1 15 3 17 13 5 6 10 9 7 12 11 20\n4 19 10\n14 8 3\n21 17 9\n16 6 12\n2 13 20\n18 1 7\n15 5 11\n21\n", "output": "3 4 8 9 10 14 17 1 2 5 6 7 11 12 13 15 16 18 19 20\n" }, { "input": "4\n4 8 3 1 7 12 10 9 11 2 5 6\n4 8 3\n1 2 6\n7 10 9\n12 11 5\n11\n", "output": "1 2 3 4 5 6 7 8 9 10 12\n" }, { "input": "3\n2 9 5 8 7 1 3 6 4\n2 5 1\n9 7 6\n8 3 4\n8\n", "output": "1 2 3 4 5 6 7 9\n" } ]
code_contests
python
0
11a7cb059b03c0de0dd30c7f196cddeb
Today, Wet Shark is given n bishops on a 1000 by 1000 grid. Both rows and columns of the grid are numbered from 1 to 1000. Rows are numbered from top to bottom, while columns are numbered from left to right. Wet Shark thinks that two bishops attack each other if they share the same diagonal. Note, that this is the only criteria, so two bishops may attack each other (according to Wet Shark) even if there is another bishop located between them. Now Wet Shark wants to count the number of pairs of bishops that attack each other. Input The first line of the input contains n (1 ≤ n ≤ 200 000) — the number of bishops. Each of next n lines contains two space separated integers xi and yi (1 ≤ xi, yi ≤ 1000) — the number of row and the number of column where i-th bishop is positioned. It's guaranteed that no two bishops share the same position. Output Output one integer — the number of pairs of bishops which attack each other. Examples Input 5 1 1 1 5 3 3 5 1 5 5 Output 6 Input 3 1 1 2 3 3 5 Output 0 Note In the first sample following pairs of bishops attack each other: (1, 3), (1, 5), (2, 3), (2, 4), (3, 4) and (3, 5). Pairs (1, 2), (1, 4), (2, 5) and (4, 5) do not attack each other because they do not share the same diagonal. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
a=[0]*2001 b=[0]*2001 n=int(input()) for i in range(n): x,y=map(int,input().split()) a[x+y]+=1 b[x-y]+=1 s=0 for i in a: s=s+(i-1)*i//2 for i in b: s=s+(i-1)*i//2 print(s)
python
code_algorithm
[ { "input": "3\n1 1\n2 3\n3 5\n", "output": "0\n" }, { "input": "5\n1 1\n1 5\n3 3\n5 1\n5 5\n", "output": "6\n" }, { "input": "1\n1 1\n", "output": "0\n" }, { "input": "2\n1000 1\n1000 1000\n", "output": "0\n" }, { "input": "10\n646 171\n816 449\n375 934\n950 299\n702 232\n657 81\n885 306\n660 304\n369 371\n798 657\n", "output": "0\n" }, { "input": "3\n259 770\n448 54\n926 667\n", "output": "0\n" }, { "input": "3\n859 96\n634 248\n808 72\n", "output": "0\n" }, { "input": "3\n987 237\n891 429\n358 145\n", "output": "0\n" }, { "input": "2\n1 1\n1000 1\n", "output": "0\n" }, { "input": "1\n6 3\n", "output": "0\n" }, { "input": "3\n539 221\n895 89\n673 890\n", "output": "0\n" }, { "input": "1\n1 1000\n", "output": "0\n" }, { "input": "2\n1 1\n3 1\n", "output": "0\n" }, { "input": "3\n387 422\n898 532\n988 636\n", "output": "0\n" }, { "input": "3\n411 81\n149 907\n611 114\n", "output": "0\n" }, { "input": "10\n518 518\n71 971\n121 862\n967 607\n138 754\n513 337\n499 873\n337 387\n647 917\n76 417\n", "output": "0\n" }, { "input": "5\n1 1000\n2 999\n3 998\n4 997\n5 996\n", "output": "10\n" }, { "input": "10\n939 407\n197 191\n791 486\n30 807\n11 665\n600 100\n445 496\n658 959\n510 389\n729 950\n", "output": "0\n" }, { "input": "10\n515 563\n451 713\n537 709\n343 819\n855 779\n457 60\n650 359\n631 42\n788 639\n710 709\n", "output": "0\n" }, { "input": "2\n999 1\n1000 2\n", "output": "1\n" }, { "input": "2\n1 1\n1 1000\n", "output": "0\n" }, { "input": "2\n1 1\n1000 1000\n", "output": "1\n" }, { "input": "2\n1 1000\n1000 1000\n", "output": "0\n" }, { "input": "1\n1000 1000\n", "output": "0\n" }, { "input": "2\n1000 1\n1 1000\n", "output": "1\n" }, { "input": "10\n70 311\n74 927\n732 711\n126 583\n857 118\n97 928\n975 843\n175 221\n284 929\n816 602\n", "output": "0\n" }, { "input": "1\n1000 1\n", "output": "0\n" } ]
code_contests
python
1
7286a5051784830d523a26fd71dcd935
Let's call a string "s-palindrome" if it is symmetric about the middle of the string. For example, the string "oHo" is "s-palindrome", but the string "aa" is not. The string "aa" is not "s-palindrome", because the second half of it is not a mirror reflection of the first half. <image> English alphabet You are given a string s. Check if the string is "s-palindrome". Input The only line contains the string s (1 ≤ |s| ≤ 1000) which consists of only English letters. Output Print "TAK" if the string s is "s-palindrome" and "NIE" otherwise. Examples Input oXoxoXo Output TAK Input bod Output TAK Input ER Output NIE Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
rever = "AHIMOTUVWXYovwx" rev = ["bd", "pq","db","qp"] line = input().rstrip() if len(line) & 1 and line[len(line) // 2] not in rever: print("NIE") exit() l = len(line) // 2 - 1 r = len(line) // 2 if len(line) & 1 == 0 else\ len(line) // 2 + 1 for i in range(len(line) // 2): if line[l] + line[r] not in rev and (line[l] not in rever or line[l] != line[r]): break l-=1 r+=1 if l != -1 or r != len(line): print("NIE") else: print("TAK")
python
code_algorithm
[ { "input": "oXoxoXo\n", "output": "TAK\n" }, { "input": "bod\n", "output": "TAK\n" }, { "input": "ER\n", "output": "NIE\n" }, { "input": "oiio\n", "output": "NIE\n" }, { "input": "uuuu\n", "output": "NIE\n" }, { "input": "iOi\n", "output": "NIE\n" }, { "input": "VxrV\n", "output": "NIE\n" }, { "input": "A\n", "output": "TAK\n" }, { "input": "lxl\n", "output": "NIE\n" }, { "input": "o\n", "output": "TAK\n" }, { "input": "iii\n", "output": "NIE\n" }, { "input": "ipOqi\n", "output": "NIE\n" }, { "input": "uu\n", "output": "NIE\n" }, { "input": "uuu\n", "output": "NIE\n" }, { "input": "O\n", "output": "TAK\n" }, { "input": "AAWW\n", "output": "NIE\n" }, { "input": "Db\n", "output": "NIE\n" }, { "input": "OuO\n", "output": "NIE\n" }, { "input": "JL\n", "output": "NIE\n" }, { "input": "tt\n", "output": "NIE\n" }, { "input": "ii\n", "output": "NIE\n" }, { "input": "NNNN\n", "output": "NIE\n" }, { "input": "iIcamjTRFH\n", "output": "NIE\n" }, { "input": "T\n", "output": "TAK\n" }, { "input": "pop\n", "output": "NIE\n" }, { "input": "lll\n", "output": "NIE\n" }, { "input": "vvivv\n", "output": "NIE\n" }, { "input": "mnmnm\n", "output": "NIE\n" }, { "input": "Z\n", "output": "NIE\n" }, { "input": "AuuA\n", "output": "NIE\n" }, { "input": "ipIqi\n", "output": "NIE\n" }, { "input": "bid\n", "output": "NIE\n" }, { "input": "s\n", "output": "NIE\n" }, { "input": "uvu\n", "output": "NIE\n" }, { "input": "NpOqN\n", "output": "NIE\n" }, { "input": "lOl\n", "output": "NIE\n" }, { "input": "bd\n", "output": "TAK\n" }, { "input": "hh\n", "output": "NIE\n" }, { "input": "aZ\n", "output": "NIE\n" }, { "input": "aAa\n", "output": "NIE\n" }, { "input": "fv\n", "output": "NIE\n" }, { "input": "mom\n", "output": "NIE\n" }, { "input": "z\n", "output": "NIE\n" }, { "input": "AiiiA\n", "output": "NIE\n" }, { "input": "BB\n", "output": "NIE\n" }, { "input": "ZoZ\n", "output": "NIE\n" }, { "input": "opo\n", "output": "NIE\n" }, { "input": "puq\n", "output": "NIE\n" }, { "input": "ssss\n", "output": "NIE\n" }, { "input": "mmmmmmmmmmmmmmmm\n", "output": "NIE\n" }, { "input": "U\n", "output": "TAK\n" }, { "input": "NN\n", "output": "NIE\n" }, { "input": "LJ\n", "output": "NIE\n" }, { "input": "POP\n", "output": "NIE\n" }, { "input": "ioh\n", "output": "NIE\n" }, { "input": "uOu\n", "output": "NIE\n" }, { "input": "ll\n", "output": "NIE\n" }, { "input": "WvoWvvWovW\n", "output": "TAK\n" }, { "input": "lml\n", "output": "NIE\n" }, { "input": "NON\n", "output": "NIE\n" }, { "input": "ioi\n", "output": "NIE\n" }, { "input": "qAq\n", "output": "NIE\n" }, { "input": "SOS\n", "output": "NIE\n" }, { "input": "vV\n", "output": "NIE\n" }, { "input": "aaaiaaa\n", "output": "NIE\n" }, { "input": "AZA\n", "output": "NIE\n" }, { "input": "nnnn\n", "output": "NIE\n" }, { "input": "Y\n", "output": "TAK\n" }, { "input": "dxxd\n", "output": "NIE\n" }, { "input": "bb\n", "output": "NIE\n" }, { "input": "NoN\n", "output": "NIE\n" }, { "input": "lol\n", "output": "NIE\n" }, { "input": "yAy\n", "output": "NIE\n" }, { "input": "dp\n", "output": "NIE\n" }, { "input": "H\n", "output": "TAK\n" }, { "input": "mm\n", "output": "NIE\n" }, { "input": "aa\n", "output": "NIE\n" }, { "input": "l\n", "output": "NIE\n" }, { "input": "i\n", "output": "NIE\n" }, { "input": "AAMM\n", "output": "NIE\n" }, { "input": "yy\n", "output": "NIE\n" }, { "input": "I\n", "output": "TAK\n" }, { "input": "bNd\n", "output": "NIE\n" }, { "input": "YAiAY\n", "output": "NIE\n" }, { "input": "sss\n", "output": "NIE\n" }, { "input": "ZzZ\n", "output": "NIE\n" }, { "input": "m\n", "output": "NIE\n" }, { "input": "vMo\n", "output": "NIE\n" }, { "input": "oNoNo\n", "output": "NIE\n" }, { "input": "mmmmmmm\n", "output": "NIE\n" }, { "input": "mmmAmmm\n", "output": "NIE\n" }, { "input": "blld\n", "output": "NIE\n" }, { "input": "nnnnnnnnnnnnn\n", "output": "NIE\n" }, { "input": "mmmmm\n", "output": "NIE\n" }, { "input": "mAm\n", "output": "NIE\n" }, { "input": "nn\n", "output": "NIE\n" }, { "input": "oYo\n", "output": "TAK\n" }, { "input": "olo\n", "output": "NIE\n" }, { "input": "AiiA\n", "output": "NIE\n" }, { "input": "N\n", "output": "NIE\n" }, { "input": "zAz\n", "output": "NIE\n" }, { "input": "UA\n", "output": "NIE\n" }, { "input": "u\n", "output": "NIE\n" }, { "input": "S\n", "output": "NIE\n" }, { "input": "llllll\n", "output": "NIE\n" }, { "input": "c\n", "output": "NIE\n" }, { "input": "qlililp\n", "output": "NIE\n" }, { "input": "SS\n", "output": "NIE\n" }, { "input": "dd\n", "output": "NIE\n" }, { "input": "AAA\n", "output": "TAK\n" }, { "input": "vMhhXCMWDe\n", "output": "NIE\n" }, { "input": "lllll\n", "output": "NIE\n" }, { "input": "XHX\n", "output": "TAK\n" }, { "input": "t\n", "output": "NIE\n" }, { "input": "viv\n", "output": "NIE\n" }, { "input": "h\n", "output": "NIE\n" }, { "input": "uou\n", "output": "NIE\n" }, { "input": "uoOou\n", "output": "NIE\n" }, { "input": "sos\n", "output": "NIE\n" }, { "input": "NAMAN\n", "output": "NIE\n" }, { "input": "zz\n", "output": "NIE\n" }, { "input": "mmmm\n", "output": "NIE\n" }, { "input": "AiA\n", "output": "NIE\n" }, { "input": "bob\n", "output": "NIE\n" }, { "input": "iiiiiiiiii\n", "output": "NIE\n" }, { "input": "AAAANANAAAA\n", "output": "NIE\n" }, { "input": "tAt\n", "output": "NIE\n" }, { "input": "ouo\n", "output": "NIE\n" }, { "input": "mOm\n", "output": "NIE\n" }, { "input": "mXm\n", "output": "NIE\n" }, { "input": "OA\n", "output": "NIE\n" }, { "input": "bbbb\n", "output": "NIE\n" }, { "input": "vqMTUUTMpv\n", "output": "TAK\n" }, { "input": "bzd\n", "output": "NIE\n" }, { "input": "AA\n", "output": "TAK\n" }, { "input": "a\n", "output": "NIE\n" }, { "input": "mmm\n", "output": "NIE\n" }, { "input": "lAl\n", "output": "NIE\n" }, { "input": "iiii\n", "output": "NIE\n" }, { "input": "ss\n", "output": "NIE\n" }, { "input": "AbpA\n", "output": "NIE\n" }, { "input": "vYv\n", "output": "TAK\n" }, { "input": "rrrrrr\n", "output": "NIE\n" }, { "input": "n\n", "output": "NIE\n" }, { "input": "ZZ\n", "output": "NIE\n" }, { "input": "BAAAB\n", "output": "NIE\n" }, { "input": "bmd\n", "output": "NIE\n" }, { "input": "HCMoxkgbNb\n", "output": "NIE\n" }, { "input": "llll\n", "output": "NIE\n" }, { "input": "mmmmmm\n", "output": "NIE\n" }, { "input": "mpOqm\n", "output": "NIE\n" }, { "input": "ixi\n", "output": "NIE\n" }, { "input": "ssops\n", "output": "NIE\n" }, { "input": "ZAZ\n", "output": "NIE\n" }, { "input": "iAi\n", "output": "NIE\n" }, { "input": "NAN\n", "output": "NIE\n" }, { "input": "WXxAdbAxXW\n", "output": "TAK\n" } ]
code_contests
python
0
23ab5c0d110b5cda30aa13aeb0525ec7
A new innovative ticketing systems for public transport is introduced in Bytesburg. Now there is a single travel card for all transport. To make a trip a passenger scan his card and then he is charged according to the fare. The fare is constructed in the following manner. There are three types of tickets: 1. a ticket for one trip costs 20 byteland rubles, 2. a ticket for 90 minutes costs 50 byteland rubles, 3. a ticket for one day (1440 minutes) costs 120 byteland rubles. Note that a ticket for x minutes activated at time t can be used for trips started in time range from t to t + x - 1, inclusive. Assume that all trips take exactly one minute. To simplify the choice for the passenger, the system automatically chooses the optimal tickets. After each trip starts, the system analyses all the previous trips and the current trip and chooses a set of tickets for these trips with a minimum total cost. Let the minimum total cost of tickets to cover all trips from the first to the current is a, and the total sum charged before is b. Then the system charges the passenger the sum a - b. You have to write a program that, for given trips made by a passenger, calculates the sum the passenger is charged after each trip. Input The first line of input contains integer number n (1 ≤ n ≤ 105) — the number of trips made by passenger. Each of the following n lines contains the time of trip ti (0 ≤ ti ≤ 109), measured in minutes from the time of starting the system. All ti are different, given in ascending order, i. e. ti + 1 > ti holds for all 1 ≤ i < n. Output Output n integers. For each trip, print the sum the passenger is charged after it. Examples Input 3 10 20 30 Output 20 20 10 Input 10 13 45 46 60 103 115 126 150 256 516 Output 20 20 10 0 20 0 0 20 20 10 Note In the first example, the system works as follows: for the first and second trips it is cheaper to pay for two one-trip tickets, so each time 20 rubles is charged, after the third trip the system understands that it would be cheaper to buy a ticket for 90 minutes. This ticket costs 50 rubles, and the passenger had already paid 40 rubles, so it is necessary to charge 10 rubles only. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
#-*- coding:utf-8 -*- #!/usr/bin/python3 n = int(input()) a = [0,] for i in range(n): x = int(input()) a.append(x) dp = [0] * (n + 1) dp[0] = 0 p90 = 1 p1440 = 1 for i in range(1, n + 1): dp[i] = dp[i - 1] + 20 while a[p90] + 90 <= a[i]: p90 = p90 + 1 dp[i] = min(dp[i], dp[p90 - 1] + 50) while a[p1440] + 1440 <= a[i]: p1440 = p1440 + 1 dp[i] = min(dp[i], dp[p1440 - 1] + 120) for i in range(1, n + 1): print(dp[i] - dp[i - 1])
python
code_algorithm
[ { "input": "3\n10\n20\n30\n", "output": "20\n20\n10\n" }, { "input": "10\n13\n45\n46\n60\n103\n115\n126\n150\n256\n516\n", "output": "20\n20\n10\n0\n20\n0\n0\n20\n20\n10\n" }, { "input": "1\n0\n", "output": "20\n" }, { "input": "8\n0\n2\n51\n63\n69\n75\n80\n90\n", "output": "20\n20\n10\n0\n0\n0\n0\n20\n" }, { "input": "8\n0\n3\n5\n6\n7\n8\n9\n10\n", "output": "20\n20\n10\n0\n0\n0\n0\n0\n" }, { "input": "7\n100\n138\n279\n308\n396\n412\n821\n", "output": "20\n20\n20\n20\n20\n20\n0\n" } ]
code_contests
python
0.6
bbadb40e89587a6cf871dee843828f81
Vasya has recently developed a new algorithm to optimize the reception of customer flow and he considered the following problem. Let the queue to the cashier contain n people, at that each of them is characterized by a positive integer ai — that is the time needed to work with this customer. What is special about this very cashier is that it can serve two customers simultaneously. However, if two customers need ai and aj of time to be served, the time needed to work with both of them customers is equal to max(ai, aj). Please note that working with customers is an uninterruptable process, and therefore, if two people simultaneously come to the cashier, it means that they begin to be served simultaneously, and will both finish simultaneously (it is possible that one of them will have to wait). Vasya used in his algorithm an ingenious heuristic — as long as the queue has more than one person waiting, then some two people of the first three standing in front of the queue are sent simultaneously. If the queue has only one customer number i, then he goes to the cashier, and is served within ai of time. Note that the total number of phases of serving a customer will always be equal to ⌈n / 2⌉. Vasya thinks that this method will help to cope with the queues we all hate. That's why he asked you to work out a program that will determine the minimum time during which the whole queue will be served using this algorithm. Input The first line of the input file contains a single number n (1 ≤ n ≤ 1000), which is the number of people in the sequence. The second line contains space-separated integers a1, a2, ..., an (1 ≤ ai ≤ 106). The people are numbered starting from the cashier to the end of the queue. Output Print on the first line a single number — the minimum time needed to process all n people. Then on ⌈n / 2⌉ lines print the order in which customers will be served. Each line (probably, except for the last one) must contain two numbers separated by a space — the numbers of customers who will be served at the current stage of processing. If n is odd, then the last line must contain a single number — the number of the last served customer in the queue. The customers are numbered starting from 1. Examples Input 4 1 2 3 4 Output 6 1 2 3 4 Input 5 2 4 3 1 4 Output 8 1 3 2 5 4 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
# 82D def do(): n = int(input()) costs = [int(c) for c in input().split(" ")] next = {} memo = {} def dp(i, pre): if i == n: memo[i, pre] = [costs[pre], [pre]] return memo[i, pre] if i == n - 1: memo[i, pre] = [max(costs[pre], costs[i]), [pre, i]] return memo[i, pre] if (i, pre) not in memo: left1, nxt1 = dp(i + 2, pre) left2, nxt2 = dp(i + 2, i) left3, nxt3 = dp(i + 2, i + 1) left1 += max(costs[i], costs[i+1]) left2 += max(costs[pre], costs[i+1]) left3 += max(costs[pre], costs[i]) m = min(left1, left2, left3) if m == left3: nxt = nxt3 cur = [pre, i] next[i, pre] = (i + 2, i + 1) elif m == left2: nxt = nxt2 cur = [pre, i + 1] next[i, pre] = (i + 2, i) else: nxt = nxt1 cur = [i, i + 1] next[i, pre] = (i + 2, pre) memo[i, pre] = [m, cur] return memo[i, pre] res, _ = dp(1, 0) state = (1, 0) print(res) # print(next) while True: print(" ".join(str(c+1) for c in memo[state][1])) if state not in next: break state = next[state] return 0 do()
python
code_algorithm
[ { "input": "4\n1 2 3 4\n", "output": "6\n1 2\n3 4\n" }, { "input": "5\n2 4 3 1 4\n", "output": "8\n1 3\n2 5\n4\n" }, { "input": "55\n33 64 51 38 37 44 63 89 60 90 33 67 82 81 40 41 58 86 47 78 60 86 81 43 57 89 39 72 59 88 47 41 59 79 35 41 67 57 70 55 90 46 37 64 78 55 82 88 81 60 46 75 34 79 51\n", "output": "1814\n2 3\n1 5\n4 6\n7 9\n8 10\n11 12\n13 14\n15 16\n17 19\n18 20\n22 23\n21 25\n24 27\n28 29\n26 30\n31 32\n33 34\n35 36\n37 39\n38 40\n42 43\n44 45\n41 47\n48 49\n46 50\n51 53\n52 54\n55\n" }, { "input": "8\n100 1 2 3 1000 3 2 1\n", "output": "1007\n2 3\n1 5\n4 6\n7 8\n" }, { "input": "25\n8432 7540 8635 101 3810 1892 8633 1640 8440 2096 7974 5359 9912 6850 2898 5542 4535 344 1000 7041 7018 7573 6952 8521 6266\n", "output": "77477\n1 3\n2 5\n4 6\n7 9\n8 10\n11 13\n12 14\n16 17\n15 19\n20 21\n22 23\n24 25\n18\n" }, { "input": "15\n8257 5015 8429 1425 8674 7051 7808 5562 9581 5867 5033 6170 5217 5283 3452\n", "output": "51300\n1 3\n2 4\n6 7\n5 9\n8 11\n10 12\n13 14\n15\n" }, { "input": "100\n1525 7246 2782 4070 7539 5459 8162 8074 5197 4808 4599 8161 2110 2216 7434 9937 2350 9406 9497 8027 2100 1600 7508 3441 4356 3928 8448 3788 7189 9186 7923 5170 6940 6986 9909 8418 2963 9146 8411 6136 6753 3006 2726 4290 7310 8044 3558 6136 4781 1765 4242 5433 9937 8768 5103 4470 1000 5480 4834 3372 8877 2388 3601 8731 4873 3455 1121 2727 5053 8367 8677 2326 6646 8178 8722 7911 6188 8800 5693 1546 1690 5921 7368 3688 6250 7749 3073 2254 4794 4291 7590 2647 6187 5988 1729 6855 3936 5016 4874 5675\n", "output": "299505\n1 3\n2 5\n4 6\n7 8\n9 10\n11 13\n12 15\n14 17\n16 19\n18 20\n21 22\n24 25\n23 27\n26 28\n29 31\n32 33\n30 35\n34 36\n38 39\n40 41\n37 43\n42 44\n45 46\n48 49\n47 50\n51 52\n53 54\n55 56\n58 59\n57 60\n62 63\n61 64\n66 67\n65 69\n70 71\n68 72\n74 75\n73 77\n76 78\n80 81\n79 82\n84 85\n83 86\n87 88\n89 90\n91 93\n92 95\n94 96\n97 99\n98 100\n" }, { "input": "15\n6 6 6 6 6 6 6 5 5 6 6 6 6 5 6\n", "output": "46\n1 2\n3 4\n5 6\n8 9\n7 10\n11 12\n13 15\n14\n" }, { "input": "55\n56 5023 3523 1042 1540 1549 3830 4597 3736 181 4642 260 1695 1766 1567 1984 973 1035 687 1556 1569 1703 3869 3004 1766 2624 3145 4414 1876 4203 1491 899 3172 3843 2988 3858 2768 2967 998 2219 5364 4699 2869 2978 1297 5652 3992 5147 1995 1992 350 3597 2328 5679 371\n", "output": "78896\n2 3\n1 4\n5 6\n7 9\n8 11\n10 12\n13 15\n14 16\n17 19\n18 20\n21 22\n23 24\n26 27\n25 29\n28 30\n31 32\n33 35\n34 36\n37 38\n39 40\n41 42\n43 44\n46 47\n45 49\n50 51\n52 53\n48 54\n55\n" }, { "input": "7\n10 1 1 10 1 1 10\n", "output": "22\n1 2\n3 5\n4 7\n6\n" }, { "input": "3\n1 10 1\n", "output": "11\n1 2\n3\n" }, { "input": "7\n100 1 2 3 4 3 2\n", "output": "107\n2 3\n1 5\n4 6\n7\n" }, { "input": "55\n9756 9901 6482 8013 6684 3583 1777 4593 7432 3389 3887 1139 7086 6908 3715 1810 8360 2029 7149 3548 5049 5650 6870 1247 6993 1527 7986 9839 3271 9201 8331 5640 7205 1179 7274 1136 8358 9420 5380 2415 1599 5295 5541 8297 3277 3817 6220 9655 3180 9467 1613 4500 5821 4902 2138\n", "output": "162951\n1 2\n3 5\n6 7\n4 9\n8 11\n10 12\n13 14\n15 16\n17 19\n18 20\n21 22\n23 25\n24 26\n27 28\n30 31\n29 32\n33 35\n34 36\n37 38\n40 41\n39 43\n42 45\n44 47\n46 49\n48 50\n52 53\n54 55\n51\n" }, { "input": "15\n9 9 4 2 4 6 5 7 1 7 4 3 8 4 1\n", "output": "41\n1 2\n3 5\n6 7\n4 9\n8 10\n11 12\n13 14\n15\n" }, { "input": "1\n10\n", "output": "10\n1\n" }, { "input": "25\n58 59 59 59 52 54 58 55 59 58 54 58 58 59 56 52 50 59 51 57 60 51 58 58 57\n", "output": "737\n1 2\n3 4\n5 6\n7 9\n8 11\n10 12\n13 14\n15 16\n17 19\n18 21\n20 23\n24 25\n22\n" }, { "input": "5\n4 5 4 5 5\n", "output": "14\n1 2\n4 5\n3\n" }, { "input": "25\n45 59 47 19 54 29 31 36 55 58 47 37 18 7 23 47 59 20 53 6 37 55 10 54 24\n", "output": "518\n1 3\n2 5\n4 6\n7 8\n9 10\n11 12\n13 14\n16 17\n15 18\n19 21\n20 23\n22 24\n25\n" }, { "input": "25\n88 71 33 8 68 76 2 65 22 32 45 71 14 85 65 30 78 47 70 18 32 90 84 15 90\n", "output": "731\n1 2\n3 5\n4 7\n6 8\n10 11\n9 13\n12 15\n14 17\n16 18\n20 21\n19 23\n22 25\n24\n" }, { "input": "10\n9 4 4 6 10 4 4 10 7 8\n", "output": "35\n2 3\n1 4\n6 7\n5 8\n9 10\n" }, { "input": "55\n28 35 54 56 32 31 26 36 46 27 42 48 59 24 58 25 56 41 36 57 51 43 59 44 43 23 51 30 37 57 41 40 27 51 56 23 28 41 51 24 25 29 24 47 32 49 21 22 36 28 34 29 39 56 23\n", "output": "1135\n1 2\n3 4\n5 6\n8 9\n7 10\n11 12\n13 15\n14 16\n18 19\n17 21\n20 23\n22 25\n24 27\n26 28\n29 31\n32 33\n30 35\n36 37\n34 39\n40 41\n42 43\n38 45\n44 46\n47 48\n49 51\n50 52\n53 54\n55\n" }, { "input": "2\n3 5\n", "output": "5\n1 2\n" } ]
code_contests
python
0
926320afac06940d4300b7315de445e2
Recently, Dima met with Sasha in a philatelic store, and since then they are collecting coins together. Their favorite occupation is to sort collections of coins. Sasha likes having things in order, that is why he wants his coins to be arranged in a row in such a way that firstly come coins out of circulation, and then come coins still in circulation. For arranging coins Dima uses the following algorithm. One step of his algorithm looks like the following: 1. He looks through all the coins from left to right; 2. If he sees that the i-th coin is still in circulation, and (i + 1)-th coin is already out of circulation, he exchanges these two coins and continues watching coins from (i + 1)-th. Dima repeats the procedure above until it happens that no two coins were exchanged during this procedure. Dima calls hardness of ordering the number of steps required for him according to the algorithm above to sort the sequence, e.g. the number of times he looks through the coins from the very beginning. For example, for the ordered sequence hardness of ordering equals one. Today Sasha invited Dima and proposed him a game. First he puts n coins in a row, all of them are out of circulation. Then Sasha chooses one of the coins out of circulation and replaces it with a coin in circulation for n times. During this process Sasha constantly asks Dima what is the hardness of ordering of the sequence. The task is more complicated because Dima should not touch the coins and he should determine hardness of ordering in his mind. Help Dima with this task. Input The first line contains single integer n (1 ≤ n ≤ 300 000) — number of coins that Sasha puts behind Dima. Second line contains n distinct integers p1, p2, ..., pn (1 ≤ pi ≤ n) — positions that Sasha puts coins in circulation to. At first Sasha replaces coin located at position p1, then coin located at position p2 and so on. Coins are numbered from left to right. Output Print n + 1 numbers a0, a1, ..., an, where a0 is a hardness of ordering at the beginning, a1 is a hardness of ordering after the first replacement and so on. Examples Input 4 1 3 4 2 Output 1 2 3 2 1 Input 8 6 8 3 4 7 2 1 5 Output 1 2 2 3 4 3 4 5 1 Note Let's denote as O coin out of circulation, and as X — coin is circulation. At the first sample, initially in row there are coins that are not in circulation, so Dima will look through them from left to right and won't make any exchanges. After replacement of the first coin with a coin in circulation, Dima will exchange this coin with next three times and after that he will finally look through the coins and finish the process. XOOO → OOOX After replacement of the third coin, Dima's actions look this way: XOXO → OXOX → OOXX After replacement of the fourth coin, Dima's actions look this way: XOXX → OXXX Finally, after replacement of the second coin, row becomes consisting of coins that are in circulation and Dima will look through coins from left to right without any exchanges. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
from sys import stdin, stdout n = int(stdin.readline()) values = list(map(int, stdin.readline().split())) used = [0 for i in range(n)] right, cnt = n, 0 ans = 1 stdout.write(str(ans) + ' ') for v in values: used[v - 1] = 1 ans += 1 while right and used[right - 1]: ans -= 1 right -= 1 stdout.write(str(ans) + ' ')
python
code_algorithm
[ { "input": "4\n1 3 4 2\n", "output": "1 2 3 2 1 " }, { "input": "8\n6 8 3 4 7 2 1 5\n", "output": "1 2 2 3 4 3 4 5 1 " }, { "input": "1\n1\n", "output": "1 1 " }, { "input": "11\n10 8 9 4 3 5 1 11 7 2 6\n", "output": "1 2 3 4 5 6 7 8 5 5 6 1 " }, { "input": "100\n98 52 63 2 18 96 31 58 84 40 41 45 66 100 46 71 26 48 81 20 73 91 68 76 13 93 17 29 64 95 79 21 55 75 19 85 54 51 89 78 15 87 43 59 36 1 90 35 65 56 62 28 86 5 82 49 3 99 33 9 92 32 74 69 27 22 77 16 44 94 34 6 57 70 23 12 61 25 8 11 67 47 83 88 10 14 30 7 97 60 42 37 24 38 53 50 4 80 72 39\n", "output": "1 2 3 4 5 6 7 8 9 10 11 12 13 14 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 70 71 72 73 74 75 76 77 78 71 39 1 " }, { "input": "11\n10 8 9 4 6 3 5 1 11 7 2\n", "output": "1 2 3 4 5 6 7 8 9 6 2 1 " }, { "input": "100\n1 72 43 50 58 87 10 94 29 51 99 86 92 80 36 31 9 100 85 59 66 30 3 78 17 73 93 37 57 71 45 15 24 2 64 44 65 22 38 79 23 8 16 52 98 97 96 95 91 90 89 88 84 83 82 81 77 76 75 74 70 69 68 67 63 62 61 60 56 55 54 53 49 48 47 46 42 41 40 39 35 34 33 32 28 27 26 25 21 20 19 18 14 13 12 11 7 6 5 4\n", "output": "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 43 43 43 40 40 40 40 37 37 37 37 34 34 34 34 31 31 31 31 28 28 28 28 25 25 25 25 22 22 22 22 19 19 19 19 16 16 16 16 13 13 13 13 10 10 10 10 7 7 7 7 4 4 4 4 1 " } ]
code_contests
python
0
ef86e9d69d9fbc7cdafaabd7f726c62c
You have an array a consisting of n integers. Each integer from 1 to n appears exactly once in this array. For some indices i (1 ≤ i ≤ n - 1) it is possible to swap i-th element with (i + 1)-th, for other indices it is not possible. You may perform any number of swapping operations any order. There is no limit on the number of times you swap i-th element with (i + 1)-th (if the position is not forbidden). Can you make this array sorted in ascending order performing some sequence of swapping operations? Input The first line contains one integer n (2 ≤ n ≤ 200000) — the number of elements in the array. The second line contains n integers a1, a2, ..., an (1 ≤ ai ≤ 200000) — the elements of the array. Each integer from 1 to n appears exactly once. The third line contains a string of n - 1 characters, each character is either 0 or 1. If i-th character is 1, then you can swap i-th element with (i + 1)-th any number of times, otherwise it is forbidden to swap i-th element with (i + 1)-th. Output If it is possible to sort the array in ascending order using any sequence of swaps you are allowed to make, print YES. Otherwise, print NO. Examples Input 6 1 2 5 3 4 6 01110 Output YES Input 6 1 2 5 3 4 6 01010 Output NO Note In the first example you may swap a3 and a4, and then swap a4 and a5. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n=int(input()) l=[int(i) for i in input().split()] #canswap=[int(i) for i in input().split()] canswap=input() maxi=l[0] for i in range(0,n-1,): maxi=max(maxi,l[i]) if canswap[i]=='0' and i+1<maxi: print('NO') exit() print('YES')
python
code_algorithm
[ { "input": "6\n1 2 5 3 4 6\n01110\n", "output": "YES\n" }, { "input": "6\n1 2 5 3 4 6\n01010\n", "output": "NO\n" }, { "input": "6\n1 6 3 4 5 2\n01110\n", "output": "NO\n" }, { "input": "6\n1 2 3 4 6 5\n00001\n", "output": "YES\n" }, { "input": "6\n6 1 2 3 4 5\n10001\n", "output": "NO\n" }, { "input": "11\n1 2 3 4 5 6 7 8 9 10 11\n0000000000\n", "output": "YES\n" }, { "input": "5\n1 4 5 2 3\n1011\n", "output": "NO\n" }, { "input": "4\n2 4 3 1\n011\n", "output": "NO\n" }, { "input": "6\n1 5 3 4 2 6\n01010\n", "output": "NO\n" }, { "input": "5\n4 5 1 2 3\n0111\n", "output": "NO\n" }, { "input": "6\n1 2 6 3 4 5\n11110\n", "output": "NO\n" }, { "input": "6\n2 1 3 4 5 6\n10000\n", "output": "YES\n" }, { "input": "5\n2 3 4 5 1\n0011\n", "output": "NO\n" }, { "input": "5\n4 5 1 2 3\n1110\n", "output": "NO\n" }, { "input": "5\n1 2 4 5 3\n0101\n", "output": "NO\n" }, { "input": "5\n5 4 3 1 2\n1110\n", "output": "NO\n" }, { "input": "6\n3 2 6 5 1 4\n11011\n", "output": "NO\n" }, { "input": "10\n5 4 10 9 2 1 6 7 3 8\n011111111\n", "output": "NO\n" }, { "input": "6\n1 2 3 4 6 5\n00000\n", "output": "NO\n" }, { "input": "12\n6 9 11 1 12 7 5 8 10 4 3 2\n11111111110\n", "output": "NO\n" }, { "input": "10\n5 2 7 9 1 10 3 4 6 8\n111101000\n", "output": "NO\n" }, { "input": "7\n1 7 3 4 5 6 2\n010001\n", "output": "NO\n" }, { "input": "7\n1 2 7 3 4 5 6\n111011\n", "output": "NO\n" }, { "input": "5\n3 4 5 1 2\n1110\n", "output": "NO\n" }, { "input": "6\n1 6 3 4 5 2\n01001\n", "output": "NO\n" }, { "input": "4\n2 4 3 1\n101\n", "output": "NO\n" }, { "input": "6\n6 1 2 3 4 5\n11101\n", "output": "NO\n" }, { "input": "6\n1 6 3 4 5 2\n01101\n", "output": "NO\n" }, { "input": "5\n3 1 5 2 4\n1011\n", "output": "NO\n" }, { "input": "7\n1 7 3 2 5 6 4\n111001\n", "output": "NO\n" }, { "input": "16\n3 4 14 16 11 7 13 9 10 8 6 5 15 12 1 2\n111111101111111\n", "output": "NO\n" }, { "input": "3\n1 3 2\n01\n", "output": "YES\n" }, { "input": "4\n1 3 4 2\n101\n", "output": "NO\n" }, { "input": "6\n2 3 1 4 5 6\n01111\n", "output": "NO\n" }, { "input": "6\n3 1 2 5 6 4\n10011\n", "output": "NO\n" }, { "input": "5\n1 2 4 5 3\n1101\n", "output": "NO\n" }, { "input": "5\n1 4 2 5 3\n1101\n", "output": "NO\n" }, { "input": "5\n1 3 2 5 4\n1110\n", "output": "NO\n" }, { "input": "4\n2 3 1 4\n011\n", "output": "NO\n" }, { "input": "5\n1 5 3 2 4\n1110\n", "output": "NO\n" }, { "input": "5\n3 1 4 5 2\n1001\n", "output": "NO\n" }, { "input": "9\n9 8 7 6 5 4 3 1 2\n11111110\n", "output": "NO\n" }, { "input": "8\n6 1 7 8 3 2 5 4\n1011111\n", "output": "NO\n" }, { "input": "10\n6 5 9 4 3 2 8 10 7 1\n111111110\n", "output": "NO\n" }, { "input": "5\n2 5 4 3 1\n0111\n", "output": "NO\n" }, { "input": "6\n1 4 3 5 6 2\n01101\n", "output": "NO\n" }, { "input": "4\n2 3 4 1\n011\n", "output": "NO\n" }, { "input": "5\n1 2 4 5 3\n0001\n", "output": "NO\n" }, { "input": "3\n2 1 3\n01\n", "output": "NO\n" }, { "input": "10\n1 2 3 4 5 6 8 9 7 10\n000000000\n", "output": "NO\n" }, { "input": "3\n1 3 2\n10\n", "output": "NO\n" }, { "input": "6\n5 6 1 2 3 4\n01111\n", "output": "NO\n" }, { "input": "11\n9 8 10 11 1 2 3 4 5 6 7\n1101111111\n", "output": "NO\n" }, { "input": "5\n1 3 4 2 5\n0010\n", "output": "NO\n" }, { "input": "5\n5 2 3 4 1\n1001\n", "output": "NO\n" }, { "input": "6\n6 2 3 1 4 5\n11110\n", "output": "NO\n" }, { "input": "9\n2 1 3 6 5 4 7 9 8\n10011001\n", "output": "YES\n" }, { "input": "5\n1 5 3 4 2\n0101\n", "output": "NO\n" }, { "input": "4\n3 1 2 4\n101\n", "output": "NO\n" }, { "input": "10\n1 3 6 5 2 9 7 8 4 10\n001101111\n", "output": "NO\n" }, { "input": "6\n3 2 4 1 5 6\n10111\n", "output": "NO\n" }, { "input": "10\n3 10 1 2 6 4 5 7 8 9\n111111001\n", "output": "NO\n" }, { "input": "6\n2 3 4 5 1 6\n00010\n", "output": "NO\n" }, { "input": "5\n4 5 1 2 3\n1011\n", "output": "NO\n" }, { "input": "6\n5 6 3 2 4 1\n01111\n", "output": "NO\n" }, { "input": "5\n1 5 3 4 2\n1101\n", "output": "NO\n" }, { "input": "6\n4 6 3 5 2 1\n11110\n", "output": "NO\n" }, { "input": "4\n2 1 4 3\n100\n", "output": "NO\n" }, { "input": "4\n2 3 4 1\n001\n", "output": "NO\n" }, { "input": "2\n2 1\n0\n", "output": "NO\n" }, { "input": "5\n2 3 5 1 4\n0011\n", "output": "NO\n" }, { "input": "5\n5 4 2 3 1\n1110\n", "output": "NO\n" }, { "input": "7\n1 7 2 4 3 5 6\n011110\n", "output": "NO\n" }, { "input": "5\n1 5 4 3 2\n0111\n", "output": "YES\n" }, { "input": "4\n3 4 1 2\n011\n", "output": "NO\n" }, { "input": "6\n1 3 6 2 4 5\n10111\n", "output": "NO\n" }, { "input": "5\n5 3 2 4 1\n0100\n", "output": "NO\n" }, { "input": "5\n5 4 3 2 1\n0000\n", "output": "NO\n" }, { "input": "2\n1 2\n1\n", "output": "YES\n" }, { "input": "5\n5 2 3 1 4\n1011\n", "output": "NO\n" }, { "input": "5\n3 2 4 1 5\n1010\n", "output": "NO\n" }, { "input": "4\n2 4 3 1\n100\n", "output": "NO\n" }, { "input": "5\n3 2 1 5 4\n1100\n", "output": "NO\n" }, { "input": "10\n1 2 3 4 5 6 7 8 9 10\n000000000\n", "output": "YES\n" }, { "input": "4\n3 1 2 4\n100\n", "output": "NO\n" }, { "input": "20\n20 19 18 17 16 15 1 2 3 4 5 14 13 12 11 10 9 8 7 6\n1111111011111111111\n", "output": "NO\n" }, { "input": "5\n2 4 3 1 5\n0110\n", "output": "NO\n" }, { "input": "2\n1 2\n0\n", "output": "YES\n" }, { "input": "5\n3 4 2 1 5\n0110\n", "output": "NO\n" }, { "input": "6\n1 2 3 6 4 5\n11001\n", "output": "NO\n" }, { "input": "6\n3 2 1 6 5 4\n11000\n", "output": "NO\n" }, { "input": "7\n1 2 5 3 6 4 7\n111011\n", "output": "NO\n" }, { "input": "3\n2 3 1\n01\n", "output": "NO\n" }, { "input": "3\n3 1 2\n10\n", "output": "NO\n" }, { "input": "3\n2 3 1\n10\n", "output": "NO\n" }, { "input": "5\n2 4 1 3 5\n0110\n", "output": "NO\n" }, { "input": "2\n2 1\n1\n", "output": "YES\n" }, { "input": "4\n1 4 2 3\n010\n", "output": "NO\n" }, { "input": "6\n5 6 1 2 4 3\n11101\n", "output": "NO\n" }, { "input": "10\n1 8 9 7 6 10 4 2 3 5\n111111101\n", "output": "NO\n" }, { "input": "7\n1 2 7 3 4 5 6\n111101\n", "output": "NO\n" }, { "input": "7\n2 3 1 7 6 5 4\n011111\n", "output": "NO\n" }, { "input": "6\n1 5 3 4 2 6\n11011\n", "output": "NO\n" }, { "input": "4\n3 4 1 2\n101\n", "output": "NO\n" }, { "input": "5\n1 4 5 2 3\n0110\n", "output": "NO\n" }, { "input": "6\n1 2 4 5 6 3\n10011\n", "output": "NO\n" }, { "input": "7\n3 1 7 4 5 2 6\n101110\n", "output": "NO\n" }, { "input": "10\n6 7 8 9 10 1 2 3 4 5\n111111110\n", "output": "NO\n" }, { "input": "5\n5 4 3 2 1\n1110\n", "output": "NO\n" }, { "input": "6\n4 6 5 3 2 1\n01111\n", "output": "NO\n" }, { "input": "4\n2 3 4 1\n101\n", "output": "NO\n" }, { "input": "10\n9 1 2 3 7 8 5 6 4 10\n110111100\n", "output": "NO\n" }, { "input": "3\n3 2 1\n00\n", "output": "NO\n" }, { "input": "4\n1 3 4 2\n001\n", "output": "NO\n" }, { "input": "6\n1 3 5 2 4 6\n00110\n", "output": "NO\n" }, { "input": "8\n2 6 4 1 5 7 3 8\n1010010\n", "output": "NO\n" }, { "input": "5\n1 3 4 2 5\n0100\n", "output": "NO\n" }, { "input": "70\n4 65 66 30 67 16 39 35 57 14 42 51 5 21 61 53 63 13 60 29 68 70 69 46 20 2 43 47 49 52 26 44 54 62 25 19 12 28 27 24 18 36 6 33 7 8 11 1 45 32 64 38 23 22 56 59 15 9 41 37 40 55 3 31 34 48 50 10 17 58\n111111101101111111111110101111111111111101101111010010110011011110010\n", "output": "NO\n" }, { "input": "4\n1 2 4 3\n001\n", "output": "YES\n" }, { "input": "6\n6 5 4 1 2 3\n11100\n", "output": "NO\n" } ]
code_contests
python
0.1
ee416afe08946188dccb38bc8555c047
Acingel is a small town. There was only one doctor here — Miss Ada. She was very friendly and nobody has ever said something bad about her, so who could've expected that Ada will be found dead in her house? Mr Gawry, world-famous detective, is appointed to find the criminal. He asked m neighbours of Ada about clients who have visited her in that unlucky day. Let's number the clients from 1 to n. Each neighbour's testimony is a permutation of these numbers, which describes the order in which clients have been seen by the asked neighbour. However, some facts are very suspicious – how it is that, according to some of given permutations, some client has been seen in the morning, while in others he has been seen in the evening? "In the morning some of neighbours must have been sleeping!" — thinks Gawry — "and in the evening there's been too dark to see somebody's face...". Now he wants to delete some prefix and some suffix (both prefix and suffix can be empty) in each permutation, so that they'll be non-empty and equal to each other after that — some of the potential criminals may disappear, but the testimony won't stand in contradiction to each other. In how many ways he can do it? Two ways are called different if the remaining common part is different. Input The first line contains two integers n and m (1 ≤ n ≤ 100 000, 1 ≤ m ≤ 10) — the number of suspects and the number of asked neighbors. Each of the next m lines contains n integers a_1, a_2, …, a_n (1 ≤ a_i ≤ n). It is guaranteed that these integers form a correct permutation (that is, each number from 1 to n appears exactly once). Output Output a single integer denoting the number of ways to delete some prefix and some suffix of each permutation (possibly empty), such that the remaining parts will be equal and non-empty. Examples Input 3 2 1 2 3 2 3 1 Output 4 Input 5 6 1 2 3 4 5 2 3 1 4 5 3 4 5 1 2 3 5 4 2 1 2 3 5 4 1 1 2 3 4 5 Output 5 Input 2 2 1 2 2 1 Output 2 Note In the first example, all possible common parts are [1], [2], [3] and [2, 3]. In the second and third examples, you can only leave common parts of length 1. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n, m = map(int, input().split()) a = [] for i in range(m): a.append(list(map(int, input().split()))) b = [set([]) for i in range(n)] for i in range(n): for j in range(m): ya = a[j][i] if i == n-1: b[ya-1].add(100000000) else: b[ya-1].add(a[j][i+1]) class UnionFind(): def __init__(self,size): self.table = [-1 for _ in range(size)] def find(self,x): while self.table[x] >= 0: x = self.table[x] return x def union(self,x,y): s1 = self.find(x) s2 = self.find(y) if s1 != s2: if self.table[s1] != self.table[s2]: if self.table[s1] < self.table[s2]: self.table[s2] = s1 else: self.table[s1] = s2 else: self.table[s1] += -1 self.table[s2] = s1 return UN = UnionFind(n) for i in range(n): if len(b[i]) == 1 and list(b[i])[0] !=100000000: UN.union(i,list(b[i])[0]-1) d = [0]*n for i in range(n): d[UN.find(i)] += 1 ans = 0 for i in range(n): ans += (d[i]-1)*(d[i])//2 print(ans+n)
python
code_algorithm
[ { "input": "2 2\n1 2\n2 1\n", "output": "2\n" }, { "input": "3 2\n1 2 3\n2 3 1\n", "output": "4\n" }, { "input": "5 6\n1 2 3 4 5\n2 3 1 4 5\n3 4 5 1 2\n3 5 4 2 1\n2 3 5 4 1\n1 2 3 4 5\n", "output": "5\n" }, { "input": "1 1\n1\n", "output": "1\n" }, { "input": "2 1\n1 2\n", "output": "3\n" }, { "input": "10 5\n6 8 4 1 7 10 3 2 5 9\n4 1 7 10 2 5 9 6 8 3\n3 6 8 4 1 7 10 2 5 9\n2 5 9 8 4 1 7 10 3 6\n2 5 9 6 8 4 1 7 10 3\n", "output": "19\n" }, { "input": "10 3\n4 10 5 1 6 8 9 2 3 7\n2 8 5 3 1 4 6 7 10 9\n2 4 5 3 6 10 9 1 8 7\n", "output": "10\n" }, { "input": "15 2\n9 5 15 6 1 13 8 12 4 11 3 10 2 7 14\n7 13 11 8 9 3 15 2 1 12 10 4 14 6 5\n", "output": "15\n" }, { "input": "10 5\n4 7 6 8 9 2 10 5 3 1\n4 7 6 8 9 2 10 5 3 1\n1 4 7 6 8 9 2 10 5 3\n4 7 6 8 9 2 10 5 3 1\n4 7 6 8 9 2 10 5 3 1\n", "output": "46\n" }, { "input": "10 5\n7 10 6 2 4 9 8 1 3 5\n3 5 10 1 8 7 9 6 2 4\n6 2 4 1 8 7 9 3 5 10\n8 9 10 1 3 5 7 6 2 4\n6 2 4 1 9 10 8 7 3 5\n", "output": "14\n" }, { "input": "2 1\n2 1\n", "output": "3\n" }, { "input": "10 3\n7 4 10 8 3 6 2 9 5 1\n7 4 10 8 3 6 2 9 5 1\n2 9 5 1 7 4 10 8 3 6\n", "output": "31\n" }, { "input": "10 3\n6 5 9 2 3 10 4 1 8 7\n4 1 8 10 6 5 9 2 3 7\n6 5 9 2 3 7 10 4 1 8\n", "output": "23\n" }, { "input": "5 3\n1 2 3 4 5\n2 3 4 1 5\n1 2 3 5 4\n", "output": "6\n" }, { "input": "10 4\n3 7 8 9 2 6 4 10 5 1\n3 7 8 9 2 6 1 4 10 5\n6 4 10 5 3 7 8 9 2 1\n3 7 8 9 2 6 4 10 5 1\n", "output": "23\n" }, { "input": "20 5\n8 1 13 19 3 14 5 2 4 6 12 18 20 17 16 15 11 10 7 9\n12 18 20 17 16 15 11 10 7 9 8 1 13 19 3 14 5 2 4 6\n5 2 4 6 12 18 20 17 16 15 11 10 7 9 8 1 13 19 3 14\n5 2 4 6 12 18 20 17 16 15 11 10 7 9 8 1 13 19 3 14\n8 1 13 19 3 14 5 2 4 6 12 18 20 17 16 15 11 10 7 9\n", "output": "86\n" } ]
code_contests
python
0
019326173946ca30b9e0068f1f14d448
Vova's house is an array consisting of n elements (yeah, this is the first problem, I think, where someone lives in the array). There are heaters in some positions of the array. The i-th element of the array is 1 if there is a heater in the position i, otherwise the i-th element of the array is 0. Each heater has a value r (r is the same for all heaters). This value means that the heater at the position pos can warm up all the elements in range [pos - r + 1; pos + r - 1]. Vova likes to walk through his house while he thinks, and he hates cold positions of his house. Vova wants to switch some of his heaters on in such a way that each element of his house will be warmed up by at least one heater. Vova's target is to warm up the whole house (all the elements of the array), i.e. if n = 6, r = 2 and heaters are at positions 2 and 5, then Vova can warm up the whole house if he switches all the heaters in the house on (then the first 3 elements will be warmed up by the first heater and the last 3 elements will be warmed up by the second heater). Initially, all the heaters are off. But from the other hand, Vova didn't like to pay much for the electricity. So he wants to switch the minimum number of heaters on in such a way that each element of his house is warmed up by at least one heater. Your task is to find this number of heaters or say that it is impossible to warm up the whole house. Input The first line of the input contains two integers n and r (1 ≤ n, r ≤ 1000) — the number of elements in the array and the value of heaters. The second line contains n integers a_1, a_2, ..., a_n (0 ≤ a_i ≤ 1) — the Vova's house description. Output Print one integer — the minimum number of heaters needed to warm up the whole house or -1 if it is impossible to do it. Examples Input 6 2 0 1 1 0 0 1 Output 3 Input 5 3 1 0 0 0 1 Output 2 Input 5 10 0 0 0 0 0 Output -1 Input 10 3 0 0 1 1 0 1 0 0 0 1 Output 3 Note In the first example the heater at the position 2 warms up elements [1; 3], the heater at the position 3 warms up elements [2, 4] and the heater at the position 6 warms up elements [5; 6] so the answer is 3. In the second example the heater at the position 1 warms up elements [1; 3] and the heater at the position 5 warms up elements [3; 5] so the answer is 2. In the third example there are no heaters so the answer is -1. In the fourth example the heater at the position 3 warms up elements [1; 5], the heater at the position 6 warms up elements [4; 8] and the heater at the position 10 warms up elements [8; 10] so the answer is 3. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n,r=[int(x) for x in input().split()] a=[int(x) for x in input().split()] i=ans=0 while i<n: pointer=i f=0 while pointer<n: if pointer-r+1>i: break if a[pointer]==1: j=pointer f=1 pointer+=1 if f==0: pointer=i-1 while pointer>=0: if pointer+r-1<i: break if a[pointer]==1: j=pointer f=1 break pointer-=1 if f==0: break ans+=1 i=j+r if f==0: print(-1) else: print(ans)
python
code_algorithm
[ { "input": "5 10\n0 0 0 0 0\n", "output": "-1\n" }, { "input": "5 3\n1 0 0 0 1\n", "output": "2\n" }, { "input": "6 2\n0 1 1 0 0 1\n", "output": "3\n" }, { "input": "10 3\n0 0 1 1 0 1 0 0 0 1\n", "output": "3\n" }, { "input": "33 729\n0 1 1 0 0 0 0 0 1 0 0 0 1 0 0 1 0 1 1 1 1 0 1 1 1 1 0 1 1 0 0 0 1\n", "output": "1\n" }, { "input": "1 502\n1\n", "output": "1\n" }, { "input": "13 7\n0 0 0 0 0 0 0 1 0 0 0 1 0\n", "output": "-1\n" }, { "input": "3 6\n1 1 1\n", "output": "1\n" }, { "input": "187 64\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "2\n" }, { "input": "2 1\n1 0\n", "output": "-1\n" }, { "input": "1 769\n0\n", "output": "-1\n" }, { "input": "7 3\n1 1 1 1 1 0 0\n", "output": "2\n" }, { "input": "1 81\n0\n", "output": "-1\n" }, { "input": "13 6\n0 0 1 0 0 1 1 1 0 0 0 0 0\n", "output": "2\n" }, { "input": "16 4\n0 0 0 1 1 0 1 0 0 0 0 0 0 1 0 0\n", "output": "3\n" }, { "input": "6 1\n1 1 0 0 1 1\n", "output": "-1\n" }, { "input": "2 1000\n1 0\n", "output": "1\n" }, { "input": "25 12\n0 1 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 1 1 0 0 1 0 0\n", "output": "2\n" }, { "input": "2 888\n1 0\n", "output": "1\n" }, { "input": "69 2\n0 0 0 0 0 0 1 0 1 1 0 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 1 0 0 1 0 0 0 1 0 0 0 1 0\n", "output": "-1\n" }, { "input": "4 3\n1 0 0 0\n", "output": "-1\n" }, { "input": "3 1\n1 0 1\n", "output": "-1\n" }, { "input": "1 79\n0\n", "output": "-1\n" }, { "input": "140 35\n1 1 1 0 0 1 1 0 1 0 1 1 1 0 1 0 1 1 1 1 0 1 1 1 0 0 0 0 1 0 1 1 0 0 1 1 0 1 1 1 0 0 1 1 0 0 0 1 0 1 0 1 1 1 0 0 1 1 0 0 0 1 0 1 1 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1 1 1 1 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 1 0 0 1 0 0 0 0 0 1 1 1 0 1 1 1 0 0 0 0 1 1 0 0 1 1 0 0\n", "output": "3\n" }, { "input": "19 8\n0 1 0 0 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0\n", "output": "-1\n" }, { "input": "5 4\n1 0 0 0 0\n", "output": "-1\n" }, { "input": "8 2\n0 1 1 0 0 1 1 0\n", "output": "4\n" }, { "input": "2 300\n1 0\n", "output": "1\n" }, { "input": "4 2\n0 0 1 1\n", "output": "-1\n" }, { "input": "10 3\n0 0 1 1 1 0 0 0 0 1\n", "output": "3\n" }, { "input": "10 4\n0 0 0 1 1 0 1 0 0 0\n", "output": "2\n" }, { "input": "6 5\n1 0 0 0 0 0\n", "output": "-1\n" }, { "input": "4 3\n1 1 1 1\n", "output": "1\n" }, { "input": "1 1000\n0\n", "output": "-1\n" }, { "input": "6 4\n1 0 1 0 0 0\n", "output": "1\n" }, { "input": "2 3\n1 0\n", "output": "1\n" }, { "input": "4 2\n0 0 1 0\n", "output": "-1\n" } ]
code_contests
python
0.2
9fb2cc0dfa991b3c15c4f1e9a1884e5a
This is the harder version of the problem. In this version, 1 ≤ n ≤ 10^6 and 0 ≤ a_i ≤ 10^6. You can hack this problem if you locked it. But you can hack the previous problem only if you locked both problems Christmas is coming, and our protagonist, Bob, is preparing a spectacular present for his long-time best friend Alice. This year, he decides to prepare n boxes of chocolate, numbered from 1 to n. Initially, the i-th box contains a_i chocolate pieces. Since Bob is a typical nice guy, he will not send Alice n empty boxes. In other words, at least one of a_1, a_2, …, a_n is positive. Since Alice dislikes coprime sets, she will be happy only if there exists some integer k > 1 such that the number of pieces in each box is divisible by k. Note that Alice won't mind if there exists some empty boxes. Charlie, Alice's boyfriend, also is Bob's second best friend, so he decides to help Bob by rearranging the chocolate pieces. In one second, Charlie can pick up a piece in box i and put it into either box i-1 or box i+1 (if such boxes exist). Of course, he wants to help his friend as quickly as possible. Therefore, he asks you to calculate the minimum number of seconds he would need to make Alice happy. Input The first line contains a single integer n (1 ≤ n ≤ 10^6) — the number of chocolate boxes. The second line contains n integers a_1, a_2, …, a_n (0 ≤ a_i ≤ 10^6) — the number of chocolate pieces in the i-th box. It is guaranteed that at least one of a_1, a_2, …, a_n is positive. Output If there is no way for Charlie to make Alice happy, print -1. Otherwise, print a single integer x — the minimum number of seconds for Charlie to help Bob make Alice happy. Examples Input 3 4 8 5 Output 9 Input 5 3 10 2 1 5 Output 2 Input 4 0 5 15 10 Output 0 Input 1 1 Output -1 Note In the first example, Charlie can move all chocolate pieces to the second box. Each box will be divisible by 17. In the second example, Charlie can move a piece from box 2 to box 3 and a piece from box 4 to box 5. Each box will be divisible by 3. In the third example, each box is already divisible by 5. In the fourth example, since Charlie has no available move, he cannot help Bob make Alice happy. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
# 素因数分解 def prime_decomposition(n): i = 2 table = [] while i * i <= n: while n % i == 0: n //= i table.append(i) i += 1 if n > 1: table.append(n) return table import sys input = sys.stdin.readline N = int(input()) A = list(map(int, input().split())) # かけらを移動させて共通因数を持つようにする su = sum(A) if su == 1: print(-1) exit() primes = sorted(set(prime_decomposition(su))) ans = 10**18 for p in primes: an = 0 half = p >> 1 cnt = 0 for a in A: a %= p cnt += a if cnt <= half: an += cnt else: if cnt < p: an += p - cnt else: cnt -= p if cnt <= half: an += cnt else: an += p - cnt if ans <= an: break else: ans = min(ans, an) print(ans)
python
code_algorithm
[ { "input": "3\n4 8 5\n", "output": "9\n" }, { "input": "5\n3 10 2 1 5\n", "output": "2\n" }, { "input": "1\n1\n", "output": "-1\n" }, { "input": "4\n0 5 15 10\n", "output": "0\n" }, { "input": "16\n47 14 19 48 2 41 38 25 5 24 38 22 1 30 38 41\n", "output": "1860\n" }, { "input": "3\n0 0 1\n", "output": "-1\n" }, { "input": "15\n1 1 1 0 0 0 1 1 1 0 0 0 1 1 1\n", "output": "6\n" }, { "input": "17\n64 26 39 57 12 0 64 26 35 8 50 3 64 16 4 42 33\n", "output": "6\n" }, { "input": "19\n51 65 42 25 41 45 68 58 2 33 9 17 28 41 5 0 70 28 26\n", "output": "8\n" }, { "input": "16\n12 0 9 14 12 26 21 24 3 13 7 4 26 1 17 21\n", "output": "9\n" }, { "input": "14\n41 24 6 2 7 24 23 2 13 21 25 14 23 7\n", "output": "8\n" }, { "input": "100\n61 28 67 53 13 6 70 5 79 82 60 60 84 17 80 25 82 82 69 76 81 43 58 86 18 78 4 25 8 30 33 87 91 18 90 26 62 11 28 66 9 33 58 66 47 48 80 38 25 57 4 84 79 71 54 84 63 32 97 62 26 68 5 69 54 93 25 26 100 73 24 94 80 39 30 45 95 80 0 29 57 98 92 15 17 76 69 11 57 56 48 10 28 7 63 66 53 58 12 58\n", "output": "68\n" }, { "input": "10\n3 3 3 5 6 9 3 1 7 3\n", "output": "90\n" }, { "input": "1\n2103\n", "output": "0\n" }, { "input": "20\n55 21 46 36 40 11 12 59 58 2 48 7 86 52 47 48 17 4 72 30\n", "output": "3736\n" }, { "input": "11\n0 3 3 5 5 5 4 3 6 4 1\n", "output": "6\n" }, { "input": "15\n17 7 1 8 2 2 0 18 0 12 11 0 12 12 5\n", "output": "432\n" }, { "input": "11\n59 15 45 18 19 39 63 17 18 58 65\n", "output": "7\n" }, { "input": "3\n0 0 17\n", "output": "0\n" }, { "input": "11\n42 20 19 6 25 0 20 33 40 38 35\n", "output": "5\n" } ]
code_contests
python
0
4dbcec519d06bc0d90d405c23e8d3b22
You are given a string s consisting of lowercase Latin letters. Let the length of s be |s|. You may perform several operations on this string. In one operation, you can choose some index i and remove the i-th character of s (s_i) if at least one of its adjacent characters is the previous letter in the Latin alphabet for s_i. For example, the previous letter for b is a, the previous letter for s is r, the letter a has no previous letters. Note that after each removal the length of the string decreases by one. So, the index i should satisfy the condition 1 ≤ i ≤ |s| during each operation. For the character s_i adjacent characters are s_{i-1} and s_{i+1}. The first and the last characters of s both have only one adjacent character (unless |s| = 1). Consider the following example. Let s= bacabcab. 1. During the first move, you can remove the first character s_1= b because s_2= a. Then the string becomes s= acabcab. 2. During the second move, you can remove the fifth character s_5= c because s_4= b. Then the string becomes s= acabab. 3. During the third move, you can remove the sixth character s_6='b' because s_5= a. Then the string becomes s= acaba. 4. During the fourth move, the only character you can remove is s_4= b, because s_3= a (or s_5= a). The string becomes s= acaa and you cannot do anything with it. Your task is to find the maximum possible number of characters you can remove if you choose the sequence of operations optimally. Input The first line of the input contains one integer |s| (1 ≤ |s| ≤ 100) — the length of s. The second line of the input contains one string s consisting of |s| lowercase Latin letters. Output Print one integer — the maximum possible number of characters you can remove if you choose the sequence of moves optimally. Examples Input 8 bacabcab Output 4 Input 4 bcda Output 3 Input 6 abbbbb Output 5 Note The first example is described in the problem statement. Note that the sequence of moves provided in the statement is not the only, but it can be shown that the maximum possible answer to this test is 4. In the second example, you can remove all but one character of s. The only possible answer follows. 1. During the first move, remove the third character s_3= d, s becomes bca. 2. During the second move, remove the second character s_2= c, s becomes ba. 3. And during the third move, remove the first character s_1= b, s becomes a. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
t=int(input()) s=input() ans='' count=0 while(True): flag=True j=-1 ch=0 for i in range(len(s)): if (i!=0 and ord(s[i-1])-ord(s[i])==-1) or (i!=len(s)-1 and ord(s[i+1])-ord(s[i])==-1): if j==-1 or ord(ch)<ord(s[i]): ch=s[i] j=i flag=False if(flag): break s=s[:j]+s[j+1:len(s)] count+=1 print(count)
python
code_algorithm
[ { "input": "6\nabbbbb\n", "output": "5\n" }, { "input": "4\nbcda\n", "output": "3\n" }, { "input": "8\nbacabcab\n", "output": "4\n" }, { "input": "7\ncddcbcb\n", "output": "5\n" }, { "input": "100\nmxjrojjwtrauhhccftvjsyfyfsnbdnwjfltyjetsylbddrkoqjxbmientcowknrecfqcvxfgsbymwyvakmbulhvrxzvzbygajtgc\n", "output": "2\n" }, { "input": "8\naaaaaaaa\n", "output": "0\n" }, { "input": "100\nyltrygcqmgjzsxoahbvovspancmoaltdrxgjnxwxbrehubvradguoqgiodzanljxtszdutuzgcnihmwevoloceyidyvoopnqbtlb\n", "output": "9\n" }, { "input": "1\nt\n", "output": "0\n" }, { "input": "100\njupemetthxolktvhbmzdwlrekwmcugngajdgifwseksjlibsdgmegmqtmeeeqszqjxjhjenjxofvkesfjugbzephryjqqkxatrvl\n", "output": "1\n" }, { "input": "1\nz\n", "output": "0\n" }, { "input": "100\naaaaaabbcccccccddffffhhhhhhhhiiiiiikkkkkkkkmmmmmmooooooopppprrrrrrrrrttttttvvvvvvvvvvvvxxxxxxxzzzzzz\n", "output": "21\n" }, { "input": "100\nbabaababbaabbabababbabbbababababbaabababaaababaababbbaaababbaabbababababbababbabaabbaabaaaaabbababba\n", "output": "50\n" }, { "input": "100\nciftajmzqbfkvbhnyugneialytrkwjlhzwltylptheadmypbjxdzkxnqovimgmzkwpuelzbbhciinfiyspfatgoexeezolulnliu\n", "output": "0\n" }, { "input": "100\nzbzevxgewibujtbyvhzohoobudkghaivlbpaywiesizahkdxmcpdoqzsxqglezenmsgvsmxcrzcntauvarpakddglhrjmzylfuyq\n", "output": "4\n" }, { "input": "6\naaaaaa\n", "output": "0\n" }, { "input": "7\nbaaabab\n", "output": "3\n" }, { "input": "100\nwhkbjjjrpcgsfaxgcmktmwypyfhbzvvowkvxltbmnyndqkswixxqxriopddrygymbcvadjjheugxgikrlirnhhsmnjmzpizyltau\n", "output": "5\n" }, { "input": "100\nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn\n", "output": "0\n" }, { "input": "100\naaaabbbcccccccdddddeeeeeffgggghhhiijjjjkkkllmmnnnoooppqqqrrrrssssssttttuuuuuuuuvvvvvwwwwxxxxyyyyzzzz\n", "output": "96\n" }, { "input": "10\ncadbcdddda\n", "output": "6\n" }, { "input": "6\nbaabbb\n", "output": "4\n" }, { "input": "6\nbbbbab\n", "output": "5\n" }, { "input": "100\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n", "output": "99\n" }, { "input": "6\ndacbab\n", "output": "3\n" }, { "input": "100\naaaaaaabaaaaaabcaaaaaaaaaaaaaaaaaaaabbbaaaaaaabefhklmnopsuxzywvtrqjigdcaaaaaaaaaaaaaaaaaaaaaaaabaaaa\n", "output": "32\n" }, { "input": "100\nbldubjepvkwhjbxrueydtpparjszjgwpxjlqlpsmdrjoaagfnrohfcabchmdwaoctmilfbpztwjrfdgdioqggokdftcniqywmvjd\n", "output": "3\n" }, { "input": "5\nabbdd\n", "output": "2\n" }, { "input": "10\ncbbbbcaaca\n", "output": "6\n" }, { "input": "100\nababaaaabaabaaaaaaabaaaaaaaaaaaaacbaaaabaaaaaabaabaaaababaaaabaehijkmnpqvxzywutsrolgfdcbaaaabaabaaaa\n", "output": "40\n" }, { "input": "5\nbabaa\n", "output": "2\n" }, { "input": "100\nabcdeghfgefedeefcabaaabcedfefedacbbcaaabehhjlkjikjloqrtuyzxwvspnmnlkjgfdcbacdcghfedfebaacbcbcdbccaaa\n", "output": "85\n" }, { "input": "100\nacdfijmnorszzyyzzzzzzyzzyzzzzxwzzzzzyzzzzzzyzzzzzzzyzzzzzyzzzzzzyxzzzyzzzzzyzzzzzyzzyzzzzvutqplkhgeb\n", "output": "99\n" }, { "input": "7\nccababa\n", "output": "2\n" }, { "input": "100\naaaaabcjkprsvxyzwutqonmlihgfedaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "26\n" }, { "input": "1\na\n", "output": "0\n" }, { "input": "9\nacacaabaa\n", "output": "1\n" }, { "input": "8\nbdaacddc\n", "output": "2\n" }, { "input": "10\naaaaaaaaaa\n", "output": "0\n" }, { "input": "100\nyzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\n", "output": "99\n" }, { "input": "9\naaaaaaaaa\n", "output": "0\n" }, { "input": "9\nbaccbbaca\n", "output": "5\n" }, { "input": "9\naabaaabab\n", "output": "3\n" }, { "input": "8\nabababbc\n", "output": "5\n" }, { "input": "7\naaaaaaa\n", "output": "0\n" }, { "input": "10\nbbaabaabbb\n", "output": "6\n" }, { "input": "8\naaabbaab\n", "output": "3\n" }, { "input": "100\nrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n", "output": "0\n" } ]
code_contests
python
0
09ff262fc87a56b0d6c36eab8341ea7e
Denis, after buying flowers and sweets (you will learn about this story in the next task), went to a date with Nastya to ask her to become a couple. Now, they are sitting in the cafe and finally... Denis asks her to be together, but ... Nastya doesn't give any answer. The poor boy was very upset because of that. He was so sad that he punched some kind of scoreboard with numbers. The numbers are displayed in the same way as on an electronic clock: each digit position consists of 7 segments, which can be turned on or off to display different numbers. The picture shows how all 10 decimal digits are displayed: <image> After the punch, some segments stopped working, that is, some segments might stop glowing if they glowed earlier. But Denis remembered how many sticks were glowing and how many are glowing now. Denis broke exactly k segments and he knows which sticks are working now. Denis came up with the question: what is the maximum possible number that can appear on the board if you turn on exactly k sticks (which are off now)? It is allowed that the number includes leading zeros. Input The first line contains integer n (1 ≤ n ≤ 2000) — the number of digits on scoreboard and k (0 ≤ k ≤ 2000) — the number of segments that stopped working. The next n lines contain one binary string of length 7, the i-th of which encodes the i-th digit of the scoreboard. Each digit on the scoreboard consists of 7 segments. We number them, as in the picture below, and let the i-th place of the binary string be 0 if the i-th stick is not glowing and 1 if it is glowing. Then a binary string of length 7 will specify which segments are glowing now. <image> Thus, the sequences "1110111", "0010010", "1011101", "1011011", "0111010", "1101011", "1101111", "1010010", "1111111", "1111011" encode in sequence all digits from 0 to 9 inclusive. Output Output a single number consisting of n digits — the maximum number that can be obtained if you turn on exactly k sticks or -1, if it is impossible to turn on exactly k sticks so that a correct number appears on the scoreboard digits. Examples Input 1 7 0000000 Output 8 Input 2 5 0010010 0010010 Output 97 Input 3 5 0100001 1001001 1010011 Output -1 Note In the first test, we are obliged to include all 7 sticks and get one 8 digit on the scoreboard. In the second test, we have sticks turned on so that units are formed. For 5 of additionally included sticks, you can get the numbers 07, 18, 34, 43, 70, 79, 81 and 97, of which we choose the maximum — 97. In the third test, it is impossible to turn on exactly 5 sticks so that a sequence of numbers appears on the scoreboard. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
import sys def f(): n, k = map(int, input().split())#2000, 2000 ch = {0:'1110111',1:'0010010',2:'1011101',3:'1011011',4:'0111010',5:'1101011',6:'1101111',7:'1010010',8:'1111111',9:'1111011'} l = [] for _ in range(n): l.append(sys.stdin.readline().rstrip()) def tr(s1, s2): tot = 0 for i in range(7): if s1[i]=='1' and s2[i]=='0': return 10000000 elif s1[i]=='0' and s2[i]=='1': tot+=1 return tot trd = {} acc={} for i in range(2**7): s1 =bin(i)[2:].zfill(7) trd[s1] = {} acc[s1] = set() for j in range(10): s2 = ch[j] cout = tr(s1, s2) trd[s1][s2] = cout if cout < 8: acc[s1].add(cout) poss = True remp = [[False for i in range(k+1)]for j in range(n)] usable = [0] for ind in range(n-1, -1, -1): new_usable = set() for modif in usable: #print(ind) for diff in acc[l[ind]]: if diff + modif <= k: remp[ind][modif+diff] = True new_usable.add(modif+diff) usable = new_usable rep=[] for i in range(n): found = False for c in range(9,-1,-1): cout = trd[l[i]][ch[c]] if (i<n-1 and cout <= k and remp[i+1][k-cout]) or (i==n-1 and cout == k) : rep.append(c) k-=cout found = True break if not found: poss=False break if poss: print(*rep, sep='') else: print(-1) f()
python
code_algorithm
[ { "input": "3 5\n0100001\n1001001\n1010011\n", "output": "-1\n" }, { "input": "2 5\n0010010\n0010010\n", "output": "97\n" }, { "input": "1 7\n0000000\n", "output": "8\n" }, { "input": "3 8\n0111010\n1011011\n1011101\n", "output": "-1\n" }, { "input": "2 7\n0010010\n1000000\n", "output": "87\n" }, { "input": "3 7\n0111001\n1010011\n1000000\n", "output": "987\n" }, { "input": "10 10\n1110111\n0111111\n1111111\n1111111\n0111111\n1111111\n0111111\n1111110\n1111111\n1111111\n", "output": "-1\n" }, { "input": "3 2\n1111111\n1110111\n1011101\n", "output": "808\n" }, { "input": "4 4\n1101011\n0111010\n0111010\n0111010\n", "output": "9844\n" }, { "input": "2 2\n1101011\n1011101\n", "output": "82\n" }, { "input": "3 4\n1110111\n1011101\n1011101\n", "output": "088\n" }, { "input": "1 1\n0110111\n", "output": "0\n" }, { "input": "10 6\n1101011\n1101111\n1010000\n1110111\n1101110\n1100111\n1110011\n1011101\n0111010\n1010010\n", "output": "9870669247\n" }, { "input": "2 1\n1111011\n1010010\n", "output": "87\n" }, { "input": "3 7\n1100001\n1101111\n1000000\n", "output": "965\n" }, { "input": "5 12\n0100111\n1001111\n1100111\n1010110\n0110010\n", "output": "88809\n" }, { "input": "1 1\n1010010\n", "output": "-1\n" }, { "input": "1 2\n0010010\n", "output": "4\n" }, { "input": "10 0\n0111010\n1101111\n1111011\n0111010\n1101011\n1101011\n1110111\n1010010\n1111111\n0010010\n", "output": "4694550781\n" }, { "input": "10 10\n1101001\n0110000\n0111010\n0010000\n1010000\n0111000\n1011011\n1010010\n1101011\n1111110\n", "output": "9941743758\n" }, { "input": "10 10\n0101111\n0000000\n1111011\n1011011\n1011011\n1111011\n0010010\n1010010\n1101111\n0000000\n", "output": "8993391761\n" }, { "input": "10 10\n0000000\n0100000\n0000000\n0010000\n0000000\n0000001\n0000000\n0001000\n0000001\n0101000\n", "output": "-1\n" }, { "input": "10 10\n1100011\n1010011\n0000111\n1110110\n0101011\n0111111\n1001111\n1000000\n1111011\n0111000\n", "output": "-1\n" }, { "input": "2 2\n1110111\n1011101\n", "output": "08\n" }, { "input": "6 16\n1011111\n0000100\n0110000\n1001111\n0111111\n0111000\n", "output": "889689\n" }, { "input": "6 17\n1101111\n0111000\n0000011\n1000011\n0100110\n0011101\n", "output": "899968\n" } ]
code_contests
python
0
eced6ee9b83f3ebcfc98fe717fc34b6d
Vasya plays the Geometry Horse. The game goal is to destroy geometric figures of the game world. A certain number of points is given for destroying each figure depending on the figure type and the current factor value. There are n types of geometric figures. The number of figures of type ki and figure cost ci is known for each figure type. A player gets ci·f points for destroying one figure of type i, where f is the current factor. The factor value can be an integer number from 1 to t + 1, inclusive. At the beginning of the game the factor value is equal to 1. The factor is set to i + 1 after destruction of pi (1 ≤ i ≤ t) figures, so the (pi + 1)-th figure to be destroyed is considered with factor equal to i + 1. Your task is to determine the maximum number of points Vasya can get after he destroys all figures. Take into account that Vasya is so tough that he can destroy figures in any order chosen by him. Input The first line contains the only integer number n (1 ≤ n ≤ 100) — the number of figure types. Each of the following n lines contains two integer numbers ki and ci (1 ≤ ki ≤ 109, 0 ≤ ci ≤ 1000), separated with space — the number of figures of the i-th type and the cost of one i-type figure, correspondingly. The next line contains the only integer number t (1 ≤ t ≤ 100) — the number that describe the factor's changes. The next line contains t integer numbers pi (1 ≤ p1 < p2 < ... < pt ≤ 1012), separated with spaces. Please, do not use the %lld specificator to read or write 64-bit integers in С++. It is preferred to use cin, cout streams or the %I64d specificator. Output Print the only number — the maximum number of points Vasya can get. Examples Input 1 5 10 2 3 6 Output 70 Input 2 3 8 5 10 1 20 Output 74 Note In the first example Vasya destroys three figures first and gets 3·1·10 = 30 points. Then the factor will become equal to 2 and after destroying the last two figures Vasya will get 2·2·10 = 40 points. As a result Vasya will get 70 points. In the second example all 8 figures will be destroyed with factor 1, so Vasya will get (3·8 + 5·10)·1 = 74 points. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n = int(input()) figures = [] for _ in range(n): amount, cost = map(int, input().split()) figures += [(cost, amount)] figures.sort() t = int(input()) T = list(map(int, input().split())) result = 0 destructed = 0 i, j = 0, 0 while i < len(figures): if j < len(T) and destructed + figures[i][1] >= T[j]: take = T[j] - destructed destructed += take figures[i] = (figures[i][0], figures[i][1] - take) result += take * (j + 1) * figures[i][0] j += 1 else: take = figures[i][1] destructed += take result += take * (j + 1) * figures[i][0] i += 1 print(result)
python
code_algorithm
[ { "input": "2\n3 8\n5 10\n1\n20\n", "output": "74\n" }, { "input": "1\n5 10\n2\n3 6\n", "output": "70\n" }, { "input": "20\n1 676\n10 2\n10 467\n7 826\n7 138\n8 76\n8 148\n2 121\n7 527\n3 571\n10 410\n7 174\n2 318\n6 97\n3 919\n8 684\n3 586\n4 570\n10 494\n8 582\n74\n1 6 10 15 20 22 25 26 27 29 32 33 34 37 39 44 49 52 53 55 56 61 65 66 70 72 74 77 79 80 83 85 88 91 95 98 103 106 107 112 114 119 124 129 133 137 138 140 144 146 147 149 153 155 157 160 165 168 172 173 177 180 181 184 188 193 198 201 206 208 209 213 216 218\n", "output": "1497278\n" }, { "input": "1\n100 1000\n1\n1\n", "output": "199000\n" }, { "input": "1\n100 100\n3\n3 6 9\n", "output": "38200\n" }, { "input": "1\n1 1000\n1\n2\n", "output": "1000\n" }, { "input": "1\n1000000000 1000\n2\n3 6\n", "output": "2999999991000\n" }, { "input": "1\n10 10\n5\n1 2 3 4 5\n", "output": "450\n" }, { "input": "10\n3466127 4\n3477072 1\n9690039 9\n9885165 6\n2559197 4\n3448456 3\n9169542 1\n6915866 2\n1702896 10\n8934261 5\n6\n3041416 5811699 5920083 8250213 8694306 8899250\n", "output": "1843409345\n" }, { "input": "12\n559720489 0\n961035680 0\n953017025 0\n333351645 0\n840947432 0\n265712969 0\n484023361 0\n215786741 0\n880533785 0\n678800187 0\n817395626 0\n591321601 0\n13\n2165448470 32644841954 456375244913 510187375384 524722185932 628130306204 701569710739 731515209935 745407119699 772031092452 783514111802 933457816308 991905864630\n", "output": "0\n" }, { "input": "1\n10 10\n3\n1 2 3\n", "output": "340\n" }, { "input": "1\n1 1\n1\n100000000000\n", "output": "1\n" }, { "input": "1\n10 1\n10\n1 2 3 4 5 6 7 8 9 10\n", "output": "55\n" }, { "input": "1\n10 10\n2\n3 6\n", "output": "210\n" }, { "input": "9\n60129 6\n44235 10\n13131 8\n2012 2\n27536 4\n38950 6\n39080 2\n13892 3\n48709 0\n1\n23853\n", "output": "2751752\n" }, { "input": "22\n2 103\n10 84\n7 834\n9 527\n3 415\n10 943\n1 633\n9 444\n7 639\n2 146\n9 208\n5 637\n4 1000\n4 606\n6 43\n2 437\n4 855\n1 70\n4 780\n8 214\n2 196\n1 261\n61\n2 3 6 9 11 12 13 16 17 19 21 24 26 29 31 33 35 36 38 39 40 42 44 46 49 52 53 54 56 59 61 64 66 67 70 72 75 77 78 80 83 84 87 90 92 93 95 98 100 102 105 107 109 112 114 115 116 117 120 122 125\n", "output": "2004140\n" }, { "input": "1\n555 100\n10\n1 2 3 4 5 6 7 8 9 10\n", "output": "605000\n" }, { "input": "16\n196661091 17\n765544213 322\n134522506 115\n914609421 163\n219016066 227\n835576807 856\n682158845 914\n11248128 145\n876496017 854\n141052597 530\n163180278 315\n407245991 60\n294673989 270\n2976249 26\n674132026 519\n347829904 23\n16\n6280951514 53396669509 79113951711 87247958777 121933859963 219062570855 250484361488 292915737777 357877371567 638447479028 646055798354 733144914116 746148995326 752707219571 888597178968 929325038582\n", "output": "3493909415554\n" }, { "input": "10\n1000 1000\n1000 1000\n1000 1000\n1000 1000\n1000 1000\n1000 1000\n1000 1000\n1000 1000\n1000 1000\n1000 1000\n1\n1000000\n", "output": "10000000\n" }, { "input": "3\n10 3\n20 2\n30 1\n3\n30 50 60\n", "output": "200\n" }, { "input": "1\n1 1000\n1\n1\n", "output": "1000\n" }, { "input": "10\n10 10\n10 10\n10 10\n10 10\n10 10\n10 10\n10 10\n10 10\n10 10\n10 10\n1\n1\n", "output": "1990\n" }, { "input": "12\n1000000000 1\n1000000000 2\n1000000000 3\n1000000000 4\n1000000000 5\n1000000000 6\n1000000000 7\n1000000000 8\n1000000000 9\n1000000000 10\n1000000000 11\n1000000000 12\n1\n10000000000\n", "output": "101000000000\n" }, { "input": "20\n1 529\n15 864\n1 26\n7 582\n7 914\n4 535\n5 371\n15 500\n13 912\n1 354\n7 327\n7 470\n4 277\n20 656\n8 501\n8 419\n16 569\n2 587\n13 294\n11 37\n77\n1 3 6 8 9 11 12 13 14 16 18 20 22 24 27 30 33 34 35 36 38 40 43 44 46 49 52 54 56 57 60 63 64 66 68 70 73 74 75 77 78 79 80 81 84 86 89 92 93 95 96 97 99 101 103 106 109 111 112 114 115 118 119 120 121 122 123 124 125 128 130 133 134 137 139 140 142\n", "output": "4860712\n" }, { "input": "7\n9902 9\n5809 6\n2358 0\n6868 7\n9630 2\n8302 10\n9422 3\n4\n2148 4563 8488 9575\n", "output": "1481866\n" }, { "input": "11\n1000000000 1\n1000000000 2\n1000000000 3\n1000000000 4\n1000000000 5\n1000000000 6\n1000000000 7\n1000000000 8\n1000000000 9\n1000000000 10\n1000000000 11\n1\n10000000000\n", "output": "77000000000\n" }, { "input": "14\n3 689\n4 4\n6 40\n10 309\n2 216\n5 575\n1 203\n5 216\n10 544\n7 979\n1 19\n1 876\n8 505\n4 217\n51\n1 4 5 8 12 18 20 22 26 30 33 39 43 46 50 52 57 59 63 68 73 74 78 79 82 85 90 96 100 104 109 113 118 119 122 126 130 136 138 140 144 147 149 150 156 157 163 164 169 174 178\n", "output": "412722\n" }, { "input": "2\n3 116\n3 869\n80\n3 5 11 17 23 31 33 41 42 49 51 53 58 60 65 70 79 84 87 88 89 93 98 102 109 110 111 114 123 129 134 142 143 152 160 162 166 167 174 179 186 191 199 205 214 219 224 227 236 241 249 252 260 268 272 275 282 288 292 293 297 302 310 314 317 319 321 330 336 340 349 358 366 374 378 383 387 390 397 405\n", "output": "6431\n" }, { "input": "6\n5 9\n63 3\n30 4\n25 6\n48 2\n29 9\n8\n105 137 172 192 632 722 972 981\n", "output": "2251\n" }, { "input": "2\n1000000000 1000\n1 1\n1\n10\n", "output": "1999999991001\n" }, { "input": "4\n4059578 5\n20774712 1\n64867825 7\n5606945 8\n1\n337246111\n", "output": "540002937\n" } ]
code_contests
python
0
11023f5536e4652c58276d13fabd22ec
As Valeric and Valerko were watching one of the last Euro Championship games in a sports bar, they broke a mug. Of course, the guys paid for it but the barman said that he will let them watch football in his bar only if they help his son complete a programming task. The task goes like that. Let's consider a set of functions of the following form: <image> Let's define a sum of n functions y1(x), ..., yn(x) of the given type as function s(x) = y1(x) + ... + yn(x) for any x. It's easy to show that in this case the graph s(x) is a polyline. You are given n functions of the given type, your task is to find the number of angles that do not equal 180 degrees, in the graph s(x), that is the sum of the given functions. Valeric and Valerko really want to watch the next Euro Championship game, so they asked you to help them. Input The first line contains integer n (1 ≤ n ≤ 105) — the number of functions. Each of the following n lines contains two space-separated integer numbers ki, bi ( - 109 ≤ ki, bi ≤ 109) that determine the i-th function. Output Print a single number — the number of angles that do not equal 180 degrees in the graph of the polyline that equals the sum of the given functions. Examples Input 1 1 0 Output 1 Input 3 1 0 0 2 -1 1 Output 2 Input 3 -2 -4 1 7 -5 1 Output 3 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
from sys import stdin from math import gcd n = int(stdin.readline()) iset = set() for _ in range(n): k,b = map(int,stdin.readline().split()) if k!=0: if b==0: iset.add((0,1)) else: x = gcd(k,b) if k*b>0: iset.add((abs(b//x),abs(k//x))) else: iset.add((-abs(b//x),abs(k//x))) print(len(iset))
python
code_algorithm
[ { "input": "3\n1 0\n0 2\n-1 1\n", "output": "2\n" }, { "input": "3\n-2 -4\n1 7\n-5 1\n", "output": "3\n" }, { "input": "1\n1 0\n", "output": "1\n" }, { "input": "10\n148 134\n145 140\n105 144\n196 199\n195 166\n110 175\n140 198\n112 188\n147 145\n153 196\n", "output": "10\n" }, { "input": "1\n3 5\n", "output": "1\n" }, { "input": "10\n9 9\n-5 2\n-2 9\n0 6\n6 7\n-1 -10\n-8 6\n3 6\n-3 -9\n0 4\n", "output": "8\n" }, { "input": "4\n1000000000 -1000000000\n-1000000000 1000000000\n-200000000 200000000\n200000000 -200000000\n", "output": "1\n" }, { "input": "4\n0 2\n-1 -2\n1 0\n-2 2\n", "output": "3\n" }, { "input": "3\n1 1000000000\n1 1000000000\n1 1000000000\n", "output": "1\n" }, { "input": "15\n0 3\n-1 -3\n0 -2\n1 3\n1 0\n1 3\n0 3\n-2 -1\n2 -1\n-3 -2\n-1 -1\n2 -3\n-1 3\n3 -3\n0 1\n", "output": "9\n" }, { "input": "2\n0 5\n0 -5\n", "output": "0\n" }, { "input": "10\n-4 -9\n5 9\n-4 -1\n6 -1\n-10 -10\n3 4\n3 5\n3 10\n9 7\n4 -7\n", "output": "10\n" }, { "input": "5\n3 3\n2 2\n2 -3\n-3 3\n-1 1\n", "output": "3\n" }, { "input": "10\n32 -84\n-24 -21\n-4 26\n67 -34\n22 50\n-15 20\n3 -39\n-86 62\n56 -81\n34 -91\n", "output": "10\n" }, { "input": "5\n79 49\n72 40\n-5 0\n-70 26\n-98 23\n", "output": "5\n" }, { "input": "2\n1 1000000000\n-1 1000000000\n", "output": "2\n" }, { "input": "10\n-1 2\n0 1\n-2 0\n1 1\n-1 -1\n-2 1\n-2 2\n2 -1\n0 -1\n-1 0\n", "output": "5\n" }, { "input": "5\n1000000000 1000000000\n1000000000 1000000000\n1000000000 1000000000\n1000000000 1000000000\n294967296 294967296\n", "output": "1\n" }, { "input": "6\n1000000000 1\n-1000000000 -1\n999999999 1\n-999999999 -1\n7 22\n318181815 999999990\n", "output": "3\n" }, { "input": "1\n1 1\n", "output": "1\n" } ]
code_contests
python
0.2
f2bf5abbd7f873b2b26728e509a27e29
The country Treeland consists of n cities, some pairs of them are connected with unidirectional roads. Overall there are n - 1 roads in the country. We know that if we don't take the direction of the roads into consideration, we can get from any city to any other one. The council of the elders has recently decided to choose the capital of Treeland. Of course it should be a city of this country. The council is supposed to meet in the capital and regularly move from the capital to other cities (at this stage nobody is thinking about getting back to the capital from these cities). For that reason if city a is chosen a capital, then all roads must be oriented so that if we move along them, we can get from city a to any other city. For that some roads may have to be inversed. Help the elders to choose the capital so that they have to inverse the minimum number of roads in the country. Input The first input line contains integer n (2 ≤ n ≤ 2·105) — the number of cities in Treeland. Next n - 1 lines contain the descriptions of the roads, one road per line. A road is described by a pair of integers si, ti (1 ≤ si, ti ≤ n; si ≠ ti) — the numbers of cities, connected by that road. The i-th road is oriented from city si to city ti. You can consider cities in Treeland indexed from 1 to n. Output In the first line print the minimum number of roads to be inversed if the capital is chosen optimally. In the second line print all possible ways to choose the capital — a sequence of indexes of cities in the increasing order. Examples Input 3 2 1 2 3 Output 0 2 Input 4 1 4 2 4 3 4 Output 2 1 2 3 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
#More es mi pastor nada me faltara import sys from collections import defaultdict from typing import NamedTuple class EdgeNode(NamedTuple): vertex: int weight: int class Graph: def __init__(self, n): self.graph = d = {i: [] for i in range(n + 1)} self.distance = [0] * (n + 1) self.distance[0] = sys.maxsize self.min_dist = sys.maxsize self.summation = (n * (n + 1)) / 2 def dfs(self, root, visited=defaultdict(bool)): stack, path = [root], [] rev = 0 visited[root] = True while stack: s = stack.pop() visited[s] = True for v in self.graph[s]: if v[0] not in visited: dist = self.distance[s] + v[1] if dist < self.min_dist: self.min_dist = dist self.distance[v[0]] = dist self.summation -= v[0] if v[1] == -1: rev += 1 path.append(s) stack.append(v[0]) return rev def get_min_distance(self): return min(self.distance) def main(): n = int(input()) g = Graph(n) for i in range(n - 1): x, y = map(int, input().split()) g.graph[x].append([y, 1]) g.graph[y].append([x, -1]) total_rev = g.dfs(1) min_distance = 0 if (g.summation > 0 and g.min_dist > 0) else g.min_dist print(total_rev + min_distance) join = ' '.join(map(str, [i for i in range(n + 1) if g.distance[i] == min_distance])) print(join) main()
python
code_algorithm
[ { "input": "3\n2 1\n2 3\n", "output": "0\n2\n" }, { "input": "4\n1 4\n2 4\n3 4\n", "output": "2\n1 2 3\n" }, { "input": "15\n15 6\n2 15\n14 15\n15 12\n1 2\n10 15\n7 4\n13 7\n11 2\n5 2\n7 2\n3 2\n7 8\n9 15\n", "output": "7\n13\n" }, { "input": "2\n1 2\n", "output": "0\n1\n" }, { "input": "12\n10 7\n6 10\n8 10\n4 12\n10 4\n3 12\n1 2\n2 7\n4 5\n11 5\n11 9\n", "output": "5\n1 6 8\n" }, { "input": "13\n7 13\n5 4\n5 1\n11 12\n8 3\n13 4\n10 7\n11 5\n8 13\n2 8\n10 6\n4 9\n", "output": "4\n2 10\n" }, { "input": "10\n9 3\n3 8\n4 3\n3 5\n7 8\n10 3\n2 3\n6 2\n3 1\n", "output": "4\n6\n" }, { "input": "8\n1 2\n3 2\n4 3\n4 5\n6 5\n6 7\n8 7\n", "output": "3\n4 6 8\n" }, { "input": "10\n2 3\n1 8\n9 5\n5 4\n6 10\n4 8\n5 6\n7 6\n5 3\n", "output": "3\n9\n" }, { "input": "10\n5 4\n6 5\n10 1\n2 5\n9 8\n1 3\n7 10\n2 3\n5 9\n", "output": "2\n7\n" }, { "input": "14\n13 10\n5 14\n9 4\n8 12\n10 1\n5 2\n3 6\n11 2\n13 2\n13 7\n8 2\n4 5\n1 3\n", "output": "3\n9\n" }, { "input": "11\n3 10\n4 7\n11 7\n8 2\n6 9\n9 3\n5 9\n1 3\n3 8\n7 3\n", "output": "5\n4 5 6 11\n" } ]
code_contests
python
0.4
124a6dc7d0b4939fd5c40052a60d8aa4
Polycarpus has a sequence, consisting of n non-negative integers: a1, a2, ..., an. Let's define function f(l, r) (l, r are integer, 1 ≤ l ≤ r ≤ n) for sequence a as an operation of bitwise OR of all the sequence elements with indexes from l to r. Formally: f(l, r) = al | al + 1 | ... | ar. Polycarpus took a piece of paper and wrote out the values of function f(l, r) for all l, r (l, r are integer, 1 ≤ l ≤ r ≤ n). Now he wants to know, how many distinct values he's got in the end. Help Polycarpus, count the number of distinct values of function f(l, r) for the given sequence a. Expression x | y means applying the operation of bitwise OR to numbers x and y. This operation exists in all modern programming languages, for example, in language C++ and Java it is marked as "|", in Pascal — as "or". Input The first line contains integer n (1 ≤ n ≤ 105) — the number of elements of sequence a. The second line contains n space-separated integers a1, a2, ..., an (0 ≤ ai ≤ 106) — the elements of sequence a. Output Print a single integer — the number of distinct values of function f(l, r) for the given sequence a. Please, do not use the %lld specifier to read or write 64-bit integers in С++. It is preferred to use cin, cout streams or the %I64d specifier. Examples Input 3 1 2 0 Output 4 Input 10 1 2 3 4 5 6 1 2 9 10 Output 11 Note In the first test case Polycarpus will have 6 numbers written on the paper: f(1, 1) = 1, f(1, 2) = 3, f(1, 3) = 3, f(2, 2) = 2, f(2, 3) = 2, f(3, 3) = 0. There are exactly 4 distinct numbers among them: 0, 1, 2, 3. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n, a, b = input(), set(), set() for i in map(int, input().split()): b = set(i | j for j in b) b.add(i) a.update(b) print(len(a))
python
code_algorithm
[ { "input": "10\n1 2 3 4 5 6 1 2 9 10\n", "output": "11\n" }, { "input": "3\n1 2 0\n", "output": "4\n" }, { "input": "1\n1000000\n", "output": "1\n" }, { "input": "5\n0 1 2 0 4\n", "output": "7\n" }, { "input": "1\n123\n", "output": "1\n" }, { "input": "10\n6 8 4 5 1 9 10 2 3 7\n", "output": "15\n" }, { "input": "1\n0\n", "output": "1\n" }, { "input": "7\n1 2 4 8 16 32 64\n", "output": "28\n" }, { "input": "10\n375813 659427 484038 348181 432640 368050 271089 721588 345312 630771\n", "output": "29\n" } ]
code_contests
python
0.8
d8c6feadb334608ad03813f1ca8ec426
Polycarpus is the director of a large corporation. There are n secretaries working for the corporation, each of them corresponds via the famous Spyke VoIP system during the day. We know that when two people call each other via Spyke, the Spyke network assigns a unique ID to this call, a positive integer session number. One day Polycarpus wondered which secretaries are talking via the Spyke and which are not. For each secretary, he wrote out either the session number of his call or a 0 if this secretary wasn't talking via Spyke at that moment. Help Polycarpus analyze these data and find out the number of pairs of secretaries that are talking. If Polycarpus has made a mistake in the data and the described situation could not have taken place, say so. Note that the secretaries can correspond via Spyke not only with each other, but also with the people from other places. Also, Spyke conferences aren't permitted — that is, one call connects exactly two people. Input The first line contains integer n (1 ≤ n ≤ 103) — the number of secretaries in Polycarpus's corporation. The next line contains n space-separated integers: id1, id2, ..., idn (0 ≤ idi ≤ 109). Number idi equals the number of the call session of the i-th secretary, if the secretary is talking via Spyke, or zero otherwise. Consider the secretaries indexed from 1 to n in some way. Output Print a single integer — the number of pairs of chatting secretaries, or -1 if Polycarpus's got a mistake in his records and the described situation could not have taken place. Examples Input 6 0 1 7 1 7 10 Output 2 Input 3 1 1 1 Output -1 Input 1 0 Output 0 Note In the first test sample there are two Spyke calls between secretaries: secretary 2 and secretary 4, secretary 3 and secretary 5. In the second test sample the described situation is impossible as conferences aren't allowed. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n=int(input()) l=list(map(int,input().split())) ans=0 repeat={} for i in l: if i in repeat: repeat[i]+=1 if i==0: pass elif repeat[i]>2: ans=-1 break else: ans+=1 else: repeat[i]=1 print(ans)
python
code_algorithm
[ { "input": "3\n1 1 1\n", "output": "-1\n" }, { "input": "1\n0\n", "output": "0\n" }, { "input": "6\n0 1 7 1 7 10\n", "output": "2\n" }, { "input": "1\n1000000000\n", "output": "0\n" }, { "input": "2\n1 0\n", "output": "0\n" }, { "input": "6\n6 6 0 8 0 0\n", "output": "1\n" }, { "input": "5\n1 0 0 0 1\n", "output": "1\n" }, { "input": "2\n2 3\n", "output": "0\n" }, { "input": "5\n10000 10000 1 1 10000\n", "output": "-1\n" }, { "input": "100\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 0 3 0 0 3 0 0 0 0 0 0 3 0 0 3 0 0 0 0 0 0 0 3 0 0 0 0 0\n", "output": "-1\n" }, { "input": "5\n2 2 1 1 3\n", "output": "2\n" }, { "input": "10\n4 21 3 21 21 1 1 2 2 3\n", "output": "-1\n" }, { "input": "47\n1 6 0 6 1 1 6 4 3 6 5 3 6 3 2 2 5 1 4 7 3 5 6 1 6 7 4 5 6 3 3 3 7 4 1 6 1 1 7 1 3 1 5 5 1 3 6\n", "output": "-1\n" }, { "input": "20\n0 1 2 0 0 0 0 5 3 4 0 0 1 1 3 0 4 0 1 0\n", "output": "-1\n" }, { "input": "2\n1 2\n", "output": "0\n" }, { "input": "15\n380515742 842209759 945171461 664384656 945171461 474872104 0 0 131648973 131648973 474872104 842209759 664384656 0 380515742\n", "output": "6\n" }, { "input": "2\n1000000000 1000000000\n", "output": "1\n" }, { "input": "10\n0 0 0 0 0 1 0 1 0 1\n", "output": "-1\n" }, { "input": "10\n0 3 2 3 2 0 1 3 3 0\n", "output": "-1\n" }, { "input": "5\n0 0 0 0 0\n", "output": "0\n" }, { "input": "2\n2 2\n", "output": "1\n" }, { "input": "123\n0 6361 8903 10428 0 258 0 10422 0 0 2642 1958 0 0 0 0 0 8249 1958 0 0 2642 0 0 0 11566 4709 1847 3998 0 1331 0 0 10289 2739 6135 3450 0 0 10994 6069 4337 5854 1331 5854 0 630 630 11244 5928 2706 0 683 214 0 9080 0 0 0 10422 683 11566 10994 0 0 3450 11244 11542 3998 1847 2708 9871 2739 2001 0 12216 6069 0 5928 0 10289 1307 0 1307 8903 0 6361 6135 6632 10428 0 0 632 258 9080 12216 4709 4967 2706 0 11542 2001 6632 0 8249 214 0 10301 4967 10301 7296 7296 10914 2708 4337 0 0 632 0 10914 0 9871 0\n", "output": "40\n" }, { "input": "74\n0 0 0 0 0 37 0 0 0 0 0 0 0 8 0 0 9 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 9 0 7 0 0 0 0 0 0 19 19 0 0 0 0 0 0 0 0 0 0 0 0 17 0 30 0 0 0 0 0 0 30 0 0 0 0 0 0 0 37 0\n", "output": "5\n" }, { "input": "1\n1\n", "output": "0\n" } ]
code_contests
python
0.5
78c4f0db98c69fcdab15c7a9e1fb8a1c
Xenia the beginner programmer has a sequence a, consisting of 2n non-negative integers: a1, a2, ..., a2n. Xenia is currently studying bit operations. To better understand how they work, Xenia decided to calculate some value v for a. Namely, it takes several iterations to calculate value v. At the first iteration, Xenia writes a new sequence a1 or a2, a3 or a4, ..., a2n - 1 or a2n, consisting of 2n - 1 elements. In other words, she writes down the bit-wise OR of adjacent elements of sequence a. At the second iteration, Xenia writes the bitwise exclusive OR of adjacent elements of the sequence obtained after the first iteration. At the third iteration Xenia writes the bitwise OR of the adjacent elements of the sequence obtained after the second iteration. And so on; the operations of bitwise exclusive OR and bitwise OR alternate. In the end, she obtains a sequence consisting of one element, and that element is v. Let's consider an example. Suppose that sequence a = (1, 2, 3, 4). Then let's write down all the transformations (1, 2, 3, 4) → (1 or 2 = 3, 3 or 4 = 7) → (3 xor 7 = 4). The result is v = 4. You are given Xenia's initial sequence. But to calculate value v for a given sequence would be too easy, so you are given additional m queries. Each query is a pair of integers p, b. Query p, b means that you need to perform the assignment ap = b. After each query, you need to print the new value v for the new sequence a. Input The first line contains two integers n and m (1 ≤ n ≤ 17, 1 ≤ m ≤ 105). The next line contains 2n integers a1, a2, ..., a2n (0 ≤ ai < 230). Each of the next m lines contains queries. The i-th line contains integers pi, bi (1 ≤ pi ≤ 2n, 0 ≤ bi < 230) — the i-th query. Output Print m integers — the i-th integer denotes value v for sequence a after the i-th query. Examples Input 2 4 1 6 3 5 1 4 3 4 1 2 1 2 Output 1 3 3 3 Note For more information on the bit operations, you can follow this link: http://en.wikipedia.org/wiki/Bitwise_operation Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
from operator import or_, xor import sys greg=1 #Stolen from tchr to test Xenia and Bit Operations speed. n, m = map(int, input().split()) t = [list(map(int, input().split()))] for i in range(n): t += [[(or_, xor)[i & 1](*t[i][j: j + 2]) for j in range(0, len(t[i]), 2)]] for s in sys.stdin: p, b = s.split() p = int(p) - 1 t[0][p] = int(b) for j in range(n): p >>= 1 t[j + 1][p] = (or_, xor)[j & 1](*t[j][p << 1: (p << 1) + 2]) print(t[-1][0])
python
code_algorithm
[ { "input": "2 4\n1 6 3 5\n1 4\n3 4\n1 2\n1 2\n", "output": "1\n3\n3\n3\n" }, { "input": "1 10\n6 26\n1 11\n1 9\n1 31\n1 10\n2 12\n1 8\n2 10\n2 4\n2 18\n1 31\n", "output": "27\n27\n31\n26\n14\n12\n10\n12\n26\n31\n" }, { "input": "1 10\n22 17\n2 15\n2 12\n1 6\n1 16\n2 24\n1 21\n2 19\n2 25\n2 19\n2 1\n", "output": "31\n30\n14\n28\n24\n29\n23\n29\n23\n21\n" }, { "input": "2 10\n15 27 17 18\n2 12\n4 19\n2 3\n4 1\n3 15\n3 11\n2 5\n1 26\n1 17\n3 18\n", "output": "28\n28\n28\n30\n0\n4\n4\n20\n30\n6\n" }, { "input": "2 10\n31 17 22 5\n2 15\n2 26\n1 9\n4 13\n3 28\n1 20\n1 26\n1 27\n2 20\n2 12\n", "output": "8\n8\n12\n4\n6\n3\n7\n6\n2\n2\n" }, { "input": "1 1\n1 1\n1 1\n", "output": "1\n" } ]
code_contests
python
0.1
5e263e7621da62ea3e20147156df4183
A boy Petya loves chess very much. He even came up with a chess piece of his own, a semiknight. The semiknight can move in any of these four directions: 2 squares forward and 2 squares to the right, 2 squares forward and 2 squares to the left, 2 squares backward and 2 to the right and 2 squares backward and 2 to the left. Naturally, the semiknight cannot move beyond the limits of the chessboard. Petya put two semiknights on a standard chessboard. Petya simultaneously moves with both semiknights. The squares are rather large, so after some move the semiknights can meet, that is, they can end up in the same square. After the meeting the semiknights can move on, so it is possible that they meet again. Petya wonders if there is such sequence of moves when the semiknights meet. Petya considers some squares bad. That is, they do not suit for the meeting. The semiknights can move through these squares but their meetings in these squares don't count. Petya prepared multiple chess boards. Help Petya find out whether the semiknights can meet on some good square for each board. Please see the test case analysis. Input The first line contains number t (1 ≤ t ≤ 50) — the number of boards. Each board is described by a matrix of characters, consisting of 8 rows and 8 columns. The matrix consists of characters ".", "#", "K", representing an empty good square, a bad square and the semiknight's position, correspondingly. It is guaranteed that matrix contains exactly 2 semiknights. The semiknight's squares are considered good for the meeting. The tests are separated by empty line. Output For each test, print on a single line the answer to the problem: "YES", if the semiknights can meet and "NO" otherwise. Examples Input 2 ........ ........ ......#. K..##..# .......# ...##..# ......#. K....... ........ ........ ..#..... ..#..#.. ..####.. ...##... ........ ....K#K# Output YES NO Note Consider the first board from the sample. We will assume the rows and columns of the matrix to be numbered 1 through 8 from top to bottom and from left to right, correspondingly. The knights can meet, for example, in square (2, 7). The semiknight from square (4, 1) goes to square (2, 3) and the semiknight goes from square (8, 1) to square (6, 3). Then both semiknights go to (4, 5) but this square is bad, so they move together to square (2, 7). On the second board the semiknights will never meet. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
t = int(input()) for _ in range(t): s = [input() for i in range(8)] oh = True flag = True for i in range(8): for j in range(8): if(s[i][j] == 'K'): if(flag): pos1x = i pos1y = j flag = False else: pos2x = i pos2y = j if(pos1x % 4 == pos2x % 4) and (pos1y % 4 == pos2y % 4): print('YES') else: print('NO') if( _ < t - 1): k = input()
python
code_algorithm
[ { "input": "2\n........\n........\n......#.\nK..##..#\n.......#\n...##..#\n......#.\nK.......\n\n........\n........\n..#.....\n..#..#..\n..####..\n...##...\n........\n....K#K#\n", "output": "YES\nNO\n" }, { "input": "4\n#.##..##\n###.#.K#\n###.####\n.####.#.\n.#######\n######K#\n####.#..\n#.######\n\n#.......\n....##K.\n........\n...#.##.\n#....#..\n..K.#...\n...#....\n...#....\n\n.......#\n#..K....\n#.......\n#....#..\n..#...#.\n...K#.#.\n........\n#.#...#.\n\n..##....\n........\n...#....\n...#K...\n........\n...##...\n..#.....\n....K...\n", "output": "YES\nYES\nYES\nYES\n" }, { "input": "5\nK###K###\n########\n########\n########\n########\n########\n########\n########\n\nK##K####\n########\n########\n########\n########\n########\n########\n########\n\nK####K##\n########\n########\n########\n########\n########\n########\n########\n\n........\n........\n........\n...K....\n........\n.....K..\n........\n........\n\n....#.#.\n..K.K...\n.......#\n....#...\n........\n........\n........\n.#......\n", "output": "YES\nNO\nNO\nNO\nNO\n" }, { "input": "6\nK.......\n........\n.##..##.\n#..##..#\n........\n...##...\n.#....#.\n..####.K\n\n.......K\n........\n.##..##.\n#..##..#\n........\n...##...\n.#....#.\nK.####..\n\nK.......\n........\n.##..##.\n#..##..#\n........\n...##...\n.#....#.\nK.####..\n\n.......K\n........\n.##..##.\n#..##..#\n........\n...##...\n.#....#.\n..####.K\n\n........\n........\n........\n.KK.....\n........\n........\n........\n........\n\n........\n........\n.#...K..\n........\n...#....\n........\n.K...#..\n........\n", "output": "NO\nNO\nNO\nNO\nNO\nYES\n" }, { "input": "5\n........\n...KK...\n..####..\n...##...\n........\n..####..\n.######.\n#......#\n\n........\n.K......\n..#.....\n...#....\n....#...\n.....#..\n......#.\n.......K\n\n........\n...K....\n##...##.\n#.#.#..#\n.##.###.\n#..K#..#\n.##..##.\n........\n\n........\n.K..K...\n..##....\n..####..\n.#....#.\n.#.....#\n..#####.\n........\n\nK.......\n........\n........\n........\n........\n........\n........\n.......K\n", "output": "NO\nNO\nYES\nNO\nNO\n" }, { "input": "1\n...#...#\n........\n.#...K..\n........\n...#...#\n........\n.K...#..\n........\n", "output": "YES\n" }, { "input": "3\n........\n........\n..#.....\n..#..#..\n..####..\n...##...\n........\n####K#K#\n\n........\nK......K\n........\n#......#\n.#....#.\n..####..\n........\n........\n\n.#..#...\n.##.##..\n..###...\n..#K###.\n..####..\n......K.\n..#####.\n..#####.\n", "output": "NO\nNO\nNO\n" }, { "input": "1\nK.#....#\n...#..#.\n..#.....\n..#.###.\n..#.....\n...#....\n.#.....#\n.#...##K\n", "output": "NO\n" }, { "input": "2\n....#..K\n...#....\n..##.#..\n.#.#.#..\n.#.....#\n.#......\n###.....\nK#.#....\n\nK.#.....\n..#...#.\n#.....#.\n..#.#..#\n#.......\n..#..#..\n....#...\nK..##.##\n", "output": "NO\nNO\n" } ]
code_contests
python
0
60df013223cce28abd7f068825839df2
One day Dima and Alex had an argument about the price and quality of laptops. Dima thinks that the more expensive a laptop is, the better it is. Alex disagrees. Alex thinks that there are two laptops, such that the price of the first laptop is less (strictly smaller) than the price of the second laptop but the quality of the first laptop is higher (strictly greater) than the quality of the second laptop. Please, check the guess of Alex. You are given descriptions of n laptops. Determine whether two described above laptops exist. Input The first line contains an integer n (1 ≤ n ≤ 105) — the number of laptops. Next n lines contain two integers each, ai and bi (1 ≤ ai, bi ≤ n), where ai is the price of the i-th laptop, and bi is the number that represents the quality of the i-th laptop (the larger the number is, the higher is the quality). All ai are distinct. All bi are distinct. Output If Alex is correct, print "Happy Alex", otherwise print "Poor Alex" (without the quotes). Examples Input 2 1 2 2 1 Output Happy Alex Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n = int(input()) for _ in range(n): a,b = map(int,input().split()) if a!=b: print ('Happy Alex') exit() print ('Poor Alex')
python
code_algorithm
[ { "input": "2\n1 2\n2 1\n", "output": "Happy Alex\n" }, { "input": "3\n1 2\n2 3\n3 1\n", "output": "Happy Alex\n" }, { "input": "3\n2 2\n3 3\n1 1\n", "output": "Poor Alex\n" }, { "input": "4\n4 1\n3 2\n2 3\n1 4\n", "output": "Happy Alex\n" }, { "input": "3\n1 2\n2 1\n3 3\n", "output": "Happy Alex\n" }, { "input": "1\n1 1\n", "output": "Poor Alex\n" }, { "input": "3\n3 3\n1 2\n2 1\n", "output": "Happy Alex\n" }, { "input": "3\n3 2\n1 1\n2 3\n", "output": "Happy Alex\n" }, { "input": "2\n2 1\n1 2\n", "output": "Happy Alex\n" }, { "input": "2\n1 1\n2 2\n", "output": "Poor Alex\n" }, { "input": "3\n2 3\n1 1\n3 2\n", "output": "Happy Alex\n" } ]
code_contests
python
1
7ff8445efbfb25710ecf093a78967958
You are given the current time in 24-hour format hh:mm. Find and print the time after a minutes. Note that you should find only the time after a minutes, see the examples to clarify the problem statement. You can read more about 24-hour format here <https://en.wikipedia.org/wiki/24-hour_clock>. Input The first line contains the current time in the format hh:mm (0 ≤ hh < 24, 0 ≤ mm < 60). The hours and the minutes are given with two digits (the hours or the minutes less than 10 are given with the leading zeroes). The second line contains integer a (0 ≤ a ≤ 104) — the number of the minutes passed. Output The only line should contain the time after a minutes in the format described in the input. Note that you should print exactly two digits for the hours and the minutes (add leading zeroes to the numbers if needed). See the examples to check the input/output format. Examples Input 23:59 10 Output 00:09 Input 20:20 121 Output 22:21 Input 10:10 0 Output 10:10 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
#!/usr/bin/env python3 import datetime def main(args): hh, mm = list(map(int, input().split(':'))) a = int(input()) mm += a hh += (mm // 60) mm %= 60 hh %= 24 print(f"{hh:02d}:{mm:02d}") return 0 if __name__ == '__main__': import sys sys.exit(main(sys.argv))
python
code_algorithm
[ { "input": "10:10\n0\n", "output": "10:10\n" }, { "input": "23:59\n10\n", "output": "00:09\n" }, { "input": "20:20\n121\n", "output": "22:21\n" }, { "input": "00:01\n59\n", "output": "01:00\n" }, { "input": "00:55\n4321\n", "output": "00:56\n" }, { "input": "22:30\n30\n", "output": "23:00\n" }, { "input": "10:05\n1\n", "output": "10:06\n" }, { "input": "03:10\n20\n", "output": "03:30\n" }, { "input": "23:00\n60\n", "output": "00:00\n" }, { "input": "23:01\n59\n", "output": "00:00\n" }, { "input": "19:02\n59\n", "output": "20:01\n" }, { "input": "20:01\n2699\n", "output": "17:00\n" }, { "input": "03:30\n0\n", "output": "03:30\n" }, { "input": "15:04\n36\n", "output": "15:40\n" }, { "input": "01:10\n1\n", "output": "01:11\n" }, { "input": "05:12\n0\n", "output": "05:12\n" }, { "input": "05:15\n10\n", "output": "05:25\n" }, { "input": "02:45\n5617\n", "output": "00:22\n" }, { "input": "09:11\n0\n", "output": "09:11\n" }, { "input": "02:09\n2074\n", "output": "12:43\n" }, { "input": "19:34\n566\n", "output": "05:00\n" }, { "input": "18:31\n2677\n", "output": "15:08\n" }, { "input": "23:59\n8640\n", "output": "23:59\n" }, { "input": "23:59\n1\n", "output": "00:00\n" }, { "input": "11:00\n1\n", "output": "11:01\n" }, { "input": "00:39\n6525\n", "output": "13:24\n" }, { "input": "08:50\n20\n", "output": "09:10\n" }, { "input": "02:59\n1\n", "output": "03:00\n" }, { "input": "19:00\n0\n", "output": "19:00\n" }, { "input": "13:18\n5121\n", "output": "02:39\n" }, { "input": "00:00\n60\n", "output": "01:00\n" }, { "input": "07:09\n6538\n", "output": "20:07\n" }, { "input": "07:02\n121\n", "output": "09:03\n" }, { "input": "23:59\n121\n", "output": "02:00\n" }, { "input": "00:00\n10000\n", "output": "22:40\n" }, { "input": "12:34\n10000\n", "output": "11:14\n" }, { "input": "21:09\n9997\n", "output": "19:46\n" }, { "input": "10:00\n61\n", "output": "11:01\n" }, { "input": "19:01\n59\n", "output": "20:00\n" }, { "input": "04:05\n0\n", "output": "04:05\n" }, { "input": "00:00\n10\n", "output": "00:10\n" }, { "input": "23:59\n61\n", "output": "01:00\n" }, { "input": "00:30\n30\n", "output": "01:00\n" }, { "input": "00:00\n1440\n", "output": "00:00\n" }, { "input": "02:01\n59\n", "output": "03:00\n" }, { "input": "14:00\n2880\n", "output": "14:00\n" }, { "input": "09:20\n40\n", "output": "10:00\n" }, { "input": "00:59\n1\n", "output": "01:00\n" }, { "input": "01:00\n59\n", "output": "01:59\n" }, { "input": "23:59\n59\n", "output": "00:58\n" }, { "input": "00:00\n3600\n", "output": "12:00\n" }, { "input": "05:37\n23\n", "output": "06:00\n" }, { "input": "00:00\n0\n", "output": "00:00\n" }, { "input": "10:01\n0\n", "output": "10:01\n" }, { "input": "11:59\n1\n", "output": "12:00\n" }, { "input": "01:10\n44\n", "output": "01:54\n" }, { "input": "14:17\n108\n", "output": "16:05\n" }, { "input": "15:52\n60\n", "output": "16:52\n" }, { "input": "22:50\n70\n", "output": "00:00\n" } ]
code_contests
python
0.5
c5f7722a160707e06a4aec7aa67fee4f
The term of this problem is the same as the previous one, the only exception — increased restrictions. Input The first line contains two positive integers n and k (1 ≤ n ≤ 100 000, 1 ≤ k ≤ 109) — the number of ingredients and the number of grams of the magic powder. The second line contains the sequence a1, a2, ..., an (1 ≤ ai ≤ 109), where the i-th number is equal to the number of grams of the i-th ingredient, needed to bake one cookie. The third line contains the sequence b1, b2, ..., bn (1 ≤ bi ≤ 109), where the i-th number is equal to the number of grams of the i-th ingredient, which Apollinaria has. Output Print the maximum number of cookies, which Apollinaria will be able to bake using the ingredients that she has and the magic powder. Examples Input 1 1000000000 1 1000000000 Output 2000000000 Input 10 1 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1 1 1 1 1 1 1 1 1 1 Output 0 Input 3 1 2 1 4 11 3 16 Output 4 Input 4 3 4 3 5 6 11 12 14 20 Output 3 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n, k = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) l = 0 r = 10 ** 10 while r - l > 1: m = (r + l) // 2 poroshok = 0 for i in range(n): tr = A[i] * m - B[i] poroshok += max(tr, 0) if poroshok > k: r = m else: l = m print(l)
python
code_algorithm
[ { "input": "1 1000000000\n1\n1000000000\n", "output": "2000000000\n" }, { "input": "3 1\n2 1 4\n11 3 16\n", "output": "4\n" }, { "input": "10 1\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n1 1 1 1 1 1 1 1 1 1\n", "output": "0\n" }, { "input": "4 3\n4 3 5 6\n11 12 14 20\n", "output": "3\n" }, { "input": "1 1\n4\n6\n", "output": "1\n" }, { "input": "10 926\n5 6 8 1 2 5 1 8 4 4\n351 739 998 725 953 970 906 691 707 1000\n", "output": "137\n" }, { "input": "13 961166382\n312 781 329 6 813 68 872 146 33 382 134 744 353\n904116983 692808881 382512127 462746212 130261069 450407093 112139570 386577765 867425952 354457553 248439687 817592835 682387533\n", "output": "714283\n" }, { "input": "40 538\n1 3 3 1 4 1 1 1 1 5 3 3 4 1 4 2 7 1 4 1 1 2 2 1 1 1 1 4 1 4 2 3 3 3 1 3 4 1 3 5\n975 635 795 835 982 965 639 787 688 796 988 779 839 942 491 696 396 995 718 810 796 879 957 783 844 765 968 783 647 214 995 868 318 453 989 889 504 962 945 925\n", "output": "104\n" }, { "input": "2 1000000000\n1 1\n1 1\n", "output": "500000001\n" }, { "input": "1 1000\n1000\n1000\n", "output": "2\n" }, { "input": "6 1000000000\n1 1 1 1 1 1\n1000000000 1 1000000000 1000000000 1000000000 1000000000\n", "output": "1000000000\n" }, { "input": "1 1\n1000000000\n1000000000\n", "output": "1\n" }, { "input": "60 735\n3 1 4 7 1 7 3 1 1 5 4 7 3 3 3 2 5 3 1 2 3 6 1 1 1 1 1 2 5 3 2 1 3 5 2 1 2 2 2 2 1 3 3 3 6 4 3 5 1 3 2 2 1 3 1 1 1 7 1 2\n596 968 975 493 665 571 598 834 948 941 737 649 923 848 950 907 929 865 227 836 956 796 861 801 746 667 539 807 405 355 501 879 994 890 573 848 597 873 130 985 924 426 999 550 586 924 601 807 994 878 410 817 922 898 982 525 611 685 806 847\n", "output": "103\n" }, { "input": "50 530\n2 3 3 1 1 1 3 4 4 2 4 2 5 1 3 1 2 6 1 1 2 5 3 2 1 5 1 3 3 2 1 1 1 1 2 1 1 2 2 1 4 2 1 3 1 2 1 1 4 2\n959 972 201 990 675 679 972 268 976 886 488 924 795 959 647 994 969 862 898 646 763 797 978 763 995 641 923 856 829 921 934 883 904 986 728 980 1000 775 716 745 833 832 999 651 571 626 827 456 636 795\n", "output": "133\n" }, { "input": "1 786543211\n12345678\n987654321\n", "output": "143\n" }, { "input": "1 1\n1000000000\n1\n", "output": "0\n" }, { "input": "2 6\n1 3\n6 2\n", "output": "2\n" }, { "input": "20 1000000000\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "1\n" }, { "input": "1 1\n1\n1\n", "output": "2\n" }, { "input": "1 1000000000\n1\n2\n", "output": "1000000002\n" }, { "input": "20 925\n7 3 1 2 1 3 1 3 1 2 3 1 5 8 1 3 7 3 4 2\n837 898 965 807 786 670 626 873 968 745 878 359 760 781 829 882 777 740 907 779\n", "output": "150\n" }, { "input": "70 130\n2 1 2 2 3 3 2 5 2 2 3 3 3 1 1 4 3 5 3 2 1 3 7 1 2 7 5 2 1 6 3 4 1 2 1 1 1 1 3 6 4 2 2 8 2 2 4 1 4 2 1 4 4 3 5 1 1 1 1 1 2 3 1 5 1 3 3 4 2 2\n473 311 758 768 797 572 656 898 991 534 989 702 934 767 777 799 1000 655 806 727 718 948 834 965 832 778 706 861 799 874 745 970 772 967 984 886 835 795 832 837 950 952 475 891 947 952 903 929 689 478 725 945 585 943 771 631 729 887 557 738 824 758 999 786 669 992 918 762 964 941\n", "output": "119\n" }, { "input": "1 1000000000\n654321\n1000000000\n", "output": "3056\n" }, { "input": "2 1\n2 2\n1 1\n", "output": "0\n" }, { "input": "1 1\n10\n2\n", "output": "0\n" }, { "input": "30 300\n1 4 2 1 2 5 6 4 1 3 2 1 1 1 1 1 2 3 1 3 4 2 2 3 2 2 2 1 1 1\n997 817 767 860 835 809 817 565 630 804 586 953 977 356 905 890 958 916 740 583 902 945 313 956 871 729 976 707 516 788\n", "output": "164\n" }, { "input": "80 979\n2 1 1 1 2 1 1 1 3 1 4 4 2 1 1 3 1 1 2 1 4 1 1 2 5 4 8 1 3 6 5 7 2 3 4 1 2 2 6 1 2 2 4 1 1 2 3 2 8 1 1 3 3 4 1 1 2 1 4 4 1 4 3 2 6 5 2 1 4 1 2 3 2 1 3 3 1 2 1 3\n498 976 513 869 917 914 664 656 957 893 981 947 985 693 576 958 987 822 981 718 884 729 295 683 485 998 730 894 731 975 739 854 906 740 987 976 606 689 990 775 522 994 920 893 529 651 989 799 643 215 946 987 297 868 425 810 694 908 736 903 970 751 625 904 955 945 839 777 977 974 905 900 666 680 799 873 565 919 536 686\n", "output": "128\n" }, { "input": "1 1000000000\n100000000\n1000000000\n", "output": "20\n" }, { "input": "2 1000000000\n1 1\n1000000000 1000000000\n", "output": "1500000000\n" }, { "input": "1 1000\n1\n1000\n", "output": "2000\n" }, { "input": "1 1000000000\n1000000000\n1000000000\n", "output": "2\n" } ]
code_contests
python
0.2
3427157ebf0653392964217682c14ce4
Barney lives in NYC. NYC has infinite number of intersections numbered with positive integers starting from 1. There exists a bidirectional road between intersections i and 2i and another road between i and 2i + 1 for every positive integer i. You can clearly see that there exists a unique shortest path between any two intersections. <image> Initially anyone can pass any road for free. But since SlapsGiving is ahead of us, there will q consecutive events happen soon. There are two types of events: 1. Government makes a new rule. A rule can be denoted by integers v, u and w. As the result of this action, the passing fee of all roads on the shortest path from u to v increases by w dollars. 2. Barney starts moving from some intersection v and goes to intersection u where there's a girl he wants to cuddle (using his fake name Lorenzo Von Matterhorn). He always uses the shortest path (visiting minimum number of intersections or roads) between two intersections. Government needs your calculations. For each time Barney goes to cuddle a girl, you need to tell the government how much money he should pay (sum of passing fee of all roads he passes). Input The first line of input contains a single integer q (1 ≤ q ≤ 1 000). The next q lines contain the information about the events in chronological order. Each event is described in form 1 v u w if it's an event when government makes a new rule about increasing the passing fee of all roads on the shortest path from u to v by w dollars, or in form 2 v u if it's an event when Barnie goes to cuddle from the intersection v to the intersection u. 1 ≤ v, u ≤ 1018, v ≠ u, 1 ≤ w ≤ 109 states for every description line. Output For each event of second type print the sum of passing fee of all roads Barney passes in this event, in one line. Print the answers in chronological order of corresponding events. Example Input 7 1 3 4 30 1 4 1 2 1 3 6 8 2 4 3 1 6 1 40 2 3 7 2 2 4 Output 94 0 32 Note In the example testcase: Here are the intersections used: <image> 1. Intersections on the path are 3, 1, 2 and 4. 2. Intersections on the path are 4, 2 and 1. 3. Intersections on the path are only 3 and 6. 4. Intersections on the path are 4, 2, 1 and 3. Passing fee of roads on the path are 32, 32 and 30 in order. So answer equals to 32 + 32 + 30 = 94. 5. Intersections on the path are 6, 3 and 1. 6. Intersections on the path are 3 and 7. Passing fee of the road between them is 0. 7. Intersections on the path are 2 and 4. Passing fee of the road between them is 32 (increased by 30 in the first event and by 2 in the second). Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
def find_path(x,y): p1,p2 = [],[] while x!=0: p1.append(x) x = x//2 while y!=0: p2.append(y) y = y//2 p1 = p1[::-1] p2 = p2[::-1] # print (p1,p2) for i in range(min(len(p1),len(p2))): if p1[i]==p2[i]: ind = i else: break path = [] for i in range(ind,len(p1)): path.append(p1[i]) path = path[::-1] for i in range(ind+1,len(p2)): path.append(p2[i]) return path q = int(input()) cost = {} for i in range(q): a = list(map(int,input().split())) b = find_path(a[1],a[2]) # print (b) if a[0] == 1: w = a[-1] for j in range(1,len(b)): if (b[j],b[j-1]) not in cost: cost[(b[j],b[j-1])] = w cost[(b[j-1],b[j])] = w else: cost[(b[j],b[j-1])] += w cost[(b[j-1],b[j])] += w else: ans = 0 for j in range(1,len(b)): if (b[j],b[j-1]) in cost: ans += cost[(b[j],b[j-1])] print (ans)
python
code_algorithm
[ { "input": "7\n1 3 4 30\n1 4 1 2\n1 3 6 8\n2 4 3\n1 6 1 40\n2 3 7\n2 2 4\n", "output": "94\n0\n32\n" }, { "input": "2\n1 100000000000000 200000000000000 1\n2 276447232 552894464\n", "output": "0\n" }, { "input": "2\n1 562949953421312 562949953421311 1\n2 562949953421312 562949953421311\n", "output": "97\n" }, { "input": "1\n2 666077344481199252 881371880336470888\n", "output": "0\n" }, { "input": "10\n2 37526406560905229 37526426361107171\n2 37526424114740747 18763396439955441\n2 300485276957081578 301492476099962199\n1 75035386466351570 441803674395985082 642312512\n2 300197522144700185 220954108245114486\n1 150105696341181576 559187296 100113944\n1 300197522135707767 150242638470761995 170574370\n2 150105691058036871 220954108245108400\n2 37560659619635168 150070774425697078\n2 18780329809814344 300222324900057526\n", "output": "0\n0\n0\n13488562752\n14270974176\n13899046930\n5418394872\n" }, { "input": "1\n2 1 343417335313797025\n", "output": "0\n" }, { "input": "2\n1 100 50 1\n2 4294967396 1\n", "output": "0\n" }, { "input": "2\n1 2147540141 4295080282 1\n2 1 112986\n", "output": "0\n" }, { "input": "2\n1 500000000000 250000000000 1\n2 1783793664 891896832\n", "output": "0\n" }, { "input": "10\n1 1 399719082491 159376944\n1 186 1 699740230\n2 410731850987390 1\n1 410731850987390 399719082491 699271234\n1 1 186 255736462\n1 1 186 544477714\n1 399719082491 410731850987390 366708275\n2 1 186\n2 410731850987390 1\n2 399719082491 186\n", "output": "6013820218\n11615319450\n55320479319\n37986050043\n" }, { "input": "2\n1 4294967298 4294967299 10\n2 2 3\n", "output": "0\n" }, { "input": "10\n1 1 63669439577744021 396980128\n1 2582240553355225 63669439577744021 997926286\n1 2582240553355225 1 619026011\n1 1 4 231881718\n2 63669439577744021 3886074192977\n2 4 63669439577744021\n2 124354374175272 10328962213420903\n1 10328962213420903 3886074192977 188186816\n1 124354374175272 31088593543820 705639304\n2 2582240553355225 254677758310976084\n", "output": "19528689796\n80417520800\n140119493557\n179078288337\n" }, { "input": "2\n1 239841676148963 1 20\n2 2112405731 1\n", "output": "20\n" } ]
code_contests
python
0.2
ac6fed40a6fdf154f7720f86d33f0c1c
R3D3 spent some time on an internship in MDCS. After earning enough money, he decided to go on a holiday somewhere far, far away. He enjoyed suntanning, drinking alcohol-free cocktails and going to concerts of popular local bands. While listening to "The White Buttons" and their hit song "Dacan the Baker", he met another robot for whom he was sure is the love of his life. Well, his summer, at least. Anyway, R3D3 was too shy to approach his potential soulmate, so he decided to write her a love letter. However, he stumbled upon a problem. Due to a terrorist threat, the Intergalactic Space Police was monitoring all letters sent in the area. Thus, R3D3 decided to invent his own alphabet, for which he was sure his love would be able to decipher. There are n letters in R3D3’s alphabet, and he wants to represent each letter as a sequence of '0' and '1', so that no letter’s sequence is a prefix of another letter's sequence. Since the Intergalactic Space Communications Service has lately introduced a tax for invented alphabets, R3D3 must pay a certain amount of money for each bit in his alphabet’s code (check the sample test for clarifications). He is too lovestruck to think clearly, so he asked you for help. Given the costs c0 and c1 for each '0' and '1' in R3D3’s alphabet, respectively, you should come up with a coding for the alphabet (with properties as above) with minimum total cost. Input The first line of input contains three integers n (2 ≤ n ≤ 108), c0 and c1 (0 ≤ c0, c1 ≤ 108) — the number of letters in the alphabet, and costs of '0' and '1', respectively. Output Output a single integer — minimum possible total a cost of the whole alphabet. Example Input 4 1 2 Output 12 Note There are 4 letters in the alphabet. The optimal encoding is "00", "01", "10", "11". There are 4 zeroes and 4 ones used, so the total cost is 4·1 + 4·2 = 12. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
import sys,heapq #sys.stdin=open("data.txt") input=sys.stdin.readline n,a,b=map(int,input().split()) if a<b: a,b=b,a if b==0: # 1 01 001 0001 ... is optimal, plus a long series of 0's print((n-1)*a) else: # pascal's triangle thing pascal=[[1]*20005] for i in range(20004): newrow=[1] for j in range(1,20005): newrow.append(newrow[-1]+pascal[-1][j]) if newrow[-1]>n: break pascal.append(newrow) def getcom(a,b): # return a+b choose b # if larger than n, return infinite if len(pascal[a])>b: return pascal[a][b] if b==0: return 1 if b==1: return a return 100000005 # start with the null node (prefix cost 0) # can split a node into two other nodes with added cost c+a+b # new nodes have prefix costs c+a, c+b # want n-1 splits in total remain=n-1 ans=0 possible=[[a+b,1]] # [c,count] while 1: # cost u, v leaves u,v=heapq.heappop(possible) while possible and possible[0][0]==u: v+=possible[0][1] heapq.heappop(possible) if remain<=v: ans+=u*remain break ans+=u*v remain-=v heapq.heappush(possible,[u+a,v]) heapq.heappush(possible,[u+b,v]) print(ans) # Made By Mostafa_Khaled
python
code_algorithm
[ { "input": "4 1 2\n", "output": "12\n" }, { "input": "8954 4025 7157\n", "output": "641304164\n" }, { "input": "1006 9237 1123\n", "output": "38974261\n" }, { "input": "6222 7124 6784\n", "output": "547839384\n" }, { "input": "5992 2773 6869\n", "output": "340564941\n" }, { "input": "6995 4636 8251\n", "output": "561476311\n" }, { "input": "1736 5628 2595\n", "output": "73441521\n" }, { "input": "100000000 100000000 0\n", "output": "9999999900000000\n" }, { "input": "2793 175 3594\n", "output": "36405762\n" }, { "input": "100000000 50000000 0\n", "output": "4999999950000000\n" }, { "input": "4755 6759 4899\n", "output": "336456318\n" }, { "input": "28258585 6194848 49146833\n", "output": "14441957862691571\n" }, { "input": "37142108 10188690 35774598\n", "output": "19009588918065432\n" }, { "input": "100000000 1 0\n", "output": "99999999\n" }, { "input": "100000000 0 100000000\n", "output": "9999999900000000\n" }, { "input": "84963589 37799442 20818727\n", "output": "63754887412974663\n" }, { "input": "2 0 0\n", "output": "0\n" }, { "input": "5195 1354 2885\n", "output": "130236572\n" }, { "input": "5656 7968 3400\n", "output": "379249528\n" }, { "input": "100000000 100000000 100000000\n", "output": "266578227200000000\n" }, { "input": "6 6 0\n", "output": "30\n" }, { "input": "174 6826 355\n", "output": "2889605\n" }, { "input": "100000000 50000000 100000000\n", "output": "191720992950000000\n" }, { "input": "14913475 61391038 9257618\n", "output": "9761450207212562\n" }, { "input": "64302230 83635846 22670768\n", "output": "77790985833197594\n" }, { "input": "80587587 25402325 8120971\n", "output": "32044560697691212\n" }, { "input": "96212915 66569231 66289469\n", "output": "170023209909758400\n" }, { "input": "2 100000000 100000000\n", "output": "200000000\n" }, { "input": "26854436 29462638 67336233\n", "output": "30373819153055635\n" }, { "input": "6508457 32226669 8706339\n", "output": "2645634460061466\n" }, { "input": "2 1 5\n", "output": "6\n" }, { "input": "8619 6736 9365\n", "output": "900966230\n" }, { "input": "1312 5090 9909\n", "output": "98808420\n" }, { "input": "3894 9921 3871\n", "output": "299508763\n" }, { "input": "2500 5736 4002\n", "output": "136264140\n" }, { "input": "1505663 3257962 1039115\n", "output": "60023256524142\n" }, { "input": "151 7023 3093\n", "output": "5267919\n" }, { "input": "2 100000000 0\n", "output": "100000000\n" }, { "input": "7347370 2098650 66077918\n", "output": "3070602135161752\n" }, { "input": "1189 1829 6875\n", "output": "46521099\n" }, { "input": "1504 1123 626\n", "output": "13538132\n" }, { "input": "88265295 26984472 18821097\n", "output": "52835608063500861\n" }, { "input": "4730 8020 8722\n", "output": "484587068\n" }, { "input": "2888 9056 3931\n", "output": "204521173\n" }, { "input": "6 0 6\n", "output": "30\n" }, { "input": "39201451 80233602 30662934\n", "output": "50953283386656312\n" }, { "input": "100000000 0 0\n", "output": "0\n" }, { "input": "92820995 96034432 40568102\n", "output": "158135215198065044\n" }, { "input": "8415 8714 2475\n", "output": "545452719\n" }, { "input": "13756397 41019327 86510346\n", "output": "19895886795999000\n" }, { "input": "8642 5709 51\n", "output": "135655830\n" }, { "input": "34291060 92893503 64680754\n", "output": "66960630525688676\n" }, { "input": "2 50000000 0\n", "output": "50000000\n" }, { "input": "25721978 63666459 14214946\n", "output": "20847031763747988\n" }, { "input": "99338896 62289589 49020203\n", "output": "146320678028775569\n" }, { "input": "8584 4286 9528\n", "output": "738058224\n" }, { "input": "4295 9730 4322\n", "output": "346320888\n" }, { "input": "68251617 52232534 34187120\n", "output": "75694251898945158\n" }, { "input": "74790405 66932852 48171076\n", "output": "111690840882243696\n" }, { "input": "2 0 100000000\n", "output": "100000000\n" }, { "input": "2 50000000 100000000\n", "output": "150000000\n" }, { "input": "61988457 90532323 72913492\n", "output": "130757350538583270\n" }, { "input": "2 1 2\n", "output": "3\n" }, { "input": "73363656 63565575 76409698\n", "output": "133919836504944416\n" }, { "input": "9708 3254 2830\n", "output": "391502526\n" }, { "input": "6699 4249 1068\n", "output": "196812772\n" }, { "input": "3 1 1\n", "output": "5\n" }, { "input": "2179 7307 8608\n", "output": "192281235\n" }, { "input": "44440915 82093126 57268128\n", "output": "77907273273831800\n" }, { "input": "9251 4756 2763\n", "output": "448302621\n" }, { "input": "4 0 0\n", "output": "0\n" }, { "input": "81913246 61174868 31286889\n", "output": "96084588586645841\n" }, { "input": "8447 1494 4432\n", "output": "298387478\n" }, { "input": "1389928 84918086 54850899\n", "output": "1953921305304795\n" }, { "input": "39858798 77741429 44017779\n", "output": "59709461677488470\n" }, { "input": "39969092 91869601 91924349\n", "output": "93003696194821620\n" }, { "input": "9678 133 5955\n", "output": "196970292\n" }, { "input": "85779772 26434899 86820336\n", "output": "114681463889615136\n" }, { "input": "70931513 41663344 29095671\n", "output": "64816798089350400\n" }, { "input": "5 5 5\n", "output": "60\n" }, { "input": "86813943 11824369 38451380\n", "output": "51645349299460766\n" } ]
code_contests
python
0
7b54c320045c616675e5c71a42e9683d
<image> Input The input consists of four lines, each line containing a single digit 0 or 1. Output Output a single digit, 0 or 1. Example Input 0 1 1 0 Output 0 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
import collections as col import itertools as its import sys import operator from bisect import bisect_left, bisect_right from copy import copy, deepcopy class Solver: def __init__(self): pass def solve(self): a = int(input()) b = int(input()) c = int(input()) d = int(input()) l11 = a ^ b l12 = c | d l13 = b & c l14 = a ^ d l21 = l11 & l12 l22 = l13 | l14 print(l21 ^ l22) if __name__ == '__main__': s = Solver() s.solve()
python
code_algorithm
[ { "input": "0\n1\n1\n0\n", "output": "0\n" }, { "input": "1\n0\n0\n1\n", "output": "1\n" }, { "input": "0\n1\n0\n0\n", "output": "0\n" }, { "input": "1\n1\n0\n1\n", "output": "0\n" }, { "input": "0\n1\n0\n1\n", "output": "0\n" }, { "input": "0\n0\n0\n1\n", "output": "1\n" }, { "input": "0\n0\n1\n0\n", "output": "0\n" }, { "input": "1\n0\n1\n1\n", "output": "1\n" }, { "input": "1\n1\n1\n0\n", "output": "1\n" }, { "input": "0\n1\n1\n1\n", "output": "0\n" }, { "input": "1\n0\n1\n0\n", "output": "0\n" }, { "input": "1\n1\n0\n0\n", "output": "1\n" }, { "input": "0\n0\n0\n0\n", "output": "0\n" }, { "input": "0\n0\n1\n1\n", "output": "1\n" }, { "input": "1\n0\n0\n0\n", "output": "1\n" }, { "input": "1\n1\n1\n1\n", "output": "1\n" } ]
code_contests
python
0
799e973c6f5bd84ef32fa52ef4c975ca
It is known that passages in Singer house are complex and intertwined. Let's define a Singer k-house as a graph built by the following process: take complete binary tree of height k and add edges from each vertex to all its successors, if they are not yet present. <image> Singer 4-house Count the number of non-empty paths in Singer k-house which do not pass the same vertex twice. Two paths are distinct if the sets or the orders of visited vertices are different. Since the answer can be large, output it modulo 109 + 7. Input The only line contains single integer k (1 ≤ k ≤ 400). Output Print single integer — the answer for the task modulo 109 + 7. Examples Input 2 Output 9 Input 3 Output 245 Input 20 Output 550384565 Note There are 9 paths in the first example (the vertices are numbered on the picture below): 1, 2, 3, 1-2, 2-1, 1-3, 3-1, 2-1-3, 3-1-2. <image> Singer 2-house Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
print([0,1,9,245,126565,54326037,321837880,323252721,754868154,328083248,838314395,220816781,893672292,166441208,251255697,114256285,118775501,482714697,11784725,460862131,550384565,106742050,425241115,626692854,674266678,320014275,345949512,527320049,897822749,137190263,491039182,810384961,482023334,658099864,886790989,845381174,371433224,278969124,420088324,696766322,388302635,141033366,46387851,932125021,278342766,371131134,922501918,110778457,506223573,806353719,391845991,923507761,780307355,109951115,830090230,605558495,344686604,988110893,944684429,715019947,799898820,384672708,907325090,758952329,550672104,368337206,394915145,401744167,923781939,831857516,407845661,329267374,927004007,891609656,897919613,481297880,737337940,651873737,287246681,973133651,679864988,784719328,820504764,875613823,806512665,164851642,500228957,951814419,447763649,273141670,979349615,964027956,809510400,276634497,116631976,426739449,175282420,885948162,62270880,974395255,675165056,759589968,837957573,931897605,152352780,585420109,1772087,333401718,898833639,745874265,786209423,691982338,498790927,473374639,274302623,971280670,241671319,13070005,302088807,550276351,436592588,631667314,548656698,730626984,146295220,674398632,400383348,454138904,786220712,118620797,233440672,217349271,274853536,310607544,105221205,769566615,853585061,800665807,695377419,924327065,388199705,551624811,721435546,501720515,308465454,825369234,396065729,451899519,295058424,142088952,473485086,378771634,734511215,462404399,959198328,337668263,794122911,38911400,951992982,472696081,373904752,105884826,630251717,28980684,845136347,353665773,691661192,19922354,231463797,757917231,242739918,979036950,713722080,234689388,2243164,209872853,240808787,539523346,425797848,913772061,224613100,421742777,222232478,92712941,215137570,949901408,274827432,15162482,593145989,274574232,239282092,762720192,804146934,500629424,565985054,81127381,671811155,655565571,890331075,237994348,743647404,667160634,713914299,668506729,741341289,277636808,762781382,14272789,902864131,567443405,149113383,648844381,825489976,933016723,192288078,734493315,240985733,861817693,762711459,525904609,532463481,377133989,620711079,772561562,980733194,227599811,162774370,209512798,787116594,3509258,748795368,378035466,612938915,802091952,857679599,481748937,493370392,358420805,48301629,412001241,463126722,509578422,967799131,994766554,687287243,863623583,771554899,690911527,855314994,923686429,246862514,192479791,133487041,703444043,295281758,801816257,920762934,749306433,973004841,848644684,560026478,952127278,616654635,839390326,975154012,409583672,635350249,343228425,335331602,223826406,952341037,589677800,249747234,555694261,137143500,628190328,461598392,431912756,29349807,759199489,783281228,781971312,915823407,388508707,718062705,27424111,309999451,963383322,831185229,132910888,347028136,850484840,223055285,142335980,144754000,772005560,81796039,167696020,79454283,172772542,201056991,484957644,716630285,763194701,211505841,903448791,926964672,257752668,482951716,411539070,620249847,592476107,170473128,814662613,898000271,57354872,361106091,488697643,889007954,138725767,684860983,36248116,304610143,137633385,413715776,99010024,779653665,100387568,286328069,564731826,621740468,943513219,506666491,249987886,553719884,769853086,337485319,702455584,809637762,755400257,892290368,502180086,364275817,118162370,873374339,261271695,970132574,744105500,434447173,117975095,383088393,625447969,180281249,545367713,133236931,360175662,148087453,806871297,498529036,886076476,65645000,465138299,967109895,331362616,472283705,796894900,199697765,503759892,472807906,187586706,941198065,782234442,57693411,18678611,82626204,395317191,570588915,152519440,449852456,63696518,763741345,878748386,494317541,444782633,93316211,929164666,529288371,165769871,730546850,955877127,994202767,492009567,275683011,415902127,95725776,718047399,786963365,73091278,986172399,174591541,913259286][int(input())])
python
code_algorithm
[ { "input": "3\n", "output": "245\n" }, { "input": "2\n", "output": "9\n" }, { "input": "20\n", "output": "550384565\n" }, { "input": "9\n", "output": "328083248\n" }, { "input": "181\n", "output": "421742777\n" }, { "input": "261\n", "output": "952127278\n" }, { "input": "8\n", "output": "754868154\n" }, { "input": "121\n", "output": "631667314\n" }, { "input": "351\n", "output": "625447969\n" }, { "input": "71\n", "output": "329267374\n" }, { "input": "141\n", "output": "551624811\n" }, { "input": "361\n", "output": "465138299\n" }, { "input": "1\n", "output": "1\n" }, { "input": "61\n", "output": "384672708\n" }, { "input": "301\n", "output": "484957644\n" }, { "input": "392\n", "output": "275683011\n" }, { "input": "10\n", "output": "838314395\n" }, { "input": "321\n", "output": "36248116\n" }, { "input": "161\n", "output": "105884826\n" }, { "input": "151\n", "output": "378771634\n" }, { "input": "41\n", "output": "141033366\n" }, { "input": "251\n", "output": "192479791\n" }, { "input": "241\n", "output": "509578422\n" }, { "input": "395\n", "output": "718047399\n" }, { "input": "271\n", "output": "589677800\n" }, { "input": "101\n", "output": "759589968\n" }, { "input": "131\n", "output": "217349271\n" }, { "input": "396\n", "output": "786963365\n" }, { "input": "211\n", "output": "648844381\n" }, { "input": "331\n", "output": "943513219\n" }, { "input": "291\n", "output": "850484840\n" }, { "input": "398\n", "output": "986172399\n" }, { "input": "201\n", "output": "667160634\n" }, { "input": "393\n", "output": "415902127\n" }, { "input": "400\n", "output": "913259286\n" }, { "input": "31\n", "output": "810384961\n" }, { "input": "21\n", "output": "106742050\n" }, { "input": "91\n", "output": "964027956\n" }, { "input": "51\n", "output": "923507761\n" }, { "input": "371\n", "output": "782234442\n" }, { "input": "7\n", "output": "323252721\n" }, { "input": "191\n", "output": "762720192\n" }, { "input": "391\n", "output": "492009567\n" }, { "input": "394\n", "output": "95725776\n" }, { "input": "231\n", "output": "378035466\n" }, { "input": "81\n", "output": "784719328\n" }, { "input": "171\n", "output": "979036950\n" }, { "input": "111\n", "output": "691982338\n" }, { "input": "381\n", "output": "878748386\n" }, { "input": "399\n", "output": "174591541\n" }, { "input": "5\n", "output": "54326037\n" }, { "input": "311\n", "output": "592476107\n" }, { "input": "281\n", "output": "781971312\n" }, { "input": "6\n", "output": "321837880\n" }, { "input": "397\n", "output": "73091278\n" }, { "input": "4\n", "output": "126565\n" }, { "input": "221\n", "output": "377133989\n" }, { "input": "341\n", "output": "502180086\n" }, { "input": "11\n", "output": "220816781\n" } ]
code_contests
python
0
8f3c26b98c0a09ba95a8b1836eb43f66
Winnie-the-Pooh likes honey very much! That is why he decided to visit his friends. Winnie has got three best friends: Rabbit, Owl and Eeyore, each of them lives in his own house. There are winding paths between each pair of houses. The length of a path between Rabbit's and Owl's houses is a meters, between Rabbit's and Eeyore's house is b meters, between Owl's and Eeyore's house is c meters. For enjoying his life and singing merry songs Winnie-the-Pooh should have a meal n times a day. Now he is in the Rabbit's house and has a meal for the first time. Each time when in the friend's house where Winnie is now the supply of honey is about to end, Winnie leaves that house. If Winnie has not had a meal the required amount of times, he comes out from the house and goes to someone else of his two friends. For this he chooses one of two adjacent paths, arrives to the house on the other end and visits his friend. You may assume that when Winnie is eating in one of his friend's house, the supply of honey in other friend's houses recover (most probably, they go to the supply store). Winnie-the-Pooh does not like physical activity. He wants to have a meal n times, traveling minimum possible distance. Help him to find this distance. Input First line contains an integer n (1 ≤ n ≤ 100) — number of visits. Second line contains an integer a (1 ≤ a ≤ 100) — distance between Rabbit's and Owl's houses. Third line contains an integer b (1 ≤ b ≤ 100) — distance between Rabbit's and Eeyore's houses. Fourth line contains an integer c (1 ≤ c ≤ 100) — distance between Owl's and Eeyore's houses. Output Output one number — minimum distance in meters Winnie must go through to have a meal n times. Examples Input 3 2 3 1 Output 3 Input 1 2 3 5 Output 0 Note In the first test case the optimal path for Winnie is the following: first have a meal in Rabbit's house, then in Owl's house, then in Eeyore's house. Thus he will pass the distance 2 + 1 = 3. In the second test case Winnie has a meal in Rabbit's house and that is for him. So he doesn't have to walk anywhere at all. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
# 876A def main(): n, a, b, c = int(input()), int(input()), int(input()), int(input()) if n == 1: return 0 n -= 1 count = 0 state = 0 while n: if state == 0: if a > b: count += b state = 2 else: count += a state = 1 elif state == 1: if a > c: count += c state = 2 else: count += a state = 0 else: if b > c: count += c state = 1 else: count += b state = 0 n -= 1 return count if __name__ == "__main__": print(main()) # input()
python
code_algorithm
[ { "input": "1\n2\n3\n5\n", "output": "0\n" }, { "input": "3\n2\n3\n1\n", "output": "3\n" }, { "input": "1\n2\n6\n1\n", "output": "0\n" }, { "input": "1\n1\n1\n99\n", "output": "0\n" }, { "input": "2\n3\n2\n1\n", "output": "2\n" }, { "input": "62\n27\n16\n72\n", "output": "976\n" }, { "input": "1\n15\n13\n11\n", "output": "0\n" }, { "input": "5\n3\n3\n1\n", "output": "6\n" }, { "input": "1\n1\n1\n1\n", "output": "0\n" }, { "input": "75\n50\n50\n5\n", "output": "415\n" }, { "input": "9\n37\n85\n76\n", "output": "296\n" }, { "input": "65\n5\n8\n7\n", "output": "320\n" }, { "input": "5\n5\n5\n5\n", "output": "20\n" }, { "input": "100\n100\n100\n100\n", "output": "9900\n" }, { "input": "10\n1\n8\n3\n", "output": "9\n" }, { "input": "2\n1\n7\n8\n", "output": "1\n" }, { "input": "1\n3\n2\n1\n", "output": "0\n" }, { "input": "1\n30\n20\n1\n", "output": "0\n" }, { "input": "1\n100\n50\n5\n", "output": "0\n" }, { "input": "80\n42\n1\n37\n", "output": "79\n" }, { "input": "10\n13\n72\n17\n", "output": "117\n" }, { "input": "59\n8\n1\n2\n", "output": "58\n" }, { "input": "1\n99\n98\n1\n", "output": "0\n" }, { "input": "73\n71\n69\n66\n", "output": "4755\n" }, { "input": "1\n5\n6\n2\n", "output": "0\n" }, { "input": "1\n99\n98\n97\n", "output": "0\n" }, { "input": "9\n24\n1\n63\n", "output": "8\n" }, { "input": "2\n2\n3\n1\n", "output": "2\n" }, { "input": "7\n10\n5\n6\n", "output": "30\n" }, { "input": "8\n80\n55\n1\n", "output": "61\n" }, { "input": "1\n5\n7\n3\n", "output": "0\n" }, { "input": "3\n3\n3\n3\n", "output": "6\n" }, { "input": "76\n46\n77\n11\n", "output": "860\n" }, { "input": "2\n1\n1\n1\n", "output": "1\n" }, { "input": "1\n2\n3\n1\n", "output": "0\n" }, { "input": "1\n5\n6\n1\n", "output": "0\n" }, { "input": "74\n31\n11\n79\n", "output": "803\n" }, { "input": "56\n8\n9\n3\n", "output": "170\n" }, { "input": "1\n100\n50\n1\n", "output": "0\n" }, { "input": "2\n2\n2\n1\n", "output": "2\n" }, { "input": "75\n54\n76\n66\n", "output": "3996\n" }, { "input": "2\n1\n1\n3\n", "output": "1\n" }, { "input": "83\n58\n88\n16\n", "output": "1354\n" }, { "input": "1\n3\n4\n2\n", "output": "0\n" }, { "input": "100\n1\n1\n100\n", "output": "99\n" }, { "input": "1\n2\n2\n1\n", "output": "0\n" }, { "input": "72\n95\n27\n9\n", "output": "657\n" }, { "input": "9\n9\n7\n5\n", "output": "42\n" } ]
code_contests
python
0.2
9bce0af3f04522d1df79549fb438a14e
Peter likes to travel by train. He likes it so much that on the train he falls asleep. Once in summer Peter was going by train from city A to city B, and as usual, was sleeping. Then he woke up, started to look through the window and noticed that every railway station has a flag of a particular colour. The boy started to memorize the order of the flags' colours that he had seen. But soon he fell asleep again. Unfortunately, he didn't sleep long, he woke up and went on memorizing the colours. Then he fell asleep again, and that time he slept till the end of the journey. At the station he told his parents about what he was doing, and wrote two sequences of the colours that he had seen before and after his sleep, respectively. Peter's parents know that their son likes to fantasize. They give you the list of the flags' colours at the stations that the train passes sequentially on the way from A to B, and ask you to find out if Peter could see those sequences on the way from A to B, or from B to A. Remember, please, that Peter had two periods of wakefulness. Peter's parents put lowercase Latin letters for colours. The same letter stands for the same colour, different letters — for different colours. Input The input data contains three lines. The first line contains a non-empty string, whose length does not exceed 105, the string consists of lowercase Latin letters — the flags' colours at the stations on the way from A to B. On the way from B to A the train passes the same stations, but in reverse order. The second line contains the sequence, written by Peter during the first period of wakefulness. The third line contains the sequence, written during the second period of wakefulness. Both sequences are non-empty, consist of lowercase Latin letters, and the length of each does not exceed 100 letters. Each of the sequences is written in chronological order. Output Output one of the four words without inverted commas: * «forward» — if Peter could see such sequences only on the way from A to B; * «backward» — if Peter could see such sequences on the way from B to A; * «both» — if Peter could see such sequences both on the way from A to B, and on the way from B to A; * «fantasy» — if Peter could not see such sequences. Examples Input atob a b Output forward Input aaacaaa aca aa Output both Note It is assumed that the train moves all the time, so one flag cannot be seen twice. There are no flags at stations A and B. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
import re I = input s, first, second = I(), I(), I() forward = re.fullmatch('\w*' + first + '\w*' + second + '\w*', s) backward = re.fullmatch('\w*' + first + '\w*' + second + '\w*', s[::-1]) if forward: print('both' if backward else 'forward') else: print('backward' if backward else 'fantasy')
python
code_algorithm
[ { "input": "atob\na\nb\n", "output": "forward\n" }, { "input": "aaacaaa\naca\naa\n", "output": "both\n" }, { "input": "babaabababaaaababaabababaabababababababbababbbabbaabababaababbaabbababaababaaabababaabbaababaaababaa\nabaabababaa\nabaabbaa\n", "output": "forward\n" }, { "input": "abacaba\naca\nba\n", "output": "both\n" }, { "input": "aabaab\naba\nab\n", "output": "forward\n" }, { "input": "bbabbbbababbaabaabaa\nabb\nbaab\n", "output": "forward\n" }, { "input": "aababaaababaabbaabababaaababaabababbaabbabaabababaabbabbbababbababababababaabababaababaaaabababaabab\nabaabababaa\nabaabbaa\n", "output": "backward\n" }, { "input": "ab\nb\na\n", "output": "backward\n" }, { "input": "aabaa\naab\nbaa\n", "output": "fantasy\n" }, { "input": "aaa\naaaa\naaaa\n", "output": "fantasy\n" }, { "input": "aaaa\naaa\naa\n", "output": "fantasy\n" }, { "input": "zzzz\nzzzz\nzzzz\n", "output": "fantasy\n" }, { "input": "bbbbbbbbbbbbbbbbbbbbbbbbb\nbbbb\nbbbbb\n", "output": "both\n" }, { "input": "zzzz\nzz\nzz\n", "output": "both\n" }, { "input": "astalavista\nastla\nlavista\n", "output": "fantasy\n" }, { "input": "aab\nb\naa\n", "output": "backward\n" }, { "input": "zzzz\nzz\nzzz\n", "output": "fantasy\n" }, { "input": "a\na\na\n", "output": "fantasy\n" }, { "input": "abacabadabacaba\nabacaba\nabacaba\n", "output": "both\n" }, { "input": "aaa\naa\naa\n", "output": "fantasy\n" } ]
code_contests
python
0.4
64038f98b0a97b4579947107626ae0b7
Igor K. always used to trust his favorite Kashpirovsky Antivirus. That is why he didn't hesitate to download the link one of his groupmates sent him via QIP Infinium. The link was said to contain "some real funny stuff about swine influenza". The antivirus had no objections and Igor K. run the flash application he had downloaded. Immediately his QIP Infinium said: "invalid login/password". Igor K. entered the ISQ from his additional account and looked at the info of his main one. His name and surname changed to "H1N1" and "Infected" correspondingly, and the "Additional Information" field contained a strange-looking binary code 80 characters in length, consisting of zeroes and ones. "I've been hacked" — thought Igor K. and run the Internet Exploiter browser to quickly type his favourite search engine's address. Soon he learned that it really was a virus that changed ISQ users' passwords. Fortunately, he soon found out that the binary code was actually the encrypted password where each group of 10 characters stood for one decimal digit. Accordingly, the original password consisted of 8 decimal digits. Help Igor K. restore his ISQ account by the encrypted password and encryption specification. Input The input data contains 11 lines. The first line represents the binary code 80 characters in length. That is the code written in Igor K.'s ISQ account's info. Next 10 lines contain pairwise distinct binary codes 10 characters in length, corresponding to numbers 0, 1, ..., 9. Output Print one line containing 8 characters — The password to Igor K.'s ISQ account. It is guaranteed that the solution exists. Examples Input 01001100100101100000010110001001011001000101100110010110100001011010100101101100 0100110000 0100110010 0101100000 0101100010 0101100100 0101100110 0101101000 0101101010 0101101100 0101101110 Output 12345678 Input 10101101111001000010100100011010101101110010110111011000100011011110010110001000 1001000010 1101111001 1001000110 1010110111 0010110111 1101001101 1011000001 1110010101 1011011000 0110001000 Output 30234919 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
s = input() a = [] for i in range(10): a.append(input()) p = 0 while(p < 80): for i in range(10): if a[i] == s[p:p+10]: print(i, end='') p += 10 break
python
code_algorithm
[ { "input": "10101101111001000010100100011010101101110010110111011000100011011110010110001000\n1001000010\n1101111001\n1001000110\n1010110111\n0010110111\n1101001101\n1011000001\n1110010101\n1011011000\n0110001000\n", "output": "30234919" }, { "input": "01001100100101100000010110001001011001000101100110010110100001011010100101101100\n0100110000\n0100110010\n0101100000\n0101100010\n0101100100\n0101100110\n0101101000\n0101101010\n0101101100\n0101101110\n", "output": "12345678" }, { "input": "01111101111100101010001001011110111001110111110111011111011110110111111011011111\n1111110111\n0010000101\n0110000100\n0111111011\n1011100111\n1100101010\n1011011111\n1100010001\n0111110111\n0010010111\n", "output": "85948866" }, { "input": "10110010010001110110110111100100011101101110010100100010110101011001011101111001\n1001000100\n1011001001\n0101100101\n0001110110\n1000101101\n0110110000\n0010010011\n1101111001\n1101010111\n1110010100\n", "output": "13739427" }, { "input": "10100111011010001011111000000111100000010101000011000010111101010000111010011101\n1010011101\n1010111111\n0110100110\n1111000100\n1110000001\n0000101111\n0011111000\n1000110001\n0101000011\n1010001011\n", "output": "09448580" }, { "input": "01011110100010000101110000101000100001011011100001001011011010100010110010110110\n1011111100\n0010110110\n1011100001\n1010001011\n0010000101\n1100001010\n1111001001\n0111011001\n0101111010\n1011101001\n", "output": "84542131" }, { "input": "00010101101110110101100110101100010101100010101111000101011010011010110010000011\n0101010110\n0001001101\n1001101011\n0000100011\n0010101111\n1110110101\n0001010110\n0110111000\n0000111110\n0010000011\n", "output": "65264629" }, { "input": "01110011110010000011011001011000001000010110010110011001100001100110001100101000\n0000100001\n0110011000\n1010000010\n1110011101\n0111001111\n1100101000\n0010000011\n0110010000\n1100100101\n0110010110\n", "output": "46909115" }, { "input": "10000001000101100010000011001011101100100101100111010110011101011000010111100010\n1000000100\n0101111010\n1110110010\n0100100100\n0101100001\n0111100010\n0000001101\n0101100111\n0000110010\n0101100010\n", "output": "09827745" }, { "input": "00010000001001101000111010010100010000000010011011001001101110011010000100011110\n0100010100\n0001000000\n0100011110\n1001101000\n0010111010\n1101010011\n0010011011\n1110100101\n0011000001\n1000101101\n", "output": "13716632" }, { "input": "01110010111001011111101111110100011110010001111001111010010000100110011011111101\n0001111001\n0111010010\n1011111101\n0111001011\n1110100100\n1001011111\n0010011001\n1111000110\n0111101101\n0010111101\n", "output": "35200462" }, { "input": "01001000101001100100100110010010011001000001011001000101100101001000101001100100\n0010100110\n0100000111\n0100100010\n0001010001\n1010111101\n1111011010\n0100010101\n0001011001\n1001100100\n1111110101\n", "output": "28887728" }, { "input": "00001011001111110111111111011111111101110101110100010111010010100101100001010110\n1111110111\n0001010110\n0111011011\n0111000001\n1010010110\n0101110100\n0001000101\n0000111000\n0110100001\n0000101100\n", "output": "90005541" }, { "input": "11100001001110000100101001011111101011010100100001111011011010100111011110000100\n1110101101\n0011111001\n1101110111\n1110110110\n1110000011\n1010010111\n1110000000\n0100100001\n1010011101\n1110000100\n", "output": "99507389" }, { "input": "10011001111100011110110010111101111110101110101110100110011111001011111101101111\n0001010001\n1100101111\n1110101110\n0111111010\n1110100000\n1101101111\n1001100111\n1010011100\n1100011110\n0101110010\n", "output": "68132615" }, { "input": "01001100101000100010001011110001000101001001100010010000001001001100101001011111\n1001011111\n1110010111\n0111101011\n1000100010\n0011100101\n0100000010\n0010111100\n0100010100\n1001100010\n0100110010\n", "output": "93678590" }, { "input": "11000101111011000010010110000101010000111101110101000001100111101001011101110101\n1110100101\n0100000010\n1011000010\n0000011001\n0101000011\n1100000101\n1100010111\n1000001000\n1101110101\n0101100001\n", "output": "62948308" }, { "input": "10101110000011010110101011100000101101000110100000101101101101110101000011110010\n0110100000\n1011011011\n0011110010\n0001110110\n0010110100\n1100010010\n0001101011\n1010111000\n0011010110\n0111010100\n", "output": "78740192" }, { "input": "11110111101111011110010100101101000011111111011110111010010001111111010101001011\n0101001010\n0110000011\n1001010001\n0101001011\n1101111000\n0111111101\n0110100010\n0100001111\n1111011110\n1110100100\n", "output": "88378953" }, { "input": "10101010001011010001001001011000100101100001011011101010101110101010001010101000\n0010110101\n1010011010\n1010101000\n1011010001\n1010101011\n0010010110\n0110100010\n1010100101\n0001011011\n0110100001\n", "output": "23558422" }, { "input": "10101100010010010110101010010011011011010000000111000000011110110010001010110001\n1011001000\n1010110001\n0010010110\n0000010100\n1010100100\n0000001111\n0101010100\n1010101110\n1101101101\n0000000111\n", "output": "12489901" }, { "input": "11101001111100110101110011010100110011011110100111010110110011000111000011001101\n1100011100\n1100110101\n1011101000\n0011011110\n0011001101\n0100010001\n1110100111\n1010101100\n1110110100\n0101101100\n", "output": "61146904" }, { "input": "10001100110000110111100011001101111110110011110101000011011100001101110000110111\n0011110101\n0101100011\n1000110011\n1011011001\n0111111011\n0101111011\n0000110111\n0100001110\n1000000111\n0110110111\n", "output": "26240666" }, { "input": "00110101111111011111110011111000011100010101010100101111011111110110111111011111\n1100111110\n0001110001\n0011010111\n0101010100\n1011110111\n1111011111\n1001001100\n1111010001\n1111011011\n1111000000\n", "output": "25013485" }, { "input": "10001001011000100101010110011101011001110010000001010110000101000100101111101010\n0101100001\n1100001100\n1111101010\n1000100101\n0010000001\n0100010010\n0010110110\n0101100111\n0000001110\n1101001110\n", "output": "33774052" }, { "input": "00100011111001001010001111000011101000001110100000000100101011101000001001001010\n0010001111\n1001001010\n1010011001\n0011100111\n1000111000\n0011110000\n0000100010\n0001001010\n1111110111\n1110100000\n", "output": "01599791" }, { "input": "01101100001000110101101100101111101110010011010111100011010100010001101000110101\n1001101001\n1000110101\n0110110000\n0111100100\n0011010111\n1110111001\n0001000110\n0000000100\n0001101001\n1011001011\n", "output": "21954161" }, { "input": "10010100011101000011100100001100101111000010111100000010010000001001001101011101\n1001000011\n1101000011\n1001010001\n1101011101\n1000010110\n0011111101\n0010111100\n0000100100\n1010001000\n0101000110\n", "output": "21066773" }, { "input": "11100001011010110001000010011110000111101110000101101011000110101100011111111101\n0000100111\n1000011110\n0100101111\n1100100011\n0101111110\n0011111100\n1001000111\n1111111101\n1110000101\n1010110001\n", "output": "89018997" }, { "input": "10000110110000010100000010001000111101110110101011110111000100001101000000100010\n0000010100\n0000110001\n0110101011\n1101110001\n1000011011\n0000110100\n0011110111\n1000110010\n0000100010\n0000011011\n", "output": "40862358" }, { "input": "11011010001100000011000100110011010101000110011110110000001100111100001000011111\n0000100010\n1000011111\n1101101000\n0110011110\n0011110000\n1100000011\n0010001100\n0101101000\n0001001100\n1101010100\n", "output": "25893541" }, { "input": "11001100100010100010011010001110110110000111011110110011001000101000101011101011\n1011011000\n1100110010\n1011101011\n0011101110\n1110001011\n0110100011\n0111011110\n0010100010\n0101001011\n0010001110\n", "output": "17506172" }, { "input": "01101111000110111100011011110001101111001010001100101000110001010101100100000010\n1010001100\n0011010011\n0101010110\n1111001100\n1100011000\n0100101100\n1001100101\n0110111100\n0011001101\n0100000010\n", "output": "77770029" }, { "input": "00000100000001111010001010010110101111110010100101000111101000101001010010100101\n0010100101\n0110110101\n1010010001\n0001111010\n0000010000\n1110101111\n1010111111\n0111111010\n0110001010\n0100001001\n", "output": "43060300" }, { "input": "11110101001100010000110100001110101011011111010100110001000001001010001001101111\n0101101100\n1001101111\n1010101101\n0100101000\n1111110000\n0101010010\n1100010000\n1111010100\n1101000011\n1011111111\n", "output": "76827631" }, { "input": "10001100010001010010100011000110011101100100110101001010001011111100001100110101\n1001110110\n0100110101\n1001001001\n0010100010\n1000110001\n1001001000\n0001100000\n0001010010\n1111110000\n1100110101\n", "output": "47401389" }, { "input": "01110111110000111011101010110110101011010100110111000011101101110101011101001000\n0110000101\n1010101101\n1101010111\n1101011100\n0100110111\n0111011111\n1100011001\n0111010101\n0000111011\n1101001000\n", "output": "58114879" }, { "input": "11100011010000000010011110010111001011111001000111000000001000000000100111100101\n0000000010\n1110001101\n0011010101\n0111100101\n1001000111\n1101001111\n0111010110\n1100101111\n0110000000\n1101101011\n", "output": "10374003" }, { "input": "11100011000100010110010011101010101010011110001100011010111110011000011010110111\n1110001100\n0110101111\n0100111010\n0101000000\n1001100001\n1010101001\n0000100010\n1010110111\n1100011100\n0100010110\n", "output": "09250147" }, { "input": "11101110101110001001011010001111101010000101111011111001000011100010011110101000\n0101111011\n1110001001\n0111011100\n0110110101\n1110110111\n0011101001\n1110010000\n1110111010\n1110101000\n0110100011\n", "output": "71980618" }, { "input": "00000110100011001110100001010010000101001010000001100101110111001111010011001110\n1001011101\n0000011010\n1000010100\n1011000101\n1010000001\n0010011001\n1100111101\n0010000101\n0110111111\n0011001110\n", "output": "19224069" }, { "input": "00101000010010100001011100110011111011010111001100110100110010100111100100111010\n0011111000\n0010100001\n0101101110\n1111101101\n1100000000\n0100111010\n1010011110\n1101001100\n0111001100\n0000010000\n", "output": "11838765" }, { "input": "01011011000010101101110110111001011011001010110100010110110011000011001101001001\n0101101100\n1101001001\n0110011111\n1000001011\n1100001100\n1010110100\n0010101101\n1100001010\n1101101110\n1110100101\n", "output": "06805041" }, { "input": "00001101101001100111101000000100111100100011110010010100010100111101011001101110\n0101011000\n0000000011\n0000110110\n0101000101\n1010000001\n0011110010\n0011110101\n1001100111\n1001101110\n0100010100\n", "output": "27455368" }, { "input": "00000011111110100101110000001101000101000011000110111011010100110001100011001000\n0011001000\n1100000011\n0010111000\n0011000110\n0110111101\n1110100101\n0100010100\n0010011011\n0000001111\n1110110101\n", "output": "85163930" }, { "input": "11110011011000001001111100110101001000010100100000110011001110011111100100100001\n1010011000\n1111001101\n0100100001\n1111010011\n0100100000\n1001111110\n1010100111\n1000100111\n1000001001\n1100110011\n", "output": "18124952" }, { "input": "00101001000011000011111000110010001100100000110111001100001100101001000111101100\n0001101110\n0011000011\n1000110010\n0000110111\n0111101100\n0110000100\n0010100100\n1110001100\n1111000101\n1011110000\n", "output": "61723164" }, { "input": "01100010001000100011100110100101010100000110001000110000101010000111000110001000\n1010101000\n1001010110\n1000011111\n0100100011\n0110001000\n1001101001\n1000011100\n1100001010\n0101010000\n1000100011\n", "output": "49584764" }, { "input": "11010101111000110110100111011000101101011100011100101110001110011101101000110110\n1000110110\n1101010111\n1011100011\n0101011010\n0010110101\n1000100010\n0001101100\n0011111001\n1100011100\n1001110110\n", "output": "10948290" }, { "input": "10001110111110000001000010001010001110110000100010100010111101101101010000100010\n0000010110\n1101010111\n1000101111\n0001011110\n0011110101\n0101100100\n0110110101\n0000100010\n1000111011\n1110000001\n", "output": "89787267" }, { "input": "00001000011100010110010011111101111010100111101010111000101001001111111110001010\n1100011011\n1100010110\n0011101111\n0100111111\n0001010100\n1110001010\n0111101010\n0000100001\n1110011011\n0010011010\n", "output": "71366535" }, { "input": "11011110101001101100110111001010000000101000100011100110110001011110111000100011\n1001010001\n1101111010\n0001110001\n1101110010\n1000000010\n1110000111\n1001101100\n1000110110\n1000100011\n0101111011\n", "output": "16348698" }, { "input": "01111111110101111111011111111111010010000001100000101000100100111001011010001001\n0111111111\n0101111111\n0100101101\n0001100000\n0011000101\n0011100101\n1101001000\n0010111110\n1010001001\n1111000111\n", "output": "01063858" }, { "input": "01111000111110011001110101110011110000111110010001101100110110100111101011001101\n1110010001\n1001100000\n1100001000\n1010011110\n1011001101\n0111100011\n1101011100\n1110011001\n1111000011\n0010000101\n", "output": "57680434" }, { "input": "01001001100101100011110110111100000110001111001000100000110111110010000000011000\n0100100110\n1000001011\n1000111110\n0000011000\n0101100011\n1101101111\n1111001000\n1011011001\n1000001101\n0010101000\n", "output": "04536863" }, { "input": "10000000101110111000000111001101010001011110100111001100111011101011101000000010\n0000101011\n0001110011\n1000000010\n1110100111\n0011001110\n1110111000\n0101000101\n1010100011\n1110101001\n1110101110\n", "output": "25163492" }, { "input": "01100000100101111000100001100010000110000010100100100001100000110011101001110000\n0101111000\n1001110000\n0001000101\n0110110111\n0010100100\n1000011000\n1101110110\n0110000010\n0001011010\n0011001110\n", "output": "70554591" }, { "input": "11011101000100110100110011010101100011111010011010010011010010010010100110101111\n0100110100\n1001001010\n0001111101\n1101011010\n1101110100\n1100110101\n0110101111\n0110001111\n0001101000\n1010011010\n", "output": "40579016" }, { "input": "00011010101100111110000110001000101100100001101010100100101110010010111110100010\n1001001011\n0010110010\n0001010111\n1100111110\n1111000101\n0001100010\n1010000011\n1110100010\n1101100000\n0001101010\n", "output": "93519007" }, { "input": "00101100011111010001001000000110110000000110010011001111111010110010001011000000\n0010000001\n0110010011\n0010000010\n1011001000\n0011111110\n0110001000\n1111010001\n1011000000\n0000100110\n0010110001\n", "output": "96071437" }, { "input": "10010101001001010100110100101101101111101001010100011011110011010010111010001111\n1010100010\n0101001000\n0110101101\n1100111110\n1001010100\n1010001111\n0110111110\n1101100001\n0110111100\n1101001011\n", "output": "44964895" }, { "input": "01111100000111110000110010111001111100001001101010110010111010001000101001101010\n0100010101\n1011110101\n1010100100\n1010000001\n1001101010\n0101100110\n1000100010\n0111110000\n1100101110\n0110010110\n", "output": "77874864" }, { "input": "11011110100001011010010001101011000000000010010100111011000111011110100000100001\n1110110001\n0111111000\n0001011010\n1110011010\n1101111010\n1100000000\n0100101111\n0010010100\n0100011010\n0000100001\n", "output": "42857049" }, { "input": "10100100010010010011011001101000100100110110011010011001101011000100110110011010\n1111110011\n1001000111\n1001000100\n1100010011\n0110011010\n0010000001\n1110101110\n0010000110\n0010010011\n1010010001\n", "output": "98484434" }, { "input": "11101100101110111110111011111010001111111111000001001001000010001111111110110010\n0101100001\n1111010011\n1110111110\n0100110100\n1110011111\n1000111111\n0010010000\n1110110010\n0011000010\n1111000001\n", "output": "72259657" }, { "input": "01100010110011001010010110011100110010100011001010010110011101001010000011001010\n0100101000\n0101000111\n0110001011\n0111110100\n1100011011\n1010001000\n1110111100\n1001111110\n0011001010\n0101100111\n", "output": "28988908" }, { "input": "00110001100000110010111110110111101111010011000110111011110110000010011011010010\n0110101011\n0000110010\n1000001001\n1100011101\n1111101101\n0110111111\n1110111101\n0011101110\n0011000110\n1011010010\n", "output": "81468629" }, { "input": "01011001011111010010101111011001000011001100011101101111011011010011101011110110\n0100001100\n0101100101\n1111111011\n1111010010\n1111101100\n1100011101\n1011000011\n1101001110\n1011110110\n0110001010\n", "output": "13805878" }, { "input": "00011001111110000011101011010001010111100110100101000110011111011001100000001100\n0111001101\n0101011110\n0001100111\n1101011111\n1110000011\n0000001100\n0111010001\n1101100110\n1010110100\n0110100101\n", "output": "24819275" }, { "input": "11010110101101011010110011000011010001101011101011000101011100001000011100110111\n1101011010\n1100110000\n1101000110\n0111000110\n1011101011\n0000100001\n1100110111\n0101011100\n1010110101\n0001010111\n", "output": "00124956" }, { "input": "00010001111110010101000100011111111010110101011010111001010111111000001011001100\n1110010101\n1111100000\n1011001100\n1001011011\n0001000111\n0011111000\n0101011010\n1111101011\n0011010011\n1110000101\n", "output": "40476012" }, { "input": "01111011100111101110011001000110001111101000111110100100100001011111001011100010\n0110010100\n1100010001\n0111101110\n1001001000\n1010011011\n1000111110\n0010110101\n1011100010\n0101111100\n0110010001\n", "output": "22955387" }, { "input": "11110010001111001000111100100011000011011010110111100101100010101101111101101010\n1001011000\n0100100001\n1101101010\n1111001000\n0011000111\n0001001100\n1010110111\n0111100011\n1010110100\n1100001101\n", "output": "33396062" }, { "input": "11000101011100100111010000010001000001001100101100000011000000001100000101011010\n1100010101\n1111101011\n0101011010\n0100000100\n1000110111\n1100100111\n1100101100\n0111001000\n0000110000\n0110011111\n", "output": "05336882" }, { "input": "01000000010000000110100101000110110000100100000001101100001000011111111001010001\n1011000010\n1111101010\n0111110011\n0000000110\n0000001001\n0001111111\n0110010010\n0100000001\n1011001000\n1001010001\n", "output": "73907059" }, { "input": "01011110100101111010011000001001100000101001110011010111101011010000110110010101\n0100111100\n0101110011\n0101111010\n0110000010\n0101001111\n1101000011\n0110010101\n0111011010\n0001101110\n1001110011\n", "output": "22339256" }, { "input": "01101100111000000101011011001110000001011111111000111111100001011010001001011001\n1000000101\n0101101000\n0101110101\n1101011110\n0000101100\n1111111000\n0001001101\n0110111011\n0110110011\n1001011001\n", "output": "80805519" }, { "input": "10000100010000111101100100111101111011101000001001100001000110000010010000111101\n1001001111\n0000111101\n1000010001\n0110011101\n0110101000\n1011111001\n0111101110\n1000001001\n1101011111\n0001010100\n", "output": "21067271" }, { "input": "11110011010101000001110010100100010110000000111110000101100011110011010101000001\n0110101111\n0001011000\n1111001101\n1100101001\n0101000001\n1000111000\n0101001100\n0000111110\n1011101010\n1100100110\n", "output": "24317124" }, { "input": "00110110101111100010000010111111000001010000101111011001100101101100011011010011\n0111101001\n1111100010\n0110110001\n0011011010\n1011111111\n0000101111\n0111111011\n1011010011\n1100000101\n0110011001\n", "output": "31585927" }, { "input": "10011000011001100010111000000110011000101101101000110000101011000011100111100101\n0111100101\n1100001010\n1100000110\n1100001110\n1001100010\n0100001010\n1110000001\n1000010010\n1101101000\n1001100001\n", "output": "94648130" }, { "input": "01110101100101010011110111110100000111011101111101010101001111011111011111110011\n0111100000\n1111110011\n0101101010\n0101010011\n1101111101\n0000011101\n1111011011\n0111010110\n1110101110\n1001110101\n", "output": "73454341" }, { "input": "10000010111101110110011000111110000011100110001111100100000111000011011000001011\n0111010100\n1010110110\n1000001110\n1110000100\n0110001111\n1101110110\n1100001101\n1000001011\n0000000101\n1001000001\n", "output": "75424967" }, { "input": "10010100011001010001010101001101010100110100111011001010111100011001000010100000\n0011100000\n1001100100\n0001100100\n0010100000\n0101010011\n0010101110\n0010101111\n0100111011\n1001010001\n1111111110\n", "output": "88447623" }, { "input": "01110101010111001111111000100000100010001100101000011100111100011100010000000101\n0101110101\n1101101110\n0000000101\n1100101000\n0111001111\n0001110001\n1110001000\n0111010101\n0010001000\n0001000111\n", "output": "74683452" }, { "input": "00110101100111010100011101010000011000001011000011001101011000000110000111010100\n1011000011\n0011010110\n0010000010\n0101110100\n0111011101\n1111000100\n0000011000\n0111010100\n0001100000\n0111110000\n", "output": "17780167" }, { "input": "10000111111000011111001010101010010011111001001111000010010100100011000010001100\n1101101110\n1001001111\n0000100101\n1100111010\n0010101010\n1110000110\n1100111101\n0010001100\n1110000001\n1000011111\n", "output": "99411277" }, { "input": "01010011110111111000001001101101000011101011101010101110101010101110101011101010\n0000100011\n0101001111\n0011111010\n1010100000\n0111111000\n0010011011\n1011101010\n0100011101\n1010111010\n0100001110\n", "output": "14596686" }, { "input": "10111111111101010110111011010000000110101011111111001100010000110001010111100000\n1110110100\n0000010101\n1011111111\n0011000101\n0000011010\n0011000100\n0111100000\n1001101011\n1101010110\n1011000100\n", "output": "28042536" }, { "input": "00110011110011000000000110011101100110001011110100001100000011110100010011001111\n1011110100\n0001100111\n1001111111\n0110011000\n0011000000\n0011001111\n0001010001\n1111110100\n1101011011\n1111010001\n", "output": "54130495" }, { "input": "11110100010000101110010110001000001011100101100010110011011011111110001100110110\n0101100010\n0100010001\n0000101110\n1100110110\n0101000101\n0011001011\n1111010001\n1000110010\n1111111000\n1010011111\n", "output": "62020383" }, { "input": "11011111000111110010001110000100110100011011000101101110110100110100011100010011\n0111010100\n0011100001\n1011101101\n1011000101\n0111000010\n0011010001\n0111110010\n1101010010\n1100010011\n1101111100\n", "output": "96153258" }, { "input": "00110010000111100010011100010010110100011111100000001100100001111000100011111110\n1101010011\n1111100000\n0011111110\n1011010001\n1011011111\n0011001000\n0111100010\n1001000000\n0110000010\n0111000100\n", "output": "56931562" }, { "input": "00110010000111001001001100100010010111101011011110001011111100000101000100000001\n0100000001\n1011011110\n0010111111\n0111100111\n0100111001\n0000010100\n1001011110\n0111001001\n0100010011\n0011001000\n", "output": "97961250" }, { "input": "11100110110110010011001110101101100100111110011011111100101011100110111100000001\n1110011011\n0101111110\n1100000001\n1111001010\n1011000001\n0111110110\n0110001011\n0110010011\n1001001110\n0011101011\n", "output": "07970302" }, { "input": "00011100100001000101110001111000011100101100011110110000101111000010111100001011\n1001100000\n0001000101\n0001111111\n1100001011\n0000011011\n1101010110\n1111100110\n0001110010\n1100011110\n0001011010\n", "output": "71878333" }, { "input": "10110110111011001111101100111100111111011011011011001111110110010011100010000111\n0111010011\n0111101100\n1001101010\n0101000101\n0010000111\n0011111101\n1011001111\n1101111000\n1011011011\n1001001110\n", "output": "86658594" }, { "input": "10111110010011111001001111100101010111010011111001001110101000111110011001111101\n0011111001\n0101011101\n0100001010\n0001110010\n1001111101\n0011101010\n1111001001\n1100100001\n1001101000\n1011111001\n", "output": "90010504" }, { "input": "11110011011000111111001100111110001111111100000010111100110100110011111111001101\n1111001101\n1001101010\n1100110010\n0011001111\n0001011110\n1000110011\n1000111111\n0110001010\n1001011101\n1100000010\n", "output": "06369030" } ]
code_contests
python
0.6
52cf103681c836e4524513eb131e511b
You are given an undirected graph consisting of n vertices and m edges. Your task is to find the number of connected components which are cycles. Here are some definitions of graph theory. An undirected graph consists of two sets: set of nodes (called vertices) and set of edges. Each edge connects a pair of vertices. All edges are bidirectional (i.e. if a vertex a is connected with a vertex b, a vertex b is also connected with a vertex a). An edge can't connect vertex with itself, there is at most one edge between a pair of vertices. Two vertices u and v belong to the same connected component if and only if there is at least one path along edges connecting u and v. A connected component is a cycle if and only if its vertices can be reordered in such a way that: * the first vertex is connected with the second vertex by an edge, * the second vertex is connected with the third vertex by an edge, * ... * the last vertex is connected with the first vertex by an edge, * all the described edges of a cycle are distinct. A cycle doesn't contain any other edges except described above. By definition any cycle contains three or more vertices. <image> There are 6 connected components, 2 of them are cycles: [7, 10, 16] and [5, 11, 9, 15]. Input The first line contains two integer numbers n and m (1 ≤ n ≤ 2 ⋅ 10^5, 0 ≤ m ≤ 2 ⋅ 10^5) — number of vertices and edges. The following m lines contains edges: edge i is given as a pair of vertices v_i, u_i (1 ≤ v_i, u_i ≤ n, u_i ≠ v_i). There is no multiple edges in the given graph, i.e. for each pair (v_i, u_i) there no other pairs (v_i, u_i) and (u_i, v_i) in the list of edges. Output Print one integer — the number of connected components which are also cycles. Examples Input 5 4 1 2 3 4 5 4 3 5 Output 1 Input 17 15 1 8 1 12 5 11 11 9 9 15 15 5 4 13 3 13 4 3 10 16 7 10 16 7 14 3 14 4 17 6 Output 2 Note In the first example only component [3, 4, 5] is also a cycle. The illustration above corresponds to the second example. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
from sys import stdin from collections import deque def bfs(x): vis[x] = True q = deque([x]) ans = 1 while q: cur = q.popleft() ans &= len(g[cur]) == 2 for x in g[cur]: if not vis[x]: vis[x] = True q.append(x) return ans n, m = map(int, stdin.readline().split()) g = [[] for _ in range(n)] vis = [False]*n ans = 0 for _ in range(m): u, v = map(lambda x: int(x) - 1, stdin.readline().split()) g[u].append(v) g[v].append(u) for x in range(n): if not vis[x]: ans += bfs(x) print(ans)
python
code_algorithm
[ { "input": "5 4\n1 2\n3 4\n5 4\n3 5\n", "output": "1\n" }, { "input": "17 15\n1 8\n1 12\n5 11\n11 9\n9 15\n15 5\n4 13\n3 13\n4 3\n10 16\n7 10\n16 7\n14 3\n14 4\n17 6\n", "output": "2\n" }, { "input": "5 10\n1 2\n1 3\n1 4\n1 5\n2 3\n2 4\n2 5\n3 4\n3 5\n4 5\n", "output": "0\n" }, { "input": "5 5\n1 2\n2 3\n3 4\n4 1\n3 5\n", "output": "0\n" }, { "input": "5 10\n1 2\n2 3\n3 4\n4 5\n5 1\n1 4\n2 4\n3 5\n3 1\n2 5\n", "output": "0\n" }, { "input": "1 0\n", "output": "0\n" }, { "input": "4 4\n1 2\n2 3\n1 3\n1 4\n", "output": "0\n" }, { "input": "200000 0\n", "output": "0\n" }, { "input": "4 6\n1 2\n2 3\n3 4\n4 1\n1 3\n2 4\n", "output": "0\n" }, { "input": "6 9\n1 2\n2 3\n3 4\n4 5\n5 6\n6 1\n6 2\n2 4\n6 4\n", "output": "0\n" } ]
code_contests
python
0.1
7b3436a350c84b12d17fbe1bbecc3b36
You are given a string t consisting of n lowercase Latin letters and an integer number k. Let's define a substring of some string s with indices from l to r as s[l ... r]. Your task is to construct such string s of minimum possible length that there are exactly k positions i such that s[i ... i + n - 1] = t. In other words, your task is to construct such string s of minimum possible length that there are exactly k substrings of s equal to t. It is guaranteed that the answer is always unique. Input The first line of the input contains two integers n and k (1 ≤ n, k ≤ 50) — the length of the string t and the number of substrings. The second line of the input contains the string t consisting of exactly n lowercase Latin letters. Output Print such string s of minimum possible length that there are exactly k substrings of s equal to t. It is guaranteed that the answer is always unique. Examples Input 3 4 aba Output ababababa Input 3 2 cat Output catcat Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
n, k = map(int, input().split()) s = input() ans = None for i in range(1, n): prefix = s[0:n-i] suffix = s[i:n] if prefix == suffix: ans = prefix ans += s[n-i:n] * k break if ans is None: ans = s * k print (ans)
python
code_algorithm
[ { "input": "3 2\ncat\n", "output": "catcat\n" }, { "input": "3 4\naba\n", "output": "ababababa\n" }, { "input": "5 3\naaaaa\n", "output": "aaaaaaa\n" }, { "input": "4 25\nlclc\n", "output": "lclclclclclclclclclclclclclclclclclclclclclclclclclc\n" }, { "input": "4 5\nadaa\n", "output": "adaadaadaadaadaa\n" }, { "input": "5 3\naaaba\n", "output": "aaabaaabaaaba\n" }, { "input": "11 3\nabracadabra\n", "output": "abracadabracadabracadabra\n" }, { "input": "5 4\naaaaa\n", "output": "aaaaaaaa\n" }, { "input": "3 1\naba\n", "output": "aba\n" }, { "input": "4 5\nabaa\n", "output": "abaabaabaabaabaa\n" }, { "input": "9 2\ncccababbc\n", "output": "cccababbcccababbc\n" }, { "input": "7 2\nabcabca\n", "output": "abcabcabca\n" }, { "input": "4 4\naaaa\n", "output": "aaaaaaa\n" }, { "input": "3 2\nabb\n", "output": "abbabb\n" }, { "input": "4 2\nxxxb\n", "output": "xxxbxxxb\n" }, { "input": "9 2\nbaabbaabb\n", "output": "baabbaabbaabb\n" }, { "input": "3 4\naaa\n", "output": "aaaaaa\n" }, { "input": "47 1\njjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj\n", "output": "jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj\n" }, { "input": "1 1\na\n", "output": "a\n" }, { "input": "2 2\noo\n", "output": "ooo\n" }, { "input": "4 2\nakaa\n", "output": "akaakaa\n" }, { "input": "2 2\nab\n", "output": "abab\n" }, { "input": "4 2\naaba\n", "output": "aabaaba\n" }, { "input": "19 22\ncabacbbbaabccabaaca\n", "output": "cabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaacabacbbbaabccabaaca\n" }, { "input": "4 3\naaaa\n", "output": "aaaaaa\n" }, { "input": "5 2\nabaca\n", "output": "abacabaca\n" }, { "input": "5 3\nbbcbb\n", "output": "bbcbbcbbcbb\n" }, { "input": "50 50\nacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaca\n", "output": "acaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaca\n" }, { "input": "5 5\nabbab\n", "output": "abbabbabbabbabbab\n" }, { "input": "7 2\nabcabcc\n", "output": "abcabccabcabcc\n" }, { "input": "5 2\nzxxzz\n", "output": "zxxzzxxzz\n" }, { "input": "6 12\nhmkkhh\n", "output": "hmkkhhmkkhhmkkhhmkkhhmkkhhmkkhhmkkhhmkkhhmkkhhmkkhhmkkhhmkkhh\n" }, { "input": "8 4\ncababbcc\n", "output": "cababbccababbccababbccababbcc\n" }, { "input": "2 4\naa\n", "output": "aaaaa\n" }, { "input": "9 2\nbabbabbab\n", "output": "babbabbabbab\n" }, { "input": "11 2\naaabaacdaaa\n", "output": "aaabaacdaaabaacdaaa\n" }, { "input": "3 2\naab\n", "output": "aabaab\n" }, { "input": "8 4\nbabbabab\n", "output": "babbababbababbababbabab\n" }, { "input": "2 2\naa\n", "output": "aaa\n" }, { "input": "3 2\naaa\n", "output": "aaaa\n" }, { "input": "10 2\nababaababa\n", "output": "ababaababaababa\n" }, { "input": "3 6\naaa\n", "output": "aaaaaaaa\n" }, { "input": "3 1\nabb\n", "output": "abb\n" }, { "input": "4 2\nabba\n", "output": "abbabba\n" }, { "input": "4 2\naaab\n", "output": "aaabaaab\n" }, { "input": "50 50\naecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnyp\n", "output": "aecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnypaecnvrlcxdatboldlurjlmmlhuaccmlwkdvkqvzmiazhotdnyp\n" }, { "input": "9 3\naaaabcaaa\n", "output": "aaaabcaaaabcaaaabcaaa\n" }, { "input": "15 27\nzteltxyxqqwgztz\n", "output": "zteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztzteltxyxqqwgztz\n" }, { "input": "1 50\nq\n", "output": "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\n" }, { "input": "4 3\nabaa\n", "output": "abaabaabaa\n" }, { "input": "8 2\ncaacdcaa\n", "output": "caacdcaacdcaa\n" }, { "input": "6 2\nabcaba\n", "output": "abcababcaba\n" }, { "input": "20 3\nsfrpmsfrpmsfrpmsfrpm\n", "output": "sfrpmsfrpmsfrpmsfrpmsfrpmsfrpm\n" }, { "input": "9 2\nababbaaba\n", "output": "ababbaababbaaba\n" }, { "input": "6 3\nabcaba\n", "output": "abcababcababcaba\n" }, { "input": "24 20\nbaacaabccacbcbccccbbcabb\n", "output": "baacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabbaacaabccacbcbccccbbcabb\n" }, { "input": "50 23\nbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabb\n", "output": "bcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabbcaccabcaccccbcbabbabacbabaabccaaacbbbbcabcccacabb\n" }, { "input": "5 4\naabaa\n", "output": "aabaabaabaabaa\n" }, { "input": "4 2\nabac\n", "output": "abacabac\n" }, { "input": "4 2\naabb\n", "output": "aabbaabb\n" }, { "input": "3 1\naab\n", "output": "aab\n" }, { "input": "9 4\nbbaaabbab\n", "output": "bbaaabbabbaaabbabbaaabbabbaaabbab\n" }, { "input": "25 24\nkyzdckyzdckyzdckyzdckyzdc\n", "output": "kyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdckyzdc\n" }, { "input": "5 34\nabcab\n", "output": "abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcab\n" }, { "input": "2 1\naa\n", "output": "aa\n" }, { "input": "8 3\nabcaabca\n", "output": "abcaabcaabcaabca\n" }, { "input": "3 5\naaa\n", "output": "aaaaaaa\n" }, { "input": "9 2\naabaaaaba\n", "output": "aabaaaabaaaaba\n" }, { "input": "6 4\ncccacc\n", "output": "cccacccacccacccacc\n" }, { "input": "7 4\naaaabba\n", "output": "aaaabbaaaabbaaaabbaaaabba\n" }, { "input": "4 2\nabaa\n", "output": "abaabaa\n" }, { "input": "11 2\ncaaacddcaaa\n", "output": "caaacddcaaacddcaaa\n" }, { "input": "6 3\nabaaba\n", "output": "abaabaabaaba\n" }, { "input": "3 3\naaa\n", "output": "aaaaa\n" }, { "input": "6 2\nabbaba\n", "output": "abbababbaba\n" }, { "input": "6 3\naabbaa\n", "output": "aabbaabbaabbaa\n" }, { "input": "5 2\naaaba\n", "output": "aaabaaaba\n" }, { "input": "18 9\naabaabcbbabaaccbac\n", "output": "aabaabcbbabaaccbacaabaabcbbabaaccbacaabaabcbbabaaccbacaabaabcbbabaaccbacaabaabcbbabaaccbacaabaabcbbabaaccbacaabaabcbbabaaccbacaabaabcbbabaaccbacaabaabcbbabaaccbac\n" } ]
code_contests
python
0
65247dbfcf7c96fa0f638c98263a1d15
Jack has become a soldier now. Unfortunately, he has trouble with the drill. Instead of marching beginning with the left foot and then changing legs with each step, as ordered, he keeps repeating a sequence of steps, in which he sometimes makes the wrong steps or — horror of horrors! — stops for a while. For example, if Jack uses the sequence 'right, left, break', when the sergeant yells: 'Left! Right! Left! Right! Left! Right!', Jack first makes a step with the right foot, then one with the left foot, then he is confused and stops for a moment, then again - this time according to the order - starts with the right foot, then uses the left foot, then - to the sergeant's irritation - he stops to catch his breath, to incorrectly start with the right foot again... Marching this way, Jack will make the step that he is supposed to in the given moment in only one third of cases. When the officers convinced him he should do something about it, Jack decided to modify the basic sequence of steps that he repeats. However, in order not to get too tired, he has decided that the only thing he'll do is adding any number of breaks in any positions of the original sequence (a break corresponds to stopping for the duration of one step). Of course, Jack can't make a step on the same foot twice in a row, if there is no pause between these steps. It is, however, not impossible that the sequence of steps he used so far is incorrect (it would explain a lot, actually). Help Private Jack! Given the sequence of steps he keeps repeating, calculate the maximal percentage of time that he can spend marching correctly after adding some breaks to his scheme. Input The first line of input contains a sequence consisting only of characters 'L', 'R' and 'X', where 'L' corresponds to a step with the left foot, 'R' — with the right foot, and 'X' — to a break. The length of the sequence will not exceed 106. Output Output the maximum percentage of time that Jack can spend marching correctly, rounded down to exactly six digits after the decimal point. Examples Input X Output 0.000000 Input LXRR Output 50.000000 Note In the second example, if we add two breaks to receive LXXRXR, Jack will march: LXXRXRLXXRXRL... instead of LRLRLRLRLRLRL... and will make the correct step in half the cases. If we didn't add any breaks, the sequence would be incorrect — Jack can't step on his right foot twice in a row. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
def solve(): original = input() temp = [original[0]] for i in range(1, len(original)): if original[i] == original[i - 1] != 'X': temp.append('X') temp.append(original[i]) augmented = ''.join(temp) answer = 0 if augmented[0] == augmented[-1] != 'X': answer = max(rate(augmented + 'X'), rate('X' + augmented)) else: answer = rate(augmented) print('%d.%06d' % (answer / 1000000, answer % 1000000)) def rate(seq): correct, total, unknown, indicator = 0, 0, 0, 0 left_step = True for action in seq: if action == 'X': total += 1 left_step = not left_step else: if left_step and action == 'L' or not left_step and action == 'R': correct += 1 total += 1 indicator = 0 left_step = not left_step else: correct += 1 total += 2 unknown += indicator indicator = 1 - indicator if total % 2 == 1: total += 1 unknown += indicator if correct * 2 > total: correct -= unknown total -= unknown * 2 return correct * 100000000 // total solve()
python
code_algorithm
[ { "input": "LXRR\n", "output": "50.000000\n" }, { "input": "X\n", "output": "0.000000\n" }, { "input": "RXXRLRRLRR\n", "output": "57.142857\n" }, { "input": "RXRRXXXRXXRR\n", "output": "37.500000\n" }, { "input": "XRRLXRRRLRLXXLRRLRXL\n", "output": "53.846153\n" }, { "input": "RXLLRXXLLRLRLLXXXXRXXRLLRRRRXLLRRLXXLRXXLXLRLLLLLRXLRXLXRXLXLRRXXRRLXLXLRLRXRXLXXXLRXLLXLRRRRXRLLXRRLLRRXRRRLRLLRLRXXXRLXLXLLLRXXLLXLRXXLLLRLXRRXRLXLXXXXXXLXRXXRXXXRXLXXRRXLLXRRXLXXRRXLXXRLXLXXLXRXXRLRLLXLXLXLRXLXLXLLLRLXXLXLLRLLLLRLRRRRXRRLLRLXLXXRLRRLXRRXXXRLLXRRRXXRRRXXLRXRLLXRRRXRXRXXLLLRLRXXRLRLXRLLXLXLRRXLRXRRLLRRLRXXLXRXLLLLRRLXXXXLRRLLRXXRLLLXXLRLRLLRLLRRLXRXXRLXLRXXLRRRRXRXXXXLXLLXRXRRLLRXXXRXLRXXLRRLRXXRRRLRXLRRXLXXRRLLLRRXLRRRXXRRXRLRXLXXLLRLLRRXLRLRLXRXRXRLXXXRLLXLLXLRXXRRRLRRXXLRXXL\n", "output": "50.155763\n" }, { "input": "RXLLRLRR\n", "output": "58.333333\n" }, { "input": "XRLRXLLRRRLLRRXXRXLR\n", "output": "53.846153\n" }, { "input": "XRRLLXLRLLRLLLLXRXLL\n", "output": "53.571428\n" }, { "input": "LLLRLXRXLLLXXLLXLRLLXXLXXXRRXLRRRXXRXRRXXRRXLXRLXRLRRRLLLXRRLLXXLXRXRLXXXXRXXLLR\n", "output": "44.642857\n" }, { "input": "LRXRLLLXLRXRLXRXXRLX\n", "output": "54.545454\n" }, { "input": "RRXXRXRLXXRLXLLXLLLLXXLXRXRRRXLRRLRLXXLLLXLXXRXLRLLRXRRRRLXLXRRLRLLRLRRRLXLRRRRL\n", "output": "52.777777\n" }, { "input": "RXLXLRLXLR\n", "output": "58.333333\n" }, { "input": "LLXRXLXRLR\n", "output": "50.000000\n" }, { "input": "RXLRRLRLXRLLRRRLRLRR\n", "output": "64.285714\n" }, { "input": "LXXLLRXRXXXLLLLRRXLRLXLLLXLRRRXXRXXRRXLRXRXXRXXXXXRLRXLXXLXRXXRLXLLRLRXXXXLLXLLRXRRRRRXRXRXXLLRLRRLXXXXLXLLXLRLLRLXXXRXLLRXRLLXXXXXLXXLXLLXRXRRLRRLRXXRXXRRXRRXRRXXRRXXXXRLXXLLRRXLXXRXRLRRXLRRRLLRXLRRXXLLLLRXXLXRLXXXXLRXRLRLLRXLXLRLLRLRXXLXLRRRRLRRRLRLLXRRXRRRRRRXLXLLXXLLRRXXLLLXRXXXLLRLXXXRRXRXXXXXXLLLRXLXRRRLRRXXLRXXXRRLRLXRLXLXXRLXRRXXXRLRXRLXXLLXXRLRRLXRRLRRXXRLLRRRXRXXXRLLRLLRRLLLXXXLLRXXLRRXLXLXRLXXRXLLXLRRXXXRXRXLLXRXLXXLXXLRLRLLLLLRXXLRXXLXRXXLRRXLLXRLRLXXRLXRXLLRRLXRLXLLXLLRXLXLXRXRRRLLR\n", "output": "47.859327\n" }, { "input": "LRLRXLXXLR\n", "output": "60.000000\n" }, { "input": "RXLRLRRRLLLLLRLLXRLR\n", "output": "60.000000\n" } ]
code_contests
python
0
8b955cc6935559ee28ea0f8340220690
Polycarpus has n markers and m marker caps. Each marker is described by two numbers: xi is the color and yi is the diameter. Correspondingly, each cap is described by two numbers: aj is the color and bj is the diameter. Cap (aj, bj) can close marker (xi, yi) only if their diameters match, that is, bj = yi. Besides, a marker is considered to be beautifully closed, if the cap color and the marker color match, that is, aj = xi. Find the way to close the maximum number of markers. If there are several such ways, then choose the one that has the maximum number of beautifully closed markers. Input The first input line contains two space-separated integers n and m (1 ≤ n, m ≤ 105) — the number of markers and the number of caps, correspondingly. Next n lines describe the markers. The i-th line contains two space-separated integers xi, yi (1 ≤ xi, yi ≤ 1000) — the i-th marker's color and diameter, correspondingly. Next m lines describe the caps. The j-th line contains two space-separated integers aj, bj (1 ≤ aj, bj ≤ 1000) — the color and diameter of the j-th cap, correspondingly. Output Print two space-separated integers u, v, where u is the number of closed markers and v is the number of beautifully closed markers in the sought optimal way. Remember that you have to find the way to close the maximum number of markers, and if there are several such ways, you should choose the one where the number of beautifully closed markers is maximum. Examples Input 3 4 1 2 3 4 2 4 5 4 2 4 1 1 1 2 Output 3 2 Input 2 2 1 2 2 1 3 4 5 1 Output 1 0 Note In the first test sample the first marker should be closed by the fourth cap, the second marker should be closed by the first cap and the third marker should be closed by the second cap. Thus, three markers will be closed, and two of them will be beautifully closed — the first and the third markers. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
def main(): from sys import stdin l = list(map(int, stdin.read().split())) n, yx = l[0] * 2, [[0] * 1001 for _ in range(1001)] cnt = yx[0] u = v = 0 for y, x in zip(l[3:n + 3:2], l[2:n + 2:2]): cnt[y] += 1 yx[y][x] += 1 ba, l = list(zip(l[n + 3::2], l[n + 2::2])), [] for y, x in ba: if yx[y][x]: yx[y][x] -= 1 cnt[y] -= 1 v += 1 else: l.append(y) for y in l: if cnt[y]: cnt[y] -= 1 u += 1 print(u + v, v) if __name__ == '__main__': main()
python
code_algorithm
[ { "input": "2 2\n1 2\n2 1\n3 4\n5 1\n", "output": "1 0\n" }, { "input": "3 4\n1 2\n3 4\n2 4\n5 4\n2 4\n1 1\n1 2\n", "output": "3 2\n" }, { "input": "1 1\n1 1\n1 1\n", "output": "1 1\n" }, { "input": "1 1\n1 1\n2 2\n", "output": "0 0\n" }, { "input": "6 7\n2 1\n1 1\n2 2\n1 2\n1 1\n1 2\n2 1\n1 1\n1 1\n1 1\n1 2\n2 2\n1 1\n", "output": "5 5\n" }, { "input": "6 7\n1 1\n1 1\n1 2\n1 2\n2 2\n1 2\n2 1\n2 1\n2 1\n2 1\n1 1\n1 1\n1 2\n", "output": "3 3\n" }, { "input": "6 7\n2 1\n2 2\n2 1\n1 1\n2 1\n1 2\n2 2\n2 2\n2 2\n1 2\n2 2\n1 1\n1 2\n", "output": "3 3\n" }, { "input": "1 1\n1 1\n1 2\n", "output": "0 0\n" }, { "input": "6 7\n2 1\n2 2\n1 1\n1 2\n2 2\n1 2\n1 2\n1 1\n1 2\n2 2\n2 2\n2 2\n1 1\n", "output": "6 5\n" }, { "input": "3 3\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n", "output": "3 3\n" }, { "input": "1 5\n1 1\n2 2\n1 1\n2 1\n1 2\n1 1\n", "output": "1 1\n" }, { "input": "6 2\n1 1\n2 1\n1 1\n1 1\n1 2\n1 1\n2 2\n1 2\n", "output": "1 1\n" }, { "input": "1 1\n1 2\n2 2\n", "output": "1 0\n" } ]
code_contests
python
0.7
a81e6c2b6d02158ec9e95d914b713878
Formula One championship consists of series of races called Grand Prix. After every race drivers receive points according to their final position. Only the top 10 drivers receive points in the following order 25, 18, 15, 12, 10, 8, 6, 4, 2, 1. At the conclusion of the championship the driver with most points is the champion. If there is a tie, champion is the one with most wins (i.e. first places). If a tie still exists, it is chosen the one with most second places, and so on, until there are no more place to use for compare. Last year another scoring system was proposed but rejected. In it the champion is the one with most wins. If there is tie, champion is the one with most points. If a tie still exists it is proceeded the same way as in the original scoring system, that is comparing number of second, third, forth, and so on, places. You are given the result of all races during the season and you are to determine the champion according to both scoring systems. It is guaranteed, that both systems will produce unique champion. Input The first line contain integer t (1 ≤ t ≤ 20), where t is the number of races. After that all races are described one by one. Every race description start with an integer n (1 ≤ n ≤ 50) on a line of itself, where n is the number of clasified drivers in the given race. After that n lines follow with the classification for the race, each containing the name of a driver. The names of drivers are given in order from the first to the last place. The name of the driver consists of lowercase and uppercase English letters and has length at most 50 characters. Comparing of names should be case-sensetive. Output Your output should contain exactly two line. On the first line is the name of the champion according to the original rule, and on the second line the name of the champion according to the alternative rule. Examples Input 3 3 Hamilton Vettel Webber 2 Webber Vettel 2 Hamilton Vettel Output Vettel Hamilton Input 2 7 Prost Surtees Nakajima Schumacher Button DeLaRosa Buemi 8 Alonso Prost NinoFarina JimClark DeLaRosa Nakajima Patrese Surtees Output Prost Prost Note It is not guaranteed that the same drivers participate in all races. For the championship consider every driver that has participated in at least one race. The total number of drivers during the whole season is not more then 50. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
points = [25, 18, 15, 12, 10, 8, 6, 4, 2, 1] + [0] * 40 numRaces = int(input()) scores = {} for race in range(numRaces): numDrivers = int(input()) for d in range(numDrivers): driver = input() if not driver in scores: scores[driver] = [0] + [0] * 50 + [driver] scores[driver][0] += points[d] scores[driver][d + 1] += 1 s = scores.values() print(sorted(s)[-1][-1]) s = [[x[1], x[0]] + x[2:] for x in s] print(sorted(s)[-1][-1])
python
code_algorithm
[ { "input": "2\n7\nProst\nSurtees\nNakajima\nSchumacher\nButton\nDeLaRosa\nBuemi\n8\nAlonso\nProst\nNinoFarina\nJimClark\nDeLaRosa\nNakajima\nPatrese\nSurtees\n", "output": "Prost\nProst\n" }, { "input": "3\n3\nHamilton\nVettel\nWebber\n2\nWebber\nVettel\n2\nHamilton\nVettel\n", "output": "Vettel\nHamilton\n" }, { "input": "2\n1\nA\n1\nA\n", "output": "A\nA\n" }, { "input": "20\n4\nb\nba\nab\na\n4\nba\nab\na\nb\n4\nab\na\nb\nba\n4\nb\na\nab\nba\n4\na\nb\nab\nba\n4\nba\nab\nb\na\n4\nab\nb\na\nba\n4\nab\na\nba\nb\n4\nab\nba\na\nb\n4\nb\na\nab\nba\n4\nba\nb\na\nab\n4\na\nb\nba\nab\n4\nab\na\nb\nba\n4\nba\nb\nab\na\n4\nba\nab\na\nb\n4\nb\nba\nab\na\n4\na\nab\nba\nb\n4\nab\nba\nb\na\n4\nba\na\nab\nb\n4\nb\nba\na\nab\n", "output": "ab\nab\n" }, { "input": "3\n2\nA\nB\n2\nA\nD\n2\nA\nC\n", "output": "A\nA\n" }, { "input": "15\n3\nSenna\nFittipaldi\nLauda\n2\nSenna\nFittipaldi\n2\nFittipaldi\nLauda\n2\nLauda\nSenna\n3\nFittipaldi\nSenna\nLauda\n1\nSenna\n3\nSenna\nFittipaldi\nLauda\n1\nLauda\n2\nLauda\nSenna\n3\nLauda\nSenna\nFittipaldi\n2\nLauda\nSenna\n1\nSenna\n3\nFittipaldi\nLauda\nSenna\n3\nLauda\nFittipaldi\nSenna\n3\nLauda\nSenna\nFittipaldi\n", "output": "Senna\nLauda\n" }, { "input": "20\n4\nba\nab\nb\na\n4\nab\nb\nba\na\n4\nb\na\nba\nab\n4\na\nba\nb\nab\n4\na\nab\nb\nba\n4\nab\nba\na\nb\n4\na\nba\nb\nab\n4\nb\na\nba\nab\n4\nb\nab\na\nba\n4\na\nab\nb\nba\n4\na\nb\nba\nab\n4\nab\nb\nba\na\n4\na\nb\nab\nba\n4\nb\nab\nba\na\n4\nab\nba\nb\na\n4\nb\nab\nba\na\n4\nab\nba\nb\na\n4\nab\na\nb\nba\n4\nb\nab\na\nba\n4\nba\nab\na\nb\n", "output": "ab\nab\n" }, { "input": "20\n4\na\nba\nb\nab\n4\nb\nba\nab\na\n4\nab\nb\na\nba\n4\nab\nb\nba\na\n4\nb\na\nab\nba\n4\nba\nb\nab\na\n4\nba\nab\na\nb\n4\nab\nb\na\nba\n4\nb\nba\nab\na\n4\na\nab\nba\nb\n4\na\nab\nb\nba\n4\nab\na\nba\nb\n4\nba\nb\na\nab\n4\na\nab\nba\nb\n4\nb\nba\na\nab\n4\nb\nab\na\nba\n4\na\nb\nba\nab\n4\nba\nb\na\nab\n4\nb\na\nba\nab\n4\nba\nab\na\nb\n", "output": "b\nb\n" }, { "input": "2\n18\nKubica\nHawthorn\nSurtees\nBerger\nKobayashi\nWebber\nJackBrabham\nJimClark\nPatrese\nJones\nHakkinen\nJackieStewert\nMensel\nSenna\nHamilton\nAlonso\nHulkenberg\nBarichelo\n9\nHawthorn\nSutil\nBarichelo\nJackieStewert\nJones\nScheckter\nPiquet\nLiuzzi\nKovalainen\n", "output": "Hawthorn\nHawthorn\n" }, { "input": "2\n11\nHamilton\nVettel\nWebber\nButton\nKubica\nPetrov\nRoseberg\nSchumacher\nAlonson\nMassa\nSenna\n10\nSenna\nKobayashi\nDeLaRosa\nHakkinen\nRaikkonen\nProst\nJimClark\nNakajima\nBerger\nAlbertoAscari\n", "output": "Senna\nSenna\n" }, { "input": "20\n4\nab\nb\nba\na\n4\na\nba\nb\nab\n4\nb\nba\nab\na\n4\nab\nb\na\nba\n4\nab\nb\nba\na\n4\nb\na\nab\nba\n4\nba\nb\nab\na\n4\nba\nab\na\nb\n4\nab\nb\na\nba\n4\nb\nba\nab\na\n4\na\nab\nba\nb\n4\na\nab\nb\nba\n4\nab\na\nba\nb\n4\nba\nb\na\nab\n4\na\nab\nba\nb\n4\nb\nba\na\nab\n4\nb\nab\na\nba\n4\na\nb\nba\nab\n4\nba\nb\na\nab\n4\nb\na\nba\nab\n", "output": "b\nb\n" }, { "input": "1\n50\nJamesHunt\nNakajima\nHakkinen\nScheckter\nJones\nHill\nHawthorn\nVettel\nHulkenberg\nSutil\nGlock\nWebber\nAlbertoAscari\nMensel\nBuemi\nKubica\ndiGrassi\nJimClark\nKovalainen\nTrulli\nBarichelo\nSurtees\nJackieStewert\nLauda\nRaikkonen\nVilleneuve\nFangio\nButton\nDeLaRosa\nProst\nRosberg\nAlonso\nBerger\nPatrese\nHamilton\nJochenRindt\nNinoFarina\nKobayashi\nFittipaldi\nAlguersuari\nDennyHulme\nSchumacher\nPetrov\nPiquet\nAndretti\nJackBrabham\nMassa\nSenna\nLiuzzi\nReneArnoux\n", "output": "JamesHunt\nJamesHunt\n" }, { "input": "11\n4\nLauda\nRosberg\nBerger\nBarichelo\n4\nGlock\nPatrese\nBarichelo\nLauda\n7\nGlock\nBarichelo\nSchumacher\nLauda\nPatrese\nBerger\nRosberg\n4\nBerger\nRosberg\nPatrese\nBarichelo\n3\nSchumacher\nGlock\nPatrese\n1\nBarichelo\n1\nBarichelo\n5\nRosberg\nBerger\nGlock\nBarichelo\nPatrese\n1\nBerger\n3\nBerger\nSchumacher\nLauda\n4\nRosberg\nSchumacher\nBarichelo\nLauda\n", "output": "Barichelo\nBerger\n" }, { "input": "20\n4\nab\nb\nba\na\n4\nba\nb\nab\na\n4\na\nba\nb\nab\n4\nab\nba\nb\na\n4\nba\nb\na\nab\n4\nb\na\nba\nab\n4\nba\na\nab\nb\n4\nab\nb\na\nba\n4\nb\na\nba\nab\n4\nb\nba\nab\na\n4\nab\nb\na\nba\n4\nb\nba\na\nab\n4\na\nba\nb\nab\n4\nab\nba\nb\na\n4\nb\nab\na\nba\n4\nba\nb\na\nab\n4\nba\nab\nb\na\n4\nab\nb\na\nba\n4\nab\nb\na\nba\n4\nab\nb\na\nba\n", "output": "b\nab\n" }, { "input": "2\n2\nA\nB\n2\nA\nC\n", "output": "A\nA\n" }, { "input": "5\n3\nWebber\nTrulli\nJones\n9\nVilleneuve\nBerger\nJimClark\nReneArnoux\nKubica\nJones\nScheckter\nKobayashi\nJamesHunt\n10\nTrulli\nJackBrabham\nKobayashi\nNakajima\nAndretti\nScheckter\nDeLaRosa\nReneArnoux\nKovalainen\nJones\n3\nBerger\nJimClark\nTrulli\n15\nNakajima\nVilleneuve\nBerger\nTrulli\nJamesHunt\nMassa\nReneArnoux\nKubica\nJimClark\nDeLaRosa\nJackBrabham\nHill\nKobayashi\ndiGrassi\nJones\n", "output": "Trulli\nTrulli\n" }, { "input": "2\n10\nHamilton\nVettel\nWebber\nButton\nKubica\nPetrov\nRoseberg\nSchumacher\nAlonson\nMassa\n11\nSenna\nKobayashi\nDeLaRosa\nHakkinen\nRaikkonen\nProst\nJimClark\nNakajima\nBerger\nAlbertoAscari\nHamilton\n", "output": "Hamilton\nHamilton\n" }, { "input": "1\n1\nA\n", "output": "A\nA\n" }, { "input": "20\n4\na\nab\nb\nba\n4\nab\nb\na\nba\n4\nb\na\nab\nba\n4\nab\nba\na\nb\n4\nb\na\nba\nab\n4\nab\nba\na\nb\n4\nba\nb\na\nab\n4\nba\nb\na\nab\n4\nab\na\nb\nba\n4\nb\nab\nba\na\n4\na\nab\nb\nba\n4\nb\nab\nba\na\n4\nba\nab\na\nb\n4\nba\nab\nb\na\n4\nb\nab\nba\na\n4\nb\nab\na\nba\n4\nab\nb\na\nba\n4\na\nba\nab\nb\n4\nb\nba\nab\na\n4\nab\nb\na\nba\n", "output": "ab\nb\n" }, { "input": "6\n2\nAlbertoAscari\nHamilton\n5\nScheckter\nAlguersuari\nVettel\nPetrov\nProst\n5\nAlbertoAscari\nScheckter\nAlguersuari\nVettel\nHamilton\n3\nScheckter\nHamilton\nAlguersuari\n3\nAlbertoAscari\nScheckter\nProst\n4\nAlbertoAscari\nAlguersuari\nScheckter\nHamilton\n", "output": "Scheckter\nAlbertoAscari\n" }, { "input": "20\n4\nb\nab\nba\na\n4\nb\nab\nba\na\n4\na\nba\nb\nab\n4\nab\nb\nba\na\n4\na\nab\nb\nba\n4\nb\nab\nba\na\n4\nba\nb\na\nab\n4\nab\nb\nba\na\n4\na\nba\nab\nb\n4\nab\na\nba\nb\n4\nb\na\nba\nab\n4\nab\nb\na\nba\n4\na\nb\nab\nba\n4\na\nba\nb\nab\n4\nab\nb\nba\na\n4\nab\na\nb\nba\n4\nb\nab\nba\na\n4\nab\nba\nb\na\n4\nb\na\nba\nab\n4\na\nb\nba\nab\n", "output": "b\nab\n" } ]
code_contests
python
0
7db01395d816f3c564b4f3e4af38df54
As a tradition, every year before IOI all the members of Natalia Fan Club are invited to Malek Dance Club to have a fun night together. Malek Dance Club has 2n members and coincidentally Natalia Fan Club also has 2n members. Each member of MDC is assigned a unique id i from 0 to 2n - 1. The same holds for each member of NFC. One of the parts of this tradition is one by one dance, where each member of MDC dances with a member of NFC. A dance pair is a pair of numbers (a, b) such that member a from MDC dances with member b from NFC. The complexity of a pairs' assignment is the number of pairs of dancing pairs (a, b) and (c, d) such that a < c and b > d. You are given a binary number of length n named x. We know that member i from MDC dances with member <image> from NFC. Your task is to calculate the complexity of this assignment modulo 1000000007 (109 + 7). Expression <image> denotes applying «XOR» to numbers x and y. This operation exists in all modern programming languages, for example, in C++ and Java it denotes as «^», in Pascal — «xor». Input The first line of input contains a binary number x of lenght n, (1 ≤ n ≤ 100). This number may contain leading zeros. Output Print the complexity of the given dance assignent modulo 1000000007 (109 + 7). Examples Input 11 Output 6 Input 01 Output 2 Input 1 Output 1 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
#!/usr/local/bin/python3.3 -tt import sys if __name__ == '__main__': for l in sys.stdin: s = l.strip() break n = len(s) d = 2 ** (n - 1) print(d * int(s, 2) % 1000000007)
python
code_algorithm
[ { "input": "1\n", "output": "1\n" }, { "input": "11\n", "output": "6\n" }, { "input": "01\n", "output": "2\n" }, { "input": "10001010011010010101101010111001001001011110110101011000010100110\n", "output": "276731670\n" }, { "input": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\n", "output": "0\n" }, { "input": "11110111000110101111100100111110000011\n", "output": "448062885\n" }, { "input": "1000000001101010101011111001001101011100011000010000100101001111001000110100100001110001100001000001\n", "output": "759144998\n" }, { "input": "1000101010000101111110100110011110000011000110001111001001000110110011110110111110100\n", "output": "532893377\n" }, { "input": "00001100100101000111111100110010001101001000011110110000\n", "output": "526794740\n" }, { "input": "10\n", "output": "4\n" }, { "input": "1000001010111011110011111110011001011111011001110011100101111110100110111001100001110000011101011011\n", "output": "928069440\n" }, { "input": "01100010011001101100001000000101001000101101000110011100101101111101010100000011101011100\n", "output": "67141264\n" }, { "input": "0111001111110010000001111100110100111110001100100001111111110000010010111010010010010111000110001111\n", "output": "777947548\n" }, { "input": "1100110010110011001011001100101100110010110011001111001100101100110010110011001011001100101100100010\n", "output": "499547155\n" }, { "input": "10110\n", "output": "352\n" }, { "input": "0000000000000000000000000000000000000\n", "output": "0\n" }, { "input": "11111111111111111111111111111111111000000000000000000000000000\n", "output": "774857564\n" }, { "input": "00\n", "output": "0\n" }, { "input": "01010100001010111111001111001000101010010101000111011011111000\n", "output": "629793317\n" }, { "input": "10100101000010011110101011011110001\n", "output": "374541417\n" }, { "input": "0\n", "output": "0\n" }, { "input": "1101010110001010100110011011101011010100010001110100010011011100011011000101110001010101110001101011\n", "output": "383088952\n" }, { "input": "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\n", "output": "261536897\n" }, { "input": "100111100\n", "output": "80896\n" }, { "input": "0110011110111000001101001010101000011011101001001101000000111101010101111101010011101001111010111001\n", "output": "416862683\n" }, { "input": "00000000000000000000111111111111111111111111111111111111111111\n", "output": "738177230\n" }, { "input": "1111111111111111111111111111111111\n", "output": "68817500\n" } ]
code_contests
python
0.1
3f2777b17bc923331bf3f5c4088e0a7a
You will receive 3 points for solving this problem. Manao is designing the genetic code for a new type of algae to efficiently produce fuel. Specifically, Manao is focusing on a stretch of DNA that encodes one protein. The stretch of DNA is represented by a string containing only the characters 'A', 'T', 'G' and 'C'. Manao has determined that if the stretch of DNA contains a maximal sequence of consecutive identical nucleotides that is of even length, then the protein will be nonfunctional. For example, consider a protein described by DNA string "GTTAAAG". It contains four maximal sequences of consecutive identical nucleotides: "G", "TT", "AAA", and "G". The protein is nonfunctional because sequence "TT" has even length. Manao is trying to obtain a functional protein from the protein he currently has. Manao can insert additional nucleotides into the DNA stretch. Each additional nucleotide is a character from the set {'A', 'T', 'G', 'C'}. Manao wants to determine the minimum number of insertions necessary to make the DNA encode a functional protein. Input The input consists of a single line, containing a string s of length n (1 ≤ n ≤ 100). Each character of s will be from the set {'A', 'T', 'G', 'C'}. This problem doesn't have subproblems. You will get 3 points for the correct submission. Output The program should print on one line a single integer representing the minimum number of 'A', 'T', 'G', 'C' characters that are required to be inserted into the input string in order to make all runs of identical characters have odd length. Examples Input GTTAAAG Output 1 Input AACCAACCAAAAC Output 5 Note In the first example, it is sufficient to insert a single nucleotide of any type between the two 'T's in the sequence to restore the functionality of the protein. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
class CodeforcesTask391ASolution: def __init__(self): self.result = '' self.dna = '' def read_input(self): self.dna = input() def process_task(self): currc = '' count = 0 inserts = 0 for c in self.dna: if currc != c: currc = c if count: if not count % 2: inserts += 1 count = 1 else: count += 1 if not count % 2: inserts += 1 self.result = str(inserts) def get_result(self): return self.result if __name__ == "__main__": Solution = CodeforcesTask391ASolution() Solution.read_input() Solution.process_task() print(Solution.get_result())
python
code_algorithm
[ { "input": "AACCAACCAAAAC\n", "output": "5\n" }, { "input": "GTTAAAG\n", "output": "1\n" }, { "input": "CCCTTCACCCGGATCCAAATCCCTTAGAAATAATCCCCGACGGCGTTGTATCACCTCTGCACTTGTTAGTAAGGTCAGGCGTCCATTACGGAAGAACGTA\n", "output": "19\n" }, { "input": "AGCCGCCCCCCCAAAAAAGGGGGAAAAAAAAAAAAAAAAAAAAACTTTTGGAAACCCCCCCCTTTTTTTTTTTTTTTTTTTTTTTTTGGGGAAGGGGGGG\n", "output": "7\n" }, { "input": "AAG\n", "output": "1\n" }, { "input": "C\n", "output": "0\n" }, { "input": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n", "output": "1\n" }, { "input": "G\n", "output": "0\n" }, { "input": "AA\n", "output": "1\n" }, { "input": "GCATTACATGGGGGGGTCCTACGAGCCCGGCATCCCGGAAACTAGCCGGTTAATTTGGTTTAAACCCTCCCACCCCGGATTGTAACCCCCCTCATTGGTT\n", "output": "17\n" }, { "input": "GTGAATTTCC\n", "output": "2\n" }, { "input": "GGG\n", "output": "0\n" }, { "input": "A\n", "output": "0\n" }, { "input": "CAGGGGGCCGCCCATGAAAAAAACCCGGCCCCTTGGGAAAACTTGGGTTA\n", "output": "7\n" }, { "input": "AAAAAAAAAAAAAAAAAATTTTTTTTTTTTTTTTGGGGGGGGGGGGGGGGGGGGGGGTTTTTTTTTTTTTTGGGGGGGGGGGGGGGGGGGGAAAAATTTT\n", "output": "5\n" }, { "input": "T\n", "output": "0\n" }, { "input": "GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG\n", "output": "0\n" }, { "input": "AACCGGTTAACCGGTTAACCGGTTAACCGGTTAACCGGTTAACCGGTTAACCGGTTAACCGGTTAACCGGTTAACCGGTTAACCGGTTAACCGGTTCCGG\n", "output": "50\n" }, { "input": "TTT\n", "output": "0\n" }, { "input": "TTCCCAGAGAAAAAAAGGGGCCCAAATGCCCTAAAAACCCCCTTTGCCCCCCAACCCCTTTTTAAAATAAAAAGGGGCCCATTCCCTTAAAAATTTTTTG\n", "output": "10\n" } ]
code_contests
python
0.9
2eb79848af62bb75cb775130fb05283e
Vasya decided to write an anonymous letter cutting the letters out of a newspaper heading. He knows heading s1 and text s2 that he wants to send. Vasya can use every single heading letter no more than once. Vasya doesn't have to cut the spaces out of the heading — he just leaves some blank space to mark them. Help him; find out if he will manage to compose the needed text. Input The first line contains a newspaper heading s1. The second line contains the letter text s2. s1 и s2 are non-empty lines consisting of spaces, uppercase and lowercase Latin letters, whose lengths do not exceed 200 symbols. The uppercase and lowercase letters should be differentiated. Vasya does not cut spaces out of the heading. Output If Vasya can write the given anonymous letter, print YES, otherwise print NO Examples Input Instead of dogging Your footsteps it disappears but you dont notice anything where is your dog Output NO Input Instead of dogging Your footsteps it disappears but you dont notice anything Your dog is upstears Output YES Input Instead of dogging your footsteps it disappears but you dont notice anything Your dog is upstears Output NO Input abcdefg hijk k j i h g f e d c b a Output YES Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
s1 = ''.join(input().split()) s2 = ''.join(input().split()) for i in s2: if s2.count(i) > s1.count(i): print("NO") exit(0) print("YES")
python
code_algorithm
[ { "input": "Instead of dogging your footsteps it disappears but you dont notice anything\nYour dog is upstears\n", "output": "NO\n" }, { "input": "abcdefg hijk\nk j i h g f e d c b a\n", "output": "YES\n" }, { "input": "Instead of dogging Your footsteps it disappears but you dont notice anything\nYour dog is upstears\n", "output": "YES\n" }, { "input": "Instead of dogging Your footsteps it disappears but you dont notice anything\nwhere is your dog\n", "output": "NO\n" }, { "input": "AXssNpFKyQmJcBdBdfkhhMUzfqJVgcLBddkwtnFSzSRUCjiDcdtmkzIGkCKSxWUEGhmHmciktJyGMkgCductyHx\nI nYhmJfPnvoKUiXYUBIPIcxNYTtvwPUoXERZvY ahlDpQFNMmVZqEBiYqYlHNqcpSCmhFczBlOAhsYFeqMGfqL EJsDNOgwoJfBzqijKOFcYQ\n", "output": "NO\n" }, { "input": "GRZGc\nLPzD\n", "output": "NO\n" }, { "input": "KRmINuyBYPwiTsdlyiNVuylToysJKmOpcLovAtwGPqrgFJQNAYvuAiyQRkeFMECVZvkDEmTauXlyjAaYRnTJXORMZRnTakBaUzSelMilejySDIZjQjzcOIrwXdvDvpeRIkoBgreyFXIyyIZutjiEBtwrmzQtPVUhvvdEtDMbXjBpoPVjGdM EXTAK JbCnw\nXZZqlJvzKKtvdNlzFPDTYxidqlsgufVzyEmO FZuLQ vVQsJESNviUCovCK NwwlbxsmPtOJNmAonCqrOZ bZ LVKAsQGmoLnYjeekvEIECFk\n", "output": "NO\n" }, { "input": "BRsVjyNhrqRHVwrJzuzRigEhdpbDmaACSPfed\nlWqKTjlrqOCUbgBBZdZDGCeQJDXawPnnDkQdZDgwrEQk\n", "output": "NO\n" }, { "input": "HpOKgoueAtAVBdGffvQheJDejNDHhhwyKJisugiRAH OseK yUwqPPNuThUxTfthqIUeb wS jChGOdFDarNrKRT MlwKecxWNoKEeD BbiHAruE XMlvKYVsJGPP\nAHN XvoaNwV AVBKwKjr u U K wKE D K Jy KiHsR h d W Js IHyMPK Br iSqe E fDA g H\n", "output": "YES\n" }, { "input": "lkhrzDZmkdbjzYKPNMRkiwCFoZsMzBQMnxxdKKVJezSBjnLjPpUYtabcPTIaDJeDEobbWHdKOdVfMQwDXzDDcSrwVenDEYpMqfiOQ xSsqApWnAMoyhQXCKFzHvvzvUvkWwmwZrvZz\nsUzGspYpRFsHRbRgTQuCBgnFgPkisTUfFNwyEEWWRiweWWgjRkVQxgTwxOzdsOwfrGIH O gCXpzvHzfItuEHaihmugEyymSJIogYwX qAwcwIItidfnzZDhZgQHi eRjMAeVkJHceDZuJkmxGowOsmcGYYvk Ajtgi TxwihvjLViNZjvscTWvsaQUelTSivLShhEl\n", "output": "NO\n" }, { "input": "kWbvhgvvoYOhwXmgTwOSCDXrtFHhqwvMlCvsuuAUXMmWaYXiqHplFZZemhgkTuvsUtIaUxtyYauBIpjdbyYxjZ ZkaBPzwqPfqF kCqGRmXvWuabnQognnkvdNDtRUsSUvSzgBuxCMBWJifbxWegsknp\nBsH bWHJD n Ca T xq PRCv tatn Wjy sm I q s WCjFqdWe t W XUs Do eb Pfh ii hTbF O Fll\n", "output": "YES\n" }, { "input": "FVF\nr \n", "output": "NO\n" }, { "input": "GRZGc\nZG\n", "output": "YES\n" }, { "input": "GtPXu\nd\n", "output": "NO\n" }, { "input": "kvlekcdJqODUKdsJlXkRaileTmdGwUHWWgvgUokQxRzzbpFnswvNKiDnjfOFGvFcnaaiRnBGQmqoPxDHepgYasLhzjDgmvaFfVNEcSPVQCJKAbSyTGpXsAjIHr\nGjzUllNaGGKXUdYmDFpqFAKIwvTpjmqnyswWRTnxlBnavAGvavxJemrjvRJc\n", "output": "YES\n" }, { "input": "FVFSr unvtXbpKWF vPaAgNaoTqklzVqiGYcUcBIcattzBrRuNSnKUtmdGKbjcE\nUzrU K an GFGR Wc zt iBa P c T K v p V In b B c\n", "output": "YES\n" }, { "input": "gSrAcVYgAdbdayzbKGhIzLDjyznLRIJH KyvilAaEddmgkBPCNzpmPNeGEbmmpAyHvUSoPvnaORrPUuafpReEGoDOQsAYnUHYfBqhdcopQfxJuGXgKnbdVMQNhJYkyjiJDKlShqBTtnnDQQzEijOMcYRGMgPGVhfIReYennKBLwDTVvcHMIHMgVpJkvzTrezxqS\nHJerIVvRyfrPgAQMTI AqGNO mQDfDwQHKgeeYmuRmozKHILvehMPOJNMRtPTAfvKvsoGKi xHEeKqDAYmQJPUXRJbIbHrgVOMGMTdvYiLui\n", "output": "YES\n" }, { "input": "jlMwnnotSdlQMluKWkJwAeCetcqbIEnKeNyLWoKCGONDRBQOjbkGpUvDlmSFUJ bWhohqmmIUWTlDsvelUArAcZJBipMDwUvRfBsYzMdQnPDPAuBaeJmAxVKwUMJrwMDxNtlrtAowVWqWiwFGtmquZAcrpFsLHCrvMSMMlvQUqypAihQWrFMNoaqfs IBg\nNzeWQ bafrmDsYlpNHSGTBBgPl WIcuNhyNaNOEFvL\n", "output": "NO\n" }, { "input": "NwcGaIeSkOva\naIa\n", "output": "YES\n" }, { "input": "lSwjnYLYtDNIZjxHiTawdh ntSzggZogcIZTuiTMWVgwyloMtEhqkrOxgIcFvwvsboXUPILPIymFAEXnhApewJXJNtFyZ\nAoxe jWZ u yImg o AZ FNI w lpj tNhT g y ZYcb rc J w Dlv\n", "output": "YES\n" }, { "input": "ReB hksbHqQXxUgpvoNK bFqmNVCEiOyKdKcAJQRkpeohpfuqZabvrLfmpZOMcfyFBJGZwVMxiUPP pbZZtJjxhEwvrAba\nJTCpQnIViIGIdQtLnmkVzmcbBZR CoxAdTtWSYpbOglDFifqIVQ vfGKGtLpxpJHiHSWCMeRcrVOXBGBhoEnVhNTPWGTOErNtSvokcGdgZXbgTEtISUyTwaXUEIlJMmutsdCbiyrPZPJyRdOjnSuAGttLy\n", "output": "NO\n" }, { "input": "kKhuIwRPLCwPFfcnsyCfBdnsraGeOCcLTfXuGjqFSGPSAeDZJSS bXKFanNqWjpFnvRpWxHJspvisDlADJBioxXNbVoXeUedoPcNEpUyEeYxdJXhGzFAmpAiHotSVwbZQsuWjIVhVaEGgqbZHIoDpiEmjTtFylCwCkWWzUOoUfOHxEZvDwNpXhBWamHn\nK VpJjGhNbwCRhcfmNGVjewBFpEmPlIKeTuWiukDtEWpjgqciqglkyNfWrBLbGAKvlNWxaUelJmSlSoakSpRzePvJsshOsTYrMPXdxKpaShjyVIXGhRIAdtiGpNwtiRmGTBZhkJqIMdxMHX RMxCMYcWjcjhtCHyFnCvjjezGbkRDRiVxkbh\n", "output": "NO\n" }, { "input": "GRZGcsLPzDrCSXhhNTaibJqVphhjbcPoZhCDUlzAbDnRWjHvxLKtpGiFWiGbfeDxBwCrdJmJGCGv GebAOinUsFrlqKTILOmxrFjSpEoVGoTdSSstJWVgMLKMPettxHASaQZNdOIObcTxtF qTHWBdNIKwj\nWqrxze Ji x q aT GllLrRV jMpGiMDTwwS JDsPGpAZKACmsFCOS CD Sj bCDgKF jJxa RddtLFAi VGLHH SecObzG q hPF \n", "output": "YES\n" }, { "input": "HpOKgo\neAtAVB\n", "output": "NO\n" }, { "input": "zyWvXBcUZqGqjHwZHQryBtFliLYnweXAoMKNpLaunaOlzaauWmLtywsEvWPiwxJapocAFRMjrqWJXYqfKEbBKnzLO\npsbi bsXpSeJaCkIuPWfSRADXdIClxcDCowwJzGCDTyAl\n", "output": "NO\n" }, { "input": "OTmLdkMhmDEOMQMiW ZpzEIjyElHFrNCfFQDp SZyoZaEIUIpyCHfwOUqiSkKtFHggrTBGkqfOxkChPztmPrsHoxVwAdrxbZLKxPXHlMnrkgMgiaHFopiFFiUEtKwCjpJtwdwkbJCgA bxeDIscFdmHQJLAMNhWlrZisQrHQpvbALWTwpf jnx\nDbZwrQbydCdkJMCrftiwtPFfpMiwwrfIrKidEChKECxQUBVUEfFirbGWiLkFQkdJiFtkrtkbIAEXCEDkwLpK\n", "output": "YES\n" }, { "input": "GtPXuwdAxNhODQbjRslDDKciOALJrCifTjDQurQEBeFUUSZWwCZQPdYwZkYbrduMijFjgodAOrKIuUKwSXageZuOWMIhAMexyLRzFuzuXqBDTEaWMzVdbzhxDGSJC SsIYuYILwpiwwcObEHWpFvHeBkWYNitqYrxqgHReHcKnHbtjcWZuaxPBVPb\nTQIKyqFaewOkY lZUOOuxEw EwuKcArxRQGFYkvVWIAe SuanPeHuDjquurJu aSxwgOSw jYMwjxItNUUArQjO BIujAhSwttLWp\n", "output": "YES\n" }, { "input": "yDBxCtUygQwWqONxQCcuAvVCkMGlqgC zvkfEkwqbhMCQxnkwQIUhucCbVUyOBUcXvTNEGriTBwMDMfdsPZgWRgIUDqM\neptVnORTTyixxmWIBpSTEwOXqGZllBgSxPenYCDlFwckJlWsoVwWLAIbPOmFqcKcTcoQqahetl KLfVSyaLVebzsGwPSVbtQAeUdZAaJtfxlCEvvaRhLlVvRJhKat IaB awdqcDlrrhTbRxjEbzGwcdmdavkhcjHjzmwbxAgw\n", "output": "NO\n" }, { "input": "HpOKgo\nogK\n", "output": "YES\n" }, { "input": "hrLzRegCuDGxTrhDgVvM KowwyYuXGzIpcXdSMgeQVfVOtJZdkhNYSegwFWWoPqcZoeapbQnyCtojgkcyezUNHGGIZrhzsKrvvcrtokIdcnqXXkCNKjrOjrnEAKBNxyDdiMVeyLvXxUYMZQRFdlcdlcxzKTeYzBlmpNiwWbNAAhWkMoGpRxkCuyqkzXdKWwGH\nJESKDOfnFdxPvUOCkrgSBEPQHJtJHzuNGstRbTCcchRWJvCcveSEAtwtOmZZiW\n", "output": "NO\n" } ]
code_contests
python
0.6
4246147abd3507cdaa8598ccb8c5844a
Let's denote as <image> the number of bits set ('1' bits) in the binary representation of the non-negative integer x. You are given multiple queries consisting of pairs of integers l and r. For each query, find the x, such that l ≤ x ≤ r, and <image> is maximum possible. If there are multiple such numbers find the smallest of them. Input The first line contains integer n — the number of queries (1 ≤ n ≤ 10000). Each of the following n lines contain two integers li, ri — the arguments for the corresponding query (0 ≤ li ≤ ri ≤ 1018). Output For each query print the answer in a separate line. Examples Input 3 1 2 2 4 1 10 Output 1 3 7 Note The binary representations of numbers from 1 to 10 are listed below: 110 = 12 210 = 102 310 = 112 410 = 1002 510 = 1012 610 = 1102 710 = 1112 810 = 10002 910 = 10012 1010 = 10102 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
for i in range(int(input())): l,r=map(int,input().split()) L=list(bin(l)) R=list(bin(r)) L=L[2:] R=R[2:] w=0 c=0 L=['0']*(len(R)-len(L))+L #print(L,R) ans=0 if l==r: print(l) continue for i in range(len(R)): if L[i]!=R[i]: for j in range(i+1,len(R)): if(R[j]=='0'): w=1 if w==1: ans=c+(2**(len(R)-i-1))-1 # print(ans) break else: ans=c+(2**(len(R)-i))-1 break elif L[i]=='1': c=c+(2**(len(R)-i-1)) print(ans)
python
code_algorithm
[ { "input": "3\n1 2\n2 4\n1 10\n", "output": "1\n3\n7\n" }, { "input": "17\n0 0\n0 8\n1 8\n36 39\n3 4\n3 7\n2 17\n8 12\n9 12\n10 12\n10 15\n6 14\n8 15\n9 15\n15 15\n100000000000000000 1000000000000000000\n99999999999999999 1000000000000000000\n", "output": "0\n7\n7\n39\n3\n7\n15\n11\n11\n11\n15\n7\n15\n15\n15\n576460752303423487\n576460752303423487\n" }, { "input": "55\n1 1\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n1 9\n1 10\n2 2\n2 3\n2 4\n2 5\n2 6\n2 7\n2 8\n2 9\n2 10\n3 3\n3 4\n3 5\n3 6\n3 7\n3 8\n3 9\n3 10\n4 4\n4 5\n4 6\n4 7\n4 8\n4 9\n4 10\n5 5\n5 6\n5 7\n5 8\n5 9\n5 10\n6 6\n6 7\n6 8\n6 9\n6 10\n7 7\n7 8\n7 9\n7 10\n8 8\n8 9\n8 10\n9 9\n9 10\n10 10\n", "output": "1\n1\n3\n3\n3\n3\n7\n7\n7\n7\n2\n3\n3\n3\n3\n7\n7\n7\n7\n3\n3\n3\n3\n7\n7\n7\n7\n4\n5\n5\n7\n7\n7\n7\n5\n5\n7\n7\n7\n7\n6\n7\n7\n7\n7\n7\n7\n7\n7\n8\n9\n9\n9\n9\n10\n" }, { "input": "18\n1 10\n1 100\n1 1000\n1 10000\n1 100000\n1 1000000\n1 10000000\n1 100000000\n1 1000000000\n1 10000000000\n1 100000000000\n1 1000000000000\n1 10000000000000\n1 100000000000000\n1 1000000000000000\n1 10000000000000000\n1 100000000000000000\n1 1000000000000000000\n", "output": "7\n63\n511\n8191\n65535\n524287\n8388607\n67108863\n536870911\n8589934591\n68719476735\n549755813887\n8796093022207\n70368744177663\n562949953421311\n9007199254740991\n72057594037927935\n576460752303423487\n" }, { "input": "3\n0 0\n1 3\n2 4\n", "output": "0\n3\n3\n" } ]
code_contests
python
0
175a62a91d18ed78f5b42a45bbc13581
Vasya had a strictly increasing sequence of positive integers a1, ..., an. Vasya used it to build a new sequence b1, ..., bn, where bi is the sum of digits of ai's decimal representation. Then sequence ai got lost and all that remained is sequence bi. Vasya wonders what the numbers ai could be like. Of all the possible options he likes the one sequence with the minimum possible last number an. Help Vasya restore the initial sequence. It is guaranteed that such a sequence always exists. Input The first line contains a single integer number n (1 ≤ n ≤ 300). Next n lines contain integer numbers b1, ..., bn — the required sums of digits. All bi belong to the range 1 ≤ bi ≤ 300. Output Print n integer numbers, one per line — the correct option for numbers ai, in order of following in sequence. The sequence should be strictly increasing. The sum of digits of the i-th number should be equal to bi. If there are multiple sequences with least possible number an, print any of them. Print the numbers without leading zeroes. Examples Input 3 1 2 3 Output 1 2 3 Input 3 3 2 1 Output 3 11 100 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
def fill9(x,u): k=x//9 for i in range(k): u[i]=9 if x%9: u[k]=x%9 return k+1 else: return k n=input() n=int(n) u=[0 for i in range(300//9*150+150)] k=1 for i in range(n): x=input() x=int(x) t=k-1 while t>=0: if u[t]+9*t<x: t=fill9(x,u) if t>k: k=t break elif u[t]>=x: t+=1 u[t]+=1 x-=1 while u[t]==10: u[t]=0 t+=1 u[t]+=1 x+=9 if t+1>k: k=t+1 for t in range(fill9(x,u),t): u[t]=0 break else: x-=u[t] t-=1 v=[str(j) for j in u[k-1:-len(u)-1:-1]] print(''.join(v))
python
code_algorithm
[ { "input": "3\n3\n2\n1\n", "output": "3\n11\n100\n" }, { "input": "3\n1\n2\n3\n", "output": "1\n2\n3\n" }, { "input": "1\n139\n", "output": "4999999999999999\n" }, { "input": "100\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n", "output": "99\n189\n198\n279\n288\n297\n369\n378\n387\n396\n459\n468\n477\n486\n495\n549\n558\n567\n576\n585\n594\n639\n648\n657\n666\n675\n684\n693\n729\n738\n747\n756\n765\n774\n783\n792\n819\n828\n837\n846\n855\n864\n873\n882\n891\n909\n918\n927\n936\n945\n954\n963\n972\n981\n990\n1089\n1098\n1179\n1188\n1197\n1269\n1278\n1287\n1296\n1359\n1368\n1377\n1386\n1395\n1449\n1458\n1467\n1476\n1485\n1494\n1539\n1548\n1557\n1566\n1575\n1584\n1593\n1629\n1638\n1647\n1656\n1665\n1674\n1683\n1692\n1719\n1728\n1737\n1746\n1755\n1764\n1773\n1782\n1791\n1809\n" }, { "input": "1\n6\n", "output": "6\n" }, { "input": "10\n1\n2\n3\n4\n5\n6\n7\n8\n9\n1\n", "output": "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n" }, { "input": "100\n1\n2\n3\n4\n5\n6\n7\n8\n9\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n1\n", "output": "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71\n72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91\n92\n93\n94\n95\n96\n97\n98\n99\n100\n" }, { "input": "10\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n", "output": "1\n10\n100\n1000\n10000\n100000\n1000000\n10000000\n100000000\n1000000000\n" }, { "input": "10\n8\n8\n5\n1\n2\n7\n3\n8\n9\n4\n", "output": "8\n17\n23\n100\n101\n106\n111\n116\n117\n121\n" } ]
code_contests
python
0
4af8541d28bb119c1ca0d6c3edb17a15
Analyzing the mistakes people make while typing search queries is a complex and an interesting work. As there is no guaranteed way to determine what the user originally meant by typing some query, we have to use different sorts of heuristics. Polycarp needed to write a code that could, given two words, check whether they could have been obtained from the same word as a result of typos. Polycarpus suggested that the most common typo is skipping exactly one letter as you type a word. Implement a program that can, given two distinct words S and T of the same length n determine how many words W of length n + 1 are there with such property that you can transform W into both S, and T by deleting exactly one character. Words S and T consist of lowercase English letters. Word W also should consist of lowercase English letters. Input The first line contains integer n (1 ≤ n ≤ 100 000) — the length of words S and T. The second line contains word S. The third line contains word T. Words S and T consist of lowercase English letters. It is guaranteed that S and T are distinct words. Output Print a single integer — the number of distinct words W that can be transformed to S and T due to a typo. Examples Input 7 reading trading Output 1 Input 5 sweet sheep Output 0 Input 3 toy try Output 2 Note In the first sample test the two given words could be obtained only from word "treading" (the deleted letters are marked in bold). In the second sample test the two given words couldn't be obtained from the same word by removing one letter. In the third sample test the two given words could be obtained from either word "tory" or word "troy". Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
def aux(s, t): n = len(s) lpr = 0 for i in range(n): if s[i] != t[i]: break lpr += 1 lsf = 0 for i in range(n-1, -1, -1): if s[i] != t[i]: break lsf += 1 if(lpr == n): return 2 return (s[lpr:n-lsf-1] == t[lpr+1:n-lsf]) + (t[lpr:n-lsf-1] == s[lpr+1:n-lsf]) input(); print(aux(input(), input()))
python
code_algorithm
[ { "input": "7\nreading\ntrading\n", "output": "1\n" }, { "input": "5\nsweet\nsheep\n", "output": "0\n" }, { "input": "3\ntoy\ntry\n", "output": "2\n" }, { "input": "4\nabcc\nbcab\n", "output": "0\n" }, { "input": "4\nacca\nbabb\n", "output": "0\n" }, { "input": "4\naabc\naacb\n", "output": "2\n" }, { "input": "100\naaabaabbbababbbaabbbbbaaababbabbaaabbabaabbabbabbbbbabbaaabbbbbbbbbbbbbbbababaaababbaaabeabbabaabbab\naaabaabbbababbbaabbbbbaaababbabbaaabbabaabbabbabbbbbabbaaabbbbbbbbbbbbbbbababaaababbaaabtabbabaabbab\n", "output": "2\n" }, { "input": "100\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaa\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "2\n" }, { "input": "4\nccba\nbabb\n", "output": "0\n" }, { "input": "5\ncabac\ncbabc\n", "output": "2\n" }, { "input": "2\nab\nba\n", "output": "2\n" }, { "input": "4\naaca\ncaab\n", "output": "0\n" }, { "input": "4\nxaxa\naxax\n", "output": "2\n" }, { "input": "4\nbbbc\nbbab\n", "output": "1\n" }, { "input": "4\nbaca\nccbc\n", "output": "0\n" }, { "input": "4\ncaaa\nabab\n", "output": "0\n" }, { "input": "1\nz\ny\n", "output": "2\n" }, { "input": "100\nxjywrmrwqaytezhtqmcnrrjomslvcmevncvzeddnvqgkbusnbzrppdsuzsmcobmnslpvosunavayvdbxhtavvwodorwijxfjjlat\nxjywrmrwqaytezhtqmcrnrjomslvcmevncvzeddnvqgkbusnbzrppdsuzsmcobmnslpvosunavayvdbxhtavvwodorwijxfjjlat\n", "output": "2\n" }, { "input": "2\nab\nac\n", "output": "2\n" }, { "input": "4\nbcca\ncbaa\n", "output": "0\n" }, { "input": "5\nxabax\nxbabx\n", "output": "2\n" }, { "input": "100\nabababbbababbababaaabbbbaaaabbabbabbabababbbaaaabbababbbbababbabbbaaababababbbaaaabbbabbababbbbbbaba\nabababbbababbababaaabbbbaaaabbabbabbabababbbaaaabaababbbbababbabbbaaababababbbaaaabbbabbababbbbbbaba\n", "output": "2\n" }, { "input": "100\naaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\naaaaaaaaaaaaaaaaaaaaaakaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "2\n" }, { "input": "5\nababa\nbabab\n", "output": "2\n" }, { "input": "100\ndwtsrrtztfuibkrpwbxjrcxsonrwoydkmbhxrghekvusiyzqkyvulrvtfxmvrphpzpmazizogfbyauxtjfesocssnxvjjdedomlz\ndwtsrrtztfuibkrpwbxjrcxsonrwoydkmbhxrghekvusiyzqkyvulrvtfxmvrphpzpzazizogfbyauxtjfesocssnxvjjdedomlz\n", "output": "2\n" }, { "input": "5\nbabab\nababa\n", "output": "2\n" }, { "input": "5\nabxxx\nbayyy\n", "output": "0\n" }, { "input": "100\neebdeddddbecdbddaaecbbaccbecdeacedddcaddcdebedbabbceeeadecadbbeaecdaeabbceacbdbdbbdacebbbccdcbbeedbe\needbeddddbecdbddaaecbbaccbecdeacedddcaddcdebedbabbceeeadecadbbeaecdaeabbceacbdbdbbdacebbbccdcbbeedbe\n", "output": "2\n" }, { "input": "2\nba\nca\n", "output": "2\n" }, { "input": "3\naba\nbab\n", "output": "2\n" }, { "input": "4\nabba\ncaca\n", "output": "0\n" }, { "input": "3\nabc\nacb\n", "output": "2\n" }, { "input": "5\ntabat\ntbaat\n", "output": "2\n" }, { "input": "4\ncbba\nabba\n", "output": "2\n" }, { "input": "4\nbaab\nbcbc\n", "output": "0\n" }, { "input": "3\naab\naba\n", "output": "2\n" }, { "input": "154\nwqpewhyutqnhaewqpewhywqpewhyutqnhaeutqnhaeutqnhaewqpewhyutqnhaewqpewhywqpewhyutqnhaeutqnhaeutqnhaeutqnhaewqpewhyutqnhaewqpewhywqpewhywqpewhywqpewhyutqnhae\nutqnhaeutqnhaeutqnhaewqpewhywqpewhyutqnhaewqpewhyutqnhaewqpewhywqpewhyutqnhaeutqnhaeutqnhaewqpewhyutqnhaewqpewhywqpewhywqpewhyutqnhaewqpewhyutqnhaewqpewhy\n", "output": "0\n" }, { "input": "4\nccbb\nbbcb\n", "output": "0\n" }, { "input": "5\nspare\nspars\n", "output": "2\n" }, { "input": "2\ner\nre\n", "output": "2\n" }, { "input": "250\niiffiehchidfgigdbcciahdehjjfacbbaaadagaibjjcehjcbjdhaadebaejiicgidbhajfbfejcdicgfbcchgbahfccbefdcddbjjhejigiafhdjbiiehadfficicbebeeegcebideijidbgdecffeaegjfjbbcfiabfbaiddbjgidebdiccfcgfbcbbfhaejaibeicghecchjbiaceaibfgibhgcfgifiedcbhhfadhccfdhejeggcah\njbadcfjffcfabbecfabgcafgfcgfeffjjhhdaajjgcbgbechhiadfahjidcdiefhbabhjhjijghghcgghcefhidhdgficiffdjgfdahcaicidfghiedgihbbjgicjeiacihdihfhadjhccddhigiibafiafficegaiehabafiiecbjcbfhdbeaebigaijehhdbfeehbcahaggbbdjcdbgbiajgeigdeabdbddbgcgjibfdgjghhdidjdhh\n", "output": "0\n" }, { "input": "2\nac\ncb\n", "output": "1\n" }, { "input": "100\neebdeddddbecdbddaaecbbaccbecdeacedddcaddcdebedbabbceeeadecadbbeaecdaeabbceacbdbdbbdacebbbccdcbbeedbe\ndacdeebebeaeaacdeedadbcbaedcbddddddedacbabeddebaaebbdcebebaaccbaeccbecdbcbceadaaecadecbadbcddcdabecd\n", "output": "0\n" }, { "input": "4\nabab\nbaba\n", "output": "2\n" }, { "input": "4\nbaaa\nbbbc\n", "output": "0\n" }, { "input": "100\naaaabaaaaabbaababaaabaababaabbbaabaaabbbaaababbabaabbabababbaaabaabababbbababbbabbaaaabbbbbbbaaababa\naaaabaaaaabbaababaaabaababaabbbaabaaabbbaaaabbbabaabbabababbaaabaabababbbababbbabbaaaabbbbbbbaaababa\n", "output": "2\n" }, { "input": "4\nabcb\nccac\n", "output": "0\n" }, { "input": "4\ncabc\naacc\n", "output": "0\n" }, { "input": "7\ntrading\nrtading\n", "output": "2\n" }, { "input": "4\nbaba\naccc\n", "output": "0\n" }, { "input": "4\nbcbb\nccac\n", "output": "0\n" }, { "input": "4\nbbab\ncbaa\n", "output": "0\n" }, { "input": "1\na\nb\n", "output": "2\n" }, { "input": "4\nbbca\nabab\n", "output": "0\n" } ]
code_contests
python
0
d807c2a4f017cb333922eba694e88bce
Amr bought a new video game "Guess Your Way Out! II". The goal of the game is to find an exit from the maze that looks like a perfect binary tree of height h. The player is initially standing at the root of the tree and the exit from the tree is located at some leaf node. Let's index all the nodes of the tree such that * The root is number 1 * Each internal node i (i ≤ 2h - 1 - 1) will have a left child with index = 2i and a right child with index = 2i + 1 The level of a node is defined as 1 for a root, or 1 + level of parent of the node otherwise. The vertices of the level h are called leaves. The exit to the maze is located at some leaf node n, the player doesn't know where the exit is so he has to guess his way out! In the new version of the game the player is allowed to ask questions on the format "Does the ancestor(exit, i) node number belong to the range [L, R]?". Here ancestor(v, i) is the ancestor of a node v that located in the level i. The game will answer with "Yes" or "No" only. The game is designed such that it doesn't always answer correctly, and sometimes it cheats to confuse the player!. Amr asked a lot of questions and got confused by all these answers, so he asked you to help him. Given the questions and its answers, can you identify whether the game is telling contradictory information or not? If the information is not contradictory and the exit node can be determined uniquely, output its number. If the information is not contradictory, but the exit node isn't defined uniquely, output that the number of questions is not sufficient. Otherwise output that the information is contradictory. Input The first line contains two integers h, q (1 ≤ h ≤ 50, 0 ≤ q ≤ 105), the height of the tree and the number of questions respectively. The next q lines will contain four integers each i, L, R, ans (1 ≤ i ≤ h, 2i - 1 ≤ L ≤ R ≤ 2i - 1, <image>), representing a question as described in the statement with its answer (ans = 1 if the answer is "Yes" and ans = 0 if the answer is "No"). Output If the information provided by the game is contradictory output "Game cheated!" without the quotes. Else if you can uniquely identify the exit to the maze output its index. Otherwise output "Data not sufficient!" without the quotes. Examples Input 3 1 3 4 6 0 Output 7 Input 4 3 4 10 14 1 3 6 6 0 2 3 3 1 Output 14 Input 4 2 3 4 6 1 4 12 15 1 Output Data not sufficient! Input 4 2 3 4 5 1 2 3 3 1 Output Game cheated! Note Node u is an ancestor of node v if and only if * u is the same node as v, * u is the parent of node v, * or u is an ancestor of the parent of node v. In the first sample test there are 4 leaf nodes 4, 5, 6, 7. The first question says that the node isn't in the range [4, 6] so the exit is node number 7. In the second sample test there are 8 leaf nodes. After the first question the exit is in the range [10, 14]. After the second and the third questions only node number 14 is correct. Check the picture below to fully understand. <image> Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
h,q=map(int,input().split()) d=[(2**h,0),(2**(h-1),0)] for _ in range(q): i,l,r,a=map(int,input().split()) l,r=l*2**(h-i),(r+1)*2**(h-i) d.extend([[(l,1),(r,-1)],[(0,1),(l,-1),(r,1)]][a]) s=0 l=0 d=sorted(d) for (a,x),(b,_) in zip(d,d[1:]): s+=x if a!=b and s==0:q=a;l+=b-a print(("Game cheated!",q,"Data not sufficient!")[min(l,2)])
python
code_algorithm
[ { "input": "4 3\n4 10 14 1\n3 6 6 0\n2 3 3 1\n", "output": "14\n" }, { "input": "4 2\n3 4 5 1\n2 3 3 1\n", "output": "Game cheated!\n" }, { "input": "4 2\n3 4 6 1\n4 12 15 1\n", "output": "Data not sufficient!\n" }, { "input": "3 1\n3 4 6 0\n", "output": "7\n" }, { "input": "1 1\n1 1 1 0\n", "output": "Game cheated!\n" }, { "input": "1 0\n", "output": "1\n" } ]
code_contests
python
0.4
3441ed52d959e8613da4ce21e30a5b0b
Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new skateboard. He left a calculator on the floor and went to ask some money from his parents. Meanwhile his little brother Yusuf came and started to press the keys randomly. Unfortunately Max has forgotten the number which he had calculated. The only thing he knows is that the number is divisible by 4. You are given a string s consisting of digits (the number on the display of the calculator after Yusuf randomly pressed the keys). Your task is to find the number of substrings which are divisible by 4. A substring can start with a zero. A substring of a string is a nonempty sequence of consecutive characters. For example if string s is 124 then we have four substrings that are divisible by 4: 12, 4, 24 and 124. For the string 04 the answer is three: 0, 4, 04. As input/output can reach huge size it is recommended to use fast input/output methods: for example, prefer to use gets/scanf/printf instead of getline/cin/cout in C++, prefer to use BufferedReader/PrintWriter instead of Scanner/System.out in Java. Input The only line contains string s (1 ≤ |s| ≤ 3·105). The string s contains only digits from 0 to 9. Output Print integer a — the number of substrings of the string s that are divisible by 4. Note that the answer can be huge, so you should use 64-bit integer type to store it. In C++ you can use the long long integer type and in Java you can use long integer type. Examples Input 124 Output 4 Input 04 Output 3 Input 5810438174 Output 9 Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
from sys import stdin, stdout def main(): s = stdin.readline().rstrip() count = 0 for i, e in enumerate(s): if int(e) % 4 == 0: count += 1 if i >= 1: if int(s[i - 1: i + 1]) % 4 == 0: count += i stdout.write(f'{count}\n') if __name__ == '__main__': main()
python
code_algorithm
[ { "input": "04\n", "output": "3\n" }, { "input": "124\n", "output": "4\n" }, { "input": "5810438174\n", "output": "9\n" }, { "input": "1\n", "output": "0\n" }, { "input": "97247\n", "output": "6\n" }, { "input": "4\n", "output": "1\n" }, { "input": "039\n", "output": "1\n" }, { "input": "80124649014054971081213608137817466046254652492627741860478258558206397113198232823859870363821007188476405951611069347299689170240023979048198711745011542774268179055311013054073075176122755643483380248999657649211459997766221072399103579977409770898200358240970169892326442892826731631357561876251276209119521202062222947560634301788787748428236988789594458520867663257476744168528121470923031438015546006185059454402637036376247785881323277542968298682307854655591317046086531554595892680980142608\n", "output": "30826\n" }, { "input": "123\n", "output": "1\n" }, { "input": "123456\n", "output": "7\n" }, { "input": "2144315253572020279108092911160072328496568665545836825277616363478721946398140227406814602154768031\n", "output": "1528\n" }, { "input": "12883340691714056185860211260984431382156326935244\n", "output": "424\n" } ]
code_contests
python
1
15b0765448c06ba074972f0105f28d8e
You are given an array consisting of n non-negative integers a1, a2, ..., an. You are going to destroy integers in the array one by one. Thus, you are given the permutation of integers from 1 to n defining the order elements of the array are destroyed. After each element is destroyed you have to find out the segment of the array, such that it contains no destroyed elements and the sum of its elements is maximum possible. The sum of elements in the empty segment is considered to be 0. Input The first line of the input contains a single integer n (1 ≤ n ≤ 100 000) — the length of the array. The second line contains n integers a1, a2, ..., an (0 ≤ ai ≤ 109). The third line contains a permutation of integers from 1 to n — the order used to destroy elements. Output Print n lines. The i-th line should contain a single integer — the maximum possible sum of elements on the segment containing no destroyed elements, after first i operations are performed. Examples Input 4 1 3 2 5 3 4 1 2 Output 5 4 3 0 Input 5 1 2 3 4 5 4 2 3 5 1 Output 6 5 5 1 0 Input 8 5 5 4 4 6 6 5 5 5 2 8 7 1 3 4 6 Output 18 16 11 8 8 6 6 0 Note Consider the first sample: 1. Third element is destroyed. Array is now 1 3 * 5. Segment with maximum sum 5 consists of one integer 5. 2. Fourth element is destroyed. Array is now 1 3 * * . Segment with maximum sum 4 consists of two integers 1 3. 3. First element is destroyed. Array is now * 3 * * . Segment with maximum sum 3 consists of one integer 3. 4. Last element is destroyed. At this moment there are no valid nonempty segments left in this array, so the answer is equal to 0. Write Python code to solve the problem. Present the code in the code block: ```python Your code ``` Write Python code to solve the problem. Present the code in the code block: ```python Your code ```
class DSU: def __init__(self, n): self.par = list(range(n)) self.arr = list(map(int, input().split())) self.siz = [1] * n self.sht = [0] * n self.max = 0 def find(self, n): nn = n while nn != self.par[nn]: nn = self.par[nn] while n != nn: self.par[n], n = nn, self.par[n] return n def union(self, a, b): a = self.find(a) b = self.find(b) if a == b: return if self.siz[a] < self.siz[b]: a, b = b, a self.par[b] = a self.siz[a] += self.siz[b] self.arr[a] += self.arr[b] if self.arr[a] > self.max: self.max = self.arr[a] def add_node(self, n): self.sht[n] = 1 if self.arr[n] > self.max: self.max = self.arr[n] if n != len(self.par) - 1 and self.sht[n + 1]: self.union(n, n + 1) if n != 0 and self.sht[n - 1]: self.union(n, n - 1) def main(): import sys input = sys.stdin.readline n = int(input()) dsu = DSU(n) per = list(map(int, input().split())) ans = [0] * n for i in range(n): ans[~i] = dsu.max dsu.add_node(per[~i] - 1) for x in ans: print(x) return 0 main()
python
code_algorithm
[ { "input": "5\n1 2 3 4 5\n4 2 3 5 1\n", "output": "6\n5\n5\n1\n0\n" }, { "input": "4\n1 3 2 5\n3 4 1 2\n", "output": "5\n4\n3\n0\n" }, { "input": "8\n5 5 4 4 6 6 5 5\n5 2 8 7 1 3 4 6\n", "output": "18\n16\n11\n8\n8\n6\n6\n0\n" }, { "input": "17\n12 9 17 5 0 6 5 1 3 1 17 17 2 14 5 1 17\n3 7 5 8 12 9 15 13 11 14 6 16 17 1 10 2 4\n", "output": "94\n78\n78\n77\n39\n39\n21\n21\n21\n21\n21\n21\n21\n9\n9\n5\n0\n" }, { "input": "17\n1 6 9 2 10 5 15 16 17 14 17 3 9 8 12 0 2\n9 13 15 14 16 17 11 10 12 4 6 5 7 8 2 3 1\n", "output": "65\n64\n64\n64\n64\n64\n64\n64\n64\n46\n31\n31\n16\n16\n9\n1\n0\n" }, { "input": "10\n3 3 3 5 6 9 3 1 7 3\n3 4 6 7 5 1 10 9 2 8\n", "output": "34\n29\n14\n11\n11\n11\n8\n3\n1\n0\n" }, { "input": "7\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n1 2 3 4 5 6 7\n", "output": "6000000000\n5000000000\n4000000000\n3000000000\n2000000000\n1000000000\n0\n" }, { "input": "10\n3 10 9 2 6 8 4 4 1 9\n5 8 6 7 9 10 2 1 3 4\n", "output": "26\n24\n24\n24\n24\n24\n11\n11\n2\n0\n" }, { "input": "17\n10 10 3 9 8 0 10 13 11 8 11 1 6 9 2 10 5\n9 4 13 2 6 15 11 5 16 10 7 3 14 1 12 8 17\n", "output": "63\n52\n31\n31\n26\n23\n23\n23\n23\n23\n13\n13\n13\n13\n13\n5\n0\n" }, { "input": "1\n1\n1\n", "output": "0\n" }, { "input": "10\n10 4 9 0 7 5 10 3 10 9\n5 2 8 1 3 9 6 10 4 7\n", "output": "37\n37\n19\n19\n19\n15\n10\n10\n10\n0\n" } ]
code_contests
python
0
ac25d92de1f81b704b6db2a92df02efe