Makoto has a big blackboard with a positive integer $n$ written on it. He will perform the following action exactly $k$ times:

Suppose the number currently written on the blackboard is $v$. He will randomly pick one of the divisors of $v$ (possibly $1$ and $v$) and replace $v$ with this divisor. As Makoto uses his famous random number generator (RNG) and as he always uses $58$ as his generator seed, each divisor is guaranteed to be chosen with equal probability.

He now wonders what is the expected value of the number written on the blackboard after $k$ steps.

It can be shown that this value can be represented as $\frac{P}{Q}$ where $P$ and $Q$ are coprime integers and $Q \not\equiv 0 \pmod{10^9+7}$. Print the value of $P \cdot Q^{-1}$ modulo $10^9+7$.

-----Input-----

The only line of the input contains two integers $n$ and $k$ ($1 \leq n \leq 10^{15}$, $1 \leq k \leq 10^4$).

-----Output-----

Print a single integer — the expected value of the number on the blackboard after $k$ steps as $P \cdot Q^{-1} \pmod{10^9+7}$ for $P$, $Q$ defined above.

-----Examples-----
Input
6 1

Output
3

Input
6 2

Output
875000008

Input
60 5

Output
237178099

-----Note-----

In the first example, after one step, the number written on the blackboard is $1$, $2$, $3$ or $6$ — each occurring with equal probability. Hence, the answer is $\frac{1+2+3+6}{4}=3$.

In the second example, the answer is equal to $1 \cdot \frac{9}{16}+2 \cdot \frac{3}{16}+3 \cdot \frac{3}{16}+6 \cdot \frac{1}{16}=\frac{15}{8}$.


Now it's time of Olympiads. Vanya and Egor decided to make his own team to take part in a programming Olympiad. They've been best friends ever since primary school and hopefully, that can somehow help them in teamwork.

For each team Olympiad, Vanya takes his play cards with numbers. He takes only the cards containing numbers 1 and 0. The boys are very superstitious. They think that they can do well at the Olympiad if they begin with laying all the cards in a row so that:  there wouldn't be a pair of any side-adjacent cards with zeroes in a row;  there wouldn't be a group of three consecutive cards containing numbers one.

Today Vanya brought n cards with zeroes and m cards with numbers one. The number of cards was so much that the friends do not know how to put all those cards in the described way. Help them find the required arrangement of the cards or else tell the guys that it is impossible to arrange cards in such a way.

-----Input-----

The first line contains two integers: n (1 ≤ n ≤ 10^6) — the number of cards containing number 0; m (1 ≤ m ≤ 10^6) — the number of cards containing number 1.

-----Output-----

In a single line print the required sequence of zeroes and ones without any spaces. If such sequence is impossible to obtain, print -1.

-----Examples-----
Input
1 2

Output
101

Input
4 8

Output
110110110101

Input
4 10

Output
11011011011011

Input
1 5

Output
-1


There are n students who have taken part in an olympiad. Now it's time to award the students.

Some of them will receive diplomas, some wiil get certificates, and others won't receive anything. Students with diplomas and certificates are called winners. But there are some rules of counting the number of diplomas and certificates. The number of certificates must be exactly k times greater than the number of diplomas. The number of winners must not be greater than half of the number of all students (i.e. not be greater than half of n). It's possible that there are no winners.

You have to identify the maximum possible number of winners, according to these rules. Also for this case you have to calculate the number of students with diplomas, the number of students with certificates and the number of students who are not winners.

-----Input-----

The first (and the only) line of input contains two integers n and k (1 ≤ n, k ≤ 10^12), where n is the number of students and k is the ratio between the number of certificates and the number of diplomas.

-----Output-----

Output three numbers: the number of students with diplomas, the number of students with certificates and the number of students who are not winners in case when the number of winners is maximum possible.

It's possible that there are no winners.

-----Examples-----
Input
18 2

Output
3 6 9

Input
9 10

Output
0 0 9

Input
1000000000000 5

Output
83333333333 416666666665 500000000002

Input
1000000000000 499999999999

Output
1 499999999999 500000000000


Let quasi-palindromic number be such number that adding some leading zeros (possible none) to it produces a palindromic string.

String t is called a palindrome, if it reads the same from left to right and from right to left.

For example, numbers 131 and 2010200 are quasi-palindromic, they can be transformed to strings "131" and "002010200", respectively, which are palindromes.

You are given some integer number x. Check if it's a quasi-palindromic number.

-----Input-----

The first line contains one integer number x (1 ≤ x ≤ 10^9). This number is given without any leading zeroes.

-----Output-----

Print "YES" if number x is quasi-palindromic. Otherwise, print "NO" (without quotes).

-----Examples-----
Input
131

Output
YES

Input
320

Output
NO

Input
2010200

Output
YES


Imp is in a magic forest, where xorangles grow (wut?)

 [Image]

A xorangle of order n is such a non-degenerate triangle, that lengths of its sides are integers not exceeding n, and the xor-sum of the lengths is equal to zero. Imp has to count the number of distinct xorangles of order n to get out of the forest.

Formally, for a given integer n you have to find the number of such triples (a, b, c), that:

  1 ≤ a ≤ b ≤ c ≤ n;  $a \oplus b \oplus c = 0$, where $x \oplus y$ denotes the bitwise xor of integers x and y.  (a, b, c) form a non-degenerate (with strictly positive area) triangle.

-----Input-----

The only line contains a single integer n (1 ≤ n ≤ 2500).

-----Output-----

Print the number of xorangles of order n.

-----Examples-----
Input
6

Output
1

Input
10

Output
2

-----Note-----

The only xorangle in the first sample is (3, 5, 6).


You play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to descend one level lower and the only way to do this is to fall through the ice.

The level of the cave where you are is a rectangular square grid of n rows and m columns. Each cell consists either from intact or from cracked ice. From each cell you can move to cells that are side-adjacent with yours (due to some limitations of the game engine you cannot make jumps on the same place, i.e. jump from a cell to itself). If you move to the cell with cracked ice, then your character falls down through it and if you move to the cell with intact ice, then the ice on this cell becomes cracked.

Let's number the rows with integers from 1 to n from top to bottom and the columns with integers from 1 to m from left to right. Let's denote a cell on the intersection of the r-th row and the c-th column as (r, c).

You are staying in the cell (r_1, c_1) and this cell is cracked because you've just fallen here from a higher level. You need to fall down through the cell (r_2, c_2) since the exit to the next level is there. Can you do this?

-----Input-----

The first line contains two integers, n and m (1 ≤ n, m ≤ 500) — the number of rows and columns in the cave description.

Each of the next n lines describes the initial state of the level of the cave, each line consists of m characters "." (that is, intact ice) and "X" (cracked ice).

The next line contains two integers, r_1 and c_1 (1 ≤ r_1 ≤ n, 1 ≤ c_1 ≤ m) — your initial coordinates. It is guaranteed that the description of the cave contains character 'X' in cell (r_1, c_1), that is, the ice on the starting cell is initially cracked.

The next line contains two integers r_2 and c_2 (1 ≤ r_2 ≤ n, 1 ≤ c_2 ≤ m) — the coordinates of the cell through which you need to fall. The final cell may coincide with the starting one.

-----Output-----

If you can reach the destination, print 'YES', otherwise print 'NO'.

-----Examples-----
Input
4 6
X...XX
...XX.
.X..X.
......
1 6
2 2

Output
YES

Input
5 4
.X..
...X
X.X.
....
.XX.
5 3
1 1

Output
NO

Input
4 7
..X.XX.
.XX..X.
X...X..
X......
2 2
1 6

Output
YES

-----Note-----

In the first sample test one possible path is:

[Image]

After the first visit of cell (2, 2) the ice on it cracks and when you step there for the second time, your character falls through the ice as intended.


There are N islands lining up from west to east, connected by N-1 bridges.
The i-th bridge connects the i-th island from the west and the (i+1)-th island from the west.
One day, disputes took place between some islands, and there were M requests from the inhabitants of the islands:
Request i: A dispute took place between the a_i-th island from the west and the b_i-th island from the west. Please make traveling between these islands with bridges impossible.
You decided to remove some bridges to meet all these M requests.
Find the minimum number of bridges that must be removed.

-----Constraints-----
 - All values in input are integers.
 - 2 \leq N \leq 10^5
 - 1 \leq M \leq 10^5
 - 1 \leq a_i < b_i \leq N
 - All pairs (a_i, b_i) are distinct.

-----Input-----
Input is given from Standard Input in the following format:
N M
a_1 b_1
a_2 b_2
:
a_M b_M

-----Output-----
Print the minimum number of bridges that must be removed.

-----Sample Input-----
5 2
1 4
2 5

-----Sample Output-----
1

The requests can be met by removing the bridge connecting the second and third islands from the west.


Vasya has become interested in wrestling. In wrestling wrestlers use techniques for which they are awarded points by judges. The wrestler who gets the most points wins.

When the numbers of points of both wrestlers are equal, the wrestler whose sequence of points is lexicographically greater, wins.

If the sequences of the awarded points coincide, the wrestler who performed the last technique wins. Your task is to determine which wrestler won.

-----Input-----

The first line contains number n — the number of techniques that the wrestlers have used (1 ≤ n ≤ 2·10^5).

The following n lines contain integer numbers a_{i} (|a_{i}| ≤ 10^9, a_{i} ≠ 0). If a_{i} is positive, that means that the first wrestler performed the technique that was awarded with a_{i} points. And if a_{i} is negative, that means that the second wrestler performed the technique that was awarded with ( - a_{i}) points.

The techniques are given in chronological order.

-----Output-----

If the first wrestler wins, print string "first", otherwise print "second"

-----Examples-----
Input
5
1
2
-3
-4
3

Output
second

Input
3
-1
-2
3

Output
first

Input
2
4
-4

Output
second

-----Note-----

Sequence x  =  x_1x_2... x_{|}x| is lexicographically larger than sequence y  =  y_1y_2... y_{|}y|, if either |x|  >  |y| and x_1  =  y_1,  x_2  =  y_2, ... ,  x_{|}y|  =  y_{|}y|, or there is such number r (r  <  |x|, r  <  |y|), that x_1  =  y_1,  x_2  =  y_2,  ... ,  x_{r}  =  y_{r} and x_{r}  +  1  >  y_{r}  +  1.

We use notation |a| to denote length of sequence a.


The programming competition season has already started and it's time to train for ICPC. Sereja coaches his teams for a number of year and he knows that to get ready for the training session it's not enough to prepare only problems and editorial. As the training sessions lasts for several hours, teams become hungry. Thus, Sereja orders a number of pizzas so they can eat right after the end of the competition.

Teams plan to train for n times during n consecutive days. During the training session Sereja orders exactly one pizza for each team that is present this day. He already knows that there will be a_{i} teams on the i-th day.

There are two types of discounts in Sereja's favourite pizzeria. The first discount works if one buys two pizzas at one day, while the second is a coupon that allows to buy one pizza during two consecutive days (two pizzas in total).

As Sereja orders really a lot of pizza at this place, he is the golden client and can use the unlimited number of discounts and coupons of any type at any days.

Sereja wants to order exactly a_{i} pizzas on the i-th day while using only discounts and coupons. Note, that he will never buy more pizzas than he need for this particular day. Help him determine, whether he can buy the proper amount of pizzas each day if he is allowed to use only coupons and discounts. Note, that it's also prohibited to have any active coupons after the end of the day n.

-----Input-----

The first line of input contains a single integer n (1 ≤ n ≤ 200 000) — the number of training sessions.

The second line contains n integers a_1, a_2, ..., a_{n} (0 ≤ a_{i} ≤ 10 000) — the number of teams that will be present on each of the days.

-----Output-----

If there is a way to order pizzas using only coupons and discounts and do not buy any extra pizzas on any of the days, then print "YES" (without quotes) in the only line of output. Otherwise, print "NO" (without quotes).

-----Examples-----
Input
4
1 2 1 2

Output
YES

Input
3
1 0 1

Output
NO

-----Note-----

In the first sample, Sereja can use one coupon to buy one pizza on the first and the second days, one coupon to buy pizza on the second and the third days and one discount to buy pizzas on the fourth days. This is the only way to order pizzas for this sample.

In the second sample, Sereja can't use neither the coupon nor the discount without ordering an extra pizza. Note, that it's possible that there will be no teams attending the training sessions on some days.


You are given a string $s$ consisting of $n$ lowercase Latin letters. $n$ is even.

For each position $i$ ($1 \le i \le n$) in string $s$ you are required to change the letter on this position either to the previous letter in alphabetic order or to the next one (letters 'a' and 'z' have only one of these options). Letter in every position must be changed exactly once.

For example, letter 'p' should be changed either to 'o' or to 'q', letter 'a' should be changed to 'b' and letter 'z' should be changed to 'y'.

That way string "codeforces", for example, can be changed to "dpedepqbft" ('c' $\rightarrow$ 'd', 'o' $\rightarrow$ 'p', 'd' $\rightarrow$ 'e', 'e' $\rightarrow$ 'd', 'f' $\rightarrow$ 'e', 'o' $\rightarrow$ 'p', 'r' $\rightarrow$ 'q', 'c' $\rightarrow$ 'b', 'e' $\rightarrow$ 'f', 's' $\rightarrow$ 't').

String $s$ is called a palindrome if it reads the same from left to right and from right to left. For example, strings "abba" and "zz" are palindromes and strings "abca" and "zy" are not.

Your goal is to check if it's possible to make string $s$ a palindrome by applying the aforementioned changes to every position. Print "YES" if string $s$ can be transformed to a palindrome and "NO" otherwise.

Each testcase contains several strings, for each of them you are required to solve the problem separately.

-----Input-----

The first line contains a single integer $T$ ($1 \le T \le 50$) — the number of strings in a testcase.

Then $2T$ lines follow — lines $(2i - 1)$ and $2i$ of them describe the $i$-th string. The first line of the pair contains a single integer $n$ ($2 \le n \le 100$, $n$ is even) — the length of the corresponding string. The second line of the pair contains a string $s$, consisting of $n$ lowercase Latin letters.

-----Output-----

Print $T$ lines. The $i$-th line should contain the answer to the $i$-th string of the input. Print "YES" if it's possible to make the $i$-th string a palindrome by applying the aforementioned changes to every position. Print "NO" otherwise.

-----Example-----
Input
5
6
abccba
2
cf
4
adfa
8
abaazaba
2
ml

Output
YES
NO
YES
NO
NO

-----Note-----

The first string of the example can be changed to "bcbbcb", two leftmost letters and two rightmost letters got changed to the next letters, two middle letters got changed to the previous letters.

The second string can be changed to "be", "bg", "de", "dg", but none of these resulting strings are palindromes.

The third string can be changed to "beeb" which is a palindrome.

The fifth string can be changed to "lk", "lm", "nk", "nm", but none of these resulting strings are palindromes. Also note that no letter can remain the same, so you can't obtain strings "ll" or "mm".


Marina loves strings of the same length and Vasya loves when there is a third string, different from them in exactly t characters. Help Vasya find at least one such string.

More formally, you are given two strings s_1, s_2 of length n and number t. Let's denote as f(a, b) the number of characters in which strings a and b are different. Then your task will be to find any string s_3 of length n, such that f(s_1, s_3) = f(s_2, s_3) = t. If there is no such string, print  - 1.

-----Input-----

The first line contains two integers n and t (1 ≤ n ≤ 10^5, 0 ≤ t ≤ n).

The second line contains string s_1 of length n, consisting of lowercase English letters.

The third line contain string s_2 of length n, consisting of lowercase English letters.

-----Output-----

Print a string of length n, differing from string s_1 and from s_2 in exactly t characters. Your string should consist only from lowercase English letters. If such string doesn't exist, print -1.

-----Examples-----
Input
3 2
abc
xyc

Output
ayd
Input
1 0
c
b

Output
-1


It's hard times now. Today Petya needs to score 100 points on Informatics exam. The tasks seem easy to Petya, but he thinks he lacks time to finish them all, so he asks you to help with one..

There is a glob pattern in the statements (a string consisting of lowercase English letters, characters "?" and "*"). It is known that character "*" occurs no more than once in the pattern.

Also, n query strings are given, it is required to determine for each of them if the pattern matches it or not.

Everything seemed easy to Petya, but then he discovered that the special pattern characters differ from their usual meaning.

A pattern matches a string if it is possible to replace each character "?" with one good lowercase English letter, and the character "*" (if there is one) with any, including empty, string of bad lowercase English letters, so that the resulting string is the same as the given string.

The good letters are given to Petya. All the others are bad.

-----Input-----

The first line contains a string with length from 1 to 26 consisting of distinct lowercase English letters. These letters are good letters, all the others are bad.

The second line contains the pattern — a string s of lowercase English letters, characters "?" and "*" (1 ≤ |s| ≤ 10^5). It is guaranteed that character "*" occurs in s no more than once.

The third line contains integer n (1 ≤ n ≤ 10^5) — the number of query strings.

n lines follow, each of them contains single non-empty string consisting of lowercase English letters — a query string.

It is guaranteed that the total length of all query strings is not greater than 10^5.

-----Output-----

Print n lines: in the i-th of them print "YES" if the pattern matches the i-th query string, and "NO" otherwise.

You can choose the case (lower or upper) for each letter arbitrary.

-----Examples-----
Input
ab
a?a
2
aaa
aab

Output
YES
NO

Input
abc
a?a?a*
4
abacaba
abaca
apapa
aaaaax

Output
NO
YES
NO
YES

-----Note-----

In the first example we can replace "?" with good letters "a" and "b", so we can see that the answer for the first query is "YES", and the answer for the second query is "NO", because we can't match the third letter.

Explanation of the second example.   The first query: "NO", because character "*" can be replaced with a string of bad letters only, but the only way to match the query string is to replace it with the string "ba", in which both letters are good.  The second query: "YES", because characters "?" can be replaced with corresponding good letters, and character "*" can be replaced with empty string, and the strings will coincide.  The third query: "NO", because characters "?" can't be replaced with bad letters.  The fourth query: "YES", because characters "?" can be replaced with good letters "a", and character "*" can be replaced with a string of bad letters "x".


Vanya is managed to enter his favourite site Codehorses. Vanya uses n distinct passwords for sites at all, however he can't remember which one exactly he specified during Codehorses registration.

Vanya will enter passwords in order of non-decreasing their lengths, and he will enter passwords of same length in arbitrary order. Just when Vanya will have entered the correct password, he is immediately authorized on the site. Vanya will not enter any password twice.

Entering any passwords takes one second for Vanya. But if Vanya will enter wrong password k times, then he is able to make the next try only 5 seconds after that. Vanya makes each try immediately, that is, at each moment when Vanya is able to enter password, he is doing that.

Determine how many seconds will Vanya need to enter Codehorses in the best case for him (if he spends minimum possible number of second) and in the worst case (if he spends maximum possible amount of seconds).

-----Input-----

The first line of the input contains two integers n and k (1 ≤ n, k ≤ 100) — the number of Vanya's passwords and the number of failed tries, after which the access to the site is blocked for 5 seconds.

The next n lines contains passwords, one per line — pairwise distinct non-empty strings consisting of latin letters and digits. Each password length does not exceed 100 characters.

The last line of the input contains the Vanya's Codehorses password. It is guaranteed that the Vanya's Codehorses password is equal to some of his n passwords.

-----Output-----

Print two integers — time (in seconds), Vanya needs to be authorized to Codehorses in the best case for him and in the worst case respectively.

-----Examples-----
Input
5 2
cba
abc
bb1
abC
ABC
abc

Output
1 15

Input
4 100
11
22
1
2
22

Output
3 4

-----Note-----

Consider the first sample case. As soon as all passwords have the same length, Vanya can enter the right password at the first try as well as at the last try. If he enters it at the first try, he spends exactly 1 second. Thus in the best case the answer is 1. If, at the other hand, he enters it at the last try, he enters another 4 passwords before. He spends 2 seconds to enter first 2 passwords, then he waits 5 seconds as soon as he made 2 wrong tries. Then he spends 2 more seconds to enter 2 wrong passwords, again waits 5 seconds and, finally, enters the correct password spending 1 more second. In summary in the worst case he is able to be authorized in 15 seconds.

Consider the second sample case. There is no way of entering passwords and get the access to the site blocked. As soon as the required password has length of 2, Vanya enters all passwords of length 1 anyway, spending 2 seconds for that. Then, in the best case, he immediately enters the correct password and the answer for the best case is 3, but in the worst case he enters wrong password of length 2 and only then the right one, spending 4 seconds at all.


Leha somehow found an array consisting of n integers. Looking at it, he came up with a task. Two players play the game on the array. Players move one by one. The first player can choose for his move a subsegment of non-zero length with an odd sum of numbers and remove it from the array, after that the remaining parts are glued together into one array and the game continues. The second player can choose a subsegment of non-zero length with an even sum and remove it. Loses the one who can not make a move. Who will win if both play optimally?

-----Input-----

First line of input data contains single integer n (1 ≤ n ≤ 10^6) — length of the array.

Next line contains n integers a_1, a_2, ..., a_{n} (0 ≤ a_{i} ≤ 10^9).

-----Output-----

Output answer in single line. "First", if first player wins, and "Second" otherwise (without quotes).

-----Examples-----
Input
4
1 3 2 3

Output
First

Input
2
2 2

Output
Second

-----Note-----

In first sample first player remove whole array in one move and win.

In second sample first player can't make a move and lose.


A big company decided to launch a new series of rectangular displays, and decided that the display must have exactly n pixels.

Your task is to determine the size of the rectangular display — the number of lines (rows) of pixels a and the number of columns of pixels b, so that:

  there are exactly n pixels on the display;  the number of rows does not exceed the number of columns, it means a ≤ b;  the difference b - a is as small as possible.

-----Input-----

The first line contains the positive integer n (1 ≤ n ≤ 10^6) — the number of pixels display should have.

-----Output-----

Print two integers — the number of rows and columns on the display.

-----Examples-----
Input
8

Output
2 4

Input
64

Output
8 8

Input
5

Output
1 5

Input
999999

Output
999 1001

-----Note-----

In the first example the minimum possible difference equals 2, so on the display should be 2 rows of 4 pixels.

In the second example the minimum possible difference equals 0, so on the display should be 8 rows of 8 pixels.

In the third example the minimum possible difference equals 4, so on the display should be 1 row of 5 pixels.


When registering in a social network, users are allowed to create their own convenient login to make it easier to share contacts, print it on business cards, etc.

Login is an arbitrary sequence of lower and uppercase latin letters, digits and underline symbols («_»). However, in order to decrease the number of frauds and user-inattention related issues, it is prohibited to register a login if it is similar with an already existing login. More precisely, two logins s and t are considered similar if we can transform s to t via a sequence of operations of the following types:   transform lowercase letters to uppercase and vice versa;  change letter «O» (uppercase latin letter) to digit «0» and vice versa;  change digit «1» (one) to any letter among «l» (lowercase latin «L»), «I» (uppercase latin «i») and vice versa, or change one of these letters to other.

For example, logins «Codeforces» and «codef0rces» as well as «OO0OOO00O0OOO0O00OOO0OO_lol» and «OO0OOO0O00OOO0O00OO0OOO_1oI» are considered similar whereas «Codeforces» and «Code_forces» are not.

You're given a list of existing logins with no two similar amonst and a newly created user login. Check whether this new login is similar with any of the existing ones.

-----Input-----

The first line contains a non-empty string s consisting of lower and uppercase latin letters, digits and underline symbols («_») with length not exceeding 50  — the login itself.

The second line contains a single integer n (1 ≤ n ≤ 1 000) — the number of existing logins.

The next n lines describe the existing logins, following the same constraints as the user login (refer to the first line of the input). It's guaranteed that no two existing logins are similar.

-----Output-----

Print «Yes» (without quotes), if user can register via this login, i.e. none of the existing logins is similar with it.

Otherwise print «No» (without quotes).

-----Examples-----
Input
1_wat
2
2_wat
wat_1

Output
Yes

Input
000
3
00
ooA
oOo

Output
No

Input
_i_
3
__i_
_1_
I

Output
No

Input
La0
3
2a0
La1
1a0

Output
No

Input
abc
1
aBc

Output
No

Input
0Lil
2
LIL0
0Ril

Output
Yes

-----Note-----

In the second sample case the user wants to create a login consisting of three zeros. It's impossible due to collision with the third among the existing.

In the third sample case the new login is similar with the second one.


Connect the countless points with lines, till we reach the faraway yonder.

There are n points on a coordinate plane, the i-th of which being (i, y_{i}).

Determine whether it's possible to draw two parallel and non-overlapping lines, such that every point in the set lies on exactly one of them, and each of them passes through at least one point in the set.

-----Input-----

The first line of input contains a positive integer n (3 ≤ n ≤ 1 000) — the number of points.

The second line contains n space-separated integers y_1, y_2, ..., y_{n} ( - 10^9 ≤ y_{i} ≤ 10^9) — the vertical coordinates of each point.

-----Output-----

Output "Yes" (without quotes) if it's possible to fulfill the requirements, and "No" otherwise.

You can print each letter in any case (upper or lower).

-----Examples-----
Input
5
7 5 8 6 9

Output
Yes

Input
5
-1 -2 0 0 -5

Output
No

Input
5
5 4 3 2 1

Output
No

Input
5
1000000000 0 0 0 0

Output
Yes

-----Note-----

In the first example, there are five points: (1, 7), (2, 5), (3, 8), (4, 6) and (5, 9). It's possible to draw a line that passes through points 1, 3, 5, and another one that passes through points 2, 4 and is parallel to the first one.

In the second example, while it's possible to draw two lines that cover all points, they cannot be made parallel.

In the third example, it's impossible to satisfy both requirements at the same time.


Vasya had three strings $a$, $b$ and $s$, which consist of lowercase English letters. The lengths of strings $a$ and $b$ are equal to $n$, the length of the string $s$ is equal to $m$.

Vasya decided to choose a substring of the string $a$, then choose a substring of the string $b$ and concatenate them. Formally, he chooses a segment $[l_1, r_1]$ ($1 \leq l_1 \leq r_1 \leq n$) and a segment $[l_2, r_2]$ ($1 \leq l_2 \leq r_2 \leq n$), and after concatenation he obtains a string $a[l_1, r_1] + b[l_2, r_2] = a_{l_1} a_{l_1 + 1} \ldots a_{r_1} b_{l_2} b_{l_2 + 1} \ldots b_{r_2}$.

Now, Vasya is interested in counting number of ways to choose those segments adhering to the following conditions:

  segments $[l_1, r_1]$ and $[l_2, r_2]$ have non-empty intersection, i.e. there exists at least one integer $x$, such that $l_1 \leq x \leq r_1$ and $l_2 \leq x \leq r_2$;  the string $a[l_1, r_1] + b[l_2, r_2]$ is equal to the string $s$.

-----Input-----

The first line contains integers $n$ and $m$ ($1 \leq n \leq 500\,000, 2 \leq m \leq 2 \cdot n$) — the length of strings $a$ and $b$ and the length of the string $s$.

The next three lines contain strings $a$, $b$ and $s$, respectively. The length of the strings $a$ and $b$ is $n$, while the length of the string $s$ is $m$.

All strings consist of lowercase English letters.

-----Output-----

Print one integer — the number of ways to choose a pair of segments, which satisfy Vasya's conditions.

-----Examples-----
Input
6 5
aabbaa
baaaab
aaaaa

Output
4

Input
5 4
azaza
zazaz
azaz

Output
11

Input
9 12
abcabcabc
xyzxyzxyz
abcabcayzxyz

Output
2

-----Note-----

Let's list all the pairs of segments that Vasya could choose in the first example:

  $[2, 2]$ and $[2, 5]$;  $[1, 2]$ and $[2, 4]$;  $[5, 5]$ and $[2, 5]$;  $[5, 6]$ and $[3, 5]$;


During a New Year special offer the "Sudislavl Bars" offered n promo codes. Each promo code consists of exactly six digits and gives right to one free cocktail at the bar "Mosquito Shelter". Of course, all the promocodes differ.

As the "Mosquito Shelter" opens only at 9, and partying in Sudislavl usually begins at as early as 6, many problems may arise as to how to type a promotional code without errors. It is necessary to calculate such maximum k, that the promotional code could be uniquely identified if it was typed with no more than k errors. At that, k = 0 means that the promotional codes must be entered exactly.

A mistake in this problem should be considered as entering the wrong numbers. For example, value "123465" contains two errors relative to promocode "123456". Regardless of the number of errors the entered value consists of exactly six digits.

-----Input-----

The first line of the output contains number n (1 ≤ n ≤ 1000) — the number of promocodes.

Each of the next n lines contains a single promocode, consisting of exactly 6 digits. It is guaranteed that all the promocodes are distinct. Promocodes can start from digit "0".

-----Output-----

Print the maximum k (naturally, not exceeding the length of the promocode), such that any promocode can be uniquely identified if it is typed with at most k mistakes.

-----Examples-----
Input
2
000000
999999

Output
2

Input
6
211111
212111
222111
111111
112111
121111

Output
0

-----Note-----

In the first sample k < 3, so if a bar customer types in value "090909", then it will be impossible to define which promocode exactly corresponds to it.


Little Alyona is celebrating Happy Birthday! Her mother has an array of n flowers. Each flower has some mood, the mood of i-th flower is a_{i}. The mood can be positive, zero or negative.

Let's define a subarray as a segment of consecutive flowers. The mother suggested some set of subarrays. Alyona wants to choose several of the subarrays suggested by her mother. After that, each of the flowers will add to the girl's happiness its mood multiplied by the number of chosen subarrays the flower is in.

For example, consider the case when the mother has 5 flowers, and their moods are equal to 1,  - 2, 1, 3,  - 4. Suppose the mother suggested subarrays (1,  - 2), (3,  - 4), (1, 3), (1,  - 2, 1, 3). Then if the girl chooses the third and the fourth subarrays then:   the first flower adds 1·1 = 1 to the girl's happiness, because he is in one of chosen subarrays,  the second flower adds ( - 2)·1 =  - 2, because he is in one of chosen subarrays,  the third flower adds 1·2 = 2, because he is in two of chosen subarrays,  the fourth flower adds 3·2 = 6, because he is in two of chosen subarrays,  the fifth flower adds ( - 4)·0 = 0, because he is in no chosen subarrays.

Thus, in total 1 + ( - 2) + 2 + 6 + 0 = 7 is added to the girl's happiness. Alyona wants to choose such subarrays from those suggested by the mother that the value added to her happiness would be as large as possible. Help her do this!

Alyona can choose any number of the subarrays, even 0 or all suggested by her mother.

-----Input-----

The first line contains two integers n and m (1 ≤ n, m ≤ 100) — the number of flowers and the number of subarrays suggested by the mother.

The second line contains the flowers moods — n integers a_1, a_2, ..., a_{n} ( - 100 ≤ a_{i} ≤ 100).

The next m lines contain the description of the subarrays suggested by the mother. The i-th of these lines contain two integers l_{i} and r_{i} (1 ≤ l_{i} ≤ r_{i} ≤ n) denoting the subarray a[l_{i}], a[l_{i} + 1], ..., a[r_{i}].

Each subarray can encounter more than once.

-----Output-----

Print single integer — the maximum possible value added to the Alyona's happiness.

-----Examples-----
Input
5 4
1 -2 1 3 -4
1 2
4 5
3 4
1 4

Output
7

Input
4 3
1 2 3 4
1 3
2 4
1 1

Output
16

Input
2 2
-1 -2
1 1
1 2

Output
0

-----Note-----

The first example is the situation described in the statements.

In the second example Alyona should choose all subarrays.

The third example has answer 0 because Alyona can choose none of the subarrays.


Luke Skywalker gave Chewbacca an integer number x. Chewbacca isn't good at numbers but he loves inverting digits in them. Inverting digit t means replacing it with digit 9 - t.

Help Chewbacca to transform the initial number x to the minimum possible positive number by inverting some (possibly, zero) digits. The decimal representation of the final number shouldn't start with a zero.

-----Input-----

The first line contains a single integer x (1 ≤ x ≤ 10^18) — the number that Luke Skywalker gave to Chewbacca.

-----Output-----

Print the minimum possible positive number that Chewbacca can obtain after inverting some digits. The number shouldn't contain leading zeroes.

-----Examples-----
Input
27

Output
22

Input
4545

Output
4444


Programmer Rostislav got seriously interested in the Link/Cut Tree data structure, which is based on Splay trees. Specifically, he is now studying the expose procedure.

Unfortunately, Rostislav is unable to understand the definition of this procedure, so he decided to ask programmer Serezha to help him. Serezha agreed to help if Rostislav solves a simple task (and if he doesn't, then why would he need Splay trees anyway?)

Given integers l, r and k, you need to print all powers of number k within range from l to r inclusive. However, Rostislav doesn't want to spent time doing this, as he got interested in playing a network game called Agar with Gleb. Help him!

-----Input-----

The first line of the input contains three space-separated integers l, r and k (1 ≤ l ≤ r ≤ 10^18, 2 ≤ k ≤ 10^9).

-----Output-----

Print all powers of number k, that lie within range from l to r in the increasing order. If there are no such numbers, print "-1" (without the quotes).

-----Examples-----
Input
1 10 2

Output
1 2 4 8
Input
2 4 5

Output
-1

-----Note-----

Note to the first sample: numbers 2^0 = 1, 2^1 = 2, 2^2 = 4, 2^3 = 8 lie within the specified range. The number 2^4 = 16 is greater then 10, thus it shouldn't be printed.


Pig is visiting a friend.

Pig's house is located at point 0, and his friend's house is located at point m on an axis.

Pig can use teleports to move along the axis.

To use a teleport, Pig should come to a certain point (where the teleport is located) and choose where to move: for each teleport there is the rightmost point it can move Pig to, this point is known as the limit of the teleport.

Formally, a teleport located at point x with limit y can move Pig from point x to any point within the segment [x; y], including the bounds. [Image]

Determine if Pig can visit the friend using teleports only, or he should use his car.

-----Input-----

The first line contains two integers n and m (1 ≤ n ≤ 100, 1 ≤ m ≤ 100) — the number of teleports and the location of the friend's house.

The next n lines contain information about teleports.

The i-th of these lines contains two integers a_{i} and b_{i} (0 ≤ a_{i} ≤ b_{i} ≤ m), where a_{i} is the location of the i-th teleport, and b_{i} is its limit.

It is guaranteed that a_{i} ≥ a_{i} - 1 for every i (2 ≤ i ≤ n).

-----Output-----

Print "YES" if there is a path from Pig's house to his friend's house that uses only teleports, and "NO" otherwise.

You can print each letter in arbitrary case (upper or lower).

-----Examples-----
Input
3 5
0 2
2 4
3 5

Output
YES

Input
3 7
0 4
2 5
6 7

Output
NO

-----Note-----

The first example is shown on the picture below: [Image]

Pig can use the first teleport from his house (point 0) to reach point 2, then using the second teleport go from point 2 to point 3, then using the third teleport go from point 3 to point 5, where his friend lives.

The second example is shown on the picture below: [Image]

You can see that there is no path from Pig's house to his friend's house that uses only teleports.


There are N blocks arranged in a row. Let us paint these blocks.
We will consider two ways to paint the blocks different if and only if there is a block painted in different colors in those two ways.
Find the number of ways to paint the blocks under the following conditions:
 - For each block, use one of the M colors, Color 1 through Color M, to paint it. It is not mandatory to use all the colors.
 - There may be at most K pairs of adjacent blocks that are painted in the same color.
Since the count may be enormous, print it modulo 998244353.

-----Constraints-----
 - All values in input are integers.
 - 1 \leq N, M \leq 2 \times 10^5
 - 0 \leq K \leq N - 1

-----Input-----
Input is given from Standard Input in the following format:
N M K

-----Output-----
Print the answer.

-----Sample Input-----
3 2 1

-----Sample Output-----
6

The following ways to paint the blocks satisfy the conditions: 112, 121, 122, 211, 212, and 221. Here, digits represent the colors of the blocks.


Given are a prime number p and a sequence of p integers a_0, \ldots, a_{p-1} consisting of zeros and ones.
Find a polynomial of degree at most p-1, f(x) = b_{p-1} x^{p-1} + b_{p-2} x^{p-2} + \ldots + b_0, satisfying the following conditions:
 - For each i (0 \leq i \leq p-1), b_i is an integer such that 0 \leq b_i \leq p-1.
 - For each i (0 \leq i \leq p-1), f(i) \equiv a_i \pmod p.

-----Constraints-----
 - 2 \leq p \leq 2999
 - p is a prime number.
 - 0 \leq a_i \leq 1

-----Input-----
Input is given from Standard Input in the following format:
p
a_0 a_1 \ldots a_{p-1}

-----Output-----
Print b_0, b_1, \ldots, b_{p-1} of a polynomial f(x) satisfying the conditions, in this order, with spaces in between.
It can be proved that a solution always exists. If multiple solutions exist, any of them will be accepted.

-----Sample Input-----
2
1 0

-----Sample Output-----
1 1

f(x) = x + 1 satisfies the conditions, as follows:
 - f(0) = 0 + 1 = 1 \equiv 1 \pmod 2
 - f(1) = 1 + 1 = 2 \equiv 0 \pmod 2


You are given a rectangular cake, represented as an r × c grid. Each cell either has an evil strawberry, or is empty. For example, a 3 × 4 cake may look as follows: [Image]

The cakeminator is going to eat the cake! Each time he eats, he chooses a row or a column that does not contain any evil strawberries and contains at least one cake cell that has not been eaten before, and eats all the cake cells there. He may decide to eat any number of times.

Please output the maximum number of cake cells that the cakeminator can eat.

-----Input-----

The first line contains two integers r and c (2 ≤ r, c ≤ 10), denoting the number of rows and the number of columns of the cake. The next r lines each contains c characters — the j-th character of the i-th line denotes the content of the cell at row i and column j, and is either one of these:   '.' character denotes a cake cell with no evil strawberry;  'S' character denotes a cake cell with an evil strawberry.

-----Output-----

Output the maximum number of cake cells that the cakeminator can eat.

-----Examples-----
Input
3 4
S...
....
..S.

Output
8

-----Note-----

For the first example, one possible way to eat the maximum number of cake cells is as follows (perform 3 eats). [Image]  [Image]  [Image]


Everybody knows what an arithmetic progression is. Let us remind you just in case that an arithmetic progression is such sequence of numbers a_1, a_2, ..., a_{n} of length n, that the following condition fulfills: a_2 - a_1 = a_3 - a_2 = a_4 - a_3 = ... = a_{i} + 1 - a_{i} = ... = a_{n} - a_{n} - 1.

For example, sequences [1, 5], [10], [5, 4, 3] are arithmetic progressions and sequences [1, 3, 2], [1, 2, 4] are not.

Alexander has n cards containing integers. Arthur wants to give Alexander exactly one more card with a number so that he could use the resulting n + 1 cards to make an arithmetic progression (Alexander has to use all of his cards).

Arthur has already bought a card but he hasn't written a number on it. Help him, print all integers that you can write on a card so that the described condition fulfilled.

-----Input-----

The first line contains integer n (1 ≤ n ≤ 10^5) — the number of cards. The next line contains the sequence of integers — the numbers on Alexander's cards. The numbers are positive integers, each of them doesn't exceed 10^8.

-----Output-----

If Arthur can write infinitely many distinct integers on the card, print on a single line -1.

Otherwise, print on the first line the number of integers that suit you. In the second line, print the numbers in the increasing order. Note that the numbers in the answer can exceed 10^8 or even be negative (see test samples).

-----Examples-----
Input
3
4 1 7

Output
2
-2 10

Input
1
10

Output
-1

Input
4
1 3 5 9

Output
1
7

Input
4
4 3 4 5

Output
0

Input
2
2 4

Output
3
0 3 6


Polycarp is a great fan of television.

He wrote down all the TV programs he is interested in for today. His list contains n shows, i-th of them starts at moment l_{i} and ends at moment r_{i}.

Polycarp owns two TVs. He can watch two different shows simultaneously with two TVs but he can only watch one show at any given moment on a single TV. If one show ends at the same moment some other show starts then you can't watch them on a single TV.

Polycarp wants to check out all n shows. Are two TVs enough to do so?

-----Input-----

The first line contains one integer n (1 ≤ n ≤ 2·10^5) — the number of shows.

Each of the next n lines contains two integers l_{i} and r_{i} (0 ≤ l_{i} < r_{i} ≤ 10^9) — starting and ending time of i-th show.

-----Output-----

If Polycarp is able to check out all the shows using only two TVs then print "YES" (without quotes). Otherwise, print "NO" (without quotes).

-----Examples-----
Input
3
1 2
2 3
4 5

Output
YES

Input
4
1 2
2 3
2 3
1 2

Output
NO


Your friend has recently learned about coprime numbers. A pair of numbers {a, b} is called coprime if the maximum number that divides both a and b is equal to one.

Your friend often comes up with different statements. He has recently supposed that if the pair (a, b) is coprime and the pair (b, c) is coprime, then the pair (a, c) is coprime.

You want to find a counterexample for your friend's statement. Therefore, your task is to find three distinct numbers (a, b, c), for which the statement is false, and the numbers meet the condition l ≤ a < b < c ≤ r.

More specifically, you need to find three numbers (a, b, c), such that l ≤ a < b < c ≤ r, pairs (a, b) and (b, c) are coprime, and pair (a, c) is not coprime.

-----Input-----

The single line contains two positive space-separated integers l, r (1 ≤ l ≤ r ≤ 10^18; r - l ≤ 50).

-----Output-----

Print three positive space-separated integers a, b, c — three distinct numbers (a, b, c) that form the counterexample. If there are several solutions, you are allowed to print any of them. The numbers must be printed in ascending order.

If the counterexample does not exist, print the single number -1.

-----Examples-----
Input
2 4

Output
2 3 4

Input
10 11

Output
-1

Input
900000000000000009 900000000000000029

Output
900000000000000009 900000000000000010 900000000000000021

-----Note-----

In the first sample pair (2, 4) is not coprime and pairs (2, 3) and (3, 4) are.

In the second sample you cannot form a group of three distinct integers, so the answer is -1.

In the third sample it is easy to see that numbers 900000000000000009 and 900000000000000021 are divisible by three.


Sereja showed an interesting game to his friends. The game goes like that. Initially, there is a table with an empty cup and n water mugs on it. Then all players take turns to move. During a move, a player takes a non-empty mug of water and pours all water from it into the cup. If the cup overfills, then we assume that this player lost.

As soon as Sereja's friends heard of the game, they wanted to play it. Sereja, on the other hand, wanted to find out whether his friends can play the game in such a way that there are no losers. You are given the volumes of all mugs and the cup. Also, you know that Sereja has (n - 1) friends. Determine if Sereja's friends can play the game so that nobody loses.

-----Input-----

The first line contains integers n and s (2 ≤ n ≤ 100; 1 ≤ s ≤ 1000) — the number of mugs and the volume of the cup. The next line contains n integers a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ 10). Number a_{i} means the volume of the i-th mug.

-----Output-----

In a single line, print "YES" (without the quotes) if his friends can play in the described manner, and "NO" (without the quotes) otherwise.

-----Examples-----
Input
3 4
1 1 1

Output
YES

Input
3 4
3 1 3

Output
YES

Input
3 4
4 4 4

Output
NO


Alice and Bob are decorating a Christmas Tree.

Alice wants only $3$ types of ornaments to be used on the Christmas Tree: yellow, blue and red. They have $y$ yellow ornaments, $b$ blue ornaments and $r$ red ornaments.

In Bob's opinion, a Christmas Tree will be beautiful if:  the number of blue ornaments used is greater by exactly $1$ than the number of yellow ornaments, and  the number of red ornaments used is greater by exactly $1$ than the number of blue ornaments.

That is, if they have $8$ yellow ornaments, $13$ blue ornaments and $9$ red ornaments, we can choose $4$ yellow, $5$ blue and $6$ red ornaments ($5=4+1$ and $6=5+1$).

Alice wants to choose as many ornaments as possible, but she also wants the Christmas Tree to be beautiful according to Bob's opinion.

In the example two paragraphs above, we would choose $7$ yellow, $8$ blue and $9$ red ornaments. If we do it, we will use $7+8+9=24$ ornaments. That is the maximum number.

Since Alice and Bob are busy with preparing food to the New Year's Eve, they are asking you to find out the maximum number of ornaments that can be used in their beautiful Christmas Tree!

It is guaranteed that it is possible to choose at least $6$ ($1+2+3=6$) ornaments.

-----Input-----

The only line contains three integers $y$, $b$, $r$ ($1 \leq y \leq 100$, $2 \leq b \leq 100$, $3 \leq r \leq 100$) — the number of yellow, blue and red ornaments.

It is guaranteed that it is possible to choose at least $6$ ($1+2+3=6$) ornaments.

-----Output-----

Print one number — the maximum number of ornaments that can be used.

-----Examples-----
Input
8 13 9

Output
24
Input
13 3 6

Output
9

-----Note-----

In the first example, the answer is $7+8+9=24$.

In the second example, the answer is $2+3+4=9$.


You have r red, g green and b blue balloons. To decorate a single table for the banquet you need exactly three balloons. Three balloons attached to some table shouldn't have the same color. What maximum number t of tables can be decorated if we know number of balloons of each color?

Your task is to write a program that for given values r, g and b will find the maximum number t of tables, that can be decorated in the required manner.

-----Input-----

The single line contains three integers r, g and b (0 ≤ r, g, b ≤ 2·10^9) — the number of red, green and blue baloons respectively. The numbers are separated by exactly one space.

-----Output-----

Print a single integer t — the maximum number of tables that can be decorated in the required manner.

-----Examples-----
Input
5 4 3

Output
4

Input
1 1 1

Output
1

Input
2 3 3

Output
2

-----Note-----

In the first sample you can decorate the tables with the following balloon sets: "rgg", "gbb", "brr", "rrg", where "r", "g" and "b" represent the red, green and blue balls, respectively.


You and your friend are participating in a TV show "Run For Your Prize".

At the start of the show n prizes are located on a straight line. i-th prize is located at position a_{i}. Positions of all prizes are distinct. You start at position 1, your friend — at position 10^6 (and there is no prize in any of these two positions). You have to work as a team and collect all prizes in minimum possible time, in any order.

You know that it takes exactly 1 second to move from position x to position x + 1 or x - 1, both for you and your friend. You also have trained enough to instantly pick up any prize, if its position is equal to your current position (and the same is true for your friend). Carrying prizes does not affect your speed (or your friend's speed) at all.

Now you may discuss your strategy with your friend and decide who will pick up each prize. Remember that every prize must be picked up, either by you or by your friend.

What is the minimum number of seconds it will take to pick up all the prizes?

-----Input-----

The first line contains one integer n (1 ≤ n ≤ 10^5) — the number of prizes.

The second line contains n integers a_1, a_2, ..., a_{n} (2 ≤ a_{i} ≤ 10^6 - 1) — the positions of the prizes. No two prizes are located at the same position. Positions are given in ascending order.

-----Output-----

Print one integer — the minimum number of seconds it will take to collect all prizes.

-----Examples-----
Input
3
2 3 9

Output
8

Input
2
2 999995

Output
5

-----Note-----

In the first example you take all the prizes: take the first at 1, the second at 2 and the third at 8.

In the second example you take the first prize in 1 second and your friend takes the other in 5 seconds, you do this simultaneously, so the total time is 5.


Kolya loves putting gnomes at the circle table and giving them coins, and Tanya loves studying triplets of gnomes, sitting in the vertexes of an equilateral triangle.

More formally, there are 3n gnomes sitting in a circle. Each gnome can have from 1 to 3 coins. Let's number the places in the order they occur in the circle by numbers from 0 to 3n - 1, let the gnome sitting on the i-th place have a_{i} coins. If there is an integer i (0 ≤ i < n) such that a_{i} + a_{i} + n + a_{i} + 2n ≠ 6, then Tanya is satisfied.

Count the number of ways to choose a_{i} so that Tanya is satisfied. As there can be many ways of distributing coins, print the remainder of this number modulo 10^9 + 7. Two ways, a and b, are considered distinct if there is index i (0 ≤ i < 3n), such that a_{i} ≠ b_{i} (that is, some gnome got different number of coins in these two ways).

-----Input-----

A single line contains number n (1 ≤ n ≤ 10^5) — the number of the gnomes divided by three.

-----Output-----

Print a single number — the remainder of the number of variants of distributing coins that satisfy Tanya modulo 10^9 + 7.

-----Examples-----
Input
1

Output
20
Input
2

Output
680

-----Note-----

20 ways for n = 1 (gnome with index 0 sits on the top of the triangle, gnome 1 on the right vertex, gnome 2 on the left vertex): [Image]


A wise man told Kerem "Different is good" once, so Kerem wants all things in his life to be different.

Kerem recently got a string s consisting of lowercase English letters. Since Kerem likes it when things are different, he wants all substrings of his string s to be distinct. Substring is a string formed by some number of consecutive characters of the string. For example, string "aba" has substrings "" (empty substring), "a", "b", "a", "ab", "ba", "aba".

If string s has at least two equal substrings then Kerem will change characters at some positions to some other lowercase English letters. Changing characters is a very tiring job, so Kerem want to perform as few changes as possible.

Your task is to find the minimum number of changes needed to make all the substrings of the given string distinct, or determine that it is impossible.

-----Input-----

The first line of the input contains an integer n (1 ≤ n ≤ 100 000) — the length of the string s.

The second line contains the string s of length n consisting of only lowercase English letters.

-----Output-----

If it's impossible to change the string s such that all its substring are distinct print -1. Otherwise print the minimum required number of changes.

-----Examples-----
Input
2
aa

Output
1

Input
4
koko

Output
2

Input
5
murat

Output
0

-----Note-----

In the first sample one of the possible solutions is to change the first character to 'b'.

In the second sample, one may change the first character to 'a' and second character to 'b', so the string becomes "abko".


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 ≤ 10^9) — 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]


Serval soon said goodbye to Japari kindergarten, and began his life in Japari Primary School.

In his favorite math class, the teacher taught him the following interesting definitions.

A parenthesis sequence is a string, containing only characters "(" and ")".

A correct parenthesis sequence is a parenthesis sequence that can be transformed into a correct arithmetic expression by inserting characters "1" and "+" between the original characters of the sequence. For example, parenthesis sequences "()()", "(())" are correct (the resulting expressions are: "(1+1)+(1+1)", "((1+1)+1)"), while ")(" and ")" are not. Note that the empty string is a correct parenthesis sequence by definition.

We define that $|s|$ as the length of string $s$. A strict prefix $s[1\dots l]$ $(1\leq l< |s|)$ of a string $s = s_1s_2\dots s_{|s|}$ is string $s_1s_2\dots s_l$. Note that the empty string and the whole string are not strict prefixes of any string by the definition.

Having learned these definitions, he comes up with a new problem. He writes down a string $s$ containing only characters "(", ")" and "?". And what he is going to do, is to replace each of the "?" in $s$ independently by one of "(" and ")" to make all strict prefixes of the new sequence not a correct parenthesis sequence, while the new sequence should be a correct parenthesis sequence.

After all, he is just a primary school student so this problem is too hard for him to solve. As his best friend, can you help him to replace the question marks? If there are many solutions, any of them is acceptable.

-----Input-----

The first line contains a single integer $|s|$ ($1\leq |s|\leq 3 \cdot 10^5$), the length of the string.

The second line contains a string $s$, containing only "(", ")" and "?".

-----Output-----

A single line contains a string representing the answer.

If there are many solutions, any of them is acceptable.

If there is no answer, print a single line containing ":(" (without the quotes).

-----Examples-----
Input
6
(?????

Output
(()())
Input
10
(???(???(?

Output
:(

-----Note-----

It can be proved that there is no solution for the second sample, so print ":(".


Limak is a little polar bear. He doesn't have many toys and thus he often plays with polynomials.

He considers a polynomial valid if its degree is n and its coefficients are integers not exceeding k by the absolute value. More formally:

Let a_0, a_1, ..., a_{n} denote the coefficients, so $P(x) = \sum_{i = 0}^{n} a_{i} \cdot x^{i}$. Then, a polynomial P(x) is valid if all the following conditions are satisfied:  a_{i} is integer for every i;  |a_{i}| ≤ k for every i;  a_{n} ≠ 0.

Limak has recently got a valid polynomial P with coefficients a_0, a_1, a_2, ..., a_{n}. He noticed that P(2) ≠ 0 and he wants to change it. He is going to change one coefficient to get a valid polynomial Q of degree n that Q(2) = 0. Count the number of ways to do so. You should count two ways as a distinct if coefficients of target polynoms differ.

-----Input-----

The first line contains two integers n and k (1 ≤ n ≤ 200 000, 1 ≤ k ≤ 10^9) — the degree of the polynomial and the limit for absolute values of coefficients.

The second line contains n + 1 integers a_0, a_1, ..., a_{n} (|a_{i}| ≤ k, a_{n} ≠ 0) — describing a valid polynomial $P(x) = \sum_{i = 0}^{n} a_{i} \cdot x^{i}$. It's guaranteed that P(2) ≠ 0.

-----Output-----

Print the number of ways to change one coefficient to get a valid polynomial Q that Q(2) = 0.

-----Examples-----
Input
3 1000000000
10 -9 -3 5

Output
3

Input
3 12
10 -9 -3 5

Output
2

Input
2 20
14 -7 19

Output
0

-----Note-----

In the first sample, we are given a polynomial P(x) = 10 - 9x - 3x^2 + 5x^3.

Limak can change one coefficient in three ways:  He can set a_0 =  - 10. Then he would get Q(x) =  - 10 - 9x - 3x^2 + 5x^3 and indeed Q(2) =  - 10 - 18 - 12 + 40 = 0.  Or he can set a_2 =  - 8. Then Q(x) = 10 - 9x - 8x^2 + 5x^3 and indeed Q(2) = 10 - 18 - 32 + 40 = 0.  Or he can set a_1 =  - 19. Then Q(x) = 10 - 19x - 3x^2 + 5x^3 and indeed Q(2) = 10 - 38 - 12 + 40 = 0.

In the second sample, we are given the same polynomial. This time though, k is equal to 12 instead of 10^9. Two first of ways listed above are still valid but in the third way we would get |a_1| > k what is not allowed. Thus, the answer is 2 this time.


There were n groups of students which came to write a training contest. A group is either one person who can write the contest with anyone else, or two people who want to write the contest in the same team.

The coach decided to form teams of exactly three people for this training. Determine the maximum number of teams of three people he can form. It is possible that he can't use all groups to form teams. For groups of two, either both students should write the contest, or both should not. If two students from a group of two will write the contest, they should be in the same team.

-----Input-----

The first line contains single integer n (2 ≤ n ≤ 2·10^5) — the number of groups.

The second line contains a sequence of integers a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ 2), where a_{i} is the number of people in group i.

-----Output-----

Print the maximum number of teams of three people the coach can form.

-----Examples-----
Input
4
1 1 2 1

Output
1

Input
2
2 2

Output
0

Input
7
2 2 2 1 1 1 1

Output
3

Input
3
1 1 1

Output
1

-----Note-----

In the first example the coach can form one team. For example, he can take students from the first, second and fourth groups.

In the second example he can't make a single team.

In the third example the coach can form three teams. For example, he can do this in the following way:  The first group (of two people) and the seventh group (of one person),  The second group (of two people) and the sixth group (of one person),  The third group (of two people) and the fourth group (of one person).


Developing tools for creation of locations maps for turn-based fights in a new game, Petya faced the following problem.

A field map consists of hexagonal cells. Since locations sizes are going to be big, a game designer wants to have a tool for quick filling of a field part with identical enemy units. This action will look like following: a game designer will select a rectangular area on the map, and each cell whose center belongs to the selected rectangle will be filled with the enemy unit.

More formally, if a game designer selected cells having coordinates (x_1, y_1) and (x_2, y_2), where x_1 ≤ x_2 and y_1 ≤ y_2, then all cells having center coordinates (x, y) such that x_1 ≤ x ≤ x_2 and y_1 ≤ y ≤ y_2 will be filled. Orthogonal coordinates system is set up so that one of cell sides is parallel to OX axis, all hexagon centers have integer coordinates and for each integer x there are cells having center with such x coordinate and for each integer y there are cells having center with such y coordinate. It is guaranteed that difference x_2 - x_1 is divisible by 2.

Working on the problem Petya decided that before painting selected units he wants to output number of units that will be painted on the map.

Help him implement counting of these units before painting.

 [Image]

-----Input-----

The only line of input contains four integers x_1, y_1, x_2, y_2 ( - 10^9 ≤ x_1 ≤ x_2 ≤ 10^9,  - 10^9 ≤ y_1 ≤ y_2 ≤ 10^9) — the coordinates of the centers of two cells.

-----Output-----

Output one integer — the number of cells to be filled.

-----Examples-----
Input
1 1 5 5

Output
13


Alice and Bob are playing chess on a huge chessboard with dimensions $n \times n$. Alice has a single piece left — a queen, located at $(a_x, a_y)$, while Bob has only the king standing at $(b_x, b_y)$. Alice thinks that as her queen is dominating the chessboard, victory is hers.

But Bob has made a devious plan to seize the victory for himself — he needs to march his king to $(c_x, c_y)$ in order to claim the victory for himself. As Alice is distracted by her sense of superiority, she no longer moves any pieces around, and it is only Bob who makes any turns.

Bob will win if he can move his king from $(b_x, b_y)$ to $(c_x, c_y)$ without ever getting in check. Remember that a king can move to any of the $8$ adjacent squares. A king is in check if it is on the same rank (i.e. row), file (i.e. column), or diagonal as the enemy queen.

Find whether Bob can win or not.

-----Input-----

The first line contains a single integer $n$ ($3 \leq n \leq 1000$) — the dimensions of the chessboard.

The second line contains two integers $a_x$ and $a_y$ ($1 \leq a_x, a_y \leq n$) — the coordinates of Alice's queen.

The third line contains two integers $b_x$ and $b_y$ ($1 \leq b_x, b_y \leq n$) — the coordinates of Bob's king.

The fourth line contains two integers $c_x$ and $c_y$ ($1 \leq c_x, c_y \leq n$) — the coordinates of the location that Bob wants to get to.

It is guaranteed that Bob's king is currently not in check and the target location is not in check either.

Furthermore, the king is not located on the same square as the queen (i.e. $a_x \neq b_x$ or $a_y \neq b_y$), and the target does coincide neither with the queen's position (i.e. $c_x \neq a_x$ or $c_y \neq a_y$) nor with the king's position (i.e. $c_x \neq b_x$ or $c_y \neq b_y$).

-----Output-----

Print "YES" (without quotes) if Bob can get from $(b_x, b_y)$ to $(c_x, c_y)$ without ever getting in check, otherwise print "NO".

You can print each letter in any case (upper or lower).

-----Examples-----
Input
8
4 4
1 3
3 1

Output
YES

Input
8
4 4
2 3
1 6

Output
NO

Input
8
3 5
1 2
6 1

Output
NO

-----Note-----

In the diagrams below, the squares controlled by the black queen are marked red, and the target square is marked blue.

In the first case, the king can move, for instance, via the squares $(2, 3)$ and $(3, 2)$. Note that the direct route through $(2, 2)$ goes through check.

 [Image]

In the second case, the queen watches the fourth rank, and the king has no means of crossing it.

 [Image]

In the third case, the queen watches the third file.

 [Image]


Given an array $a$, consisting of $n$ integers, find:

$$\max\limits_{1 \le i < j \le n} LCM(a_i,a_j),$$

where $LCM(x, y)$ is the smallest positive integer that is divisible by both $x$ and $y$. For example, $LCM(6, 8) = 24$, $LCM(4, 12) = 12$, $LCM(2, 3) = 6$.

-----Input-----

The first line contains an integer $n$ ($2 \le n \le 10^5$) — the number of elements in the array $a$.

The second line contains $n$ integers $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 10^5$) — the elements of the array $a$.

-----Output-----

Print one integer, the maximum value of the least common multiple of two elements in the array $a$.

-----Examples-----
Input
3
13 35 77

Output
1001
Input
6
1 2 4 8 16 32

Output
32


Phoenix is picking berries in his backyard. There are $n$ shrubs, and each shrub has $a_i$ red berries and $b_i$ blue berries.

Each basket can contain $k$ berries. But, Phoenix has decided that each basket may only contain berries from the same shrub or berries of the same color (red or blue). In other words, all berries in a basket must be from the same shrub or/and have the same color.

For example, if there are two shrubs with $5$ red and $2$ blue berries in the first shrub and $2$ red and $1$ blue berries in the second shrub then Phoenix can fill $2$ baskets of capacity $4$ completely:   the first basket will contain $3$ red and $1$ blue berries from the first shrub;  the second basket will contain the $2$ remaining red berries from the first shrub and $2$ red berries from the second shrub.

Help Phoenix determine the maximum number of baskets he can fill completely!

-----Input-----

The first line contains two integers $n$ and $k$ ($ 1\le n, k \le 500$) — the number of shrubs and the basket capacity, respectively.

The $i$-th of the next $n$ lines contain two integers $a_i$ and $b_i$ ($0 \le a_i, b_i \le 10^9$) — the number of red and blue berries in the $i$-th shrub, respectively.

-----Output-----

Output one integer — the maximum number of baskets that Phoenix can fill completely.

-----Examples-----
Input
2 4
5 2
2 1

Output
2

Input
1 5
2 3

Output
1

Input
2 5
2 1
1 3

Output
0

Input
1 2
1000000000 1

Output
500000000

-----Note-----

The first example is described above.

In the second example, Phoenix can fill one basket fully using all the berries from the first (and only) shrub.

In the third example, Phoenix cannot fill any basket completely because there are less than $5$ berries in each shrub, less than $5$ total red berries, and less than $5$ total blue berries.

In the fourth example, Phoenix can put all the red berries into baskets, leaving an extra blue berry behind.


Barney is standing in a bar and starring at a pretty girl. He wants to shoot her with his heart arrow but he needs to know the distance between him and the girl to make his shot accurate. [Image]

Barney asked the bar tender Carl about this distance value, but Carl was so busy talking to the customers so he wrote the distance value (it's a real number) on a napkin. The problem is that he wrote it in scientific notation. The scientific notation of some real number x is the notation of form AeB, where A is a real number and B is an integer and x = A × 10^{B} is true. In our case A is between 0 and 9 and B is non-negative.

Barney doesn't know anything about scientific notation (as well as anything scientific at all). So he asked you to tell him the distance value in usual decimal representation with minimal number of digits after the decimal point (and no decimal point if it is an integer). See the output format for better understanding.

-----Input-----

The first and only line of input contains a single string of form a.deb where a, d and b are integers and e is usual character 'e' (0 ≤ a ≤ 9, 0 ≤ d < 10^100, 0 ≤ b ≤ 100) — the scientific notation of the desired distance value.

a and b contain no leading zeros and d contains no trailing zeros (but may be equal to 0). Also, b can not be non-zero if a is zero.

-----Output-----

Print the only real number x (the desired distance value) in the only line in its decimal notation.

Thus if x is an integer, print it's integer value without decimal part and decimal point and without leading zeroes.

Otherwise print x in a form of p.q such that p is an integer that have no leading zeroes (but may be equal to zero), and q is an integer that have no trailing zeroes (and may not be equal to zero).

-----Examples-----
Input
8.549e2

Output
854.9

Input
8.549e3

Output
8549

Input
0.33e0

Output
0.33


Takahashi will play a game using a piece on an array of squares numbered 1, 2, \cdots, N. Square i has an integer C_i written on it. Also, he is given a permutation of 1, 2, \cdots, N: P_1, P_2, \cdots, P_N.
Now, he will choose one square and place the piece on that square. Then, he will make the following move some number of times between 1 and K (inclusive):
 - In one move, if the piece is now on Square i (1 \leq i \leq N), move it to Square P_i. Here, his score increases by C_{P_i}.
Help him by finding the maximum possible score at the end of the game. (The score is 0 at the beginning of the game.)

-----Constraints-----
 - 2 \leq N \leq 5000
 - 1 \leq K \leq 10^9
 - 1 \leq P_i \leq N
 - P_i \neq i
 - P_1, P_2, \cdots, P_N are all different.
 - -10^9 \leq C_i \leq 10^9
 - All values in input are integers.

-----Input-----
Input is given from Standard Input in the following format:
N K
P_1 P_2 \cdots P_N
C_1 C_2 \cdots C_N

-----Output-----
Print the maximum possible score at the end of the game.

-----Sample Input-----
5 2
2 4 5 1 3
3 4 -10 -8 8

-----Sample Output-----
8

When we start at some square of our choice and make at most two moves, we have the following options:
 - If we start at Square 1, making one move sends the piece to Square 2, after which the score is 4. Making another move sends the piece to Square 4, after which the score is 4 + (-8) = -4.
 - If we start at Square 2, making one move sends the piece to Square 4, after which the score is -8. Making another move sends the piece to Square 1, after which the score is -8 + 3 = -5.
 - If we start at Square 3, making one move sends the piece to Square 5, after which the score is 8. Making another move sends the piece to Square 3, after which the score is 8 + (-10) = -2.
 - If we start at Square 4, making one move sends the piece to Square 1, after which the score is 3. Making another move sends the piece to Square 2, after which the score is 3 + 4 = 7.
 - If we start at Square 5, making one move sends the piece to Square 3, after which the score is -10. Making another move sends the piece to Square 5, after which the score is -10 + 8 = -2.
The maximum score achieved is 8.


Berland has n cities, the capital is located in city s, and the historic home town of the President is in city t (s ≠ t). The cities are connected by one-way roads, the travel time for each of the road is a positive integer.

Once a year the President visited his historic home town t, for which his motorcade passes along some path from s to t (he always returns on a personal plane). Since the president is a very busy man, he always chooses the path from s to t, along which he will travel the fastest.

The ministry of Roads and Railways wants to learn for each of the road: whether the President will definitely pass through it during his travels, and if not, whether it is possible to repair it so that it would definitely be included in the shortest path from the capital to the historic home town of the President. Obviously, the road can not be repaired so that the travel time on it was less than one. The ministry of Berland, like any other, is interested in maintaining the budget, so it wants to know the minimum cost of repairing the road. Also, it is very fond of accuracy, so it repairs the roads so that the travel time on them is always a positive integer.

-----Input-----

The first lines contain four integers n, m, s and t (2 ≤ n ≤ 10^5; 1 ≤ m ≤ 10^5; 1 ≤ s, t ≤ n) — the number of cities and roads in Berland, the numbers of the capital and of the Presidents' home town (s ≠ t).

Next m lines contain the roads. Each road is given as a group of three integers a_{i}, b_{i}, l_{i} (1 ≤ a_{i}, b_{i} ≤ n; a_{i} ≠ b_{i}; 1 ≤ l_{i} ≤ 10^6) — the cities that are connected by the i-th road and the time needed to ride along it. The road is directed from city a_{i} to city b_{i}.

The cities are numbered from 1 to n. Each pair of cities can have multiple roads between them. It is guaranteed that there is a path from s to t along the roads.

-----Output-----

Print m lines. The i-th line should contain information about the i-th road (the roads are numbered in the order of appearance in the input).

If the president will definitely ride along it during his travels, the line must contain a single word "YES" (without the quotes).

Otherwise, if the i-th road can be repaired so that the travel time on it remains positive and then president will definitely ride along it, print space-separated word "CAN" (without the quotes), and the minimum cost of repairing.

If we can't make the road be such that president will definitely ride along it, print "NO" (without the quotes).

-----Examples-----
Input
6 7 1 6
1 2 2
1 3 10
2 3 7
2 4 8
3 5 3
4 5 2
5 6 1

Output
YES
CAN 2
CAN 1
CAN 1
CAN 1
CAN 1
YES

Input
3 3 1 3
1 2 10
2 3 10
1 3 100

Output
YES
YES
CAN 81

Input
2 2 1 2
1 2 1
1 2 2

Output
YES
NO

-----Note-----

The cost of repairing the road is the difference between the time needed to ride along it before and after the repairing.

In the first sample president initially may choose one of the two following ways for a ride: 1 → 2 → 4 → 5 → 6 or 1 → 2 → 3 → 5 → 6.


You are given an unweighted tree with n vertices. Then n - 1 following operations are applied to the tree. A single operation consists of the following steps:   choose two leaves;  add the length of the simple path between them to the answer;  remove one of the chosen leaves from the tree.

Initial answer (before applying operations) is 0. Obviously after n - 1 such operations the tree will consist of a single vertex.

Calculate the maximal possible answer you can achieve, and construct a sequence of operations that allows you to achieve this answer!

-----Input-----

The first line contains one integer number n (2 ≤ n ≤ 2·10^5) — the number of vertices in the tree.

Next n - 1 lines describe the edges of the tree in form a_{i}, b_{i} (1 ≤ a_{i}, b_{i} ≤ n, a_{i} ≠ b_{i}). It is guaranteed that given graph is a tree.

-----Output-----

In the first line print one integer number — maximal possible answer.

In the next n - 1 lines print the operations in order of their applying in format a_{i}, b_{i}, c_{i}, where a_{i}, b_{i} — pair of the leaves that are chosen in the current operation (1 ≤ a_{i}, b_{i} ≤ n), c_{i} (1 ≤ c_{i} ≤ n, c_{i} = a_{i} or c_{i} = b_{i}) — choosen leaf that is removed from the tree in the current operation.

See the examples for better understanding.

-----Examples-----
Input
3
1 2
1 3

Output
3
2 3 3
2 1 1

Input
5
1 2
1 3
2 4
2 5

Output
9
3 5 5
4 3 3
4 1 1
4 2 2


VK news recommendation system daily selects interesting publications of one of $n$ disjoint categories for each user. Each publication belongs to exactly one category. For each category $i$ batch algorithm selects $a_i$ publications.

The latest A/B test suggests that users are reading recommended publications more actively if each category has a different number of publications within daily recommendations. The targeted algorithm can find a single interesting publication of $i$-th category within $t_i$ seconds.

What is the minimum total time necessary to add publications to the result of batch algorithm execution, so all categories have a different number of publications? You can't remove publications recommended by the batch algorithm.

-----Input-----

The first line of input consists of single integer $n$ — the number of news categories ($1 \le n \le 200\,000$).

The second line of input consists of $n$ integers $a_i$ — the number of publications of $i$-th category selected by the batch algorithm ($1 \le a_i \le 10^9$).

The third line of input consists of $n$ integers $t_i$ — time it takes for targeted algorithm to find one new publication of category $i$ ($1 \le t_i \le 10^5)$.

-----Output-----

Print one integer — the minimal required time for the targeted algorithm to get rid of categories with the same size.

-----Examples-----
Input
5
3 7 9 7 8
5 2 5 7 5

Output
6

Input
5
1 2 3 4 5
1 1 1 1 1

Output
0

-----Note-----

In the first example, it is possible to find three publications of the second type, which will take 6 seconds.

In the second example, all news categories contain a different number of publications.


This is an easier version of the problem. In this version, $n \le 500$.

Vasya is an experienced developer of programming competitions' problems. As all great minds at some time, Vasya faced a creative crisis. To improve the situation, Petya gifted him a string consisting of opening and closing brackets only. Petya believes, that the beauty of the bracket string is a number of its cyclical shifts, which form a correct bracket sequence.

To digress from his problems, Vasya decided to select two positions of the string (not necessarily distinct) and swap characters located at this positions with each other. Vasya will apply this operation exactly once. He is curious what is the maximum possible beauty he can achieve this way. Please help him.

We remind that bracket sequence $s$ is called correct if:   $s$ is empty;  $s$ is equal to "($t$)", where $t$ is correct bracket sequence;  $s$ is equal to $t_1 t_2$, i.e. concatenation of $t_1$ and $t_2$, where $t_1$ and $t_2$ are correct bracket sequences.

For example, "(()())", "()" are correct, while ")(" and "())" are not.

The cyclical shift of the string $s$ of length $n$ by $k$ ($0 \leq k < n$) is a string formed by a concatenation of the last $k$ symbols of the string $s$ with the first $n - k$ symbols of string $s$. For example, the cyclical shift of string "(())()" by $2$ equals "()(())".

Cyclical shifts $i$ and $j$ are considered different, if $i \ne j$.

-----Input-----

The first line contains an integer $n$ ($1 \le n \le 500$), the length of the string.

The second line contains a string, consisting of exactly $n$ characters, where each of the characters is either "(" or ")".

-----Output-----

The first line should contain a single integer — the largest beauty of the string, which can be achieved by swapping some two characters.

The second line should contain integers $l$ and $r$ ($1 \leq l, r \leq n$) — the indices of two characters, which should be swapped in order to maximize the string's beauty.

In case there are several possible swaps, print any of them.

-----Examples-----
Input
10
()()())(()

Output
5
8 7

Input
12
)(()(()())()

Output
4
5 10

Input
6
)))(()

Output
0
1 1

-----Note-----

In the first example, we can swap $7$-th and $8$-th character, obtaining a string "()()()()()". The cyclical shifts by $0, 2, 4, 6, 8$ of this string form a correct bracket sequence.

In the second example, after swapping $5$-th and $10$-th character, we obtain a string ")(())()()(()". The cyclical shifts by $11, 7, 5, 3$ of this string form a correct bracket sequence.

In the third example, swap of any two brackets results in $0$ cyclical shifts being correct bracket sequences.


Modern text editors usually show some information regarding the document being edited. For example, the number of words, the number of pages, or the number of characters.

In this problem you should implement the similar functionality.

You are given a string which only consists of:  uppercase and lowercase English letters,  underscore symbols (they are used as separators),  parentheses (both opening and closing).

It is guaranteed that each opening parenthesis has a succeeding closing parenthesis. Similarly, each closing parentheses has a preceding opening parentheses matching it. For each pair of matching parentheses there are no other parenthesis between them. In other words, each parenthesis in the string belongs to a matching "opening-closing" pair, and such pairs can't be nested.

For example, the following string is valid: "_Hello_Vasya(and_Petya)__bye_(and_OK)".

Word is a maximal sequence of consecutive letters, i.e. such sequence that the first character to the left and the first character to the right of it is an underscore, a parenthesis, or it just does not exist. For example, the string above consists of seven words: "Hello", "Vasya", "and", "Petya", "bye", "and" and "OK". Write a program that finds:  the length of the longest word outside the parentheses (print 0, if there is no word outside the parentheses),  the number of words inside the parentheses (print 0, if there is no word inside the parentheses).

-----Input-----

The first line of the input contains a single integer n (1 ≤ n ≤ 255) — the length of the given string. The second line contains the string consisting of only lowercase and uppercase English letters, parentheses and underscore symbols.

-----Output-----

Print two space-separated integers:  the length of the longest word outside the parentheses (print 0, if there is no word outside the parentheses),  the number of words inside the parentheses (print 0, if there is no word inside the parentheses).

-----Examples-----
Input
37
_Hello_Vasya(and_Petya)__bye_(and_OK)

Output
5 4

Input
37
_a_(_b___c)__de_f(g_)__h__i(j_k_l)m__

Output
2 6

Input
27
(LoooonG)__shOrt__(LoooonG)

Output
5 2

Input
5
(___)

Output
0 0

-----Note-----

In the first sample, the words "Hello", "Vasya" and "bye" are outside any of the parentheses, and the words "and", "Petya", "and" and "OK" are inside. Note, that the word "and" is given twice and you should count it twice in the answer.


You are given two arrays $a_1, a_2, \dots , a_n$ and $b_1, b_2, \dots , b_m$. Array $b$ is sorted in ascending order ($b_i < b_{i + 1}$ for each $i$ from $1$ to $m - 1$).

You have to divide the array $a$ into $m$ consecutive subarrays so that, for each $i$ from $1$ to $m$, the minimum on the $i$-th subarray is equal to $b_i$. Note that each element belongs to exactly one subarray, and they are formed in such a way: the first several elements of $a$ compose the first subarray, the next several elements of $a$ compose the second subarray, and so on.

For example, if $a = [12, 10, 20, 20, 25, 30]$ and $b = [10, 20, 30]$ then there are two good partitions of array $a$:   $[12, 10, 20], [20, 25], [30]$;  $[12, 10], [20, 20, 25], [30]$.

You have to calculate the number of ways to divide the array $a$. Since the number can be pretty large print it modulo 998244353.

-----Input-----

The first line contains two integers $n$ and $m$ ($1 \le n, m \le 2 \cdot 10^5$) — the length of arrays $a$ and $b$ respectively.

The second line contains $n$ integers $a_1, a_2, \dots , a_n$ ($1 \le a_i \le 10^9$) — the array $a$.

The third line contains $m$ integers $b_1, b_2, \dots , b_m$ ($1 \le b_i \le 10^9; b_i < b_{i+1}$) — the array $b$.

-----Output-----

In only line print one integer — the number of ways to divide the array $a$ modulo 998244353.

-----Examples-----
Input
6 3
12 10 20 20 25 30
10 20 30

Output
2

Input
4 2
1 3 3 7
3 7

Output
0

Input
8 2
1 2 2 2 2 2 2 2
1 2

Output
7


You are given a square board, consisting of $n$ rows and $n$ columns. Each tile in it should be colored either white or black.

Let's call some coloring beautiful if each pair of adjacent rows are either the same or different in every position. The same condition should be held for the columns as well.

Let's call some coloring suitable if it is beautiful and there is no rectangle of the single color, consisting of at least $k$ tiles.

Your task is to count the number of suitable colorings of the board of the given size.

Since the answer can be very large, print it modulo $998244353$.

-----Input-----

A single line contains two integers $n$ and $k$ ($1 \le n \le 500$, $1 \le k \le n^2$) — the number of rows and columns of the board and the maximum number of tiles inside the rectangle of the single color, respectively.

-----Output-----

Print a single integer — the number of suitable colorings of the board of the given size modulo $998244353$.

-----Examples-----
Input
1 1

Output
0

Input
2 3

Output
6

Input
49 1808

Output
359087121

-----Note-----

Board of size $1 \times 1$ is either a single black tile or a single white tile. Both of them include a rectangle of a single color, consisting of $1$ tile.

Here are the beautiful colorings of a board of size $2 \times 2$ that don't include rectangles of a single color, consisting of at least $3$ tiles: [Image]

The rest of beautiful colorings of a board of size $2 \times 2$ are the following: [Image]


There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i.
You are choosing K among these N pieces to eat.
Your "satisfaction" here will be calculated as follows:
 - The satisfaction is the sum of the "base total deliciousness" and the "variety bonus".
 - The base total deliciousness is the sum of the deliciousness of the pieces you eat.
 - The variety bonus is x*x, where x is the number of different kinds of toppings of the pieces you eat.
You want to have as much satisfaction as possible.
Find this maximum satisfaction.

-----Constraints-----
 - 1 \leq K \leq N  \leq 10^5
 - 1 \leq t_i \leq N
 - 1 \leq d_i \leq 10^9
 - All values in input are integers.

-----Input-----
Input is given from Standard Input in the following format:
N K
t_1 d_1
t_2 d_2
.
.
.
t_N d_N

-----Output-----
Print the maximum satisfaction that you can obtain.

-----Sample Input-----
5 3
1 9
1 7
2 6
2 5
3 1

-----Sample Output-----
26

If you eat Sushi 1,2 and 3:
 - The base total deliciousness is 9+7+6=22.
 - The variety bonus is 2*2=4.
Thus, your satisfaction will be 26, which is optimal.


E869120 is initially standing at the origin (0, 0) in a two-dimensional plane.
He has N engines, which can be used as follows:
 - When E869120 uses the i-th engine, his X- and Y-coordinate change by x_i and y_i, respectively. In other words, if E869120 uses the i-th engine from coordinates (X, Y), he will move to the coordinates (X + x_i, Y + y_i).
 - E869120 can use these engines in any order, but each engine can be used at most once. He may also choose not to use some of the engines.
He wants to go as far as possible from the origin.
Let (X, Y) be his final coordinates. Find the maximum possible value of \sqrt{X^2 + Y^2}, the distance from the origin.

-----Constraints-----
 - 1 \leq N \leq 100
 - -1 \ 000 \ 000 \leq x_i \leq 1 \ 000 \ 000
 - -1 \ 000 \ 000 \leq y_i \leq 1 \ 000 \ 000
 - All values in input are integers.

-----Input-----
Input is given from Standard Input in the following format:
N
x_1 y_1
x_2 y_2
 : :
x_N y_N

-----Output-----
Print the maximum possible final distance from the origin, as a real value.
Your output is considered correct when the relative or absolute error from the true answer is at most 10^{-10}.

-----Sample Input-----
3
0 10
5 -5
-5 -5

-----Sample Output-----
10.000000000000000000000000000000000000000000000000

The final distance from the origin can be 10 if we use the engines in one of the following three ways:
 - Use Engine 1 to move to (0, 10).
 - Use Engine 2 to move to (5, -5), and then use Engine 3 to move to (0, -10).
 - Use Engine 3 to move to (-5, -5), and then use Engine 2 to move to (0, -10).
The distance cannot be greater than 10, so the maximum possible distance is 10.


Special Agent Smart Beaver works in a secret research department of ABBYY. He's been working there for a long time and is satisfied with his job, as it allows him to eat out in the best restaurants and order the most expensive and exotic wood types there.

The content special agent has got an important task: to get the latest research by British scientists on the English Language. These developments are encoded and stored in a large safe. The Beaver's teeth are strong enough, so the authorities assured that upon arriving at the place the beaver won't have any problems with opening the safe.

And he finishes his aspen sprig and leaves for this important task. Of course, the Beaver arrived at the location without any problems, but alas. He can't open the safe with his strong and big teeth. At this point, the Smart Beaver get a call from the headquarters and learns that opening the safe with the teeth is not necessary, as a reliable source has sent the following information: the safe code consists of digits and has no leading zeroes. There also is a special hint, which can be used to open the safe. The hint is string s with the following structure:

  if s_{i} = "?", then the digit that goes i-th in the safe code can be anything (between 0 to 9, inclusively);  if s_{i} is a digit (between 0 to 9, inclusively), then it means that there is digit s_{i} on position i in code;  if the string contains letters from "A" to "J", then all positions with the same letters must contain the same digits and the positions with distinct letters must contain distinct digits.  The length of the safe code coincides with the length of the hint.

For example, hint "?JGJ9" has such matching safe code variants: "51919", "55959", "12329", "93539" and so on, and has wrong variants such as: "56669", "00111", "03539" and "13666".

After receiving such information, the authorities change the plan and ask the special agents to work quietly and gently and not to try to open the safe by mechanical means, and try to find the password using the given hint.

At a special agent school the Smart Beaver was the fastest in his platoon finding codes for such safes, but now he is not in that shape: the years take their toll ... Help him to determine the number of possible variants of the code to the safe, matching the given hint. After receiving this information, and knowing his own speed of entering codes, the Smart Beaver will be able to determine whether he will have time for tonight's show "Beavers are on the trail" on his favorite TV channel, or he should work for a sleepless night...

-----Input-----

The first line contains string s — the hint to the safe code. String s consists of the following characters: ?, 0-9, A-J. It is guaranteed that the first character of string s doesn't equal to character 0.

The input limits for scoring 30 points are (subproblem A1):   1 ≤ |s| ≤ 5.

The input limits for scoring 100 points are (subproblems A1+A2):   1 ≤ |s| ≤ 10^5.

Here |s| means the length of string s.

-----Output-----

Print the number of codes that match the given hint.

-----Examples-----
Input
AJ

Output
81

Input
1?AA

Output
100


Ivan has an array consisting of n elements. Each of the elements is an integer from 1 to n.

Recently Ivan learned about permutations and their lexicographical order. Now he wants to change (replace) minimum number of elements in his array in such a way that his array becomes a permutation (i.e. each of the integers from 1 to n was encountered in his array exactly once). If there are multiple ways to do it he wants to find the lexicographically minimal permutation among them.

Thus minimizing the number of changes has the first priority, lexicographical minimizing has the second priority.

In order to determine which of the two permutations is lexicographically smaller, we compare their first elements. If they are equal — compare the second, and so on. If we have two permutations x and y, then x is lexicographically smaller if x_{i} < y_{i}, where i is the first index in which the permutations x and y differ.

Determine the array Ivan will obtain after performing all the changes.

-----Input-----

The first line contains an single integer n (2 ≤ n ≤ 200 000) — the number of elements in Ivan's array.

The second line contains a sequence of integers a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ n) — the description of Ivan's array.

-----Output-----

In the first line print q — the minimum number of elements that need to be changed in Ivan's array in order to make his array a permutation. In the second line, print the lexicographically minimal permutation which can be obtained from array with q changes.

-----Examples-----
Input
4
3 2 2 3

Output
2
1 2 4 3

Input
6
4 5 6 3 2 1

Output
0
4 5 6 3 2 1

Input
10
6 8 4 6 7 1 6 3 4 5

Output
3
2 8 4 6 7 1 9 3 10 5

-----Note-----

In the first example Ivan needs to replace number three in position 1 with number one, and number two in position 3 with number four. Then he will get a permutation [1, 2, 4, 3] with only two changed numbers — this permutation is lexicographically minimal among all suitable.

In the second example Ivan does not need to change anything because his array already is a permutation.


Vasya is going to the Olympics in the city Ntown by train. The boy wants to read the textbook to prepare for the Olympics. He counted that he needed k hours for this. He also found that the light in the train changes every hour. The light is measured on a scale from 0 to 100, where 0 is very dark, and 100 is very light.

Vasya has a train lighting schedule for all n hours of the trip — n numbers from 0 to 100 each (the light level in the first hour, the second hour and so on). During each of those hours he will either read the whole time, or not read at all. He wants to choose k hours to read a book, not necessarily consecutive, so that the minimum level of light among the selected hours were maximum. Vasya is very excited before the upcoming contest, help him choose reading hours.

-----Input-----

The first input line contains two integers n and k (1 ≤ n ≤ 1000, 1 ≤ k ≤ n) — the number of hours on the train and the number of hours to read, correspondingly. The second line contains n space-separated integers a_{i} (0 ≤ a_{i} ≤ 100), a_{i} is the light level at the i-th hour.

-----Output-----

In the first output line print the minimum light level Vasya will read at. In the second line print k distinct space-separated integers b_1, b_2, ..., b_{k}, — the indexes of hours Vasya will read at (1 ≤ b_{i} ≤ n). The hours are indexed starting from 1. If there are multiple optimal solutions, print any of them. Print the numbers b_{i} in an arbitrary order.

-----Examples-----
Input
5 3
20 10 30 40 10

Output
20
1 3 4

Input
6 5
90 20 35 40 60 100

Output
35
1 3 4 5 6

-----Note-----

In the first sample Vasya should read at the first hour (light 20), third hour (light 30) and at the fourth hour (light 40). The minimum light Vasya will have to read at is 20.


You are given a positive integer $n$ greater or equal to $2$. For every pair of integers $a$ and $b$ ($2 \le |a|, |b| \le n$), you can transform $a$ into $b$ if and only if there exists an integer $x$ such that $1 < |x|$ and ($a \cdot x = b$ or $b \cdot x = a$), where $|x|$ denotes the absolute value of $x$.

After such a transformation, your score increases by $|x|$ points and you are not allowed to transform $a$ into $b$ nor $b$ into $a$ anymore.

Initially, you have a score of $0$. You can start at any integer and transform it as many times as you like. What is the maximum score you can achieve?

-----Input-----

A single line contains a single integer $n$ ($2 \le n \le 100\,000$) — the given integer described above.

-----Output-----

Print an only integer — the maximum score that can be achieved with the transformations. If it is not possible to perform even a single transformation for all possible starting integers, print $0$.

-----Examples-----
Input
4

Output
8
Input
6

Output
28
Input
2

Output
0

-----Note-----

In the first example, the transformations are $2 \rightarrow 4 \rightarrow (-2) \rightarrow (-4) \rightarrow 2$.

In the third example, it is impossible to perform even a single transformation.