The first line of the input contains a single integer n (2 ≤ n ≤ 1 000 000) — the length of the paths. The second line of the input contains a string consisting of n - 1 characters (each of which is either 'N', 'E', 'S', or 'W') — the first grid path. The characters can be thought of as the sequence of moves needed to traverse the grid path. For example, the example path in the problem statement can be expressed by the string "NNESWW". The third line of the input contains a string of n - 1 characters (each of which is either 'N', 'E', 'S', or 'W') — the second grid path.

NoteIn the first sample, the first grid path is the one described in the statement. Moreover, the following sequence of moves will get both marbles to the end: NNESWWSWSW.In the second sample, no sequence of moves can get both marbles to the end.

Print "YES" (without quotes) if it is possible for both marbles to be at the end position at the same time. Print "NO" (without quotes) otherwise. In both cases, the answer is case-insensitive.

In the spirit of the holidays, Saitama has given Genos two grid paths of length n (a weird gift even by Saitama's standards). A grid path is an ordered sequence of neighbouring squares in an infinite grid. Two squares are neighbouring if they share a side.One example of a grid path is (0, 0) → (0, 1) → (0, 2) → (1, 2) → (1, 1) → (0, 1) → ( - 1, 1). Note that squares in this sequence might be repeated, i.e. path has self intersections.Movement within a grid path is restricted to adjacent squares within the sequence. That is, from the i-th square, one can only move to the (i - 1)-th or (i + 1)-th squares of this path. Note that there is only a single valid move from the first and last squares of a grid path. Also note, that even if there is some j-th square of the path that coincides with the i-th square, only moves to (i - 1)-th and (i + 1)-th squares are available. For example, from the second square in the above sequence, one can only move to either the first or third squares.To ensure that movement is not ambiguous, the two grid paths will not have an alternating sequence of three squares. For example, a contiguous subsequence (0, 0) → (0, 1) → (0, 0) cannot occur in a valid grid path.One marble is placed on the first square of each grid path. Genos wants to get both marbles to the last square of each grid path. However, there is a catch. Whenever he moves one marble, the other marble will copy its movement if possible. For instance, if one marble moves east, then the other marble will try and move east as well. By try, we mean if moving east is a valid move, then the marble will move east.Moving north increases the second coordinate by 1, while moving south decreases it by 1. Similarly, moving east increases first coordinate by 1, while moving west decreases it.Given these two valid grid paths, Genos wants to know if it is possible to move both marbles to the ends of their respective paths. That is, if it is possible to move the marbles such that both marbles rest on the last square of their respective paths.

Input:
7
NNESWW
SWSWSW

Output: YES

Input:
3
NN
SS

Output: NO

Input:
3
ES
NW

Output: NO

Input:
5
WSSE
WNNE

Output: NO

Input:
2
E
E

Output: YES

Input:
2
W
S

Output: YES

Input:
2
S
N

Output: NO

Output: NO

Output: YES

Output: NO

Output: YES

Output: NO

Output: NO

Output: YES

Output: YES

Output: NO

Output: NO

Output: NO

Output: NO

Output: NO

Output: NO

Output: YES

Output: NO

Output: YES

Output: NO

Output: YES

Output: NO

Output: YES

Output: NO

Output: YES

Output: NO

Output: YES

Output: NO

Output: YES

Output: NO

Output: YES

Output: NO

Input:
11
WWNNNNWNWN
ENWSWWSSEE

Output: YES

Output: NO

Input:
12
WNNWSWWSSSE
NESWNNNWSSS

Output: YES


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.

NoteIn 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.

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).

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:
37
_Hello_Vasya(and_Petya)__bye_(and_OK)

Output:
5
4

Output: 5 4

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

Output: 2 6

Output:
2
6

Input:
27
(LoooonG)__shOrt__(LoooonG)

Output: 5 2

Output:
5
2

Input:
5
(___)

Output: 0 0

Output:
0
0

Output: 0 0

Output:
0
0

Input:
14
Q(___)_u(_U)HG

Output: 2 1

Output:
2
1

Input:
50
_F_()___(____q)H_(__)__(_____p________o_)__Bz()___

Output: 2 3

Output:
2
3

Input:
10
dJ_R_____K

Output: 2 0

Output:
2
0

Input:
20
m(_)jzay()s()d()T(M)

Output:
4
1

Output: 4 1

Input:
50
()()W()g_(EEX)UADba(R)()TD(L)X(Aub)DN(a)(YYJXNgyK)

Output:
5
6

Output: 5 6

Input:
80
_____(_____k_____q____N)(e___sM__pf___)_(___g_____)__V_n___________z(__)__(___)U

Output: 1 7

Output:
1
7

Input:
100
FE_i_UhQF_oIh(v__qf)WVa_gND___caHkdU(_WP_Kxm__WEIn_KZLBS)_XDwNnR_c(_Pv_A)LXO__GEd_R_bTP_hAnZ_____sDL

Output: 6 8

Output:
6
8

Input:
150
jUcWddnQOXvZcdiQm_ngFnpbXyQCIzHHwU(KHNQPMDPFkoihdhZAthjelfgAHS_tco_JwgEFu)q_WLbNsZgQLJFFX_vAOClrvJQm_XWhHDOP_aMT_RuCFsegLgwQbI_FTJPfIHwmpr_jrtbiTsiIaX

Output: 17 3

Output:
17
3

Output: 1 1

Output:
1
1

Output:
2
17

Output: 2 17

Output: 32 7

Output:
32
7

Output: 3 45

Output:
3
45

Output: 10 25

Output:
10
25

Output:
20
17

Output: 20 17

Output:
2
20

Output: 2 20

Output: 6 31

Output:
6
31

Output: 4 20

Output:
4
20

Output:
3
29

Output: 3 29

Output: 3 17

Output:
3
17

Output:
1
0

Output: 1 0

Output:
5
30

Output: 5 30

Output:
255
0

Output: 255 0

Output: 0 1

Output:
0
1

Output:
0
127

Output: 0 127

Input:
1
_

Output: 0 0

Output:
0
0

Input:
1
a

Output:
1
0

Output: 1 0

Input:
2
()

Output: 0 0

Output:
0
0

Input:
2
ad

Output: 2 0

Output:
2
0

Input:
2
_a

Output:
1
0

Output: 1 0

Input:
2
q_

Output:
1
0

Output: 1 0

Input:
3
(_)

Output: 0 0

Output:
0
0

Input:
3
(a)

Output: 0 1

Output:
0
1

Input:
3
q_z

Output:
1
0

Output: 1 0

Input:
6
a(al)a

Output: 1 1

Output:
1
1

Input:
10
a(a)aa(a)a

Output:
2
2

Output: 2 2

Input:
5
()abc

Output:
3
0

Output: 3 0


The input consists of two lines, each of them containing the name of exactly one day of the week. It's guaranteed that each string in the input is from the set "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday".

NoteIn the second sample, one can consider February 1 and March 1 of year 2015. Both these days were Sundays.In the third sample, one can consider July 1 and August 1 of year 2017. First of these two days is Saturday, while the second one is Tuesday.

Print "YES" (without quotes) if such situation is possible during some non-leap year. Otherwise, print "NO" (without quotes).

You are given names of two days of the week.Please, determine whether it is possible that during some non-leap year the first day of some month was equal to the first day of the week you are given, while the first day of the next month was equal to the second day of the week you are given. Both months should belong to one year.In this problem, we consider the Gregorian calendar to be used. The number of months in this calendar is equal to 12. The number of days in months during any non-leap year is: 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31.Names of the days of the week are given with lowercase English letters: "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday".

Input:
monday
tuesday

Output: NO

Input:
sunday
sunday

Output: YES

Input:
saturday
tuesday

Output: YES

Input:
tuesday
thursday

Output: YES

Input:
friday
wednesday

Output: NO

Input:
sunday
saturday

Output: NO

Input:
monday
monday

Output: YES

Input:
monday
wednesday

Output: YES

Input:
monday
thursday

Output: YES

Input:
monday
friday

Output: NO

Input:
monday
saturday

Output: NO

Input:
monday
sunday

Output: NO

Input:
tuesday
monday

Output: NO

Input:
tuesday
tuesday

Output: YES

Input:
tuesday
wednesday

Output: NO

Input:
tuesday
friday

Output: YES

Input:
tuesday
saturday

Output: NO

Input:
tuesday
sunday

Output: NO

Input:
wednesday
monday

Output: NO

Input:
wednesday
tuesday

Output: NO

Input:
wednesday
wednesday

Output: YES

Input:
wednesday
thursday

Output: NO

Input:
wednesday
friday

Output: YES

Input:
wednesday
saturday

Output: YES

Input:
wednesday
sunday

Output: NO

Input:
thursday
monday

Output: NO

Input:
thursday
tuesday

Output: NO

Input:
thursday
wednesday

Output: NO

Input:
thursday
thursday

Output: YES

Input:
thursday
friday

Output: NO

Input:
thursday
saturday

Output: YES

Input:
thursday
sunday

Output: YES

Input:
friday
monday

Output: YES

Input:
friday
tuesday

Output: NO

Input:
friday
thursday

Output: NO

Input:
friday
saturday

Output: NO

Input:
friday
sunday

Output: YES

Input:
saturday
monday

Output: YES

Input:
saturday
wednesday

Output: NO

Input:
saturday
thursday

Output: NO

Input:
saturday
friday

Output: NO

Input:
saturday
saturday

Output: YES

Input:
saturday
sunday

Output: NO

Input:
sunday
monday

Output: NO

Input:
sunday
tuesday

Output: YES

Input:
sunday
wednesday

Output: YES

Input:
sunday
thursday

Output: NO

Input:
sunday
friday

Output: NO

Input:
friday
friday

Output: YES


The single line of the input contains three integers n, d and mod (1 ≤ n ≤ 1000, 2 ≤ d ≤ 10, 108 ≤ mod ≤ 109)  — the number of vertices in the tree, the degree of internal vertices and the prime modulo.

Print the number of trees over the modulo mod.

A tree is a connected graph without cycles.Two trees, consisting of n vertices each, are called isomorphic if there exists a permutation p: {1, ..., n} → {1, ..., n} such that the edge (u, v) is present in the first tree if and only if the edge (pu, pv) is present in the second tree.Vertex of the tree is called internal if its degree is greater than or equal to two.Count the number of different non-isomorphic trees, consisting of n vertices, such that the degree of each internal vertex is exactly d. Print the answer over the given prime modulo mod.

Input: 5 2 433416647

Output: 1

Input: 10 3 409693891

Output: 2

Input: 65 4 177545087

Output: 910726

Input: 2 2 434448163

Output: 1

Input: 2 3 434448163

Output: 1

Input: 2 4 434448163

Output: 1

Input: 2 5 434448163

Output: 1

Input: 180 3 434448163

Output: 106622108

Input: 104 7 434448163

Output: 47207

Input: 106 9 434448163

Output: 1296

Input: 1 4 904448911

Output: 1

Input: 2 6 904448911

Output: 1

Input: 2 7 904448911

Output: 1

Input: 2 8 904448911

Output: 1

Input: 102 4 904448911

Output: 0

Input: 2 9 904448911

Output: 1

Input: 2 10 904448911

Output: 1

Input: 100 2 944036243

Output: 1

Input: 101 4 944036243

Output: 467334192

Input: 102 5 944036243

Output: 74266477

Input: 102 6 944036243

Output: 748711

Input: 100 8 944036243

Output: 3128

Input: 101 10 944036243

Output: 235

Input: 1 2 727733989

Output: 1

Input: 1 3 727733989

Output: 1

Input: 1 5 727733989

Output: 1

Input: 1 6 727733989

Output: 1

Input: 1 7 727733989

Output: 1

Input: 1 8 727733989

Output: 1

Input: 1 9 837744727

Output: 1

Input: 1 10 837744727

Output: 1

Input: 999 3 837744727

Output: 0

Input: 1000 5 970400047

Output: 0

Input: 1000 6 970400047

Output: 0

Input: 1000 7 970400047

Output: 0

Input: 1000 8 750160753

Output: 0

Input: 1000 9 750160753

Output: 0

Input: 1000 10 750160753

Output: 0

Input: 1000 2 750160753

Output: 1

Input: 1000 3 750160753

Output: 16572167

Input: 998 4 817408561

Output: 443073705

Input: 998 5 680633279

Output: 233182629

Input: 997 6 680633279

Output: 148277591

Input: 998 7 930423869

Output: 167343048

Input: 996 8 990767311

Output: 350615945

Input: 994 9 390528763

Output: 211625777

Input: 992 10 762763321

Output: 571064998

Input: 983 10 762763321

Output: 663665406

Input: 989 8 990767311

Output: 976760285

Input: 992 6 680633279

Output: 451750559

Input: 995 4 817408561

Output: 36421881

Input: 999 2 750160753

Output: 1


The first line of the input contains a positive integer n (1 ≤ n ≤ 2·109) — the length of Pasha's stick.

NoteThere is only one way to divide the stick in the first sample {1, 1, 2, 2}.Four ways to divide the stick in the second sample are {1, 1, 9, 9}, {2, 2, 8, 8}, {3, 3, 7, 7} and {4, 4, 6, 6}. Note that {5, 5, 5, 5} doesn't work.

The output should contain a single integer — the number of ways to split Pasha's stick into four parts of positive integer length so that it's possible to make a rectangle by connecting the ends of these parts, but is impossible to form a square.

Pasha has a wooden stick of some positive integer length n. He wants to perform exactly three cuts to get four parts of the stick. Each part must have some positive integer length and the sum of these lengths will obviously be n. Pasha likes rectangles but hates squares, so he wonders, how many ways are there to split a stick into four parts so that it's possible to form a rectangle using these parts, but is impossible to form a square.Your task is to help Pasha and count the number of such ways. Two ways to cut the stick are considered distinct if there exists some integer x, such that the number of parts of length x in the first way differ from the number of parts of length x in the second way.


The only line of the input is in one of the following two formats:    "x of week" where x (1 ≤ x ≤ 7) denotes the day of the week. The 1-st day is Monday and the 7-th one is Sunday.  "x of month" where x (1 ≤ x ≤ 31) denotes the day of the month.

NotePolar bears use the Gregorian calendar. It is the most common calendar and you likely use it too. You can read about it on Wikipedia if you want to – https://en.wikipedia.org/wiki/Gregorian_calendar. The week starts with Monday.In the first sample Limak wants to save one candy on each Thursday (the 4-th day of the week). There are 52 Thursdays in the 2016. Thus, he will save 52 candies in total.In the second sample Limak wants to save one candy on the 30-th day of each month. There is the 30-th day in exactly 11 months in the 2016 — all months but February. It means that Limak will save 11 candies in total.

Print one integer — the number of candies Limak will save in the year 2016.

Today is Wednesday, the third day of the week. What's more interesting is that tomorrow is the last day of the year 2015.Limak is a little polar bear. He enjoyed this year a lot. Now, he is so eager to the coming year 2016.Limak wants to prove how responsible a bear he is. He is going to regularly save candies for the entire year 2016! He considers various saving plans. He can save one candy either on some fixed day of the week or on some fixed day of the month.Limak chose one particular plan. He isn't sure how many candies he will save in the 2016 with his plan. Please, calculate it and tell him.

Input: 4 of week

Output: 52

Input: 30 of month

Output: 11

Input: 17 of month

Output: 12

Input: 31 of month

Output: 7

Input: 6 of week

Output: 53

Input: 1 of week

Output: 52

Input: 2 of week

Output: 52

Input: 3 of week

Output: 52

Input: 5 of week

Output: 53

Input: 7 of week

Output: 52

Input: 1 of month

Output: 12

Input: 2 of month

Output: 12

Input: 3 of month

Output: 12

Input: 4 of month

Output: 12

Input: 5 of month

Output: 12

Input: 6 of month

Output: 12

Input: 7 of month

Output: 12

Input: 8 of month

Output: 12

Input: 9 of month

Output: 12

Input: 10 of month

Output: 12

Input: 11 of month

Output: 12

Input: 12 of month

Output: 12

Input: 13 of month

Output: 12

Input: 14 of month

Output: 12

Input: 15 of month

Output: 12

Input: 16 of month

Output: 12

Input: 18 of month

Output: 12

Input: 19 of month

Output: 12

Input: 20 of month

Output: 12

Input: 21 of month

Output: 12

Input: 22 of month

Output: 12

Input: 23 of month

Output: 12

Input: 24 of month

Output: 12

Input: 25 of month

Output: 12

Input: 26 of month

Output: 12

Input: 27 of month

Output: 12

Input: 28 of month

Output: 12

Input: 29 of month

Output: 12


The only line of the input contains integer n (0 ≤ n ≤ 1018) — the number of Ayrat's moves.

Print two integers x and y — current coordinates of Ayrat coordinates.

Ayrat is looking for the perfect code. He decided to start his search from an infinite field tiled by hexagons. For convenience the coordinate system is introduced, take a look at the picture to see how the coordinates of hexagon are defined:   Ayrat is searching through the field. He started at point (0, 0) and is moving along the spiral (see second picture). Sometimes he forgets where he is now. Help Ayrat determine his location after n moves.

Output: -2 0

Output: 3 2

Output: 5 6

Output: -2 -4

Output: 8 8

Output: 8 0

Output: 8 0

Output: 7 -2

Output: 154 -492

Output: -33 806

Output: 13 -214

Output: -769 562

Output: -418284973 -1154700538

Output: 414 1068

Output: 458 -20

Output: -797 -222

Output: 21108 9228

Output: 27596 -17836

Output: 1516 17472

Output: 27776 16488

Output: 22704 -27064

Output: 4864 384

Output: 2815 18250

Output: 8695 33702

Output: -15591 -36122

Output: 31404 5384

Output: 11555 -17054

Output: 0 0

Output: 1 2

Output: -1 2

Output: -2 0

Output: -1 -2

Output: 1 -2

Output: 2 0

Output: 3 2

Output: 2 4

Output: 0 4

Output: -2 4

Output: -3 2

Output: -4 0

Output: -3 -2

Output: -2 -4

Output: 0 -4

Output: 2 -4

Output: 3 -2

Output: 4 0

Output: 5 2

Output: 4 4

Output: 3 6

Output: 1 6

Output: -1 6

Output: -3 6

Output: -4 4

Output: -5 2

Output: -6 0

Output: -5 -2

Output: -4 -4

Output: -3 -6

Output: -53995102 -586455096

Output: -438664202 297458800

Output: -252460838 -588330600

Output: -423141322 332249584

Output: -164822562 -590200144

Output: 439863347 302538706

Output: -378326148 -427475264

Output: 200309780 592993400

Output: 489196540 209450068

Output: -794841963 -444342246

Output: -623135314 -788838484

Output: -328249537 -1018095738

Output: -719067659 -599137942

Output: -637165825 764022826

Output: 559082192 -921270732

Output: 7343027 1020257594

Output: -707743686 626107308

Output: 797020774 -448632052

Output: 604133660 -835484644

Output: -264428508 -626474244

Output: -107643660 215287324

Output: -287379568 574759144

Output: 344296355 2

Output: 146851396 293702780

Output: 31620002 63239992

Output: -422711816 4

Output: -96124517 -192249026

Output: -275860421 551720850

Output: -911192665 10

Output: 357225613 714451226

Output: -483988434 8

Output: -421730125 843460258

Output: -306498737 -612997466

Output: -281201952 -562403896

Output: -331941110 4

Output: -691412929 6

Output: -25442382 -50884744

Output: 820421960 -4

Output: 179893783 -2

Output: -380112498 8

Output: 74824856 -149649712

Output: -509121532 4

Output: 868593352 0

Output: -114032591 -228065170

Output: 498801191 -997602386

Output: 178537107 357074206

Output: 358273010 -716546028

Output: 486083238 -4

Output: -422777531 845555062

Output: 45773778 4

Output: 407655496 -815310984

Output: 382358709 -764717418

Output: 534254630 0

Output: -446863220 893726452

Output: -331631832 663263664

Output: 306335045 612670094

Output: 191103653 382207306

Output: 370839563 741679126

Output: -255608161 511216338

Output: -355717526 711435056

Output: 240486136 480972264

Output: -430378693 10

Output: 99957958 199915904

Output: -279693865 559387730

Output: -459429777 -918859546

Output: -139165682 278331372

Output: 23934291 -47868582

Output: 203670197 -407340402

Output: -383406115 -766812218

Output: 852579099 -2

Output: -430378698 0

Output: -215189349 -430378698

Output: 1 2

Output: -1 2

Output: -1 -2

Output: 1 -2

Output: 2 0


The first line of the input contains an integer x (1 ≤ x ≤ 1 000 000) — The coordinate of the friend's house.

NoteIn the first sample the elephant needs to make one step of length 5 to reach the point x.In the second sample the elephant can get to point x if he moves by 3, 5 and 4. There are other ways to get the optimal answer but the elephant cannot reach x in less than three moves.

Print the minimum number of steps that elephant needs to make to get from point 0 to point x.

An elephant decided to visit his friend. It turned out that the elephant's house is located at point 0 and his friend's house is located at point x(x > 0) of the coordinate line. In one step the elephant can move 1, 2, 3, 4 or 5 positions forward. Determine, what is the minimum number of steps he need to make in order to get to his friend's house.


The first line of the input contains integer n (1 ≤ n ≤ 100) — the number of pieces in the chocolate bar. The second line contains n integers ai (0 ≤ ai ≤ 1), where 0 represents a piece without the nut and 1 stands for a piece with the nut.

NoteIn the first sample there is exactly one nut, so the number of ways equals 1 — Bob shouldn't make any breaks.In the second sample you can break the bar in four ways:10|10|11|010|110|1|011|01|01

Print the number of ways to break the chocolate into multiple parts so that each part would contain exactly one nut.

Bob loves everything sweet. His favorite chocolate bar consists of pieces, each piece may contain a nut. Bob wants to break the bar of chocolate into multiple pieces so that each part would contain exactly one nut and any break line goes between two adjacent pieces.You are asked to calculate the number of ways he can do it. Two ways to break chocolate are considered distinct if one of them contains a break between some two adjacent pieces and the other one doesn't. Please note, that if Bob doesn't make any breaks, all the bar will form one piece and it still has to have exactly one nut.

Input:
3
0 1 0

Output: 1

Input:
5
1 0 1 0 1

Output: 4

Input:
10
0 0 1 0 0 0 1 1 0 1

Output: 8

Input:
20
0 0 0 0 1 1 1 0 1 0 0 1 0 1 1 0 1 1 1 0

Output: 24

Input:
50
0 1 1 1 1 1 1 0 1 1 0 1 1 1 0 0 1 0 1 1 0 1 0 0 1 1 1 1 1 1 0 1 1 0 0 0 1 0 0 0 0 1 0 1 1 0 0 0 0 0

Output: 11520

Input:
99
0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 1 1 1 1 1 1 0 1 0 1 1 0 1 1 1 0 0 0 0 0 1 1 0 1 0 0 0 1 0 1 1 0 1 1 0 0 0 1 0 1 0 0 0 0 1 1 1 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Output: 17694720

Input:
1
0

Output: 0

Input:
100
1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1

Output: 5559060566555523

Input:
41
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Output: 0

Input:
100
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Output: 0

Input:
1
1

Output: 1

Input:
18
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Output: 1

Input:
100
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Output: 1

Input:
10
0 1 0 0 0 0 1 0 0 1

Output: 15

Input:
10
1 1 0 0 0 1 1 1 1 0

Output: 4

Input:
50
1 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1 0 0 0 1 0 0 1 0 1 0 1 0 0 1 0 1 0 0 1 0 1 1 1

Output: 186624

Input:
50
0 0 1 1 0 0 0 1 0 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 1 0 0 0 0 1 0 1 1 1 1 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1

Output: 122880

Input:
99
1 1 1 1 0 1 0 1 0 0 0 1 1 0 0 1 0 1 0 1 1 0 0 1 0 1 1 0 1 1 1 1 1 1 0 1 0 0 0 0 1 1 1 1 1 0 0 0 1 0 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 1 0 1 1 0 1 0 0 1 1 0 0 0 0 1 1 1 1 1 0 1 0 0 1 1 1 0 0

Output: 27869184000

Input:
99
1 0 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 0 0 1 0 0 1 0 1 0 0 0 1 1 0 0 0 1 0 1 1 1 0 0 1 1 1 1 1 0 1 0 0 1 0 0 1 1 1 0 1 1 0 0 1 0 1 1 1 0 1 0 0 0 1 0 1 1 0 1 0 1 1 0 0 1 0 0 1 1 1

Output: 123834728448

Input:
100
1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 0 0 0 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 1 0 0 1 1 1 0 1 1 0 0 0 0 1 0 0 1 1 0 0 0 0 0 1 0 1 0 1 0

Output: 773967052800

Input:
100
0 1 1 0 1 1 0 0 1 0 0 1 0 1 1 0 0 0 0 0 1 1 1 1 0 1 1 1 1 0 1 0 0 1 1 1 0 0 0 0 0 1 1 0 0 0 0 0 1 0 1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 1 1 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 1 1 0 1 0 1 1 1 0 1 1 0 1

Output: 38698352640

Input:
100
1 1 1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 1 1 1 1 1 0 0 1 0 1 1 1 1 0 1 0 1 0 0 1 0 0 1 1 1 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 1 1 1 1 1 1 1 0 1 0 0 0 1 0 1 0 1 1 1 0 1 1 1 0 1 1 0 1 0 0 1 0 0 0 1 0 0 1 0

Output: 72236924928

Input:
100
1 1 0 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1 0 0 1 0 0 1 0 0 1 1 0 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1 1 1 1 1 0 1 1 0 1 0 0 0 0 1 0 0 1 0 0 1 0 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1

Output: 58047528960

Input:
100
0 1 0 1 1 0 1 0 1 0 0 0 0 0 0 1 0 1 0 1 1 1 0 1 1 1 1 0 1 0 0 0 1 1 0 1 1 1 0 0 1 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 0 0 1 0 1 0 1 0 0 0 1 1 0 1 1 0 1 1 1 1 0

Output: 73987522560

Input:
100
1 1 0 1 1 0 0 1 0 1 0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 0 1 1 1 0 1 1 0 1 0 1 0 0 0 0 1 1 0 0 0 0 0 1 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 1 1 1 1 0 1 0 0 1 0 0 1 1 1 0 0 0 0 0 0 1 0 1 0 0 1 1 0 1 1 1 0 1 1 0

Output: 180592312320

Input:
100
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1

Output: 1900000000


Each of the three lines of the input contains two integers. The i-th line contains integers xi and yi ( - 109 ≤ xi, yi ≤ 109) — the coordinates of the i-th point. It is guaranteed that all points are distinct.

NoteThe variant of the polyline in the first sample:  The variant of the polyline in the second sample:  The variant of the polyline in the third sample:

Print a single number — the minimum possible number of segments of the polyline.

There are three points marked on the coordinate plane. The goal is to make a simple polyline, without self-intersections and self-touches, such that it passes through all these points. Also, the polyline must consist of only segments parallel to the coordinate axes. You are to find the minimum number of segments this polyline may consist of.

Input:
1 -1
1 1
1 2

Output: 1

Input:
-1 -1
-1 3
4 3

Output: 2

Input:
1 1
2 3
3 2

Output: 3

Input:
1000000000 -1000000000
1000000000 1000000000
-1000000000 -1000000000

Output: 2

Input:
-510073119 -991063686
583272581 -991063686
623462417 -991063686

Output: 1

Input:
-422276230 -422225325
-422276230 -544602611
-282078856 -544602611

Output: 2

Input:
127447697 -311048187
-644646254 135095006
127447697 135095006

Output: 2

Input:
-609937696 436598127
-189924209 241399893
-883780251 296798182

Output: 3

Input:
-931665727 768789996
234859675 808326671
-931665727 879145023

Output: 3

Input:
899431605 238425805
899431605 339067352
940909482 333612216

Output: 3

Input:
143495802 -137905447
-922193757 -660311216
-922193757 659147504

Output: 3

Input:
-759091260 362077211
-759091260 123892252
-79714253 226333388

Output: 3

Input:
-495060442 -389175621
79351129 -146107545
-495060442 59059286

Output: 3

Input:
-485581506 973584319
-762068259 670458753
-485581506 -661338021

Output: 3

Input:
-865523810 66779936
-865523810 879328244
551305309 495319633

Output: 3

Input:
-985816934 85994062
490801388 171721095
-985816934 265995176

Output: 3

Input:
-322848128 276304614
-228010033 -361111909
-137761352 276304614

Output: 3

Input:
648743183 -329867260
680098341 -988370978
594847608 -988370978

Output: 3

Input:
-636111887 -755135651
-411477790 -755135651
-540985255 -808506689

Output: 3

Input:
-280166733 -215262264
-257537874 640677716
-288509263 640677716

Output: 3

Input:
158219297 -796751401
464911767 780525998
25054022 780525998

Output: 3

Input:
-76151678 894169660
125930178 -434000890
259457432 894169660

Output: 3

Input:
403402592 55070913
-703565711 55070913
-141194091 -66977045

Output: 3

Input:
-485970125 725016060
-972748484 -602121312
183987969 -602121312

Output: 3

Input:
-494824697 -964138793
-494824697 671151995
-24543485 877798954

Output: 2

Input:
-504439520 685616264
-575788481 178485261
-575788481 -998856787

Output: 2

Input:
446038601 -598441655
446038601 -781335731
-446725217 -862937359

Output: 2

Input:
443336387 317738308
-731455437 682073969
443336387 -487472781

Output: 2

Input:
-954908844 156002304
-954908844 507051490
-377680300 878914758

Output: 2

Input:
437180709 -829478932
-775395571 -605325538
-775395571 298582830

Output: 2

Input:
791725263 -592101263
791725263 -401786481
953501658 -699705540

Output: 2

Input:
621619191 -223521454
621619191 -746436580
-886355353 -920817120

Output: 2

Input:
353770247 742032246
391091420 742032246
113505964 105784687

Output: 2

Input:
-386452587 -689699105
-51244121 425743943
736584134 425743943

Output: 2

Input:
-354329375 -222798859
-636793392 28344958
989602966 -222798859

Output: 2

Input:
439039590 -419754858
-16966935 -979701468
276072230 -979701468

Output: 2

Input:
-160622039 260994846
-981120537 -453711571
-899331084 260994846

Output: 2

Input:
755966021 -977934315
-693932164 -977934315
780740735 341305212

Output: 2

Input:
997183648 -430699196
555277138 -34246328
962365828 -34246328

Output: 2

Input:
394482565 -5842724
-120921456 -5842724
474336847 -666083693

Output: 2

Input:
451140644 -552066345
451140644 97091285
643901618 -552066345

Output: 2

Input:
-397991545 510063044
347795937 510063044
-397991545 944965447

Output: 2

Input:
361702696 891912906
742864513 891912906
361702696 616808838

Output: 2

Input:
950548287 766404840
995400182 976310818
950548287 976310818

Output: 2

Input:
512806478 -76305905
51445888 -189759697
512806478 -189759697

Output: 2

Input:
134061442 -132620069
-215253638 -132620069
134061442 112298311

Output: 2

Input:
-225194635 772128906
-9640584 -636384130
-9640584 772128906

Output: 2

Input:
976530519 -932140580
418643692 -845327922
976530519 -845327922

Output: 2

Input:
-960958311 -757098377
-960958311 -153001649
-960958311 567188828

Output: 1

Input:
487214658 518775922
487214658 -869675495
487214658 -106351878

Output: 1

Input:
58011742 175214671
-853914900 175214671
-245334045 175214671

Output: 1

Input:
306134424 46417066
-503106271 46417066
-286564055 46417066

Output: 1

Input:
150098962 830455428
-70279563 -160635038
-721135733 -627254059

Output: 3

Input:
-664035427 -710202693
527339005 -8499215
414350757 -966228511

Output: 3


The only line contains two integers a, b (1 ≤ a ≤ b ≤ 106) — the first and the last number typed by Max.

Print the only integer a — the total number of printed segments.

Once Max found an electronic calculator from his grandfather Dovlet's chest. He noticed that the numbers were written with seven-segment indicators (https://en.wikipedia.org/wiki/Seven-segment_display).  Max starts to type all the values from a to b. After typing each number Max resets the calculator. Find the total number of segments printed on the calculator.For example if a = 1 and b = 3 then at first the calculator will print 2 segments, then — 5 segments and at last it will print 5 segments. So the total number of printed segments is 12.

Input: 1 3

Output: 12

Input: 10 15

Output: 39

Input: 1 100

Output: 928

Input: 100 10000

Output: 188446

Input: 213 221442

Output: 5645356

Input: 1 1000000

Output: 28733372

Input: 1000000 1000000

Output: 38

Input: 222145 353252

Output: 3860750

Input: 2 1000000

Output: 28733370

Input: 1 999999

Output: 28733334

Input: 192 200

Output: 122


The first line contains two integers x1, y1 ( - 109 ≤ x1, y1 ≤ 109) — the start position of the robot. The second line contains two integers x2, y2 ( - 109 ≤ x2, y2 ≤ 109) — the finish position of the robot.

NoteIn the first example robot should increase both of its coordinates by one four times, so it will be in position (4, 4). After that robot should simply increase its y coordinate and get the finish position.In the second example robot should simultaneously increase x coordinate and decrease y coordinate by one three times.

Print the only integer d — the minimal number of steps to get the finish position.

Professor GukiZ makes a new robot. The robot are in the point with coordinates (x1, y1) and should go to the point (x2, y2). In a single step the robot can change any of its coordinates (maybe both of them) by one (decrease or increase). So the robot can move in one of the 8 directions. Find the minimal number of steps the robot should make to get the finish position.

Input:
0 0
4 5

Output: 5

Input:
3 4
6 1

Output: 3

Input:
0 0
4 6

Output: 6

Input:
1 1
-3 -5

Output: 6

Input:
-1 -1
-10 100

Output: 101

Input:
1 -1
100 -100

Output: 99

Input:
-1000000000 -1000000000
1000000000 1000000000

Output: 2000000000

Input:
-1000000000 -1000000000
0 999999999

Output: 1999999999

Input:
0 0
2 1

Output: 2

Input:
10 0
100 0

Output: 90

Input:
1 5
6 4

Output: 5

Input:
0 0
5 4

Output: 5

Input:
10 1
20 1

Output: 10

Input:
1 1
-3 4

Output: 4

Input:
-863407280 504312726
786535210 -661703810

Output: 1649942490

Input:
-588306085 -741137832
341385643 152943311

Output: 929691728

Input:
0 0
4 0

Output: 4

Input:
93097194 -48405232
-716984003 -428596062

Output: 810081197

Input:
9 1
1 1

Output: 8

Input:
4 6
0 4

Output: 4

Input:
2 4
5 2

Output: 3

Input:
-100000000 -100000000
100000000 100000123

Output: 200000123

Input:
5 6
5 7

Output: 1

Input:
12 16
12 1

Output: 15

Input:
0 0
5 1

Output: 5

Input:
0 1
1 1

Output: 1

Input:
-44602634 913365223
-572368780 933284951

Output: 527766146

Input:
-2 0
2 -2

Output: 4

Input:
0 0
3 1

Output: 3

Input:
-458 2
1255 4548

Output: 4546

Input:
-5 -4
-3 -3

Output: 2

Input:
4 5
7 3

Output: 3

Input:
-1000000000 -999999999
1000000000 999999998

Output: 2000000000

Input:
-1000000000 -1000000000
1000000000 -1000000000

Output: 2000000000

Input:
-464122675 -898521847
656107323 -625340409

Output: 1120229998

Input:
-463154699 -654742385
-699179052 -789004997

Output: 236024353

Input:
982747270 -593488945
342286841 -593604186

Output: 640460429

Input:
-80625246 708958515
468950878 574646184

Output: 549576124

Input:
0 0
1 0

Output: 1

Input:
109810 1
2 3

Output: 109808

Input:
-9 0
9 9

Output: 18

Input:
9 9
9 9

Output: 0

Input:
1 1
4 3

Output: 3

Input:
1 2
45 1

Output: 44

Input:
207558188 -313753260
-211535387 -721675423

Output: 419093575

Input:
-11 0
0 0

Output: 11

Input:
-1000000000 1000000000
1000000000 -1000000000

Output: 2000000000

Input:
0 0
1 1

Output: 1

Input:
0 0
0 1

Output: 1

Input:
0 0
-1 1

Output: 1

Input:
0 0
-1 0

Output: 1

Input:
0 0
-1 -1

Output: 1

Input:
0 0
0 -1

Output: 1

Input:
0 0
1 -1

Output: 1

Input:
10 90
90 10

Output: 80

Input:
851016864 573579544
-761410925 -380746263

Output: 1612427789

Input:
1 9
9 9

Output: 8

Input:
1000 1000
1000 1000

Output: 0

Input:
1 9
9 1

Output: 8

Input:
1 90
90 90

Output: 89

Input:
100 100
1000 1000

Output: 900

Input:
-1 0
0 0

Output: 1

Input:
-750595959 -2984043
649569876 -749608783

Output: 1400165835

Input:
958048496 712083589
423286949 810566863

Output: 534761547

Input:
146316710 53945094
-523054748 147499505

Output: 669371458

Input:
50383856 -596516251
-802950224 -557916272

Output: 853334080

Input:
-637204864 -280290367
-119020929 153679771

Output: 518183935

Input:
-100 -100
-60 -91

Output: 40

Input:
337537326 74909428
-765558776 167951547

Output: 1103096102

Input:
0 81
18 90

Output: 18

Input:
283722202 -902633305
-831696497 -160868946

Output: 1115418699

Input:
1000 1000
-1000 1000

Output: 2000

Input:
5 6
4 8

Output: 2

Input:
40572000 597493595
-935051731 368493185

Output: 975623731

Input:
-5 5
5 5

Output: 10


The only line contains integer n (1 ≤ n ≤ 1014) — the position of the number to find. Note that the given number is too large, so you should use 64-bit integer type to store it. In C++ you can use the long long integer type and in Java you can use long integer type.

Print the element in the n-th position of the sequence (the elements are numerated from one).

Consider the infinite sequence of integers: 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5.... The sequence is built in the following way: at first the number 1 is written out, then the numbers from 1 to 2, then the numbers from 1 to 3, then the numbers from 1 to 4 and so on. Note that the sequence contains numbers, not digits. For example number 10 first appears in the sequence in position 55 (the elements are numerated from one).Find the number on the n-th position of the sequence.


The only line of the input contains three space-separated real numbers x, y and z (0.1 ≤ x, y, z ≤ 200.0). Each of x, y and z is given with exactly one digit after the decimal point.

Find the maximum value of expression among xyz, xzy, (xy)z, (xz)y, yxz, yzx, (yx)z, (yz)x, zxy, zyx, (zx)y, (zy)x and print the corresponding expression. If there are many maximums, print the one that comes first in the list.  xyz should be outputted as x^y^z (without brackets), and (xy)z should be outputted as (x^y)^z (quotes for clarity).

Wet Shark asked Rat Kwesh to generate three positive real numbers x, y and z, from 0.1 to 200.0, inclusive. Wet Krash wants to impress Wet Shark, so all generated numbers will have exactly one digit after the decimal point.Wet Shark knows Rat Kwesh will want a lot of cheese. So he will give the Rat an opportunity to earn a lot of cheese. He will hand the three numbers x, y and z to Rat Kwesh, and Rat Kwesh will pick one of the these twelve options:  a1 = xyz;  a2 = xzy;  a3 = (xy)z;  a4 = (xz)y;  a5 = yxz;  a6 = yzx;  a7 = (yx)z;  a8 = (yz)x;  a9 = zxy;  a10 = zyx;  a11 = (zx)y;  a12 = (zy)x. Let m be the maximum of all the ai, and c be the smallest index (from 1 to 12) such that ac = m. Rat's goal is to find that c, and he asks you to help him. Rat Kwesh wants to see how much cheese he gets, so he you will have to print the expression corresponding to that ac.

Input: 1.1 3.4 2.5

Output: z^y^x

Input: 2.0 2.0 2.0

Output: x^y^z

Input: 1.9 1.8 1.7

Output: (x^y)^z

Input: 2.0 2.1 2.2

Output: x^z^y

Input: 1.5 1.7 2.5

Output: (z^x)^y

Input: 1.1 1.1 1.1

Output: (x^y)^z

Input: 4.2 1.1 1.2

Output: (x^y)^z

Input: 113.9 125.2 88.8

Output: z^x^y

Input: 185.9 9.6 163.4

Output: y^z^x

Input: 198.7 23.7 89.1

Output: y^z^x

Input: 141.1 108.1 14.9

Output: z^y^x

Input: 153.9 122.1 89.5

Output: z^y^x

Input: 25.9 77.0 144.8

Output: x^y^z

Input: 38.7 142.2 89.8

Output: x^z^y

Input: 51.5 156.3 145.1

Output: x^z^y

Input: 193.9 40.7 19.7

Output: z^y^x

Input: 51.8 51.8 7.1

Output: z^x^y

Input: 64.6 117.1 81.6

Output: x^z^y

Input: 7.0 131.1 7.4

Output: x^z^y

Input: 149.4 15.5 82.0

Output: y^z^x

Input: 91.8 170.4 7.7

Output: z^x^y

Input: 104.6 184.4 82.3

Output: z^x^y

Input: 117.4 68.8 137.7

Output: y^x^z

Input: 189.4 63.7 63.4

Output: z^y^x

Input: 2.2 148.1 138.0

Output: x^z^y

Input: 144.6 103.0 193.4

Output: y^x^z

Input: 144.0 70.4 148.1

Output: y^x^z

Input: 156.9 154.8 73.9

Output: z^y^x

Input: 28.9 39.3 148.4

Output: x^y^z

Input: 41.7 104.5 74.2

Output: x^z^y

Input: 184.1 118.5 129.5

Output: y^z^x

Input: 196.9 3.0 4.1

Output: y^z^x

Input: 139.3 87.4 129.9

Output: y^z^x

Input: 81.7 171.9 4.4

Output: z^x^y

Input: 94.5 56.3 59.8

Output: y^z^x

Input: 36.9 51.1 4.8

Output: z^x^y

Input: 55.5 159.4 140.3

Output: x^z^y

Input: 3.9 0.2 3.8

Output: x^z^y

Input: 0.9 4.6 3.4

Output: (z^x)^y

Input: 3.7 3.7 4.1

Output: x^y^z

Input: 1.1 3.1 4.9

Output: x^y^z

Input: 3.9 2.1 4.5

Output: y^x^z

Input: 0.9 2.0 4.8

Output: (y^x)^z

Input: 3.7 2.2 4.8

Output: y^x^z

Input: 1.5 1.3 0.1

Output: x^y^z

Input: 3.9 0.7 4.7

Output: (x^y)^z

Input: 1.8 1.8 2.1

Output: (z^x)^y

Input: 4.6 2.1 1.6

Output: z^y^x

Input: 2.0 1.1 2.4

Output: (z^x)^y

Input: 4.4 0.5 2.0

Output: x^z^y

Input: 1.8 0.4 2.7

Output: z^x^y

Input: 4.6 4.4 2.3

Output: z^y^x

Input: 2.4 3.8 2.7

Output: x^z^y

Input: 4.4 3.7 3.4

Output: z^y^x

Input: 2.2 3.1 3.0

Output: x^z^y

Input: 4.6 3.0 3.4

Output: y^z^x

Input: 4.0 0.4 3.1

Output: x^z^y

Input: 1.9 4.8 3.9

Output: x^z^y

Input: 3.9 4.3 3.4

Output: z^x^y

Input: 1.7 4.5 4.2

Output: x^z^y

Input: 4.1 3.5 4.5

Output: y^x^z

Input: 1.9 3.0 4.1

Output: x^y^z

Input: 4.3 2.4 4.9

Output: y^x^z

Input: 1.7 1.9 4.4

Output: x^y^z

Input: 4.5 1.3 4.8

Output: y^x^z

Input: 1.9 1.1 4.8

Output: x^z^y

Input: 0.4 0.2 0.3

Output: (x^y)^z

Input: 0.4 1.1 0.9

Output: y^z^x

Input: 0.2 0.7 0.6

Output: (y^x)^z

Input: 0.1 0.1 0.4

Output: (z^x)^y

Input: 1.4 1.1 1.0

Output: x^y^z

Input: 1.4 0.5 0.8

Output: x^z^y

Input: 1.2 0.7 1.3

Output: z^x^y

Input: 1.0 0.3 1.1

Output: z^x^y

Input: 0.9 1.2 0.2

Output: y^x^z

Input: 0.8 0.3 0.6

Output: (x^y)^z

Input: 0.6 0.6 1.1

Output: z^x^y

Input: 0.5 0.1 0.9

Output: (z^x)^y

Input: 0.4 1.0 1.5

Output: z^y^x

Input: 0.3 0.4 1.2

Output: z^y^x

Input: 0.1 1.4 0.3

Output: y^z^x

Input: 1.4 0.8 0.2

Output: x^y^z

Input: 1.4 1.2 1.4

Output: (x^y)^z

Input: 1.2 0.6 0.5

Output: x^y^z

Input: 1.1 1.5 0.4

Output: y^x^z

Input: 1.5 1.4 1.1

Output: (x^y)^z

Input: 1.4 0.8 0.9

Output: x^z^y

Input: 1.4 0.3 1.4

Output: x^z^y

Input: 1.2 0.5 1.2

Output: x^z^y

Input: 1.1 1.5 1.0

Output: y^x^z

Input: 0.9 1.0 0.1

Output: y^x^z

Input: 0.8 0.4 1.4

Output: z^x^y

Input: 0.7 1.4 0.4

Output: y^x^z

Input: 0.5 0.8 0.3

Output: (y^x)^z

Input: 0.4 1.1 0.8

Output: y^z^x

Input: 0.2 0.1 0.2

Output: (x^y)^z

Input: 0.1 0.2 0.6

Output: (z^x)^y

Input: 0.5 0.1 0.3

Output: (x^y)^z

Input: 0.1 0.1 0.1

Output: (x^y)^z

Input: 0.5 0.5 0.1

Output: (x^y)^z

Input: 0.5 0.2 0.2

Output: (x^y)^z

Input: 0.3 0.4 0.4

Output: (y^x)^z

Input: 0.1 0.3 0.5

Output: (z^x)^y

Input: 0.3 0.3 0.5

Output: (z^x)^y

Input: 0.2 0.6 0.3

Output: (y^x)^z

Input: 0.6 0.3 0.2

Output: (x^y)^z

Input: 0.2 0.1 0.6

Output: (z^x)^y

Input: 0.4 0.1 0.6

Output: (z^x)^y

Input: 0.6 0.4 0.3

Output: (x^y)^z

Input: 0.2 0.2 0.5

Output: (z^x)^y

Input: 0.2 0.3 0.2

Output: (y^x)^z

Input: 0.2 0.6 0.4

Output: (y^x)^z

Input: 0.6 0.2 0.5

Output: (x^y)^z

Input: 0.5 0.2 0.3

Output: (x^y)^z

Input: 0.5 0.3 0.2

Output: (x^y)^z

Input: 0.3 0.5 0.6

Output: (z^x)^y

Input: 0.5 0.3 0.1

Output: (x^y)^z

Input: 0.3 0.4 0.1

Output: (y^x)^z

Input: 0.5 0.4 0.5

Output: (x^y)^z

Input: 0.1 0.5 0.4

Output: (y^x)^z

Input: 0.5 0.5 0.6

Output: (z^x)^y

Input: 0.1 0.5 0.2

Output: (y^x)^z

Input: 1.0 2.0 4.0

Output: y^z^x

Input: 1.0 4.0 2.0

Output: y^z^x

Input: 2.0 1.0 4.0

Output: x^z^y

Input: 2.0 4.0 1.0

Output: x^y^z

Input: 4.0 1.0 2.0

Output: x^z^y

Input: 4.0 2.0 1.0

Output: x^y^z

Input: 3.0 3.0 3.1

Output: x^y^z

Input: 0.1 0.2 0.3

Output: (z^x)^y

Input: 200.0 200.0 200.0

Output: x^y^z

Input: 1.0 1.0 200.0

Output: z^x^y

Input: 1.0 200.0 1.0

Output: y^x^z

Input: 200.0 1.0 1.0

Output: x^y^z

Input: 200.0 200.0 1.0

Output: x^y^z

Input: 200.0 1.0 200.0

Output: x^z^y

Input: 1.0 200.0 200.0

Output: y^z^x

Input: 1.0 1.0 1.0

Output: x^y^z

Input: 200.0 0.1 0.1

Output: x^y^z

Input: 200.0 0.1 200.0

Output: (x^y)^z

Input: 0.1 200.0 200.0

Output: (y^x)^z

Input: 200.0 200.0 0.1

Output: (x^y)^z

Input: 0.1 200.0 0.1

Output: y^x^z

Input: 0.1 0.1 200.0

Output: z^x^y

Input: 0.1 0.4 0.2

Output: (y^x)^z

Input: 0.2 0.3 0.1

Output: (y^x)^z

Input: 0.1 0.4 0.3

Output: (y^x)^z

Input: 1.0 2.0 1.0

Output: y^x^z


The first line contains the current time in the format hh:mm (0 ≤ hh < 24, 0 ≤ mm < 60). The hours and the minutes are given with two digits (the hours or the minutes less than 10 are given with the leading zeroes). The second line contains integer a (0 ≤ a ≤ 104) — the number of the minutes passed.

The only line should contain the time after a minutes in the format described in the input. Note that you should print exactly two digits for the hours and the minutes (add leading zeroes to the numbers if needed). See the examples to check the input/output format.

You are given the current time in 24-hour format hh:mm. Find and print the time after a minutes.Note that you should find only the time after a minutes, see the examples to clarify the problem statement.You can read more about 24-hour format here https://en.wikipedia.org/wiki/24-hour_clock.

Input:
23:59
10

Output: 00:09

Input:
20:20
121

Output: 22:21

Input:
10:10
0

Output: 10:10

Input:
12:34
10000

Output: 11:14

Input:
00:00
10000

Output: 22:40

Input:
00:00
1440

Output: 00:00

Input:
23:59
8640

Output: 23:59

Input:
10:01
0

Output: 10:01

Input:
04:05
0

Output: 04:05

Input:
02:59
1

Output: 03:00

Input:
05:15
10

Output: 05:25

Input:
03:10
20

Output: 03:30

Input:
09:11
0

Output: 09:11

Input:
19:00
0

Output: 19:00

Input:
23:59
1

Output: 00:00

Input:
11:59
1

Output: 12:00

Input:
19:34
566

Output: 05:00

Input:
00:01
59

Output: 01:00

Input:
03:30
0

Output: 03:30

Input:
22:30
30

Output: 23:00

Input:
22:50
70

Output: 00:00

Input:
05:12
0

Output: 05:12

Input:
09:20
40

Output: 10:00

Input:
15:04
36

Output: 15:40

Input:
05:37
23

Output: 06:00

Input:
23:59
59

Output: 00:58

Input:
21:09
9997

Output: 19:46

Input:
11:00
1

Output: 11:01

Input:
20:01
2699

Output: 17:00

Input:
01:00
59

Output: 01:59

Input:
07:09
6538

Output: 20:07

Input:
00:00
10

Output: 00:10

Input:
02:09
2074

Output: 12:43

Input:
01:10
1

Output: 01:11

Input:
23:01
59

Output: 00:00

Input:
08:50
20

Output: 09:10

Input:
13:18
5121

Output: 02:39

Input:
18:31
2677

Output: 15:08

Input:
14:17
108

Output: 16:05

Input:
02:45
5617

Output: 00:22

Input:
00:00
3600

Output: 12:00

Input:
19:01
59

Output: 20:00

Input:
19:02
59

Output: 20:01

Input:
14:00
2880

Output: 14:00

Input:
01:10
44

Output: 01:54

Input:
02:01
59

Output: 03:00

Input:
07:02
121

Output: 09:03

Input:
10:00
61

Output: 11:01

Input:
23:59
61

Output: 01:00

Input:
00:00
0

Output: 00:00

Input:
23:59
121

Output: 02:00

Input:
00:00
60

Output: 01:00

Input:
15:52
60

Output: 16:52

Input:
00:39
6525

Output: 13:24

Input:
00:30
30

Output: 01:00

Input:
00:59
1

Output: 01:00

Input:
00:55
4321

Output: 00:56

Input:
10:05
1

Output: 10:06

Input:
23:00
60

Output: 00:00


The only line contains two integers n, k (1 ≤ n ≤ 109, 0 ≤ k ≤ 106).

Print the only integer a — the remainder after dividing the value of the sum by the value 109 + 7.

There are well-known formulas: , , . Also mathematicians found similar formulas for higher degrees.Find the value of the sum  modulo 109 + 7 (so you should find the remainder after dividing the answer by the value 109 + 7).

Input: 4 1

Output: 10

Input: 4 2

Output: 30

Input: 4 3

Output: 100

Input: 4 0

Output: 4

Input: 10 0

Output: 10

Input: 1 1

Output: 1

Input: 1 0

Output: 1

Input: 1 1000000

Output: 1

Input: 1000000000 0

Output: 1000000000

Input: 100 100

Output: 568830579

Input: 10000 100

Output: 352711099

Input: 100 10000

Output: 859998022

Input: 1000000000 1000000

Output: 617381606

Input: 1000000 1000000

Output: 997878755

Input: 999999 1000000

Output: 504760730

Input: 77674473 447444

Output: 838207299

Input: 333312494 795258

Output: 393290476

Input: 761637147 673329

Output: 223778667

Input: 335185991 514401

Output: 412595240

Input: 203702132 355473

Output: 229710810

Input: 1000000000 999935

Output: 729344740


The first line of the input contains two integers n and m  — the number of vertices and edges in the graph found by Petya, respectively. Each of the next m lines contains two integers ui and vi (1 ≤ ui, vi ≤ n, ui ≠ vi) — the edges of the graph G. It is guaranteed, that there are no multiple edges, that is any pair of vertexes appear in this list no more than once.

NoteIn the first sample you are given a graph made of two vertices with an edge between them. So, these vertices can correspond to both the same and adjacent letters. Any of the following strings "aa", "ab", "ba", "bb", "bc", "cb", "cc" meets the graph's conditions. In the second sample the first vertex is connected to all three other vertices, but these three vertices are not connected with each other. That means that they must correspond to distinct letters that are not adjacent, but that is impossible as there are only two such letters: a and c.

In the first line print "Yes" (without the quotes), if the string s Petya is interested in really exists and "No" (without the quotes) otherwise. If the string s exists, then print it on the second line of the output. The length of s must be exactly n, it must consist of only letters "a", "b" and "c" only, and the graph built using this string must coincide with G. If there are multiple possible answers, you may print any of them.

One day student Vasya was sitting on a lecture and mentioned a string s1s2... sn, consisting of letters "a", "b" and "c" that was written on his desk. As the lecture was boring, Vasya decided to complete the picture by composing a graph G with the following properties:   G has exactly n vertices, numbered from 1 to n.  For all pairs of vertices i and j, where i ≠ j, there is an edge connecting them if and only if characters si and sj are either equal or neighbouring in the alphabet. That is, letters in pairs "a"-"b" and "b"-"c" are neighbouring, while letters "a"-"c" are not. Vasya painted the resulting graph near the string and then erased the string. Next day Vasya's friend Petya came to a lecture and found some graph at his desk. He had heard of Vasya's adventure and now he wants to find out whether it could be the original graph G, painted by Vasya. In order to verify this, Petya needs to know whether there exists a string s, such that if Vasya used this s he would produce the given graph G.

Input:
2 1
1 2

Output:
Yes
bb

Output:
Yes
cb

Output:
Yes
aa

Input:
4 3
1 2
1 3
1 4

Output: No

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

Output:
Yes
bcaa

Output:
Yes
bacc

Input: 1 0

Output:
Yes
c

Output:
Yes
a

Output:
Yes
b

Input:
15 95
1 11
13 7
12 10
1 14
15 14
15 7
13 14
9 10
5 10
7 4
6 13
2 11
14 10
11 4
15 8
11 9
13 15
8 2
2 5
15 4
7 14
12 2
12 9
2 4
1 8
8 3
1 5
1 3
1 10
9 3
6 1
7 2
1 4
7 3
7 10
13 8
8 14
8 9
14 11
6 11
6 12
12 5
14 5
6 7
8 4
2 3
7 8
11 3
1 9
15 11
14 3
8 5
12 11
13 2
15 2
11 5
8 10
11 10
12 7
14 9
13 11
8 11
5 3
7 11
3 4
1 7
1 15
12 14
15 5
7 5
2 10
7 9
9 4
5 4
13 1
2 9
15 10
13 12
15 3
1 12
10 4
14 2
9 5
6 15
12 4
15 12
10 ...

Output:
Yes
bbaaacbbaabbcbb

Output:
Yes
bbcccabbccbbabb

Input:
8 28
3 2
4 2
7 4
6 3
3 7
8 1
3 4
5 1
6 5
5 3
7 1
5 8
5 4
6 1
6 4
2 1
4 1
8 2
7 2
6 8
8 4
6 7
3 1
7 8
3 8
5 7
5 2
6 2

Output:
Yes
bbbbbbbb

Output:
Yes
aaaaaaaa

Output:
Yes
cbbbbbbb

Input:
417 43540
187 191
81 388
332 273
167 89
99 394
357 385
405 218
127 252
19 282
12 385
329 365
75 235
19 390
368 354
39 321
368 295
143 406
403 187
64 78
360 357
340 345
312 307
323 206
181 258
228 210
293 244
186 15
50 46
47 79
381 170
365 212
57 48
62 260
185 123
325 404
77 149
106 153
250 201
238 190
221 128
39 312
282 94
113 340
237 317
330 138
331 255
281 309
223 144
379 209
41 187
50 396
103 275
184 6
112 225
160 416
403 20
262 240
247 24
262 2...

Output: No

Input:
500 124750
3 470
57 482
422 366
282 337
185 467
322 55
250 111
172 389
427 146
404 135
443 161
259 10
394 111
192 48
444 8
114 228
277 42
116 139
417 441
263 16
132 328
332 58
94 305
199 416
413 338
489 125
66 98
125 294
39 36
444 430
78 194
413 395
177 338
419 134
337 420
399 148
442 321
97 482
281 443
388 3
289 56
293 394
173 371
282 401
437 363
82 209
140 234
228 251
239 57
172 310
227 49
256 234
221 19
475 293
167 444
295 138
247 353
368 38
221...

Input:
500 8538
55 35
492 402
492 81
135 387
354 185
288 444
209 68
302 282
155 130
276 423
419 199
483 303
213 43
175 180
336 400
318 133
483 208
445 260
389 396
4 460
245 100
1 335
331 428
197 433
464 349
74 114
268 311
160 156
139 165
83 359
115 143
138 410
144 455
193 333
348 430
236 363
468 312
468 437
456 20
422 253
398 491
271 275
365 487
353 154
443 41
58 369
382 321
21 100
177 193
292 500
131 162
260 258
281 448
129 367
20 167
191 187
45 306
400 3...

Output: No

Input:
19 144
5 12
14 12
1 3
4 5
9 14
5 13
2 19
13 15
8 15
6 17
14 13
3 10
19 8
8 13
6 16
16 13
16 17
5 14
5 17
14 18
4 16
13 12
7 2
11 7
19 12
1 13
9 13
7 17
4 19
9 18
17 14
2 5
19 13
16 12
5 8
15 12
17 15
16 1
10 13
7 16
1 10
2 16
5 10
6 10
6 15
4 6
6 18
17 18
2 18
5 3
5 19
16 8
7 6
6 8
8 12
16 10
7 19
3 18
8 3
5 15
12 18
16 18
19 3
11 17
3 13
2 3
11 5
9 2
1 12
19 15
2 1
2 17
3 14
6 19
9 16
4 2
11 19
19 18
16 15
1 14
6 12
2 12
19...

Output:
Yes
cbcabbacbcaccccbbcb

Output:
Yes
abacbbcabacaaaabbab

Input:
31 417
4 26
29 3
15 7
22 24
22 30
29 24
9 2
10 11
16 19
10 12
9 1
26 24
27 4
13 17
21 2
9 21
16 21
21 11
5 30
31 29
31 20
5 20
25 29
23 11
28 8
23 4
5 3
26 19
3 2
31 2
13 1
18 19
29 19
15 23
9 6
7 22
1 24
9 27
10 2
11 1
9 22
6 3
14 27
23 20
23 26
10 21
11 26
1 19
8 16
4 17
3 19
22 11
10 7
6 20
25 31
9 3
9 4
14 5
28 7
21 26
31 18
7 24
16 20
28 25
28 21
8 6
27 24
23 3
28 23
20 4
22 4
20 18
29 23
1 2
10 5
16 13
14 3
28 15
8 15
14 ...

Output:
Yes
aaaabbbcbbabbbcbaaaabbbacabcbab

Output:
Yes
ccccbbbabbcbbbabccccbbbcacbabcb

Input:
138 6413
45 35
18 106
107 130
137 127
63 104
21 29
87 82
103 68
120 92
63 94
40 52
132 35
18 136
107 19
88 14
93 56
12 14
108 126
45 117
25 128
65 72
44 82
101 72
131 8
124 11
68 127
105 56
34 69
81 96
32 34
133 32
44 132
29 115
119 58
126 75
125 83
107 135
6 129
82 36
13 100
133 1
126 1
9 36
80 54
16 34
137 54
41 92
35 127
47 41
33 127
25 58
67 73
57 106
48 83
135 71
114 107
67 52
18 7
122 72
127 85
1 127
120 6
134 69
126 82
28 9
63 121
28...

Output:
Yes
cbcaaaaaccbccbcccbbcccacabccbcbccccbacabbacccccaccaabcacaaaccccccabcbaccacbaaaccccacacccabcaccccccaccccccacccaccccaacbaacccbacbaacaccccbcc

Output:
Yes
abacccccaabaabaaabbaaacacbaababaaaabcacbbcaaaaacaaccbacacccaaaaaacbabcaacabcccaaaacacaaacbacaaaaaacaaaaaacaaacaaaaccabccaaabcabccacaaaabaa

Input:
289 34576
74 164
72 122
288 203
25 97
68 5
98 135
182 67
143 87
58 1
225 39
52 275
19 201
163 165
75 23
112 283
204 107
136 203
120 205
106 57
114 246
252 141
90 232
14 243
11 52
34 64
51 277
125 64
17 13
41 245
220 286
218 138
161 220
9 33
39 177
147 47
58 256
145 238
193 127
271 248
115 8
190 86
92 29
116 187
201 260
157 131
115 82
121 23
122 12
193 35
117 1
284 172
87 33
136 79
247 105
155 24
123 101
255 125
285 255
88 195
14 104
282 192
288 ...

Input:
500 123420
136 76
388 405
121 171
44 345
45 332
219 42
344 468
271 139
312 240
372 415
70 431
445 195
50 308
317 42
375 208
419 255
366 456
336 42
249 28
150 129
250 7
221 64
189 280
371 411
142 105
373 41
53 134
226 241
382 468
463 215
239 270
371 160
405 444
424 470
139 360
429 238
372 450
200 431
179 276
240 432
27 295
456 1
446 339
288 281
468 437
378 63
201 498
10 341
279 370
272 43
323 87
299 375
417 9
25 386
462 243
230 206
132 447
140 380
2...

Input:
4 3
4 3
2 4
2 3

Output:
Yes
caaa

Output:
Yes
accc

Input:
4 2
4 3
1 2

Output:
Yes
ccaa

Output:
Yes
aacc

Input:
500 113071
209 169
377 204
119 423
267 110
333 414
60 227
78 135
169 26
50 384
466 211
190 290
106 309
320 272
468 443
87 221
62 84
41 100
493 484
346 500
405 204
220 183
242 445
305 379
357 297
462 441
65 461
317 6
474 227
63 27
492 34
85 498
160 99
112 292
117 279
182 465
317 156
275 248
316 442
444 89
252 175
256 409
253 148
131 120
388 222
439 419
384 96
54 25
174 100
88 378
60 112
236 392
418 16
364 484
235 300
210 124
375 414
153 214
36 316
3...

Input:
500 108211
495 283
49 361
484 40
151 410
211 107
8 441
224 335
448 450
111 388
498 87
136 68
244 111
431 134
465 182
407 283
19 474
210 445
479 395
383 177
177 9
310 34
406 69
26 437
72 166
131 175
215 451
104 401
412 357
87 205
131 451
56 268
425 368
131 143
142 46
45 118
347 368
287 199
386 407
343 60
308 384
440 351
355 297
345 419
185 18
182 369
474 175
91 39
273 410
55 135
70 397
290 94
17 289
141 384
158 451
321 268
453 77
206 406
148 494
439...

Input:
500 86374
63 497
138 415
393 363
401 456
401 375
381 473
104 422
79 211
59 49
402 246
253 473
114 141
93 127
63 34
68 50
239 495
236 210
436 99
189 175
105 394
190 323
387 59
129 441
428 126
459 442
441 185
382 496
339 233
38 49
7 333
195 154
234 276
24 59
346 186
341 444
210 48
313 184
275 15
288 236
240 184
300 156
265 4
306 187
177 47
465 118
55 449
148 312
475 58
151 458
104 269
265 477
352 121
263 58
166 445
252 358
224 338
500 143
179 322
111...

Input:
5 3
1 2
1 3
4 5

Output: No

Input:
6 4
1 2
1 3
4 5
4 6

Output: No

Input:
6 4
1 2
2 3
4 5
4 6

Output: No

Input:
6 4
3 2
1 3
6 5
4 6

Output: No

Input:
6 4
1 2
1 3
4 6
5 6

Output: No

Input:
7 13
1 2
2 3
1 3
4 5
5 6
4 6
2 5
2 7
3 7
7 4
7 6
7 1
7 5

Output: No

Input:
500 113344
397 381
431 21
462 356
262 105
438 481
324 61
246 89
305 327
166 76
141 250
294 362
156 381
46 424
26 419
213 150
410 324
357 262
9 359
380 13
205 112
67 38
488 170
442 373
394 368
404 231
270 471
374 187
339 175
239 75
396 28
485 96
457 396
349 86
73 188
176 232
6 127
380 402
174 287
10 280
385 80
91 452
47 83
447 130
251 39
439 466
8 275
166 178
190 438
410 388
239 302
354 70
146 209
51 22
115 59
484 4
198 202
64 158
384 152
126 316
4...

Output: No

Input:
500 111660
471 302
29 30
21 254
182 122
390 268
37 72
205 402
155 333
440 390
21 429
385 37
242 355
371 183
101 339
287 179
175 421
296 480
498 254
202 222
343 486
471 319
344 208
214 124
373 308
445 206
196 400
500 10
18 39
42 243
187 286
20 277
72 138
301 28
431 483
180 436
305 39
358 55
221 254
466 76
291 297
233 264
11 399
60 34
342 294
171 21
182 45
265 294
366 185
385 347
211 149
38 258
479 492
248 79
301 208
444 348
240 211
288 320
38 323
21...

Output: No

Input:
500 111500
491 137
382 96
10 130
171 408
451 237
120 88
238 174
283 278
240 336
95 374
427 408
395 204
413 188
227 396
91 430
41 412
148 169
207 153
93 344
97 184
68 231
113 499
123 206
203 153
317 340
375 468
140 345
353 190
39 347
164 358
173 147
46 334
187 393
199 305
133 254
272 451
23 280
29 426
235 437
121 474
284 426
273 44
415 399
437 416
219 247
193 195
392 374
111 92
390 18
323 271
221 318
139 202
234 267
412 105
184 319
470 387
16 306
310...

Output: No

Input:
500 122732
426 499
462 379
245 119
144 24
450 203
231 225
117 268
21 248
140 191
187 444
179 290
58 363
88 112
497 473
284 218
413 264
161 480
119 389
95 373
168 318
240 250
257 393
342 190
182 156
334 98
246 40
497 115
373 96
271 74
290 29
454 87
394 423
254 139
55 411
176 339
84 208
278 196
335 253
33 287
404 362
234 45
475 482
417 356
109 424
326 190
127 224
166 44
465 148
163 5
441 443
309 36
107 153
237 29
198 215
17 208
307 288
10 169
164 249
...

Output: No

Input:
500 37186
483 441
223 156
264 34
99 148
481 60
347 443
140 457
211 499
97 292
53 228
178 166
249 338
114 500
141 84
165 332
495 35
449 405
52 228
406 139
219 408
311 365
146 332
363 64
491 74
433 3
224 185
41 14
323 453
303 186
11 54
44 179
408 70
112 310
240 250
86 143
281 424
439 171
206 162
11 245
367 471
60 169
393 343
384 272
67 314
301 493
428 139
448 251
497 27
214 47
285 292
86 62
97 142
137 192
356 23
491 496
279 63
93 448
77 276
191 123
...

Output: No

Input:
500 5271
77 162
315 195
162 66
196 147
482 415
373 489
323 272
346 282
143 476
334 359
362 463
263 494
230 444
13 137
391 12
359 240
227 402
341 55
92 192
242 280
101 312
379 141
410 6
233 60
278 322
442 80
407 154
259 27
265 500
440 137
200 15
130 231
446 92
266 360
134 265
44 9
209 302
65 286
369 69
415 284
318 198
411 186
47 411
152 424
228 42
282 176
65 231
430 353
497 134
281 102
314 353
60 467
426 406
418 65
405 474
124 262
425 449
88 53
73 1...

Output: No

Input:
500 34831
216 500
464 222
469 151
259 102
5 414
381 367
395 282
322 404
451 209
303 9
354 211
291 235
119 214
479 33
147 158
231 392
323 262
154 436
111 215
359 182
417 191
448 404
196 192
455 159
252 133
283 98
214 145
408 118
323 24
167 334
229 153
299 108
305 179
23 484
67 48
229 473
157 224
441 345
360 64
251 154
62 18
332 290
405 476
35 489
278 165
103 428
209 147
60 499
73 359
325 351
143 226
306 320
113 22
28 453
181 61
427 235
423 465
343 10...

Output: No

Input:
500 57134
129 489
431 358
128 51
77 118
131 6
248 102
442 64
95 76
483 317
105 371
162 114
180 339
2 107
443 301
445 473
180 381
200 478
181 248
388 47
164 199
21 150
6 334
89 496
77 347
398 43
296 294
122 427
37 95
21 324
87 173
500 316
168 424
93 359
169 371
334 382
224 183
315 190
137 168
493 273
193 46
121 282
118 278
391 437
59 386
380 265
176 17
131 366
468 144
93 297
92 100
433 488
69 162
368 415
396 295
295 216
54 48
61 118
422 430
496 98
...

Output: No

Input:
8 18
3 7
2 5
5 3
3 8
8 6
6 3
6 4
4 8
1 2
6 1
2 7
2 4
4 5
4 3
6 5
1 4
5 7
3 1

Output: No

Input:
20 55
20 11
14 5
4 9
17 5
16 5
20 16
11 17
2 14
14 19
9 15
20 19
5 18
15 20
1 16
12 20
4 7
16 19
17 19
16 12
19 9
11 13
18 17
10 8
20 1
16 8
1 13
11 12
13 18
4 13
14 10
9 13
8 9
6 9
2 13
10 16
19 1
7 17
20 4
12 8
3 2
18 10
6 13
14 9
7 9
19 7
8 15
20 6
16 13
14 13
19 8
7 14
6 2
9 1
7 1
10 6

Output: No

Input:
15 84
11 9
3 11
13 10
2 12
5 9
1 7
14 4
14 2
14 1
11 8
1 8
14 10
4 15
10 5
5 12
13 11
6 14
5 7
12 11
9 1
10 15
2 6
7 15
14 9
9 7
11 14
8 15
12 7
13 6
2 9
9 6
15 3
12 15
6 15
4 6
4 1
9 12
10 7
6 1
11 10
2 3
5 2
13 2
13 3
12 6
4 3
5 8
12 1
9 15
14 5
12 14
10 1
9 4
7 13
3 6
15 1
13 9
11 1
10 4
9 3
8 12
13 12
6 7
12 10
4 12
13 15
2 10
3 8
1 5
15 2
4 11
2 1
10 8
14 3
14 8
8 7
13 1
5 4
11 2
6 8
5 15
2 4
9 8
9 10

Output: No

Input:
31 226
8 3
24 25
5 13
19 26
21 14
3 25
9 12
1 9
4 1
28 25
22 19
25 16
4 25
3 30
9 25
2 27
20 1
1 5
31 11
28 31
18 28
13 11
26 23
12 29
13 28
16 23
5 30
2 10
13 22
12 26
12 17
27 1
23 12
25 1
1 13
11 8
22 16
21 28
24 21
27 25
18 31
18 23
19 12
15 30
22 1
8 30
14 6
23 27
2 8
24 3
27 7
30 28
26 17
8 23
29 8
31 15
17 10
2 21
27 8
6 11
28 16
9 13
31 23
17 16
3 10
11 4
10 22
24 8
28 23
11 1
5 29
21 31
23 6
2 6
27 18
22 25
9 10
7 30
18...

Output: No

Input:
47 708
6 31
27 35
42 32
26 33
33 40
14 10
43 46
34 24
37 45
1 24
33 8
26 22
3 42
20 1
32 33
25 12
7 27
1 31
38 41
37 10
44 35
37 20
24 44
27 20
27 9
19 21
22 29
18 45
27 1
33 18
7 21
24 16
10 31
46 16
44 39
25 37
9 29
21 25
46 21
43 26
34 44
24 35
8 6
42 26
10 32
9 14
8 45
2 11
10 6
6 37
35 34
11 10
4 21
11 9
45 29
28 27
43 37
15 34
46 18
21 8
24 41
23 16
2 18
22 13
27 4
17 36
32 9
28 44
4 33
4 2
28 32
39 42
34 33
46 12
37 38
8 13
...

Output: No

Input:
15 13
13 15
13 3
14 3
10 7
2 5
5 12
12 11
9 2
13 7
7 4
12 10
15 7
6 13

Output: No

Input:
63 449
5 28
48 55
62 51
29 44
41 38
28 21
52 42
18 50
51 25
18 14
43 39
15 6
25 3
13 28
27 47
57 27
48 59
54 11
47 20
20 44
7 52
14 24
63 32
33 32
20 13
61 7
13 50
28 30
59 31
63 41
29 46
50 34
4 29
30 59
11 63
32 7
18 38
47 11
45 59
2 30
50 55
30 29
56 42
19 56
54 57
49 52
15 40
59 56
54 8
52 10
42 30
18 47
63 2
8 52
57 48
6 45
11 39
34 54
20 43
30 10
31 23
60 6
21 26
48 58
39 50
40 4
30 38
59 57
57 29
43 2
41 55
21 23
5 3
30 53
55...

Output: No

Input:
6 6
1 4
3 4
6 4
2 6
5 3
3 2

Output: No

Input:
203 10299
193 69
171 186
176 55
133 138
46 182
110 182
20 188
197 62
62 3
170 106
146 25
150 26
51 140
137 27
36 146
96 164
12 141
169 26
69 37
33 96
74 46
156 114
155 26
194 75
200 199
125 67
136 149
184 110
28 202
2 18
179 140
98 121
25 198
110 201
24 181
154 35
91 166
52 45
7 186
47 203
91 138
182 148
59 125
53 35
139 177
125 49
162 176
103 43
5 9
71 148
75 113
109 117
64 63
165 102
55 201
63 164
103 199
114 112
78 118
92 1
88 87
7 143
82 20...

Output: No

Input:
325 29179
63 201
58 26
263 208
120 257
105 236
247 207
97 169
317 178
77 214
178 172
319 322
272 172
159 139
134 153
224 8
128 208
60 212
160 264
267 99
68 167
309 19
285 245
290 16
71 137
210 90
211 320
32 38
86 284
167 250
171 17
11 175
191 224
110 247
239 76
278 53
58 138
20 240
100 204
124 156
228 241
39 299
258 124
125 324
129 67
248 295
285 9
82 106
277 107
285 23
62 244
194 32
16 204
315 111
271 184
112 79
256 195
263 173
186 309
111 13
144...

Output: No

Input:
249 15869
182 135
28 231
98 93
172 113
125 222
190 124
223 153
72 78
83 56
237 197
211 14
160 86
230 158
112 249
237 152
112 208
126 114
27 134
161 192
34 87
133 36
158 12
127 79
141 189
45 52
149 152
56 75
65 223
89 65
176 130
159 200
90 76
140 161
62 191
109 6
12 204
126 245
190 169
249 145
154 170
55 219
95 152
151 164
143 206
176 40
191 204
89 142
24 63
169 204
45 68
231 18
121 173
63 82
210 106
23 27
126 168
118 5
237 174
85 245
60 132
54 59...

Output: No

Input:
79 470
21 47
32 21
54 38
79 11
43 1
77 31
32 26
2 25
34 27
64 74
24 66
35 70
25 49
14 38
56 13
68 59
8 47
65 4
67 15
37 17
2 34
75 79
70 50
22 67
12 45
42 67
38 37
60 65
63 67
53 11
20 54
5 43
47 34
78 67
47 62
57 26
46 67
34 24
1 14
45 17
59 3
35 1
71 72
61 26
29 25
68 63
54 1
71 42
28 43
75 8
65 47
5 65
57 65
34 14
13 12
2 38
56 27
32 20
32 56
69 5
7 26
33 13
58 6
14 33
43 57
34 37
63 20
66 58
73 55
73 59
63 15
20 18
72 13
32 52
3...

Output: No

Input:
364 37645
234 245
23 215
289 8
262 24
324 302
75 8
227 43
228 116
312 48
132 247
248 178
101 353
148 2
162 155
143 313
169 26
347 13
182 336
291 176
169 261
79 267
9 41
265 152
264 109
272 362
5 54
337 131
210 45
141 285
309 211
147 266
338 247
298 339
48 32
7 154
187 272
89 125
266 66
202 276
191 317
248 286
180 214
178 296
125 294
35 55
239 284
198 274
60 23
297 185
157 88
133 172
118 75
305 146
350 215
290 94
246 44
96 49
343 4
340 38
227 269
...

Output: No

Input:
492 83130
222 169
470 311
326 138
185 373
453 465
461 345
37 227
18 329
196 103
2 242
410 139
366 82
229 100
218 225
113 442
340 466
471 222
423 431
55 6
250 251
181 290
194 294
249 262
199 248
462 7
105 158
259 461
288 487
131 217
332 378
222 177
128 33
488 45
278 106
348 256
268 460
419 438
174 368
338 221
262 199
405 283
91 264
425 334
189 344
421 405
115 309
202 322
444 423
351 440
192 424
276 41
464 375
399 228
44 390
286 114
364 130
347 260
25...

Output: No

Input:
19 165
7 17
19 8
16 8
14 12
7 8
10 15
11 16
9 15
6 15
11 18
19 18
16 14
11 19
2 18
17 1
19 12
8 14
5 10
5 1
17 10
9 2
3 15
16 19
2 12
15 12
9 18
6 14
8 12
1 8
15 18
16 1
16 18
2 1
4 8
9 8
5 13
10 13
6 16
9 13
7 15
2 10
11 7
17 14
11 17
6 8
4 17
17 8
11 10
17 12
2 6
5 12
6 13
11 13
1 15
16 12
5 19
2 13
5 16
6 10
4 19
9 6
11 14
17 15
4 3
7 10
8 3
14 18
7 5
17 19
6 12
1 18
11 6
4 9
3 18
16 13
11 9
4 15
6 19
7 9
4 5
4 6
16 15
13...

Output: No

Input:
31 453
6 22
7 26
9 6
18 30
1 30
20 18
16 26
7 18
16 27
3 17
6 14
22 18
9 17
27 21
8 10
16 19
15 6
1 3
31 27
25 19
28 15
7 2
25 27
31 23
27 12
10 7
16 4
12 2
14 3
16 1
1 2
10 19
2 30
9 29
25 31
25 21
1 19
2 24
7 3
9 27
13 12
26 2
22 26
15 9
4 19
9 21
23 24
19 24
23 7
22 17
21 2
29 27
15 31
29 3
28 22
8 9
28 8
18 24
15 7
29 19
25 2
10 2
27 17
16 30
21 1
13 21
12 1
20 2
9 13
14 27
9 4
8 26
8 30
14 18
4 2
29 23
17 24
28 17
7 17
6 2...

Output: No

Input:
15 103
5 10
7 8
1 8
14 3
13 9
6 8
11 4
8 3
11 3
13 4
12 11
11 10
15 10
15 5
13 11
6 1
2 5
2 10
7 14
7 3
6 5
2 3
14 2
6 11
1 15
13 7
5 3
11 9
13 5
1 7
6 10
1 12
1 4
6 13
2 9
13 12
5 4
7 5
13 14
13 3
7 9
2 4
15 11
14 11
13 8
9 5
3 4
11 5
6 3
12 8
6 12
12 3
14 10
9 4
15 14
12 9
10 4
8 10
14 5
12 7
13 1
13 2
6 7
8 4
6 15
1 14
7 10
1 9
12 4
1 11
12 2
8 9
15 2
15 4
14 4
15 8
8 2
15 12
14 9
2 11
9 3
1 3
8 14
15 7
7 11
10 3
8 5
...

Output: No

Input:
138 8693
70 85
122 58
11 119
111 59
135 123
131 89
22 89
38 54
86 38
100 37
55 4
79 18
108 75
73 66
30 9
84 48
108 5
74 60
63 79
121 54
15 121
100 105
22 110
67 36
113 103
133 27
88 90
104 46
96 57
74 67
121 109
32 25
28 80
13 39
60 116
120 52
32 69
34 62
13 38
111 78
10 67
21 92
27 113
21 25
49 18
24 113
34 126
6 25
138 23
81 129
94 127
24 55
15 32
14 55
79 22
28 38
94 54
57 89
16 56
15 27
51 7
27 53
117 19
56 36
72 11
135 62
79 68
78 85
...

Output: No

Input:
289 39856
147 39
46 270
57 96
86 262
75 161
73 62
191 156
163 260
228 124
281 47
247 230
197 36
171 206
206 223
263 207
235 70
129 192
83 177
201 278
68 99
119 280
279 223
208 187
215 25
204 110
207 259
252 63
63 183
271 55
22 186
56 149
89 136
267 27
7 164
119 37
247 8
43 54
145 111
162 178
42 41
3 15
158 212
123 25
228 7
72 101
9 107
19 203
279 232
289 274
80 28
155 26
206 140
288 182
139 129
282 199
96 238
241 211
102 58
180 177
76 250
241 88
...

Output: No

Input:
4 6
4 2
3 1
3 4
3 2
4 1
2 1

Output:
Yes
cbbb

Output:
Yes
bbbb

Output:
Yes
aaaa

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

Output:
Yes
cbaa

Output:
Yes
abcc

Input:
4 3
1 3
1 4
3 4

Output:
Yes
cacc

Output:
Yes
acaa

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

Output:
Yes
bcaa

Output:
Yes
bacc

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

Output:
Yes
caba

Output:
Yes
acbc

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

Output:
Yes
abbc

Output:
Yes
cbba

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

Output:
Yes
cabc

Output:
Yes
acba

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

Output:
Yes
bcba

Output:
Yes
babc

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

Output:
Yes
ccba

Output:
Yes
aabc

Input:
4 3
2 1
1 4
2 4

Output:
Yes
aaca

Output:
Yes
ccac

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

Output:
Yes
bcac

Output:
Yes
baca

Input:
4 2
3 1
2 4

Output:
Yes
acac

Output:
Yes
caca

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

Output:
Yes
cbac

Output:
Yes
abca

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

Output:
Yes
bbac

Output:
Yes
bbca

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

Output:
Yes
cbca

Output:
Yes
abac

Input:
4 2
2 3
1 4

Output:
Yes
caac

Output:
Yes
acca

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

Output:
Yes
baac

Output:
Yes
bcca

Input:
4 3
3 2
1 2
1 3

Output:
Yes
ccca

Output:
Yes
aaac

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

Output:
Yes
accb

Output:
Yes
caab

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

Output:
Yes
cbab

Output:
Yes
abcb

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

Output:
Yes
acab

Output:
Yes
cacb

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

Output:
Yes
bcab

Output:
Yes
bacb

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

Output:
Yes
aacb

Output:
Yes
ccab

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

Output:
Yes
cabb

Output:
Yes
acbb

Input: 2 0

Output:
Yes
ca

Output:
Yes
ac

Input: 3 0

Output: No

Input:
3 1
1 2

Output:
Yes
cca

Output:
Yes
aac

Input:
3 2
1 2
3 2

Output:
Yes
cba

Output:
Yes
abc

Input:
3 3
1 2
1 3
2 3

Output:
Yes
aaa

Output:
Yes
cbb

Output:
Yes
bbb

Input:
3 1
2 3

Output:
Yes
acc

Output:
Yes
caa

Input:
3 1
1 3

Output:
Yes
aca

Output:
Yes
cac

Input:
4 3
1 2
2 3
3 4

Output: No

Input:
5 9
4 3
4 2
3 1
5 1
4 1
2 1
5 2
3 2
5 4

Output:
Yes
bbcba

Output:
Yes
bbabc

Input:
19 107
19 8
1 3
1 17
13 18
3 4
2 16
13 16
14 8
10 5
15 6
13 17
1 13
6 5
12 5
6 2
1 16
9 7
11 5
3 5
19 9
13 10
16 18
10 2
13 11
2 18
8 15
17 18
14 15
11 4
1 2
15 16
10 16
6 13
17 16
1 11
6 16
13 2
11 2
10 11
6 12
19 14
12 18
11 12
18 3
15 17
7 8
12 2
1 12
11 16
17 3
16 5
13 3
4 5
16 4
9 14
18 4
15 4
9 15
9 8
13 4
15 18
18 5
12 3
16 3
1 5
2 4
15 11
19 7
10 4
15 3
15 2
10 3
17 5
1 6
6 10
2 3
10 12
15 1
19 15
17 12
6 3
12 16
15 ...

Output: No

Input:
16 118
10 2
3 8
10 3
1 8
6 13
4 12
10 4
9 11
5 8
4 14
16 12
7 2
15 3
1 13
3 12
16 8
16 13
7 6
7 1
10 7
15 2
16 15
15 14
6 9
16 9
16 4
3 11
10 15
3 1
15 8
5 16
5 4
7 14
11 12
7 9
15 13
11 13
9 1
4 2
4 8
10 14
7 4
8 13
2 9
5 11
3 14
7 8
5 6
2 12
4 9
15 1
9 8
7 3
15 4
11 8
15 11
2 11
10 1
3 2
10 11
5 13
8 14
5 2
10 5
12 8
5 3
2 1
4 13
4 11
10 12
6 3
5 1
6 12
3 13
6 4
7 11
16 2
10 16
2 8
9 13
5 14
15 12
16 7
6 1
7 15
2 14
3 ...

Output: No

Input:
87 3738
74 11
62 65
22 53
12 78
21 56
40 47
14 86
12 16
6 48
72 18
68 7
73 31
60 64
49 56
23 20
26 57
81 51
4 12
75 85
13 77
5 20
31 50
46 49
9 50
5 16
31 46
16 20
43 18
56 53
59 22
63 46
26 60
1 87
34 69
69 11
84 77
59 65
32 56
71 35
7 60
2 12
68 73
72 35
30 10
58 61
34 37
32 22
1 65
83 10
46 24
31 82
18 33
34 17
18 57
4 63
13 10
33 57
32 27
49 14
3 78
69 81
46 77
70 37
39 26
17 30
63 65
83 54
75 48
26 33
11 22
17 65
32 12
5 43
73 1...

Output:
Yes
bbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbcbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaabbbbbbbb

Output:
Yes
bbbbbbbbbbbbbbbbbbbbbbbcbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccbbbbbbbb

Input:
17 115
6 12
5 4
5 17
8 6
16 6
1 10
7 4
13 7
13 5
5 7
9 3
3 12
16 13
14 1
14 7
15 14
14 17
5 6
5 12
15 2
15 13
17 12
15 8
1 12
1 6
7 12
1 9
16 8
4 12
14 11
14 8
7 17
13 9
15 1
8 7
6 3
2 4
6 4
15 16
11 17
8 17
13 6
15 9
16 2
13 11
7 6
10 4
8 1
13 17
11 7
9 10
8 2
15 10
11 8
16 10
17 3
14 9
2 1
11 1
15 17
8 5
13 2
2 5
7 3
8 9
10 17
7 10
17 4
1 17
15 11
5 1
4 3
9 12
16 1
16 9
2 9
14 6
11 9
13 8
10 3
14 13
9 6
16 7
11 2
17 6
2...

Output: No

Input:
88 2089
82 7
52 57
51 43
3 60
58 85
59 23
1 37
55 57
87 50
68 74
22 4
68 37
49 60
58 7
68 51
76 5
84 36
86 39
24 66
2 56
49 24
6 65
3 42
88 21
39 10
30 35
58 23
25 83
68 38
49 68
8 29
68 67
51 11
87 17
47 21
84 25
44 39
34 48
78 53
14 86
24 58
59 67
33 40
2 75
74 23
56 26
29 77
78 28
62 42
9 45
32 84
27 45
15 13
7 10
34 47
41 50
5 21
2 78
1 49
14 63
7 80
58 43
33 83
82 33
70 11
77 10
63 7
4 13
60 11
41 77
4 67
3 50
71 35
49 62
40 65...

Output: No

Input:
6 9
1 4
1 6
3 6
5 4
2 6
3 5
4 6
1 5
5 6

Output: No

Input:
37 665
11 20
10 9
17 37
26 30
19 13
2 17
27 13
27 10
1 12
8 7
15 8
5 3
32 1
30 8
14 31
11 29
37 12
5 16
30 34
26 14
35 12
4 12
6 3
15 36
14 35
21 36
23 30
2 35
5 31
13 10
6 35
17 36
4 19
12 7
4 1
35 33
27 16
11 17
36 18
27 5
1 7
24 3
22 36
27 4
6 5
15 37
37 28
22 24
23 12
6 1
25 12
27 9
5 12
3 18
35 9
31 29
11 36
15 10
15 21
19 30
3 20
27 31
32 31
23 33
13 8
6 36
22 3
2 28
16 11
5 4
22 31
24 19
4 18
24 36
2 8
16 37
27 23
35 20
2...

Output:
Yes
bbbbbbbbbbbbbbbbbbbbbbbbbcbbbbabbbbbb

Output:
Yes
bbbbbbbbbbbbbbbbbbbbbbbbbabbbbcbbbbbb

Input:
8 21
4 7
7 8
6 4
8 5
8 1
3 4
4 8
4 5
6 7
6 8
7 1
4 2
1 5
6 5
8 2
3 6
5 2
7 5
1 2
7 2
4 1

Output: No

Input:
66 1669
31 41
19 24
19 26
40 46
34 57
13 6
25 13
25 21
23 8
3 21
50 51
34 60
54 15
66 15
26 56
50 21
38 8
50 10
58 2
48 58
9 10
41 46
47 40
64 9
23 44
18 6
37 46
66 6
23 40
18 51
43 42
9 56
58 66
43 57
50 61
47 66
20 61
58 15
27 25
16 33
60 5
7 8
56 40
64 15
57 17
7 19
19 17
30 56
62 7
28 47
33 54
55 66
32 10
58 50
53 2
9 46
41 61
20 29
54 56
51 44
59 63
11 35
14 44
22 38
59 49
28 13
54 51
13 21
17 61
47 15
51 21
27 4
21 2
9 2
26 33...

Output:
Yes
cccbbcbcccabbcccccbccabcbcaacbaccaaacbccbaacacbacccabcccbbbbcacbcc

Output:
Yes
aaabbabaaacbbaaaaabaacbabaccabcaacccabaabccacabcaaacbaaabbbbacabaa

Input:
149 10727
28 3
43 131
54 20
45 90
69 103
6 130
7 49
65 54
127 82
113 3
86 108
104 148
3 14
32 25
104 49
57 145
63 20
105 131
114 37
69 119
34 72
55 33
26 93
75 145
53 61
29 73
88 108
104 66
43 98
69 16
5 88
38 77
102 145
95 137
69 80
96 55
34 82
49 148
91 56
39 62
80 73
118 94
45 143
97 107
70 84
56 21
2 80
34 144
88 121
127 14
5 31
64 46
78 54
38 13
117 105
82 136
137 17
29 95
107 108
97 149
94 110
91 75
2 134
125 144
5 3
65 53
84 78
92 1...

Output: No

Input:
139 6924
129 4
134 73
127 92
138 79
128 50
57 123
43 101
101 133
81 41
109 74
116 21
77 67
35 121
92 38
77 71
108 23
39 36
114 37
123 29
47 114
25 39
44 114
59 129
137 40
120 130
14 132
97 85
76 49
109 57
76 56
104 99
35 134
76 54
128 109
101 68
111 130
42 106
38 22
128 101
129 56
103 65
90 59
129 73
43 93
101 134
72 74
32 81
12 40
38 81
75 115
69 4
87 99
95 23
83 34
53 66
16 15
14 103
26 91
124 21
76 122
72 114
93 41
24 100
5 127
51 111
22 ...

Output: No

Input:
278 36658
178 184
186 61
167 140
61 130
244 109
129 98
130 26
54 103
230 152
161 192
22 68
193 277
69 231
75 200
164 172
236 184
242 275
217 184
207 267
158 223
256 51
272 228
161 199
11 51
187 29
11 273
97 98
277 239
149 235
171 197
235 41
171 211
101 175
23 154
18 228
86 123
112 192
10 79
225 84
96 157
179 198
231 263
195 193
69 274
202 134
54 29
273 103
36 156
167 212
241 251
110 103
190 156
246 129
150 37
103 133
278 244
129 169
125 250
214 12
...

Output: No

Input:
434 69531
227 383
211 24
281 157
426 187
171 248
127 153
355 410
141 409
170 212
384 56
265 275
212 188
144 356
228 128
372 179
361 379
151 100
186 72
120 321
259 428
267 32
418 363
123 310
338 298
172 153
203 221
157 372
272 217
88 8
227 254
274 395
302 251
3 257
317 3
427 409
134 257
251 420
101 215
52 99
98 203
125 206
221 97
68 385
98 129
401 256
219 24
65 195
335 389
389 168
35 297
11 24
353 260
107 85
149 88
338 89
238 7
107 94
136 157
31 46
...

Output: No

Input:
4 3
1 4
1 3
2 4

Output: No

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

Output: No

Input:
4 3
1 3
2 4
3 4

Output: No

Input:
4 3
1 3
2 4
1 4

Output: No

Input:
5 6
1 2
2 4
2 5
3 4
3 5
4 5

Output: No

Input:
6 10
1 5
1 4
3 4
3 6
1 2
3 5
2 5
2 6
1 6
4 6

Output: No

Input:
4 3
1 2
3 4
2 3

Output: No


The only line of the input contains two integers n and k (1 ≤ n ≤ 1018, 1 ≤ k ≤ 30 000).

Print a single integer — the answer to the problem modulo 109 + 7.

Let's define the transformation P of a sequence of integers a1, a2, ..., an as b1, b2, ..., bn, where bi = a1 | a2 | ... | ai for all i = 1, 2, ..., n, where | is the bitwise OR operation.Vasya consequently applies the transformation P to all sequences of length n consisting of integers from 1 to 2k - 1 inclusive. He wants to know how many of these sequences have such property that their transformation is a strictly increasing sequence. Help him to calculate this number modulo 109 + 7.

Input: 1 2

Output: 3

Input: 2 3

Output: 30

Input: 3 3

Output: 48

Input: 1 5

Output: 31

Input: 9 13

Output: 560991352

Input: 223 802

Output: 950926232

Input: 4791 5172

Output: 670068098

Input: 1300 2645

Output: 230132247

Input: 30000 30000

Output: 751626110

Input: 16383 30000

Output: 270740562

Input: 1000000000000000000 30000

Output: 0

Input: 3 8

Output: 9664704

Input: 1 3

Output: 7

Input: 1 1

Output: 1

Input: 3 10

Output: 739577520

Input: 1 10

Output: 1023

Input: 2 10

Output: 988504

Input: 10 10

Output: 214221806

Input: 5 10

Output: 255704347

Input: 6 10

Output: 912388190

Input: 10 10

Output: 214221806

Input: 10 10

Output: 214221806

Input: 10 10

Output: 214221806

Input: 41 72

Output: 514802711

Input: 2 93

Output: 438688387

Input: 4 11

Output: 652981897

Input: 74 97

Output: 210290437

Input: 43 90

Output: 359819551

Input: 7 100

Output: 615605717

Input: 95 95

Output: 370042559

Input: 93 94

Output: 783453307

Input: 72 92

Output: 371769611

Input: 90 90

Output: 476279802

Input: 96 96

Output: 919277499

Input: 100 100

Output: 293143637

Input: 137 326

Output: 103620167

Input: 114 594

Output: 235432555

Input: 423 846

Output: 124096414

Input: 94 940

Output: 567966217

Input: 150 930

Output: 137304690

Input: 374 982

Output: 614625020

Input: 718 928

Output: 207184838

Input: 899 970

Output: 673580895

Input: 668 941

Output: 355234917

Input: 933 933

Output: 163481906

Input: 909 909

Output: 957754959

Input: 960 960

Output: 208938120

Input: 1 1

Output: 1

Input: 745 1143

Output: 564236942

Input: 4082 4279

Output: 709995857

Input: 2334 8447

Output: 781145866

Input: 151 8170

Output: 361397062

Input: 6261 8047

Output: 859529200

Input: 4918 9643

Output: 591601198

Input: 5859 8779

Output: 178500855

Input: 7581 9403

Output: 841886683

Input: 8319 8319

Output: 959670286

Input: 8720 8720

Output: 308706146

Input: 8440 8440

Output: 581363097

Input: 1123 25536

Output: 100450161

Input: 2219 15396

Output: 805561340

Input: 913 29847

Output: 904528473

Input: 4872 29970

Output: 523915099

Input: 1962 29982

Output: 932327862

Input: 556 29967

Output: 751380839

Input: 21258 29982

Output: 364694591

Input: 16362 29971

Output: 795032942

Input: 20911 29922

Output: 333257950

Input: 29942 29942

Output: 398353719

Input: 29907 29907

Output: 892434405

Input: 29995 29995

Output: 84809674

Input: 576460752303423488 30000

Output: 0

Input: 1 30000

Output: 165890098

Input: 2 30000

Output: 735604295

Input: 3 30000

Output: 823214124

Input: 4 30000

Output: 987544667

Input: 5 30000

Output: 942558376

Input: 6 30000

Output: 242728609

Input: 7 30000

Output: 552847548

Input: 8 30000

Output: 570434131

Input: 9 30000

Output: 780287774

Input: 10 30000

Output: 943864195

Input: 14 30000

Output: 671364010

Input: 15 30000

Output: 154333237

Input: 16 30000

Output: 879112665

Input: 17 30000

Output: 889242594

Input: 18 30000

Output: 857685882

Input: 30 30000

Output: 917966455

Input: 31 30000

Output: 429092222

Input: 32 30000

Output: 499547862

Input: 33 30000

Output: 15542629

Input: 34 30000

Output: 122744524

Input: 62 30000

Output: 435633831

Input: 63 30000

Output: 154872965

Input: 64 30000

Output: 732605406

Input: 65 30000

Output: 138804624

Input: 66 30000

Output: 216199230

Input: 126 30000

Output: 747451845

Input: 127 30000

Output: 104581002

Input: 128 30000

Output: 879768588

Input: 129 30000

Output: 524133215

Input: 130 30000

Output: 687263291

Input: 254 30000

Output: 887989844

Input: 255 30000

Output: 570289784

Input: 256 30000

Output: 79493554

Input: 257 30000

Output: 306517085

Input: 258 30000

Output: 32135222

Input: 510 30000

Output: 353745314

Input: 511 30000

Output: 758995176

Input: 512 30000

Output: 648919298

Input: 513 30000

Output: 763731048

Input: 514 30000

Output: 929078767

Input: 1022 30000

Output: 636841414

Input: 1023 30000

Output: 229465479

Input: 1024 30000

Output: 108831968

Input: 1025 30000

Output: 65784034

Input: 1026 30000

Output: 560720873

Input: 2046 30000

Output: 543275530

Input: 2047 30000

Output: 207848513

Input: 2048 30000

Output: 233762295

Input: 2049 30000

Output: 456966672

Input: 2050 30000

Output: 613784189

Input: 4094 30000

Output: 328723609

Input: 4095 30000

Output: 102635335

Input: 4096 30000

Output: 152993942

Input: 4097 30000

Output: 766261439

Input: 4098 30000

Output: 744115050

Input: 8190 30000

Output: 56554961

Input: 8191 30000

Output: 353668885

Input: 8192 30000

Output: 569908138

Input: 8193 30000

Output: 328686369

Input: 8194 30000

Output: 942231052

Input: 16382 30000

Output: 394093041

Input: 16384 30000

Output: 855163255

Input: 16385 30000

Output: 418819142

Input: 16386 30000

Output: 971034756

Input: 29990 30000

Output: 709073603

Input: 29991 30000

Output: 173247574

Input: 29992 30000

Output: 882779686

Input: 29993 30000

Output: 154087811

Input: 29994 30000

Output: 401186967

Input: 29995 30000

Output: 776155145

Input: 29996 30000

Output: 527171023

Input: 29997 30000

Output: 686135238

Input: 29998 30000

Output: 255236926

Input: 29999 30000

Output: 928906440

Input: 5 3

Output: 0

Input: 11 10

Output: 0

Input: 1000000000000000000 143

Output: 0

Input: 50000 30000

Output: 0

Input: 1000000000000000000 1

Output: 0

Input: 4675834657824658 30000

Output: 0

Input: 29997 29998

Output: 553998947

Input: 29992 29995

Output: 514700572


The first line of the input contains four integers d, L, v1, v2 (1 ≤ d, L, v1, v2 ≤ 10 000, d < L) — Luke's width, the initial position of the second press and the speed of the first and second presses, respectively.

NoteIn the first sample Luke should stay exactly in the middle of the segment, that is at coordinates [2;4], as the presses move with the same speed.In the second sample he needs to occupy the position . In this case both presses move to his edges at the same time.

Print a single real value — the maximum period of time Luke can stay alive for. Your answer will be considered correct if its absolute or relative error does not exceed 10 - 6.  Namely: let's assume that your answer is a, and the answer of the jury is b. The checker program will consider your answer correct, if .

Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume that everything happens on a straight line, the presses are initially at coordinates 0 and L, and they move towards each other with speed v1 and v2, respectively. Luke has width d and is able to choose any position between the presses. Luke dies as soon as the distance between the presses is less than his width. Your task is to determine for how long Luke can stay alive.

Input: 2 6 2 2

Output: 1.0000000

Output: 1.000000

Output: 1.0

Output: 1.0000000000

Input: 1 9 1 2

Output: 2.66666666667

Output: 2.6666666666666665

Output: 2.6666667

Output: 2.666667

Output: 2.6666666667

Input: 1 10000 1 1

Output: 4999.500000

Output: 4999.5

Output: 4999.5000000

Output: 4999.5000000000

Input: 9999 10000 10000 10000

Output: 0.000050

Output: 0.0000500000

Output: 0.0000500

Output: 5.0E-5

Output: 5e-05

Input: 1023 2340 1029 3021

Output: 0.3251852

Output: 0.325185

Output: 0.325185185185

Output: 0.3251851852

Output: 0.3251851851851852

Input: 2173 2176 10000 9989

Output: 0.0001500825454

Output: 0.0001500825

Output: 0.0001501

Output: 1.5008254539996998E-4

Output: 0.000150

Input: 1 2 123 1

Output: 0.0080645

Output: 0.008064516129032258

Output: 0.008065

Output: 0.00806451612903

Output: 0.0080645161

Input: 123 1242 12 312

Output: 3.4537037037037037

Output: 3.453704

Output: 3.4537037037

Output: 3.4537037

Input: 2 9997 3 12

Output: 666.3333333333334

Output: 666.333333

Output: 666.333333333

Output: 666.3333333333

Output: 666.3333333

Input: 1 10000 10000 10000

Output: 0.4999500000

Output: 0.49995

Output: 0.4999500

Output: 0.499950

Input: 3274 4728 888 4578

Output: 0.2660080

Output: 0.26600804976216613

Output: 0.2660080498

Output: 0.266008049762

Output: 0.266008

Input: 4600 9696 5634 8248

Output: 0.3670941

Output: 0.367094

Output: 0.3670940787

Output: 0.367094078663

Output: 0.36709407866301685

Input: 2255 7902 8891 429

Output: 0.6059013

Output: 0.605901

Output: 0.605901287554

Output: 0.6059012876

Output: 0.605901287553648

Input: 6745 9881 2149 9907

Output: 0.260119442601

Output: 0.2601194426011944

Output: 0.2601194

Output: 0.2601194426

Output: 0.260119

Input: 4400 8021 6895 2089

Output: 0.403049866429

Output: 0.4030498664292075

Output: 0.403050

Output: 0.4030498664

Output: 0.4030499

Input: 5726 9082 7448 3054

Output: 0.319558179394

Output: 0.3195582

Output: 0.3195581794

Output: 0.319558

Output: 0.31955817939440107

Input: 3381 9769 4898 2532

Output: 0.859757738896

Output: 0.8597577

Output: 0.8597577389

Output: 0.8597577388963661

Output: 0.859758

Input: 1036 6259 5451 4713

Output: 0.513872

Output: 0.5138724911

Output: 0.5138724911452184

Output: 0.513872491145

Output: 0.5138725

Input: 5526 6455 197 4191

Output: 0.2117137648131267

Output: 0.2117137648

Output: 0.211713764813

Output: 0.2117138

Output: 0.211714

Input: 1196 4082 4071 9971

Output: 0.2055263

Output: 0.2055262783

Output: 0.205526278308

Output: 0.205526

Output: 0.20552627830793335

Input: 8850 9921 8816 9449

Output: 0.0586367

Output: 0.0586367369

Output: 0.0586367369286

Output: 0.058637

Output: 0.058636736928551876

Input: 3341 7299 2074 8927

Output: 0.3597854740

Output: 0.359785474048

Output: 0.35978547404781386

Output: 0.3597855

Output: 0.359785

Input: 7831 8609 6820 2596

Output: 0.082625

Output: 0.0826253186

Output: 0.08262531860662702

Output: 0.0826253186066

Output: 0.0826253

Input: 2322 7212 77 4778

Output: 1.007209062821833

Output: 1.00720906282

Output: 1.0072091

Output: 1.007209

Output: 1.0072090628

Input: 9976 9996 4823 4255

Output: 0.0022031284

Output: 0.00220312844239

Output: 0.002203128442388191

Output: 0.002203

Output: 0.0022031

Input: 7631 9769 5377 6437

Output: 0.1809717285

Output: 0.180971728458

Output: 0.1809717

Output: 0.180972

Output: 0.18097172845776197

Input: 8957 9525 8634 107

Output: 0.064981

Output: 0.0649811

Output: 0.06498112344125385

Output: 0.0649811234

Output: 0.0649811234413

Input: 6612 9565 3380 2288

Output: 0.520995

Output: 0.5209950599858857

Output: 0.520995059986

Output: 0.5209951

Output: 0.5209950600

Input: 1103 6256 3934 9062

Output: 0.39650661742074483

Output: 0.3965066

Output: 0.396506617421

Output: 0.3965066174

Output: 0.396507

Input: 1854 3280 1481 2140

Output: 0.393814

Output: 0.3938139

Output: 0.393813863574

Output: 0.39381386357359843

Output: 0.3938138636

Input: 2 6 2 2

Output: 1.0

Output: 1

Output: 1.000000

Output: 1.0000000000

Input: 1 9 1 2

Output: 2.6666666667

Output: 2.6666666666666665

Output: 2.666667

Input: 1 10000 1 1

Output: 4999.5

Output: 4999.500000

Output: 4999.5000000000

Input: 9999 10000 10000 10000

Output: 0.000050

Output: 0.0000500000

Output: 5.0E-5

Output: 5e-005

Input: 1023 2340 1029 3021

Output: 0.325185

Output: 0.3251852

Output: 0.3251851852

Output: 0.3251851851851852

Input: 2173 2176 10000 9989

Output: 0.0001500825

Output: 1.5008254539996998E-4

Output: 0.000150

Input: 1 2 123 1

Output: 0.0080645161

Output: 0.008064516129032258

Output: 0.008064516

Output: 0.008065

Input: 123 1242 12 312

Output: 3.453704

Output: 3.4537037037037037

Output: 3.4537037037

Input: 2 9997 3 12

Output: 666.3333333333

Output: 666.333333

Output: 666.3333

Output: 666.3333333333334

Input: 1 10000 10000 10000

Output: 0.49995

Output: 0.4999500000

Output: 0.499950

Input: 3274 4728 888 4578

Output: 0.26600804976216613

Output: 0.2660080498

Output: 0.266008

Input: 4600 9696 5634 8248

Output: 0.367094

Output: 0.36709407866301685

Output: 0.3670941

Output: 0.3670940787

Input: 2255 7902 8891 429

Output: 0.605901

Output: 0.6059012876

Output: 0.605901287553648

Output: 0.6059013

Input: 6745 9881 2149 9907

Output: 0.2601194426011944

Output: 0.2601194426

Output: 0.2601194

Output: 0.260119

Input: 4400 8021 6895 2089

Output: 0.4030499

Output: 0.4030498664

Output: 0.4030498664292075

Output: 0.403050

Input: 5726 9082 7448 3054

Output: 0.31955817939440107

Output: 0.319558

Output: 0.3195581794

Output: 0.3195582

Input: 3381 9769 4898 2532

Output: 0.8597577388963661

Output: 0.8597577

Output: 0.8597577389

Output: 0.859758

Input: 1036 6259 5451 4713

Output: 0.5138724911452184

Output: 0.5138724911

Output: 0.5138725

Output: 0.513872

Input: 5526 6455 197 4191

Output: 0.2117137648

Output: 0.211714

Output: 0.2117138

Output: 0.2117137648131267

Input: 1196 4082 4071 9971

Output: 0.205526

Output: 0.2055263

Output: 0.2055262783

Output: 0.20552627830793335

Input: 8850 9921 8816 9449

Output: 0.058637

Output: 0.05863674

Output: 0.0586367369

Output: 0.058636736928551876

Input: 3341 7299 2074 8927

Output: 0.359785

Output: 0.3597854740

Output: 0.35978547404781386

Output: 0.3597855

Input: 7831 8609 6820 2596

Output: 0.082625

Output: 0.08262532

Output: 0.0826253186

Output: 0.08262531860662702

Input: 2322 7212 77 4778

Output: 1.007209

Output: 1.0072090628

Output: 1.007209062821833

Input: 9976 9996 4823 4255

Output: 0.002203128442388191

Output: 0.002203

Output: 0.0022031284

Output: 0.002203128

Input: 7631 9769 5377 6437

Output: 0.1809717

Output: 0.18097172845776197

Output: 0.1809717285

Output: 0.180972

Input: 8957 9525 8634 107

Output: 0.06498112344125385

Output: 0.06498112

Output: 0.064981

Output: 0.0649811234

Input: 6612 9565 3380 2288

Output: 0.520995

Output: 0.5209951

Output: 0.5209950599858857

Output: 0.5209950600

Input: 1103 6256 3934 9062

Output: 0.39650661742074483

Output: 0.3965066

Output: 0.3965066174

Output: 0.396507

Input: 1854 3280 1481 2140

Output: 0.393814

Output: 0.3938139

Output: 0.3938138636

Output: 0.39381386357359843


First line of the input contains a single integer n (1 ≤ n ≤ 1018) — the number of rubles Kolya has at the beginning. Then follow three lines containing integers a, b and c (1 ≤ a ≤ 1018, 1 ≤ c < b ≤ 1018) — the cost of one plastic liter bottle, the cost of one glass liter bottle and the money one can get back by returning an empty glass bottle, respectively.

NoteIn the first sample, Kolya can buy one glass bottle, then return it and buy one more glass bottle. Thus he will drink 2 liters of kefir.In the second sample, Kolya can buy two plastic bottle and get two liters of kefir, or he can buy one liter glass bottle, then return it and buy one plastic bottle. In both cases he will drink two liters of kefir.

Print the only integer — maximum number of liters of kefir, that Kolya can drink.

Kolya Gerasimov loves kefir very much. He lives in year 1984 and knows all the details of buying this delicious drink. One day, as you probably know, he found himself in year 2084, and buying kefir there is much more complicated.Kolya is hungry, so he went to the nearest milk shop. In 2084 you may buy kefir in a plastic liter bottle, that costs a rubles, or in glass liter bottle, that costs b rubles. Also, you may return empty glass bottle and get c (c < b) rubles back, but you cannot return plastic bottles.Kolya has n rubles and he is really hungry, so he wants to drink as much kefir as possible. There were no plastic bottles in his 1984, so Kolya doesn't know how to act optimally and asks for your help.

Input:
10
11
9
8

Output: 2

Input:
10
5
6
1

Output: 2

Input:
2
2
2
1

Output: 1

Input:
10
3
3
1

Output: 4

Input:
10
1
2
1

Output: 10

Input:
10
2
3
1

Output: 5

Input:
9
2
4
1

Output: 4

Input:
9
2
2
1

Output: 8

Input:
9
10
10
1

Output: 0

Input:
10
2
2
1

Output: 9

Input:
1000000000000000000
2
10
9

Output: 999999999999999995

Input:
501000000000000000
300000000000000000
301000000000000000
100000000000000000

Output: 2

Input:
10
1
9
8

Output: 10

Input:
10
8
8
7

Output: 3

Input:
10
5
5
1

Output: 2

Input:
29
3
3
1

Output: 14

Input:
45
9
9
8

Output: 37

Input:
45
9
9
1

Output: 5

Input:
100
10
10
9

Output: 91

Input:
179
10
9
1

Output: 22

Input:
179
2
2
1

Output: 178

Input:
179
179
179
1

Output: 1

Input:
179
59
59
58

Output: 121

Input:
500
250
250
1

Output: 2

Input:
500
1
250
1

Output: 500

Input:
501
500
500
499

Output: 2

Input:
501
450
52
1

Output: 9

Input:
501
300
301
100

Output: 2

Input:
500
179
10
1

Output: 55

Input:
1000
500
10
9

Output: 991

Input:
1000
2
10
9

Output: 995

Input:
1001
1000
1000
999

Output: 2

Input:
10000
10000
10000
1

Output: 1

Input:
10000
10
5000
4999

Output: 5500

Input:
1000000000
999999998
999999999
999999998

Output: 3

Input:
1000000000
50
50
49

Output: 999999951

Input:
1000000000
500
5000
4999

Output: 999995010

Input:
1000000000
51
100
98

Output: 499999952

Input:
1000000000
100
51
50

Output: 999999950

Input:
1000000000
2
5
4

Output: 999999998

Input:
1000000000000000000
999999998000000000
999999999000000000
999999998000000000

Output: 3

Input:
1000000000
2
2
1

Output: 999999999

Input:
999999999
2
999999998
1

Output: 499999999

Input:
999999999999999999
2
2
1

Output: 999999999999999998

Input:
999999999999999999
10
10
9

Output: 999999999999999990

Input:
999999999999999999
999999999999999998
999999999999999998
999999999999999997

Output: 2

Input:
999999999999999999
501
501
1

Output: 1999999999999999

Input:
999999999999999999
2
50000000000000000
49999999999999999

Output: 974999999999999999

Input:
999999999999999999
180
180
1

Output: 5586592178770949

Input:
1000000000000000000
42
41
1

Output: 24999999999999999

Input:
1000000000000000000
41
40
1

Output: 25641025641025641

Input:
100000000000000000
79
100
25

Output: 1333333333333333

Input:
1
100
5
4

Output: 0

Input:
1000000000000000000
1000000000000000000
10000000
9999999

Output: 999999999990000001

Input:
999999999999999999
999999999000000000
900000000000000000
899999999999999999

Output: 100000000000000000

Input:
13
10
15
11

Output: 1

Input:
1
1000
5
4

Output: 0

Input:
10
100
10
1

Output: 1

Input:
3
2
100000
99999

Output: 1

Input:
4
2
4
2

Output: 2

Input:
5
3
6
4

Output: 1

Input:
1
7
65
49

Output: 0

Input:
10
20
100
99

Output: 0

Input:
10000000000
10000000000
9000000000
8999999999

Output: 1000000001

Input:
90
30
101
100

Output: 3

Input:
999999999999999
5
500000000000000
499999999999999

Output: 599999999999999

Input:
1000000000000000000
1000000000000000000
1000000000
999999999

Output: 999999999000000001

Input:
1
1000000000000000000
1000000000
999999999

Output: 0

Input:
100000000000000000
100000000000000000
1000000000
999999999

Output: 99999999000000001

Input:
100000000000000009
100
1000000000000000
999999999999999

Output: 99010000000000009

Input:
10
20
10
9

Output: 1

Input:
10
4
14
13

Output: 2

Input:
11
3
9
7

Output: 4

Input:
1000000000
5
7
4

Output: 333333332

Input:
12155
1943
28717
24074

Output: 6

Input:
1000000000000000000
10
20
5

Output: 100000000000000000

Input:
98
33
440
314

Output: 2

Input:
1070252292
57449678
237309920
221182550

Output: 56

Input:
100
3
102
101

Output: 33

Input:
100000000000000000
100000000000000001
1000000000000000
999999999999999

Output: 99000000000000001

Input:
66249876257975628
302307316
406102416
182373516

Output: 296116756

Input:
10
5
10
1

Output: 2

Input:
1000000000000000000
10
1000000000
999999998

Output: 499999999600000000