import java . io . * ; import java . util . * ; import java . util . ArrayList ;   public class CodeForce { static BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; static StringBuilder sb = new StringBuilder ( ) ;   static int next ( String [ ] sr , int ind ) { if ( sr [ ind ] . equals ( " S " ) || sr [ ind ] . equals ( " F " ) ) return 1000 ; return Integer . parseInt ( sr [ ind ] ) ; }   public static void main ( String [ ] args ) throws IOException { int n = Integer . parseInt ( br . readLine ( ) ) ; int [ ] arr = new int [ n ] ; int [ ] arr1 = new int [ n ] ; String [ ] sr = br . readLine ( ) . split ( " ▁ " ) ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = next ( sr , i ) ; } int k = arr [ 0 ] ; if ( k == 0 ) k = arr [ 1 ] ; sr = br . readLine ( ) . split ( " ▁ " ) ; int j = 0 ; for ( int i = 0 ; i < n ; i ++ ) { arr1 [ i ] = next ( sr , i ) ; if ( arr1 [ i ] == k ) j = i ; } int i = 0 ; while ( i < n ) { j = j % n ; if ( arr [ i ] == 0 ) i ++ ; if ( arr1 [ j ] == 0 ) { j ++ ; j = j % n ; } if ( i < n ) { if ( arr [ i ] != arr1 [ j ] ) { System . out . println ( " NO " ) ; return ; } } i ++ ; j ++ ; } System . out . println ( " YES " ) ; } }

n = int ( input ( ) ) l1 = list ( map ( int , input ( ) . split ( ) ) ) l2 = list ( map ( int , input ( ) . split ( ) ) ) for k in range ( n ) : if l1 [ k ] == 0 : l1 = l1 [ : k ] + l1 [ k + 1 : ] breakfor k in range ( n ) : if l2 [ k ] == 0 : l2 = l2 [ : k ] + l2 [ k + 1 : ] break i = 0j = 0 ans = Truefor k in range ( n - 1 ) : if l1 [ k ] == 1 : i = k if l2 [ k ] == 1 : j = k for k in range ( n - 1 ) : if l1 [ ( i + k ) % ( n - 1 ) ] != l2 [ ( j + k ) % ( n - 1 ) ] : ans = False break if ans : print ( " YES " ) else : print ( " NO " ) NEW_LINE


n = int ( input ( ) ) l1 = list ( map ( int , input ( ) . split ( ) ) ) l2 = list ( map ( int , input ( ) . split ( ) ) )   for k in range ( n ) : if l1 [ k ] == 0 : l1 = l1 [ : k ] + l1 [ k + 1 : ] breakfor k in range ( n ) : if l2 [ k ] == 0 : l2 = l2 [ : k ] + l2 [ k + 1 : ] break   i = 0j = 0 ans = Truefor k in range ( n - 1 ) : if l1 [ k ] == 1 : i = k if l2 [ k ] == 1 : j = k for k in range ( n - 1 ) : if l1 [ ( i + k ) % ( n - 1 ) ] != l2 [ ( j + k ) % ( n - 1 ) ] : ans = False break if ans : print ( " YES " ) else : print ( " NO " ) NEW_LINE


def run ( ) : n = int ( input ( ) ) a = [ int ( i ) for i in input ( ) . split ( ) ] b = [ int ( i ) for i in input ( ) . split ( ) ]   i = a . index ( 1 ) j = b . index ( 1 ) ok = True cont = 0 while cont < n : if ( a [ i ] != b [ j ] ) : ok = False break i = ( i + 1 ) % n j = ( j + 1 ) % n if ( a [ i ] == 0 ) : i = ( i + 1 ) % n if ( b [ j ] == 0 ) : j = ( j + 1 ) % n   cont += 1 print ( ' YES ' if ok else ' NO ' )       if __name__ == " _ _ main _ _ " : run ( ) NEW_LINE


from sys import stdina = int ( stdin . readline ( ) ) b = input ( ) . replace ( ' ▁ ' , ' ' ) . replace ( '0' , ' ' ) c = input ( ) . replace ( ' ▁ ' , ' ' ) . replace ( '0' , ' ' ) if b in 2 * c : print ( " YES " ) else : print ( " NO " ) NEW_LINE


n = int ( input ( ) ) s1 = input ( ) . split ( ) s2 = input ( ) . split ( )   st1 = 0 st2 = 0 for i in range ( n ) : if s1 [ i ] == '1' : st1 = i if s2 [ i ] == '1' : st2 = i   i = ( st1 + 1 ) % nj = ( st2 + 1 ) % nf = Truesteps = 0 while steps < n : if s1 [ i ] == '0' : i = ( i + 1 ) % n if s2 [ j ] == '0' : j = ( j + 1 ) % n if s1 [ i ] != s2 [ j ] : f = False break i = ( i + 1 ) % n j = ( j + 1 ) % n steps += 1   if f : print ( ' YES ' ) else : print ( ' NO ' ) NEW_LINE


import java . util . Scanner ; ; public class Main {


import java . io . * ; import java . util . * ; public class Main { static InputReader in = new InputReader ( System . in ) ; static PrintWriter out = new PrintWriter ( System . out ) ; static int oo = ( int ) 1e9 ;


( ( x , y , r , R ) , ( u , v , w , W ) ) = [ map ( int , input ( ) . split ( ) ) for _ in range ( 2 ) ] d = ( x - u ) ** 2 + ( y - v ) ** 2   def t ( a , b , c ) : if c <= a and ( a - c ) ** 2 >= d : return 1 if c >= b and ( c - b ) ** 2 >= d : return 1 if ( b + c ) ** 2 <= d : return 1 return 0 print ( t ( r , R , w ) + t ( r , R , W ) + t ( w , W , r ) + t ( w , W , R ) ) NEW_LINE


import mathdef intersect ( r1 , R1 , r ) : global d if d + r <= r1 : return 1 elif r + R1 <= d : return 1 elif d + R1 <= r : return 1 return 0   x1 , y1 , r1 , R1 = map ( int , input ( ) . split ( ) ) x2 , y2 , r2 , R2 = map ( int , input ( ) . split ( ) ) d = math . sqrt ( ( x1 - x2 ) ** 2 + ( y1 - y2 ) ** 2 ) print ( intersect ( r1 , R1 , r2 ) + intersect ( r1 , R1 , R2 ) + intersect ( r2 , R2 , r1 ) + intersect ( r2 , R2 , R1 ) )             NEW_LINE


def okay ( xc , yc , rc , xr , yr , rr , Rr ) : d = ( ( xc - xr ) ** 2 + ( yc - yr ) ** 2 ) ** 0.5 if d + rc <= rr : return True if d >= rc + Rr : return True if d + Rr <= rc : return True return False   x1 , y1 , r1 , R1 = map ( float , input ( ) . split ( ) ) x2 , y2 , r2 , R2 = map ( float , input ( ) . split ( ) ) ans = 0 if okay ( x2 , y2 , r2 , x1 , y1 , r1 , R1 ) : ans += 1 if okay ( x2 , y2 , R2 , x1 , y1 , r1 , R1 ) : ans += 1 if okay ( x1 , y1 , r1 , x2 , y2 , r2 , R2 ) : ans += 1 if okay ( x1 , y1 , R1 , x2 , y2 , r2 , R2 ) : ans += 1 print ( ans ) NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . ArrayDeque ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . Random ; import java . util . StringTokenizer ;   public class Solution { public static void main ( String [ ] args ) throws IOException { FastScanner fs = new FastScanner ( ) ; PrintWriter out = new PrintWriter ( System . out ) ; int tt = 1 ; while ( tt -- > 0 ) { Point p1 = new Point ( fs . nextInt ( ) , fs . nextInt ( ) ) ; int r1 = fs . nextInt ( ) , R1 = fs . nextInt ( ) ; Point p2 = new Point ( fs . nextInt ( ) , fs . nextInt ( ) ) ; int r2 = fs . nextInt ( ) , R2 = fs . nextInt ( ) ; int ans = 0 ; ans += intersection ( p1 , r1 , p2 , r2 , R2 ) ; ans += intersection ( p1 , R1 , p2 , r2 , R2 ) ; ans += intersection ( p2 , r2 , p1 , r1 , R1 ) ; ans += intersection ( p2 , R2 , p1 , r1 , R1 ) ; out . println ( ans ) ; } out . close ( ) ; } static int intersection ( Point p1 , int r , Point p2 , int r2 , int R2 ) { if ( ( r + R2 <= p1 . dist ( p2 ) ) || ( r - R2 >= p1 . dist ( p2 ) ) || ( r2 - r >= p1 . dist ( p2 ) ) ) return 1 ; return 0 ; } static class Point { int x , y ; Point ( int x , int y ) { this . x = x ; this . y = y ; } double dist ( Point p ) { long dx = x - p . x , dy = y - p . y ; return Math . sqrt ( dx * dx + dy * dy ) ; } } static final Random random = new Random ( ) ; static void ruffleSort ( int [ ] a ) { int n = a . length ;


import java . util . Scanner ; public class Main { public static void main ( String args [ ] ) { Scanner s = new Scanner ( System . in ) ; int t = s . nextInt ( ) ; while ( t -- != 0 ) { long l1 = s . nextLong ( ) ; long r1 = s . nextLong ( ) ; long l2 = s . nextLong ( ) ; long r2 = s . nextLong ( ) ; long min = Math . min ( l1 , r1 ) ; long max = Math . max ( l2 , r2 ) ; if ( min == max ) { System . out . println ( Math . max ( l1 , r1 ) + " ▁ " + Math . max ( l2 , r2 ) ) ;   } else { System . out . println ( min + " ▁ " + max ) ; } } } }

cases = int ( input ( ) ) for __ in range ( cases ) : l1 , r1 , l2 , r2 = list ( map ( int , input ( ) . split ( ) ) ) if ( l1 != l2 ) : print ( l1 , l2 ) else : print ( l1 , r2 ) NEW_LINE


def string_to_list ( s , char ) : collector = " " output_list = [ ] for i in range ( len ( s ) ) : if s [ i ] != char : collector += s [ i ] if i == len ( s ) - 1 : output_list . append ( int ( collector ) ) else : output_list . append ( int ( collector ) ) collector = " " return output_list     NEW_LINE


n_queries = int ( input ( ) ) for _ in range ( n_queries ) : l1 , r1 , l2 , r2 = map ( int , input ( ) . strip ( ) . split ( ' ▁ ' ) ) if l1 != l2 : print ( f ' { l1 } ▁ { l2 } ' ) elif l1 != r1 : print ( f ' { r1 } ▁ { l2 } ' ) else : print ( f ' { l1 } ▁ { r2 } ' )       NEW_LINE


Q = int ( input ( ) )   for _ in range ( Q ) :   l1 , r1 , l2 , r2 = list ( map ( int , input ( ) . split ( ) ) )   if l1 != l2 : print ( l1 , l2 ) else : print ( l1 , r2 ) NEW_LINE


q = int ( input ( ) ) for i in range ( q ) : l1 , r1 , l2 , r2 = list ( input ( ) . strip ( ) . split ( ) ) if l1 != l2 : print ( l1 , l2 ) else : print ( l1 , r2 ) NEW_LINE


import java . io . BufferedReader ; import java . io . BufferedWriter ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . OutputStreamWriter ; import java . io . PrintWriter ; import java . util . StringTokenizer ;   public class temp4 { static class FastReader { BufferedReader br ; StringTokenizer st ; public FastReader ( ) { br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; } String next ( ) { while ( st == null || ! st . hasMoreElements ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; } int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; } String nextLine ( ) { String str = " " ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return str ; } } static class Print { private final BufferedWriter bw ; public Print ( ) { bw = new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ; } public void print ( String str ) throws IOException { bw . append ( str ) ; } public void println ( String str ) throws IOException { print ( str ) ; bw . append ( " \n " ) ; } public void close ( ) throws IOException { bw . close ( ) ; } } public static void main ( String [ ] args ) throws IOException { FastReader scn = new FastReader ( ) ;


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . Collections ; import java . util . HashSet ; import java . util . StringTokenizer ;   public class A { public static void main ( String [ ] args ) { FastScanner fs = new FastScanner ( ) ; int t = fs . nextInt ( ) ; while ( t -- > 0 ) { int a = fs . nextInt ( ) ; int b = fs . nextInt ( ) ; int c = fs . nextInt ( ) ; int d = fs . nextInt ( ) ; int x = 0 ; int y = 0 ; x = a ; y = c ; if ( x == y ) x = b ; System . out . println ( x + " ▁ " + y ) ; } } static class FastScanner { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( " " ) ; String next ( ) { while ( ! st . hasMoreTokens ( ) ) try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return st . nextToken ( ) ; } int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } int [ ] readArray ( int n ) { int [ ] a = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = nextInt ( ) ; return a ; } long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } } }


import java . util . * ;   public class GameWithString {   public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; String inputString = scan . nextLine ( ) ; StringBuffer gameString = new StringBuffer ( ) ; int playerTurn = 0 ; gameString . append ( inputString ) ; for ( int i = 1 ; i < gameString . length ( ) ; i ++ ) { if ( gameString . charAt ( i ) == gameString . charAt ( i - 1 ) ) { gameString . deleteCharAt ( i - 1 ) ; gameString . deleteCharAt ( i - 1 ) ; playerTurn ++ ; i = Math . max ( i - 2 , 0 ) ; } } if ( playerTurn % 2 == 0 ) { System . out . println ( " No " ) ; } else { System . out . println ( " Yes " ) ; }

n = input ( ) lst = [ ] cnt = 0 for i in n : if len ( lst ) == 0 : lst . append ( i ) elif i == lst [ - 1 ] : lst . pop ( ) cnt += 1 else : lst . append ( i ) if cnt % 2 == 0 : print ( ' No ' ) else : print ( ' Yes ' ) NEW_LINE


s = input ( ) st = [ '0' ] c = 0 for i in s : NEW_LINE


s = input ( ) res = [ ' ' ] cnt = 0 for i in s : if i == res [ - 1 ] : res . pop ( ) cnt += 1 else : res . append ( i ) print ( " Yes " if cnt % 2 == 1 else " No " ) NEW_LINE


s = list ( input ( ) ) i = 0 count = 0 while i < len ( s ) - 1 : if s [ i ] == s [ i + 1 ] : s . pop ( i ) s . pop ( i ) count += 1 if i > 0 : i -= 1 else : i += 1 print ( " YES " if count % 2 == 1 else " NO " ) NEW_LINE


import java . util . * ;   public class GameWithString {   public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; String inputString = scan . nextLine ( ) ; StringBuffer gameString = new StringBuffer ( ) ; int playerTurn = 0 ; gameString . append ( inputString ) ;


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . Stack ; import java . util . StringTokenizer ;   public class C { static class FastScanner { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( " " ) ; String next ( ) { while ( ! st . hasMoreTokens ( ) ) try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return st . nextToken ( ) ; } int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } int [ ] readArray ( int n ) { int [ ] a = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = nextInt ( ) ; return a ; } long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } } public static void main ( String [ ] args ) { FastScanner fs = new FastScanner ( ) ; String s = fs . next ( ) ; int dels = 0 ; Stack < Character > st = new Stack < > ( ) ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( st . size ( ) > 0 ) { if ( s . charAt ( i ) == st . peek ( ) ) { st . pop ( ) ; dels ++ ; } else { st . push ( s . charAt ( i ) ) ; } } else { st . push ( s . charAt ( i ) ) ; } } if ( dels % 2 == 0 ) { System . out . println ( " NO " ) ; } else { System . out . println ( " YES " ) ; } } }


import java . io . * ;   import java . util . * ; public class Solution {


import java . util . Scanner ;   public class TextDocumentAnalysis {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; char [ ] c = sc . next ( ) . toCharArray ( ) ; int wip = 0 , max = 0 , len ; int j ; for ( int i = 0 ; i < n ; ) { if ( c [ i ] == ' ( ' ) { j = i + 1 ; while ( c [ j ] != ' ) ' ) { len = 0 ; while ( j < n && c [ j ] != ' _ ' && c [ j ] != ' ) ' ) { len ++ ; j ++ ; } if ( len > 0 ) wip ++ ; if ( c [ j ] == ' _ ' ) j ++ ; } j ++ ; i = j ; } else if ( c [ i ] != ' _ ' ) { j = i + 1 ; while ( j < n && c [ j ] != ' _ ' && c [ j ] != ' ( ' && c [ j ] != ' ) ' ) { j ++ ; } max = Math . max ( max , j - i ) ; i = j ; } else i ++ ; } System . out . println ( max + " ▁ " + wip ) ; sc . close ( ) ; } }

n = int ( input ( ) ) st = input ( ) n += 1 st += ' _ ' v_sk = [ ] bz_sk = [ ] dd = 0 dd1 = 0 sw = Falsect = 0 long = [ ] for e in range ( n ) : if st [ e ] == ' ( ' : bz_sk . append ( st [ dd1 : e ] ) dd = e + 1 elif st [ e ] == ' ) ' : v_sk . append ( st [ dd : e ] ) dd1 = e + 1 bz_sk . append ( st [ dd1 : ] ) for e in v_sk : rem = - 1 e += ' _ ' for qq in range ( len ( e ) ) : if e [ qq ] == ' _ ' : if rem == - 1 : continue else : ct += 1 rem = - 1 else : rem = qqfor e in bz_sk : z = e . split ( ' _ ' ) for k in z : kk = 0 for ee in k : if ee != ' _ ' : kk += 1 long . append ( kk ) print ( max ( long ) , ct ) NEW_LINE


n , s = int ( input ( ) ) , input ( ) max_len , in_par = 0 , 0 while s . find ( ' ( ' ) != - 1 : i , j = s . find ( ' ( ' ) , s . find ( ' ) ' ) in_par += len ( [ t for t in s [ i + 1 : j ] . split ( ' _ ' ) if t ] ) s = s [ : i ] + " _ " + s [ j + 1 : ] max_len = max ( [ len ( t ) for t in s . split ( ' _ ' ) ] ) print ( max_len , in_par ) NEW_LINE


n = int ( input ( ) ) s = input ( ) . replace ( ' ▁ ' , ' ' ) f = Falsea = b = 0 for chr in s . replace ( ' ( ' , ' ) ' ) . split ( ' ) ' ) : for i in chr . split ( ' _ ' ) : if f : b += len ( i ) != 0 else : a = max ( a , len ( i ) ) f = not fprint ( a , b ) NEW_LINE


n = int ( input ( ) ) s = input ( ) . replace ( ' ▁ ' , ' ' ) f = Falsea = b = 0 for chr in s . replace ( ' ( ' , ' ) ' ) . split ( ' ) ' ) : for i in chr . split ( ' _ ' ) : if f : b += len ( i ) != 0 else : a = max ( a , len ( i ) ) f = not fprint ( a , b )   NEW_LINE


n = int ( input ( ) ) s = str ( input ( ) ) outside , inside = ' ' , ' ' p = 0 while p < n : if s [ p ] == ' ( ' : pd = p + 1 while pd < n : if s [ pd ] == ' ) ' : pd += 1 break inside += s [ pd ] pd += 1 p = pd inside += ' _ ' else : outside += s [ p ] p += 1 if p < n : if s [ p ] == ' ( ' or s [ p ] == ' ) ' : outside += ' _ ' outside = outside . split ( ' _ ' ) inside = inside . split ( ' _ ' ) val = 0 for j in range ( len ( outside ) ) : val = max ( val , len ( outside [ j ] ) ) length = 0 for j in range ( len ( inside ) ) : if len ( inside [ j ] ) > 0 : length += 1 print ( val , length ) NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . * ;   public class Main { public static void main ( String [ ] args ) { FastScanner input = new FastScanner ( ) ; int n = input . nextInt ( ) ; String s = input . next ( ) ; int max = Integer . MIN_VALUE ; int parenMax = 0 ; int count = 0 ; int parencount = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( s . charAt ( i ) == ' ( ' ) { max = Math . max ( max , count ) ; count = 0 ; parencount = 0 ; for ( i = i + 1 ; ; i ++ ) { if ( s . charAt ( i ) == ' ) ' ) { if ( parencount > 0 ) parenMax ++ ; parencount = 0 ; break ; } else if ( s . charAt ( i ) == ' _ ' ) { if ( parencount > 0 ) parenMax ++ ; parencount = 0 ; } else parencount ++ ; } } else if ( s . charAt ( i ) == ' _ ' ) { max = Math . max ( max , count ) ; count = 0 ; } else { count ++ ; } } max = Math . max ( max , count ) ; System . out . println ( max + " ▁ " + parenMax ) ; }   static class FastScanner {   BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( " " ) ;   String next ( ) { while ( ! st . hasMoreTokens ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; }   int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   long nextLong ( ) {   return Long . parseLong ( next ( ) ) ; }   double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; }   String nextLine ( ) throws IOException { return br . readLine ( ) ; } }   }


import java . util . Scanner ;   public class TextDocAnalysis { public static void main ( String [ ] args ) {   Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) , i , m = 0 , l = 0 , w = 0 , wl = 0 ; String s = in . next ( ) ; boolean p = false ;   in . close ( ) ; for ( i = 0 ; i < n ; i ++ ) { char c = s . charAt ( i ) ;   if ( c == ' ( ' ) { p = true ; m = Math . max ( m , l ) ; l = 0 ; wl = 0 ; } else if ( c == ' ) ' ) { p = false ; m = Math . max ( m , l ) ; l = 0 ; wl = 0 ; } else if ( c == ' _ ' ) { m = Math . max ( m , l ) ; l = 0 ; wl = 0 ; } else if ( c != ' _ ' && ! p ) { l ++ ; } else if ( c != ' _ ' && p && wl == 0 ) { w ++ ; wl ++ ; } } System . out . println ( Math . max ( m , l ) + " ▁ " + w ) ; } }


import java . util . Scanner ; public class _723B { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; char [ ] s = sc . next ( ) . toCharArray ( ) ; boolean in = false ; int len = 0 , maxLen = 0 , words = 0 ; for ( int i = 0 ; i < s . length ; i ++ ) { if ( ' a ' <= s [ i ] && s [ i ] <= ' z ' || ' A ' <= s [ i ] && s [ i ] <= ' Z ' ) len ++ ; else len = 0 ; if ( s [ i ] == ' ( ' ) in = true ; else if ( s [ i ] == ' ) ' ) in = false ; if ( in ) { if ( len == 1 ) words ++ ; } else maxLen = Math . max ( len , maxLen ) ; } System . out . println ( maxLen + " ▁ " + words ) ; } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . Arrays ; import java . util . Random ; import java . util . StringTokenizer ;   public class Solution { static final int N = ( int ) 2e6 + 10 ; public static void main ( String [ ] args ) throws IOException { FastScanner fs = new FastScanner ( ) ; PrintWriter out = new PrintWriter ( System . out ) ; int tt = 1 ; while ( tt -- > 0 ) { int n = fs . nextInt ( ) ; int [ ] a = fs . readArray ( n ) ; ruffleSort ( a ) ; int [ ] pos = new int [ N ] ; Arrays . fill ( pos , - 1 ) ; boolean [ ] done = new boolean [ N ] ; for ( int i = 0 ; i < n ; i ++ ) { pos [ a [ i ] ] = i ; } for ( int i = 1 ; i < N ; i ++ ) { if ( pos [ i ] == - 1 ) pos [ i ] = pos [ i - 1 ] ; } int ans = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ! done [ a [ i ] ] ) { done [ a [ i ] ] = true ; for ( int j = 2 * a [ i ] ; j < N ; j += a [ i ] ) { int ind = pos [ j - 1 ] ; if ( ind != i ) ans = Math . max ( ans , a [ ind ] % a [ i ] ) ; if ( ind == n - 1 ) break ; } } } out . println ( ans ) ; } out . close ( ) ; } static final Random random = new Random ( ) ; static < T > void shuffle ( T [ ] arr ) { int n = arr . length ; for ( int i = 0 ; i < n ; i ++ ) { int k = random . nextInt ( n ) ; T temp = arr [ k ] ; arr [ k ] = arr [ i ] ; arr [ i ] = temp ; } } static void ruffleSort ( int [ ] a ) { int n = a . length ;

n = int ( input ( ) ) a = list ( set ( map ( int , input ( ) . split ( ) ) ) ) mx = max ( a )   b = [ 0 ] * ( 2 * mx ) for e in a : b [ e ] = efor i in range ( 1 , len ( b ) ) : if b [ i ] == 0 : b [ i ] = b [ i - 1 ]   best = 0 for e in a : for m in range ( 2 * e , 2 * mx , e ) : if b [ m - 1 ] >= e : best = max ( best , b [ m - 1 ] % e ) print ( best ) NEW_LINE


n = int ( input ( ) ) l = list ( map ( int , input ( ) . split ( ' ▁ ' ) ) ) l = list ( set ( l ) )   lb = [ - 1 ] * 3000001 NEW_LINE


public class p484B { public static void main ( String [ ] args ) { java . util . Scanner sc = new java . util . Scanner ( System . in ) ; int n = sc . nextInt ( ) , m = 0 , l = 2000001 , a [ ] = new int [ l ] , pre [ ] = new int [ l ] ; for ( int i = 0 ; i < n ; i ++ ) a [ sc . nextInt ( ) ] ++ ; for ( int i = 1 ; i < l ; i ++ ) if ( a [ i - 1 ] > 0 ) pre [ i ] = i - 1 ; else pre [ i ] = pre [ i - 1 ] ; for ( int i = 1 ; i < l ; i ++ ) if ( a [ i ] > 0 ) for ( int j = i * 2 ; j < l ; j += i ) m = Math . max ( m , pre [ j ] % i ) ; System . out . println ( m ) ; } }


import java . io . BufferedReader ;   import java . io . IOException ; import java . io . InputStreamReader ; import java . math . BigInteger ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . HashMap ; import java . util . List ; import java . util . Map ; import java . util . Scanner ;   public class test {

n , L , a = map ( int , input ( ) . split ( ) ) T = [ ( 0 , 0 ) ] for i in range ( n ) : t , l = map ( int , input ( ) . split ( ) ) l += t T . append ( ( t , l ) )   count = 0 for i in range ( 1 , n + 1 ) : if ( T [ i ] [ 0 ] - T [ i - 1 ] [ 1 ] >= a ) : count += ( T [ i ] [ 0 ] - T [ i - 1 ] [ 1 ] ) // aif ( L - T [ n ] [ 1 ] >= a ) : count += ( L - T [ n ] [ 1 ] ) // aprint ( count )           NEW_LINE


n , l , a = map ( int , input ( ) . split ( ) ) current = 0 ans = 0 for i in range ( n ) : x , y = map ( int , input ( ) . split ( ) ) ans += ( x - current ) // a current = x + yans += ( l - current ) // aprint ( ans ) NEW_LINE


import mathn , L , a = map ( int , input ( ) . split ( ) ) br = 0 c = 0 for i in range ( n ) : t , l = map ( int , input ( ) . split ( ) ) if i == 0 : if ( t - a ) >= 0 : br = br + ( math . floor ( t / a ) ) L = L - ( t + l ) c = l + t else : L = L - ( t + l ) c = l + t else : if ( t - c ) >= a : br = br + ( math . floor ( ( t - c ) / a ) ) L = L - ( t - c + l ) elif t == c : L = L - ( l ) else : L = L - ( l + t - c ) c = l + t   if ( L >= a ) : print ( br + math . floor ( ( L / a ) ) ) else : print ( br ) NEW_LINE


n , L , a = map ( int , input ( ) . split ( ) ) actual = 0 breaks = 0   for i in range ( n ) : t , l = map ( int , input ( ) . split ( ) ) breaks += ( t - actual ) // a actual = t + l   print ( breaks + ( L - actual ) // a ) NEW_LINE


n , L , a = map ( int , input ( ) . split ( ) ) prev , ans = 0 , 0 for _ in range ( n ) : t , l = map ( int , input ( ) . split ( ) ) ans += ( t - prev ) // a prev = t + lans += ( L - prev ) // aprint ( ans ) NEW_LINE


import java . util . Scanner ;   public class CashierBreaks { public static void main ( String [ ] args ) {   Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) , m = in . nextInt ( ) , a = in . nextInt ( ) , b = 0 , x = 0 ; while ( n -- > 0 ) { int t = in . nextInt ( ) , l = in . nextInt ( ) ; b += ( t - x ) / a ; x = t + l ; } System . out . println ( b + ( m - x ) / a ) ; in . close ( ) ; } }


import java . util . * ; public class Cashier {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int work = sc . nextInt ( ) ; int breakLength = sc . nextInt ( ) ; int [ ] [ ] customers = new int [ n ] [ ] ; for ( int i = 0 ; i < n ; i ++ ) customers [ i ] = new int [ ] { sc . nextInt ( ) , sc . nextInt ( ) } ; sc . close ( ) ; if ( n == 0 ) { System . out . println ( work / breakLength ) ; sc . close ( ) ; return ; } int num = 0 ; int time = 0 ; for ( int i = 0 ; i < n ; i ++ ) if ( customers [ i ] [ 0 ] - time >= breakLength ) { time += breakLength ; num ++ ; i -- ; } else time = customers [ i ] [ 0 ] + customers [ i ] [ 1 ] ; num += ( work - time ) / breakLength ; System . out . println ( num ) ; } }


import java . util . Scanner ;   public class _0729Cashier {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int L = sc . nextInt ( ) ; int a = sc . nextInt ( ) ; int currIndex = 0 ; int CountBrakes = 0 ; for ( int i = 0 ; i < n ; i ++ ) { int t = sc . nextInt ( ) ; int l = sc . nextInt ( ) ; CountBrakes += ( t - currIndex ) / a ; currIndex = t + l ; } CountBrakes += ( L - currIndex ) / a ; System . out . println ( CountBrakes ) ; }   }


import java . util . Scanner ;   public class PlayingWithPaper {   public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; long a = scan . nextLong ( ) ; long b = scan . nextLong ( ) ; if ( b == 1 ) System . out . println ( a ) ; else if ( a % b == 0 ) System . out . println ( a / b ) ; else { long count = 0 ; while ( a > 0 && b > 0 ) { if ( a > b ) { count += a / b ; a = a % b ; } else { count += b / a ; b = b % a ; } } System . out . println ( count ) ; } }   }

contador = 0   def dobrar_papel ( a , b ) : global contador if ( a <= 0 or b <= 0 ) : return None if ( a == b ) :   contador = contador + 1 ; return None elif ( b > a ) : max_fator = binario ( b , a ) contador = contador + max_fator dobrar_papel ( a , b - max_fator * a ) else : max_fator = binario ( a , b ) contador += max_fator dobrar_papel ( a - max_fator * b , b )   def binario ( grande , pequeno ) : aux = - 1 limite_superior = grande limite_inferior = 1 while ( limite_inferior <= limite_superior ) : media = ( limite_superior + limite_inferior ) // 2 if ( media == aux ) : break if ( media * pequeno >= grande ) : limite_superior = media - 1 elif ( media * pequeno < grande ) : limite_inferior = media aux = media return media   def main ( ) : entrada = input ( ) entrada = entrada . split ( " ▁ " ) a = int ( entrada [ 0 ] ) b = int ( entrada [ 1 ] ) dobrar_papel ( a , b ) print ( contador ) main ( ) NEW_LINE


def main ( ) : nums = input ( ) . split ( ' ▁ ' ) a , b = int ( nums [ 0 ] ) , int ( nums [ 1 ] ) cort = True cont = 0   while cort : if a == 0 or b == 0 : cort = False   elif a == 1 : cont += b * 1 cort = False elif b == 1 : cont += a * 1 cort = False elif a == b : cont += 1 cort = False elif a > b : cont += ( a // b ) a -= ( b * ( a // b ) ) else : cont += ( b // a ) b -= ( a * ( b // a ) )   print ( cont ) return     main ( ) NEW_LINE


finished = Falselado = list ( map ( int , input ( ) . split ( ) ) ) navios = 0 base = lado [ 0 ] altura = lado [ 1 ] while altura != 0 : navios += ( base // altura ) ( base , altura ) = ( altura , base % altura ) print ( navios ) NEW_LINE


a , b = map ( int , input ( ) . split ( ) )   NEW_LINE


import java . util . * ;   public class questionA2OJ { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; long a = sc . nextLong ( ) ; long b = sc . nextLong ( ) ; long s = 0 ; while ( a > 0 && b > 0 ) { if ( a > b ) { s += a / b ; a = a % b ; } else { s += b / a ; b = b % a ; } } System . out . println ( s ) ; } }


import java . util . * ; public class Problem { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int d = sc . nextInt ( ) ; String [ ] from = new String [ n ] ; String [ ] to = new String [ n ] ; int [ ] time = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { from [ i ] = sc . next ( ) ; to [ i ] = sc . next ( ) ; time [ i ] = sc . nextInt ( ) ; } HashSet < String > ans = new HashSet < String > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = i + 1 ; j < n ; j ++ ) { if ( from [ i ] . equals ( to [ j ] ) && to [ i ] . equals ( from [ j ] ) && time [ j ] - time [ i ] <= d && time [ j ] - time [ i ] > 0 ) { ans . add ( fixStr ( from [ i ] , to [ i ] ) ) ; } } } System . out . println ( ans . size ( ) ) ; for ( String s : ans ) { System . out . println ( s ) ; } } private static String fixStr ( String a , String b ) { if ( a . compareTo ( b ) > 0 ) { return b + " ▁ " + a ; } else { return a + " ▁ " + b ; } } }

l = input ( ) . split ( ) n = int ( l [ 0 ] ) d = int ( l [ 1 ] ) lfi = [ ] lofpairs = [ ] for you in range ( n ) : s = input ( ) . split ( ) for i in lfi : if ( s [ 0 ] == i [ 1 ] and s [ 1 ] == i [ 0 ] ) : if ( int ( s [ 2 ] ) - int ( i [ 2 ] ) <= d and int ( s [ 2 ] ) - int ( i [ 2 ] ) != 0 ) : if ( ( i [ 0 ] , i [ 1 ] ) not in lofpairs and ( i [ 1 ] , i [ 0 ] ) not in lofpairs ) : lofpairs . append ( ( i [ 0 ] , i [ 1 ] ) ) lfi . append ( s ) print ( len ( lofpairs ) ) for i in lofpairs : print ( i [ 0 ] , i [ 1 ] ) NEW_LINE


import sysfrom collections import Countern , k = map ( int , input ( ) . split ( ) ) l = [ ] for i in range ( n ) : p , q , t = map ( str , sys . stdin . readline ( ) . split ( ) ) t = int ( t ) l . append ( [ [ p , q ] , t ] ) NEW_LINE


n , d = map ( int , input ( ) . split ( ) ) arr = [ ] for _ in range ( n ) : a , b , c = input ( ) . split ( ) curr = [ a , b , int ( c ) ] arr . append ( curr ) ans = [ ] for i in range ( n ) : for j in range ( i + 1 , n ) : if abs ( arr [ i ] [ 2 ] - arr [ j ] [ 2 ] ) <= d and abs ( arr [ i ] [ 2 ] - arr [ j ] [ 2 ] ) > 0 : if arr [ i ] [ 0 ] == arr [ j ] [ 1 ] and arr [ i ] [ 1 ] == arr [ j ] [ 0 ] : ans . append ( ( arr [ i ] [ 1 ] , arr [ i ] [ 0 ] ) ) elif abs ( arr [ i ] [ 2 ] - arr [ j ] [ 2 ] ) > d : breakif ans == [ ] : print ( 0 ) else : distinct_ans = [ ] for i in ans : i = list ( i ) x = i . sort ( ) distinct_ans . append ( i ) stack = [ ] for i in distinct_ans : if i not in stack : stack . append ( i ) print ( len ( stack ) ) for i in stack : for j in i : print ( j , end = ' ▁ ' ) print ( ) NEW_LINE


import java . util . * ;   public class Main { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int n = scanner . nextInt ( ) ; int d = scanner . nextInt ( ) ; Map < String , List < Integer > > messagesMap = new HashMap < > ( ) ; Map < String , String > invertedParticipantsMap = new HashMap < > ( ) ; Set < String > friends = new HashSet < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { String a = scanner . next ( ) ; String b = scanner . next ( ) ; int t = scanner . nextInt ( ) ; messagesMap . putIfAbsent ( a + " ▁ " + b , new ArrayList < > ( ) ) ; messagesMap . get ( a + " ▁ " + b ) . add ( t ) ; invertedParticipantsMap . put ( b + " ▁ " + a , a + " ▁ " + b ) ; if ( i > 0 && messagesMap . containsKey ( invertedParticipantsMap . get ( a + " ▁ " + b ) ) ) { for ( Integer previousT : messagesMap . get ( invertedParticipantsMap . get ( a + " ▁ " + b ) ) ) { if ( t - previousT <= d && t - previousT > 0 ) { if ( ! friends . contains ( a + " ▁ " + b ) && ! friends . contains ( b + " ▁ " + a ) ) { friends . add ( a + " ▁ " + b ) ; } break ; } } } } System . out . println ( friends . size ( ) ) ; friends . forEach ( f -> System . out . println ( f ) ) ; } }


import java . util . ArrayList ; import java . util . Scanner ;    public class Friendsornot {   public static void main ( String [ ] args ) {


import java . util . * ;   public class CodeForces { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int t = scan . nextInt ( ) ;   while ( t -- > 0 ) { int n = scan . nextInt ( ) ; int sum = 0 ;   for ( int i = 0 ; i < n ; i ++ ) sum += ( scan . nextInt ( ) % 2 ) ;   if ( sum == 0 || sum == n ) System . out . println ( " YES " ) ; else System . out . println ( " NO " ) ;   } } }

for i in range ( int ( input ( ) ) ) : n = int ( input ( ) ) cnto = sum ( list ( map ( lambda x : int ( x ) % 2 , input ( ) . split ( ) ) ) ) print ( ' YES ' if cnto == 0 or cnto == n else ' NO ' ) NEW_LINE


cases = int ( input ( ) ) while cases : cases -= 1 num = int ( input ( ) ) arr = list ( map ( int , input ( ) . split ( ) ) ) odds = sum ( 1 for i in arr if i % 2 != 0 )   if odds == 0 or odds == num : print ( " YES " ) else : print ( " NO " ) NEW_LINE


for _ in range ( int ( input ( ) ) ) : n = int ( input ( ) ) l = list ( map ( int , input ( ) . split ( ) ) ) ans = 0 sum = 0 for i in l : if i % 2 == 0 : ans += 1 elif i % 2 != 0 : sum += 1 if ans == n or sum == n : print ( " YES " ) else : print ( " NO " ) NEW_LINE


import sysfrom os import pathif ( path . exists ( ' input . txt ' ) and path . exists ( ' output . txt ' ) ) : sys . stdout = open ( ' output . txt ' , ' w ' ) sys . stdin = open ( ' input . txt ' , ' r ' )     def main ( ) : T = int ( input ( ) ) for ii in range ( 0 , T ) : N = int ( input ( ) ) figs = list ( map ( int , input ( ) . split ( ) ) ) for fig in figs : if fig == 0 : fig += 2 break mn = min ( figs ) ok = True for fig in figs : if ( fig - mn ) % 2 == 1 : ok = False break print ( " YES " if ok else " NO " )     main ( ) NEW_LINE


for _ in range ( int ( input ( ) ) ) : n = int ( input ( ) ) l = list ( map ( int , input ( ) . split ( ) ) ) p = 0 for i in l : p += i % 2 if p == 0 or p == n : print ( " YES " ) else : print ( " NO " ) NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ;   public class NumberGuessing { public static void main ( String [ ] args ) throws IOException { BufferedReader reader = new BufferedReader ( new InputStreamReader ( System . in ) ) ;   int n = Integer . parseInt ( reader . readLine ( ) ) ;   Integer l = null , u = null ;   for ( int i = 0 ; i < n ; i ++ ) { String [ ] line = reader . readLine ( ) . split ( " ▁ " ) ; int x = Integer . parseInt ( line [ 1 ] ) ;   switch ( line [ 0 ] ) { case " > " : if ( line [ 2 ] . equals ( " Y " ) ) { if ( l == null || l <= x ) l = x + 1 ; } else if ( u == null || u > x ) u = x ; break ; case " < " : if ( line [ 2 ] . equals ( " Y " ) ) { if ( u == null || u >= x ) u = x - 1 ; } else if ( l == null || l < x ) l = x ; break ; case " > = " : if ( line [ 2 ] . equals ( " Y " ) ) { if ( l == null || l < x ) l = x ; } else if ( u == null || u >= x ) u = x - 1 ; break ; default : if ( line [ 2 ] . equals ( " Y " ) ) { if ( u == null || u > x ) u = x ; } else if ( l == null || l <= x ) l = x + 1 ; } }   if ( l == null ) System . out . println ( u ) ; else if ( u == null || l <= u ) System . out . println ( l ) ; else System . out . println ( " Impossible " ) ; } }


left = - 2000000000 right = 2000000000   for _ in range ( int ( input ( ) ) ) : temp = input ( ) . split ( ) sign = temp [ 0 ] n = int ( temp [ 1 ] ) tf = temp [ 2 ] if tf == ' Y ' : if sign == ' > ' and left <= n : left = n + 1 elif sign == ' > = ' and left < n : left = n elif sign == ' < ' and right >= n : right = n - 1 elif sign == ' < = ' and right > n : right = n elif tf == ' N ' : if sign == ' > ' and right > n : right = n elif sign == ' > = ' and right >= n : right = n - 1 elif sign == ' < ' and left < n : left = n elif sign == ' < = ' and left <= n : left = n + 1 if left <= right : print ( left ) else : print ( ' Impossible ' ) NEW_LINE


n = int ( input ( ) ) flag = True l = - 2e9 r = 2e9 for i in range ( n ) : q = input ( ) ans = q [ - 1 ] if ( ans == ' Y ' ) : ans = True else : ans = False if ( q [ 1 ] == ' = ' ) : num = int ( q [ 3 : - 2 ] ) else : num = int ( q [ 2 : - 2 ] )   NEW_LINE


greater = - 2000000000 smaller = 2000000000 n = int ( input ( ) ) for _ in range ( n ) : a , b , c = input ( ) . split ( ) if a == " > = " : if c == " Y " : greater = max ( greater , int ( b ) ) else : smaller = min ( smaller , int ( b ) - 1 ) elif a == " < = " : if c == " Y " : smaller = min ( int ( b ) , smaller ) NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . Scanner ; import java . util . * ; public class Main { static class FastReader { BufferedReader br ; StringTokenizer st ; public FastReader ( ) { br = new BufferedReader ( newInputStreamReader ( System . in ) ) ; } String next ( ) { while ( st == null || ! st . hasMoreElements ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; } int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; } String nextLine ( ) { String str = " " ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return str ; } }    public static void main ( String [ ] args ) { FastReader fs = new FastReader ( ) ; int n = fs . nextInt ( ) ;   long lessthan = 2 * 1000 * 1000 * 1000 ;


import java . util . Scanner ;   public class GuessANumber { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ;   long min = - 2000000000L , max = 2000000000L ;   while ( t -- > 0 ) { String sign = sc . next ( ) ; long n = sc . nextLong ( ) ; char ans = sc . next ( ) . charAt ( 0 ) ;   switch ( sign ) { case " > " : if ( ans == ' Y ' ) { min = Math . max ( min , n + 1 ) ; } else { max = Math . min ( max , n ) ; } break ;   case " < " : if ( ans == ' Y ' ) { max = Math . min ( max , n - 1 ) ; } else { min = Math . max ( min , n ) ; } break ;   case " > = " : if ( ans == ' Y ' ) { min = Math . max ( min , n ) ; } else { max = Math . min ( max , n - 1 ) ; } break ;   case " < = " : if ( ans == ' Y ' ) { max = Math . min ( max , n ) ; } else { min = Math . max ( min , n + 1 ) ; } break ; } } if ( min > max ) { System . out . println ( " Impossible " ) ; } else { System . out . println ( min ) ; } } }


import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int k = sc . nextInt ( ) ; int count = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { if ( k % i == 0 && k / i <= n ) count ++ ; } System . out . println ( count ) ; } }

n , x = map ( int , input ( ) . split ( ) ) count = 0 for i in range ( 1 , n + 1 ) : if x % i == 0 and x // i <= n and i <= n : count = count + 1 print ( count ) NEW_LINE


rowscolumns , result = [ int ( i ) for i in input ( ) . split ( ) ]   counter = 0   for col in range ( 1 , rowscolumns + 1 ) : if result % col == 0 and result / col <= rowscolumns : counter += 1                                     print ( counter ) NEW_LINE


a = list ( map ( int , input ( ) . split ( ) ) ) n = a [ 0 ] x = a [ 1 ] c = 0 for i in range ( 1 , n + 1 ) : if x % i == 0 and x / i <= n : c = c + 1 print ( c ) NEW_LINE


import java . util . Scanner ;   public class problem118 {   public static void main ( String [ ] args ) {


import java . util . * ;   public class Example { static int [ ] dp ;   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ;


import java . util . Scanner ;    public class MutliTable { public static void main ( String [ ] args ) { Scanner S = new Scanner ( System . in ) ; int table = S . nextInt ( ) ; int find = S . nextInt ( ) ; int answer = 0 ; for ( int x = 1 ; x <= table ; x ++ ) { if ( find % x == 0 && find / x <= table ) answer ++ ; } System . out . print ( answer ) ; } }


import java . awt . * ; import java . io . IOException ; import java . util . Comparator ; import java . util . HashSet ; import java . util . Scanner ;   public class Main {

a , m = map ( int , input ( ) . split ( ) ) i = 0 f = 0 while i < m : if a % m == 0 : print ( ' Yes ' ) f = 1 break a += a % m i += 1   if f == 0 : print ( ' No ' ) NEW_LINE


a , m = map ( int , input ( ) . split ( ) ) for i in range ( 21 ) : if a % m == 0 : print ( " Yes " ) exit ( ) a *= 2 print ( " No " ) NEW_LINE


a , m = map ( int , input ( ) . split ( ) )   t = Truefor i in range ( m ) : if a % m == 0 : t = False print ( " Yes " ) break else : x = int ( a % m ) a += xif t == True : print ( " No " ) NEW_LINE


def f ( l ) : a , m = l for i in range ( m ) : x = a % m if x == 0 : return ' Yes ' a += x return ' No '   l = list ( map ( int , input ( ) . split ( ) ) ) print ( f ( l ) )   NEW_LINE


import java . util . * ;   public class Testing { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int m = sc . nextInt ( ) ; int n = sc . nextInt ( ) ; int sum = m ; int iteration = 0 ; boolean flag = false ; while ( iteration <= 20 ) { if ( sum % n == 0 ) { System . out . println ( " Yes " ) ; flag = true ; break ; } iteration ++ ; sum *= 2 ; } if ( ! flag ) System . out . println ( " No " ) ; } }


import java . util . Scanner ;   public class Main { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int t = in . nextInt ( ) ; while ( t > 0 ) { t -- ; int n = in . nextInt ( ) ; String s = Integer . toString ( n ) ; int cnt = 0 ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) != '0' ) ++ cnt ; } System . out . println ( cnt ) ; int cnt2 = 0 ; while ( n != 0 ) { int digit = n % 10 ; if ( digit != 0 ) { System . out . print ( ( int ) ( digit * Math . pow ( 10 , cnt2 ) ) + " ▁ " ) ; } n /= 10 ; ++ cnt2 ;   } System . out . println ( ) ; } }

t = int ( input ( ) ) for i in range ( t ) : n = input ( ) a = n [ : : - 1 ] s = [ ] for i in range ( len ( n ) ) : if ( a [ i ] != '0' ) : s . append ( a [ i ] + '0' * i ) print ( len ( s ) ) print ( * s ) NEW_LINE


import re     def main ( ) : t = int ( input ( ) ) for _ in range ( t ) : num = input ( ) count = 0 res = [ ] for i in range ( 1 , len ( num ) + 1 ) :   if num [ i - 1 ] == "0" : continue count += 1   res . append ( num [ i - 1 ] + "0" * ( len ( num ) - i ) )   re_num = re . findall ( r " [123456789 ] " , string = num [ i : ] ) if len ( re_num ) == 0 : break   print ( f " { count } \n { ' ▁ ' . join ( res ) } " )     if __name__ == ' _ _ main _ _ ' : main ( ) NEW_LINE


number = int ( input ( ) ) for i in range ( number ) : n = input ( ) new = [ ] for i , num in enumerate ( n [ : : - 1 ] ) : if int ( num ) > 0 : new . append ( int ( num ) * 10 ** i ) print ( len ( new ) ) print ( * new , sep = " ▁ " )       NEW_LINE


t = int ( input ( ) ) for x in range ( t ) : n = input ( ) print ( len ( n ) - n . count ( "0" ) ) for x in range ( len ( n ) ) : if n [ x ] != "0" : print ( n [ x ] + "0" * ( len ( n ) - ( x + 1 ) ) , end = " ▁ " ) print ( ) NEW_LINE


from collections import Counterimport math   def solve ( ) : string = input ( ) count = 0 l = len ( string ) i = 0   array = [ ]   while ( i < l ) : if string [ i ] != "0" : count += 1 array . append ( int ( string [ i ] ) * 10 ** ( l - 1 - i ) ) i += 1 print ( count ) for i in array : print ( i , end = " ▁ " ) print ( )   for i in range ( int ( input ( ) ) ) : solve ( ) NEW_LINE


import java . util . * ;   public class Main { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int t = in . nextInt ( ) ; for ( int i = 0 ; i < t ; i ++ ) { ArrayList < Integer > rounds = new ArrayList < > ( ) ; int tenth = 0 ; int n = in . nextInt ( ) ; while ( n > 0 ) { int x = ( n % 10 ) * ( int ) Math . pow ( 10 , tenth ++ ) ; if ( x > 0 ) rounds . add ( x ) ; n /= 10 ; } String s = " " ; for ( int num : rounds ) { s = s + num + " ▁ " ; } s = s . substring ( 0 , s . length ( ) - 1 ) ; System . out . println ( rounds . size ( ) ) ; System . out . println ( s ) ; }   }    }


import java . util . * ;   public class SumOfRoundNumbers { static void cal ( int n ) { String s = Integer . toString ( n ) ; int len = s . length ( ) ; int number [ ] = new int [ len ] ; for ( int i = 0 ; i < len ; i ++ ) { number [ i ] = s . charAt ( i ) - '0' ; } List < Integer > l = new ArrayList < > ( ) ; int place = len - 1 ; for ( int i = 0 ; i < len ; i ++ ) { int no = number [ i ] * ( int ) ( Math . pow ( 10 , place ) ) ; if ( no != 0 ) l . add ( no ) ; place -- ; } System . out . println ( l . size ( ) ) ; for ( int ele : l ) System . out . print ( ele + " ▁ " ) ; System . out . println ( ) ; }   public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; while ( t -- > 0 ) { int n = sc . nextInt ( ) ; cal ( n ) ; } } }


import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; int n = s . nextInt ( ) ; while ( n -- > 0 ) { int t = s . nextInt ( ) ; ArrayList < Integer > l = new ArrayList < > ( ) ; int res , r = 1 , i = 0 ; while ( t > 0 ) { res = t % 10 ; if ( res != 0 ) { l . add ( res * r ) ; } t = t / 10 ; r = r * 10 ; } System . out . println ( l . size ( ) ) ; for ( int j = 0 ; j < l . size ( ) ; j ++ ) { System . out . print ( l . get ( j ) + " ▁ " ) ; } } } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . Scanner ; import java . util . StringTokenizer ; import java . util . * ; public class c710b {

def fun ( n , k ) : n = int ( n ) k = int ( k ) a = list ( map ( int , input ( ) . split ( ) ) ) if k > n : a . sort ( ) print ( a [ - 1 ] ) exit ( 0 ) p = a [ 0 ] s = 0 for i in range ( 1 , n ) : if p > a [ i ] : s += 1 else : p = a [ i ] s = 1 if s < k : continue break print ( p ) a , b = input ( ) . split ( ) fun ( int ( a ) , int ( b ) ) NEW_LINE


import queue   n , k = map ( int , input ( ) . split ( ) ) players = list ( map ( int , input ( ) . split ( ) ) ) p1 = players [ 0 ] p2 = players [ 1 ] q = queue . Queue ( )   for i in range ( 2 , n ) : q . put ( players [ i ] )   c = 0 while True : if p1 > p2 : q . put ( p2 ) c += 1 else : q . put ( p1 ) p1 = p2 c = 1 p2 = q . get ( ) if c == k or c >= n : print ( p1 ) break NEW_LINE


import queue   n , k = map ( int , input ( ) . split ( ) ) players = list ( map ( int , input ( ) . split ( ) ) ) p1 = players [ 0 ] p2 = players [ 1 ] q = queue . Queue ( )   for i in range ( 2 , n ) : q . put ( players [ i ] )   c = 0 while True : if p1 > p2 : q . put ( p2 ) c += 1 else : q . put ( p1 ) p1 = p2 c = 1 p2 = q . get ( ) if c == k or c >= n : print ( p1 ) break                   NEW_LINE


playersCount , winNumber = [ int ( x ) for x in input ( ) . split ( ' ▁ ' ) ] players = [ int ( x ) for x in input ( ) . split ( ' ▁ ' ) ]   winsCount = 0 max = 0 for i in range ( 1 , playersCount ) : if players [ max ] > players [ i ] : winsCount += 1 else : winsCount = 1 max = i if winsCount >= winNumber : break   print ( players [ max ] ) NEW_LINE


n , k = map ( int , input ( ) . split ( ) )   p = list ( map ( int , input ( ) . split ( ) ) )   if k >= n - 1 : print ( max ( p ) ) exit ( 0 )   mx = - 1   for i in range ( n ) : now = ( i + 1 ) % n num = 0 if mx < p [ i ] and mx != - 1 : num = 1 for j in range ( k ) : if p [ i ] > p [ now ] : num += 1 now = ( now + 1 ) % n else : break if num >= k : print ( p [ i ] ) exit ( 0 ) mx = max ( mx , p [ i ] ) NEW_LINE


import java . util . Scanner ; public class p879B { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; long n = sc . nextInt ( ) , k = sc . nextLong ( ) ; int a [ ] = new int [ ( int ) n ] , max = - 1 , c = 0 ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = sc . nextInt ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] > max ) { max = a [ i ] ; c = 0 ; } if ( i > 0 ) c ++ ; if ( c >= k ) break ; } System . out . println ( max ) ; } }


import com . sun . org . apache . bcel . internal . generic . AALOAD ; import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . math . BigInteger ; import java . util . * ; import java . util . stream . IntStream ; import javafx . util . Pair ;   public class Main {   static void sort ( int a [ ] ) { Random ran = new Random ( ) ; for ( int i = 0 ; i < a . length ; i ++ ) { int r = ran . nextInt ( a . length ) ; int temp = a [ r ] ; a [ r ] = a [ i ] ; a [ i ] = temp ; }   Arrays . sort ( a ) ; }   public static void main ( String [ ] args ) throws IOException {   Scanner input = new Scanner ( System . in ) ;   int n = input . nextInt ( ) ; long k = input . nextLong ( ) ; ArrayList < Integer > a = new ArrayList < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { a . add ( input . nextInt ( ) ) ; } int ans [ ] = new int [ n + 1 ] ; int j = n ; if ( k >= n ) { System . out . println ( n ) ; return ; } for ( int i = 0 ; ; i ++ ) { if ( a . get ( 0 ) < a . get ( 1 ) ) { ans [ a . get ( 1 ) ] ++ ; if ( ans [ a . get ( 1 ) ] >= k ) { System . out . println ( a . get ( 1 ) ) ; return ; } int value = a . remove ( 0 ) ;


import java . lang . * ; import java . util . * ;   public class Abhishek { public static void main ( String [ ] args ) throws Exception { Scanner sc = new Scanner ( System . in ) ; long n = Long . parseLong ( sc . next ( ) ) ; long k = Long . parseLong ( sc . next ( ) ) ; Queue < Long > players = new LinkedList < > ( ) ; long max = Long . MIN_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { long a = sc . nextLong ( ) ; players . add ( a ) ; max = Math . max ( a , max ) ; } if ( k >= n - 1 ) { System . out . println ( max ) ; return ; } long current = players . remove ( ) ; long c = 0 ; while ( c != k ) { long p2 = players . remove ( ) ; if ( p2 > current ) { players . add ( current ) ; current = p2 ; c = 1 ; } else { c ++ ; players . add ( p2 ) ; } } System . out . println ( current ) ;   } }


import java . util . * ;   public class Array_493 { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; String first = scanner . next ( ) ; String second = scanner . next ( ) ;   String ans = solution ( first , second ) ;   System . out . println ( ans ) ; }   private static String solution ( String first , String second ) { char [ ] fArr = first . toCharArray ( ) ; char [ ] sArr = second . toCharArray ( ) ;   int i = fArr . length - 1 ; while ( i >= 0 ) { if ( fArr [ i ] == ' z ' ) { fArr [ i ] = ' a ' ; } else { fArr [ i ] ++ ; break ; } i -- ; }   return test ( String . valueOf ( fArr ) , String . valueOf ( sArr ) ) ? String . valueOf ( fArr ) : " No ▁ such ▁ string " ; }   public static boolean test ( String first , String second ) { return first . compareTo ( second ) < 0 ; } }

from collections import defaultdict , deque , Counterfrom sys import stdin , stdoutfrom heapq import heappush , heappopimport mathimport ioimport osimport mathimport bisect   NEW_LINE


s = input ( ) t = input ( ) n = len ( s ) ans = " " f = 0 d = 0 i = 0 while ( i < n ) : val1 = 1 if ( s [ i ] == t [ i ] ) : ans += s [ i ] else : if ( f == 0 ) : f = 1 if ord ( t [ i ] ) - ord ( s [ i ] ) > 1 : val = ord ( s [ i ] ) val += 1 d = 1 ans += chr ( val ) else : val1 = 1 ans += s [ i ] for j in range ( i + 1 , n ) : if ( s [ j ] != ' z ' ) : d = 1 val = ord ( s [ j ] ) val += 1 ans += chr ( val ) val1 += 1 break else : ans += t [ j ] val1 += 1 if ( d == 0 ) : ans = ans [ : i ] val1 = 1 ans += t [ i ] for j in range ( i + 1 , n ) : if ( t [ j ] != ' a ' ) : d = 1 ans += ' a ' val1 += 1 break else : ans += t [ j ] val1 += 1 else : ans += s [ i ] i += val1if ( d == 0 ) : print ( " No ▁ such ▁ string " ) else : print ( ans ) NEW_LINE


s = input ( ) t = input ( ) flag = Trueans = list ( s ) i = len ( s ) - 1 while True : if ord ( s [ i ] ) != ord ( ' z ' ) : ans [ i ] = chr ( ord ( ans [ i ] ) + 1 ) break else : ans [ i ] = ' a ' i -= 1 t = list ( t ) if ans != t : for i in range ( len ( ans ) ) : print ( ans [ i ] , end = " " ) else : print ( ' No ▁ such ▁ string ' ) NEW_LINE


a = list ( input ( ) ) b = input ( ) i = len ( a ) - 1 while a [ i ] == ' z ' : a [ i ] = ' a ' i -= 1 a [ i ] = chr ( ord ( a [ i ] ) + 1 ) a = ' ' . join ( a ) if a >= b : print ( ' No ▁ such ▁ string ' ) else : print ( a ) NEW_LINE


import sys , os , iofrom sys import stdinfrom math import log , gcd , ceilfrom collections import defaultdict , deque , Counterfrom heapq import heappush , heappop , heapifyfrom bisect import bisect_left , bisect_rightimport math def ii ( ) : return int ( input ( ) ) def li ( ) : return list ( map ( int , input ( ) . split ( ) ) ) if ( os . path . exists ( ' input . txt ' ) ) : sys . stdin = open ( " input . txt " , " r " ) ; sys . stdout = open ( " output . txt " , " w " ) NEW_LINE


import java . io . * ; import java . util . * ; import java . math . * ;   public class A293 { static char [ ] sarr ; public static void main ( String [ ] args ) throws IOException { FastScanner fs = new FastScanner ( ) ; PrintWriter out = new PrintWriter ( System . out ) ;


import java . io . * ; import java . math . * ; import java . util . * ; import java . text . * ;   public class Main { public static void main ( String [ ] args ) { Scanner cin = new Scanner ( new BufferedInputStream ( System . in ) ) ; String a = cin . nextLine ( ) ; String b = cin . nextLine ( ) ; HashMap < Character , BigInteger > mp = new HashMap < > ( ) ; HashMap < BigInteger , Character > rmp = new HashMap < > ( ) ; String dic = new String ( " abcdefghijklmnopqrstuvwxyz " ) ; for ( int i = 0 ; i < 26 ; ++ i ) { mp . put ( dic . charAt ( i ) , BigInteger . valueOf ( i ) ) ; rmp . put ( BigInteger . valueOf ( i ) , dic . charAt ( i ) ) ; } BigInteger L = BigInteger . ONE ; BigInteger R = BigInteger . ONE ; for ( int i = 0 ; i < a . length ( ) ; ++ i ) { L = L . multiply ( BigInteger . valueOf ( 26 ) ) . add ( mp . get ( a . charAt ( i ) ) ) ; R = R . multiply ( BigInteger . valueOf ( 26 ) ) . add ( mp . get ( b . charAt ( i ) ) ) ; } if ( R . subtract ( L ) . equals ( BigInteger . ONE ) ) { System . out . println ( " No ▁ such ▁ string " ) ; } else { L = L . add ( BigInteger . ONE ) ; String ans = new String ( " " ) ; while ( ! L . equals ( BigInteger . ONE ) ) { ans += rmp . get ( L . mod ( BigInteger . valueOf ( 26 ) ) ) ; L = L . divide ( BigInteger . valueOf ( 26 ) ) ; } System . out . println ( new StringBuffer ( ans ) . reverse ( ) . toString ( ) ) ; } } }


import java . util . * ;   public class P1 { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int a [ ] = new int [ n - 1 ] ; for ( int i = 0 ; i < n - 1 ; i ++ ) { a [ i ] = sc . nextInt ( ) ; } ArrayList < Integer > al = new ArrayList < > ( ) ; int c = n ; al . add ( c ) ; while ( c > 1 ) { c = a [ c - 2 ] ; al . add ( c ) ; } Collections . reverse ( al ) ; for ( int i = 0 ; i < al . size ( ) ; i ++ ) { System . out . print ( al . get ( i ) + " ▁ " ) ; } } }

n = int ( input ( ) ) a = [ 0 ] + [ 0 ] + [ int ( x ) for x in input ( ) . strip ( ) . split ( ) ]   b = [ ]   while a [ n ] >= 1 : b . append ( n ) n = a [ n ]     b . append ( 1 ) b . reverse ( ) b_new = ( str ( x ) for x in b ) print ( " ▁ " . join ( b_new ) ) NEW_LINE


n = int ( input ( ) ) p = [ 0 ] * 2 + list ( map ( int , input ( ) . split ( ) ) )   c = npath = [ n ] while c != 1 : c = p [ c ] path . append ( c ) print ( * path [ : : - 1 ] ) NEW_LINE


n = int ( input ( ) )   p = list ( map ( int , input ( ) . split ( ) ) )   pa = n   ans = [ ]   while True : ans . append ( pa ) if pa == 1 : break pa = p [ pa - 2 ] print ( * ans [ : : - 1 ] ) NEW_LINE


n = int ( input ( ) ) p = [ 0 , 0 , * map ( int , input ( ) . split ( ) ) ] r = [ ] while n : r . append ( n ) ; n = p [ n ] print ( * reversed ( r ) ) NEW_LINE


import java . util . * ; import java . util . jar . JarOutputStream ;   public class Practise {   public static int [ ] [ ] dp ;   public static void main ( String [ ] args ) {


import java . util . * ; public class Check2 { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int ar [ ] = new int [ n + 2 ] ; for ( int i = 2 ; i < ( n + 1 ) ; i ++ ) { ar [ i ] = sc . nextInt ( ) ; } List < Integer > list = new ArrayList < > ( ) ; int k = n ; while ( k >= 1 ) {


import java . util . * ;   public class questionCF { public static void main ( String [ ] args ) {   Scanner sc = new Scanner ( System . in ) ;   int n = sc . nextInt ( ) ;   int a [ ] = new int [ n ] ; ArrayList < Integer > l = new ArrayList < > ( ) ; for ( int i = 0 ; i < n - 1 ; i ++ ) a [ i ] = sc . nextInt ( ) ; int i = n ; l . add ( i ) ; while ( i > 1 ) { i = a [ i - 2 ] ; l . add ( i ) ; } for ( i = l . size ( ) - 1 ; i >= 0 ; i -- ) System . out . print ( l . get ( i ) + " ▁ " ) ; } }


import java . io . * ; import java . util . * ; import java . text . * ; import java . math . * ; import java . util . regex . * ; public class RockB { Scanner in = new Scanner ( System . in ) ;   private RockB ( ) throws IOException {

t = { } for i , c in enumerate ( input ( ) ) : if c not in t : t [ c ] = ( i , 1 ) elif ( t [ c ] [ 0 ] - i ) & 1 : t [ c ] = ( i , t [ c ] [ 1 ] + 1 ) print ( max ( b for a , b in t . values ( ) ) )         NEW_LINE


t = { } for i , c in enumerate ( input ( ) ) : if c not in t : t [ c ] = ( i , 1 ) elif ( t [ c ] [ 0 ] - i ) & 1 : t [ c ] = ( i , t [ c ] [ 1 ] + 1 ) print ( max ( b for a , b in t . values ( ) ) ) NEW_LINE


import java . io . InputStream ; import java . io . InputStreamReader ; import java . io . BufferedReader ; import java . io . OutputStream ; import java . io . PrintWriter ; import java . io . IOException ;   public class Main { public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; InputReader in = new InputReader ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; TaskB solver = new TaskB ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; } }   class TaskB { public void solve ( int testNumber , InputReader in , PrintWriter out ) { String word = in . next ( ) ; int answer = 0 ;   for ( int i = 0 ; i < word . length ( ) ; i ++ ) { answer = Math . max ( answer , getAns ( word , i ) ) ; }   out . println ( answer ) ;   }   private int getAns ( String word , int start ) { char ch = word . charAt ( start ) ; int res = 1 ; while ( start < word . length ( ) ) { int nextIdx = start + 1 ; while ( nextIdx < word . length ( ) ) { if ( word . charAt ( nextIdx ) == ch && ( ( nextIdx - start ) % 2 == 1 ) ) { break ; } nextIdx ++ ; }   if ( nextIdx < word . length ( ) ) { res ++ ; } start = nextIdx ; }   return res ; }   }   class InputReader { private BufferedReader reader ; private String [ ] currentArray ;   public InputReader ( InputStream inputStream ) { reader = new BufferedReader ( new InputStreamReader ( inputStream ) ) ; }    public String next ( ) { try { currentArray = null ; return reader . readLine ( ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } }   }


import java . util . Scanner ;   public class MAIN {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; String s = in . nextLine ( ) ; in . close ( ) ; int res = 0 ; if ( s != null && s . length ( ) > 0 ) {


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . math . BigInteger ; import java . util . StringTokenizer ;   public class V {   static class FastReader { BufferedReader bf ; StringTokenizer st ;   public FastReader ( ) { bf = new BufferedReader ( new InputStreamReader ( System . in ) ) ; } String next ( ) { while ( st == null || ! st . hasMoreElements ( ) ) try { st = new StringTokenizer ( bf . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return st . nextToken ( ) ; } int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; } String nextLine ( ) throws IOException { return bf . readLine ( ) ; } boolean ready ( ) throws IOException { return bf . ready ( ) || ( st != null && st . hasMoreElements ( ) ) ; } }   public static void main ( String [ ] args ) { FastReader fr = new FastReader ( ) ; int n = fr . nextInt ( ) - 1 ; if ( n < 0 ) System . out . println ( 1 ) ; else { BigInteger result = new BigInteger ( "3" ) ; BigInteger mod = new BigInteger ( "1000003" ) ; BigInteger exp = new BigInteger ( Integer . toString ( n ) ) ; result = result . modPow ( exp , mod ) ; System . out . println ( result . toString ( ) ) ; } } }

n = int ( input ( ) ) NEW_LINE if ( n == 0 ) : NEW_LINE INDENT print ( "1" ) else : NEW_LINE ans = int ( 3 ** ( n - 1 ) ) NEW_LINE DEDENT ans = ans % ( 1000003 ) NEW_LINE print ( ans ) NEW_LINE


print ( pow ( 3 , max ( 0 , int ( input ( ) ) - 1 ) , int ( 1e6 + 3 ) ) ) NEW_LINE


n = int ( input ( ) ) - 1 NEW_LINE if ( n < 0 ) : NEW_LINE INDENT print ( 1 ) else : NEW_LINE print ( pow ( 3 , n , 1000003 ) ) NEW_LINE DEDENT


n = int ( input ( ) ) NEW_LINE print ( ( 3 ** ( n - 1 ) ) % ( 10 ** 6 + 3 ) if n > 0 else 1 ) NEW_LINE


import java . io . * ; import java . util . * ;


import java . util . Scanner ;   public class A1447 {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int T = in . nextInt ( ) ; StringBuilder output = new StringBuilder ( ) ; for ( int t = 0 ; t < T ; t ++ ) { int N = in . nextInt ( ) ; output . append ( N ) . append ( ' \n ' ) ; for ( int n = 1 ; n <= N ; n ++ ) { output . append ( n ) . append ( ' ▁ ' ) ; } output . append ( ' \n ' ) ; } System . out . print ( output ) ; }   }

n = int ( input ( ) ) NEW_LINE for i in range ( n ) : m = int ( input ( ) ) NEW_LINE print ( m ) NEW_LINE print ( * [ k for k in range ( 1 , m + 1 ) ] ) NEW_LINE


import sys   input = sys . stdin . buffer . readline   t = int ( input ( ) ) NEW_LINE for _ in range ( t ) : n = int ( input ( ) ) NEW_LINE print ( n ) NEW_LINE print ( " ▁ " . join ( map ( str , range ( 1 , n + 1 ) ) ) ) NEW_LINE


for _ in range ( int ( input ( ) ) ) : n = int ( input ( ) ) NEW_LINE print ( n ) NEW_LINE for i in range ( 1 , n + 1 ) : print ( i , end = " ▁ " ) NEW_LINE print ( )   NEW_LINE


m = int ( input ( ) ) NEW_LINE n = [ ] NEW_LINE for i in range ( m ) : n . append ( int ( input ( ) ) ) NEW_LINE for i in n : print ( i - 1 ) NEW_LINE for j in range ( 2 , i + 1 ) : print ( j , end = ' ▁ ' ) NEW_LINE print ( ) NEW_LINE


import sys   NEW_LINE def main ( ) : _ , * l = map ( int , sys . stdin . read ( ) . strip ( ) . split ( ) ) NEW_LINE out = [ ] NEW_LINE for i in l : out . extend ( ( str ( i - 1 ) , ' ▁ ' . join ( map ( str , range ( 2 , i + 1 ) ) ) ) ) NEW_LINE return out NEW_LINE print ( * main ( ) , sep = ' \n ' ) NEW_LINE


import java . util . * ; public class HelloWorld {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; while ( t -- > 0 ) { int n = sc . nextInt ( ) ; System . out . println ( n ) ; for ( int i = 1 ; i <= n ; i ++ ) System . out . print ( i + " ▁ " ) ; System . out . println ( ) ; } } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . math . BigInteger ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . Scanner ; import java . util . StringTokenizer ; import java . util . stream . IntStream ;   public class FairchildTangerine {   static class FastReader { BufferedReader br ; StringTokenizer st ;   public FastReader ( ) { br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; }   String next ( ) { while ( st == null || ! st . hasMoreElements ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; }   int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   long nextLong ( ) { return Long . parseLong ( next ( ) ) ; }   double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; }   String nextLine ( ) { String str = " " ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return str ; } }   public static void main ( String [ ] args ) { try {   FastReader s = new FastReader ( ) ; int T = s . nextInt ( ) ;   while ( T > 0 ) {   int N = s . nextInt ( ) ; System . out . println ( N ) ;   for ( int i = 1 ; i <= N ; i ++ ) { System . out . print ( i + " ▁ " ) ; } System . out . println ( ) ; T -- ; } } catch (   Exception e ) { return ;   } } }


import java . io . BufferedReader ; import java . io . Closeable ; import java . io . IOException ; import java . io . InputStream ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . StringTokenizer ;   public class AddCandies implements Closeable {   private InputReader in = new InputReader ( System . in ) ; private PrintWriter out = new PrintWriter ( System . out ) ;   public void solve ( ) { int t = in . ni ( ) ; while ( t -- > 0 ) { int n = in . ni ( ) ; out . println ( n - 1 ) ; for ( int i = 2 ; i <= n ; i ++ ) { out . print ( i ) ; out . print ( ' ▁ ' ) ; } out . println ( ) ; } }   @ Override public void close ( ) throws IOException { in . close ( ) ; out . close ( ) ; }   static class InputReader { public BufferedReader reader ; public StringTokenizer tokenizer ;   public InputReader ( InputStream stream ) { reader = new BufferedReader ( new InputStreamReader ( stream ) , 32768 ) ; tokenizer = null ; }   public String next ( ) { while ( tokenizer == null || ! tokenizer . hasMoreTokens ( ) ) { try { tokenizer = new StringTokenizer ( reader . readLine ( ) ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } return tokenizer . nextToken ( ) ; }   public int ni ( ) { return Integer . parseInt ( next ( ) ) ; }   public long nl ( ) { return Long . parseLong ( next ( ) ) ; }   public void close ( ) throws IOException { reader . close ( ) ; } }   public static void main ( String [ ] args ) throws IOException { try ( AddCandies instance = new AddCandies ( ) ) { instance . solve ( ) ; } } }


import java . util . * ; public class Main {   public static void main ( String [ ] args ) { int t , n ;   Scanner sc = new Scanner ( System . in ) ;   t = sc . nextInt ( ) ;   while ( t -- > 0 ) { n = sc . nextInt ( ) ;   System . out . println ( n ) ;   for ( int i = 1 ; i <= n ; i ++ ) { System . out . print ( i + " ▁ " ) ; } }


# include < bits / stdc ++ . h > using namespace std ; void uttam ( ) { string s , t ; cin >> s >> t ; int n = s . length ( ) ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { if ( s [ i ] == t [ j ] ) { cout << " YES " << endl ; return ; } } } cout << " NO " << endl ; } int main ( ) { int t ; cin >> t ; for ( int i = 0 ; i < t ; i ++ ) uttam ( ) ; }

if __name__ == " _ _ main _ _ " : for _ in range ( int ( input ( ) ) ) : s = input ( ) t = input ( ) li = list ( s ) for i in li : if i in t : print ( " YES " ) break else : print ( " NO " ) NEW_LINE


def solve ( ) : s , t = input ( ) , input ( ) if len ( set ( s ) & set ( t ) ) > 0 : print ( ' YES ' ) else : print ( ' NO ' )   t = int ( input ( ) ) for _ in range ( t ) : solve ( ) NEW_LINE


try : q = int ( input ( ) ) for i in range ( q ) : s = input ( ) t = input ( ) v = True for j in s : if t . __contains__ ( j ) : print ( " YES " ) v = False break if v : print ( " NO " ) except : pass NEW_LINE


from __future__ import division , print_functionfrom collections import * from math import * from itertools import * import osimport sysfrom io import BytesIO , IOBase NEW_LINE


from __future__ import division , print_functionfrom collections import * from math import * from itertools import * from time import timeimport osimport sysfrom io import BytesIO , IOBase   if sys . version_info [ 0 ] < 3 : from __builtin__ import xrange as range from future_builtins import ascii , filter , hex , map , oct , zip   ''' Notes : n ▁ = ▁ number ▁ of ▁ ballsk ▁ = ▁ attract ▁ powerni ▁ = ▁ ball ' s ▁ coords '''   def main ( ) : s = list ( input ( ) ) t = list ( input ( ) ) if ( ' ' . join ( s ) ) == ( ' ' . join ( t ) ) : print ( ' YES ' ) return ss = set ( s ) st = set ( t ) for i in ss : if i in st : print ( ' YES ' ) return print ( ' NO ' ) return         NEW_LINE


import java . util . * ;   public class CF102 { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int q = sc . nextInt ( ) ; for ( int i = 0 ; i < q ; i ++ ) { String s = sc . next ( ) ; String t = sc . next ( ) ; boolean ans = false ; for ( int j = 0 ; j < s . length ( ) ; j ++ ) { char ch = s . charAt ( j ) ;


import java . util . Scanner ;   public class _0690StringsEqualization {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int cases = sc . nextInt ( ) ; sc . nextLine ( ) ; while ( cases > 0 ) { String s = sc . nextLine ( ) ; String t = sc . nextLine ( ) ; boolean flag = false ; a : { for ( int i = 0 ; i < s . length ( ) ; i ++ ) { for ( int j = 0 ; j < t . length ( ) ; j ++ ) { if ( s . charAt ( i ) == t . charAt ( j ) ) { flag = true ; break a ; } } } } if ( flag ) { System . out . println ( " YES " ) ; } else { System . out . println ( " NO " ) ; } cases -- ; } }   }


import java . util . Scanner ;   public class FrameArtist { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ;   int n = scanner . nextInt ( ) ; int [ ] a = new int [ 101 ] ; int count = 0 ;   for ( int i = 0 ; i < n ; i ++ ) { int add = scanner . nextInt ( ) ; a [ add ] ++ ;   if ( a [ add ] == 4 ) { count ++ ; a [ add ] = 0 ; } }   for ( int i = 1 ; i < 101 ; i ++ ) { if ( a [ i ] > 1 ) { for ( int j = i + 1 ; j < 101 ; j ++ ) { if ( a [ j ] > 1 ) { count ++ ; a [ j ] = 0 ; break ; } } } }   System . out . println ( count ) ; } }

n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) d = [ 0 ] * ( max ( a ) + 1 ) pas = 0 x = 0 for k in range ( n ) : d [ a [ k ] ] += 1 for k in range ( len ( d ) ) : pas += d [ k ] // 4   if d [ k ] % 4 > 1 : if x == 1 : pas += 1 x = 0 else : x = 1 print ( pas ) NEW_LINE


from sys import stdin , stdoutfrom collections import Counternmbr = lambda : int ( stdin . readline ( ) ) lst = lambda : list ( map ( int , stdin . readline ( ) . split ( ) ) ) for _ in range ( 1 ) : NEW_LINE


n = ( int ) ( input ( ) ) d = { } a = list ( map ( int , input ( ) . split ( ) ) ) for i in a : if i in d : d [ i ] += 1 else : d [ i ] = 1 res = 0 for i in d : res += ( int ) ( d [ i ] / 2 ) print ( ( int ) ( res / 2 ) ) NEW_LINE


n = int ( input ( ) ) l = list ( input ( ) . split ( ) ) d = { } for gar in l : if gar in d : d [ gar ] = d [ gar ] + 1 else : d [ gar ] = 1 pari = 0 for gar in d : pari = pari + d [ gar ] // 2 print ( pari // 2 ) NEW_LINE


import java . io . BufferedReader ; import java . io . BufferedWriter ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . OutputStreamWriter ;    public class Q { public static void main ( String [ ] args ) throws IOException { BufferedReader reader = new BufferedReader ( new InputStreamReader ( System . in ) ) ; BufferedWriter writer = new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ; int num = Integer . parseInt ( reader . readLine ( ) ) ; String word = reader . readLine ( ) ; boolean Char [ ] = new boolean [ 70 ] ; Char [ ' a ' - ' a ' ] = true ; Char [ ' o ' - ' a ' ] = true ; Char [ ' i ' - ' a ' ] = true ; Char [ ' u ' - ' a ' ] = true ; Char [ ' y ' - ' a ' ] = true ; Char [ ' e ' - ' a ' ] = true ; int count = 0 ; boolean x = true ; for ( int i = 0 ; i < num ; i ++ ) { char ltr = word . charAt ( i ) ; if ( Char [ ltr - ' a ' ] ) { count ++ ; } else { count = 0 ; } if ( count <= 1 ) { writer . write ( " " + ltr ) ; }   } writer . newLine ( ) ; writer . flush ( ) ; } }

import reinput ( ) print ( re . sub ( ' ( [ aeiouy ] ) [ aeiouy ] + ' , ' \\1' , input ( ) ) ) NEW_LINE


import sys , math , itertoolsfrom collections import Counter , deque , defaultdictfrom bisect import bisect_left , bisect_right from heapq import heappop , heappush , heapify , nlargestfrom copy import deepcopymod = 10 ** 9 + 7 INF = float ( ' inf ' ) def inp ( ) : return int ( sys . stdin . readline ( ) ) def inpl ( ) : return list ( map ( int , sys . stdin . readline ( ) . split ( ) ) ) def inpl_1 ( ) : return list ( map ( lambda x : int ( x ) - 1 , sys . stdin . readline ( ) . split ( ) ) ) def inps ( ) : return sys . stdin . readline ( ) def inpsl ( x ) : tmp = sys . stdin . readline ( ) ; return list ( tmp [ : x ] ) def err ( x ) : print ( x ) ; exit ( )   n = inp ( ) s = input ( ) res = [ ] boin = [ ' a ' , ' i ' , ' u ' , ' e ' , ' o ' , ' y ' ] for i in range ( n ) : if res and res [ - 1 ] in boin and s [ i ] in boin : continue res . append ( s [ i ] ) print ( ' ' . join ( res ) ) NEW_LINE


size = int ( input ( ) ) word = list ( input ( ) )   def isConsecutiveVowels ( ch1 , ch2 ) : return ( ch1 in " aeiouy " ) and ( ch2 in " aeiouy " )   for i in range ( 1 , size ) : if isConsecutiveVowels ( word [ i ] , word [ i - 1 ] ) : word [ i ] = ' '           print ( ' ' . join ( word ) ) NEW_LINE


n = int ( input ( ) ) s = input ( ) l = [ ] l . append ( s [ 0 ] ) for i in range ( 1 , len ( s ) ) : if ( ( l [ len ( l ) - 1 ] == " a " or l [ len ( l ) - 1 ] == " e " or l [ len ( l ) - 1 ] == " i " or l [ len ( l ) - 1 ] == " o " or l [ len ( l ) - 1 ] == " u " or l [ len ( l ) - 1 ] == " y " ) and ( s [ i ] == " a " or s [ i ] == " e " or s [ i ] == " i " or s [ i ] == " o " or s [ i ] == " u " or s [ i ] == " y " ) ) : pass else : l . append ( s [ i ] ) for i in range ( len ( l ) ) : print ( l [ i ] , end = " " ) NEW_LINE


import java . io . BufferedReader ; import java . io . BufferedWriter ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . OutputStreamWriter ;    public class Q { public static void main ( String [ ] args ) throws IOException { BufferedReader reader = new BufferedReader ( new InputStreamReader ( System . in ) ) ; BufferedWriter writer = new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ; int num = Integer . parseInt ( reader . readLine ( ) ) ; String word = reader . readLine ( ) ; String word2 = " " ; for ( int i = 0 ; i < num ; i ++ ) { char ltr = word . charAt ( i ) ; if ( i != 0 ) { if ( ( ltr == ' a ' || ltr == ' e ' || ltr == ' o ' || ltr == ' u ' || ltr == ' i ' || ltr == ' y ' ) && ( word . charAt ( i - 1 ) == ' y ' || word . charAt ( i - 1 ) == ' a ' || word . charAt ( i - 1 ) == ' o ' || word . charAt ( i - 1 ) == ' i ' || word . charAt ( i - 1 ) == ' e ' || word . charAt ( i - 1 ) == ' u ' ) && i != 0 ) {   } else { word2 += ltr ; } } else { word2 += ltr ; }   } writer . write ( word2 ) ; writer . newLine ( ) ; writer . flush ( ) ; } }


import java . io . BufferedReader ; import java . io . BufferedWriter ; import java . io . InputStreamReader ; import java . io . OutputStreamWriter ;   public class Main {   public static void main ( String [ ] args ) throws Exception { BufferedReader reader = new BufferedReader ( new InputStreamReader ( System . in ) ) ; BufferedWriter writer = new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ; int n = Integer . parseInt ( reader . readLine ( ) ) ; String v = " aouiey " ; String word = reader . readLine ( ) ; int count = 0 ; for ( int i = 0 ; i < word . length ( ) ; i ++ ) {   if ( v . contains ( " " + word . charAt ( i ) ) ) { count ++ ;


import java . io . * ; import java . util . * ; import java . text . * ; import java . math . * ; import java . util . regex . * ; public class Main { public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; int n = s . nextInt ( ) ; String str = s . next ( ) ; char [ ] ch = str . toCharArray ( ) ; System . out . print ( ch [ 0 ] ) ; for ( int i = 1 ; i < ch . length ; i ++ ) if ( check ( ch [ i ] ) == 0 ) System . out . print ( ch [ i ] ) ; else { if ( check ( ch [ i - 1 ] ) == 0 ) System . out . print ( ch [ i ] ) ; } } public static int check ( char x ) { if ( x == ' a ' || x == ' e ' || x == ' i ' || x == ' o ' || x == ' u ' || x == ' y ' ) return 1 ; return 0 ; } }


import java . util . Scanner ; public class NewClass6 { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) ; String x = in . next ( ) ; int j ; String y = " aeiouy " , z = " " ; for ( int i = 0 ; i < n ; i ++ ) { z += x . charAt ( i ) + " " ; if ( y . contains ( x . charAt ( i ) + " " ) ) { for ( j = i + 1 ; j < n ; j ++ ) { if ( ! ( y . contains ( x . charAt ( j ) + " " ) ) ) { break ; } } i = j - 1 ; } } System . out . println ( z ) ; } }


import java . util . Scanner ; import java . util . * ;   public class Solution {   public static void main ( String [ ] args ) { boolean debug = false ;   Scanner input = new Scanner ( System . in ) ;   String s = input . next ( ) ;   int count = 0 ;   int currentCount = 1 ; for ( int i = 1 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) == s . charAt ( i - 1 ) ) { currentCount ++ ; if ( i == s . length ( ) - 1 ) { if ( currentCount % 2 == 0 ) count ++ ; } } else { if ( currentCount % 2 == 0 ) count ++ ; currentCount = 1 ; } }   System . out . println ( count ) ; }    }

import sysstring = str ( sys . stdin . readline ( ) ) string = list ( string ) def solution ( string ) : count = 1 answer = 0 num = 0 NEW_LINE


s = input ( ) num = 0 i = 0 while ( i < len ( s ) ) : for j in range ( i + 1 , len ( s ) + 1 ) : if ( j == len ( s ) or s [ i ] != s [ j ] ) : if ( ( j - i ) % 2 == 0 ) : num += 1 i = j - 1 break i += 1 print ( num ) NEW_LINE


strand = input ( ) add = 0 count = 1 for i in range ( len ( strand ) - 1 ) : if strand [ i ] == strand [ i + 1 ] : count += 1 elif strand [ i ] != strand [ i + 1 ] : if count % 2 == 0 : add += 1 count = 1   if i == len ( strand ) - 2 : if count % 2 == 0 : add += 1   print ( add ) NEW_LINE


import math     def split ( word ) : return [ char for char in word ]   fin = input ( )   gene = split ( fin ) n = len ( gene ) max = [ ] counter = 1     for i in range ( 1 , n ) : if gene [ i ] == gene [ i - 1 ] : counter += 1 else : max . append ( counter ) counter = 1 max . append ( counter )     answer = 0 for i in range ( 0 , len ( max ) ) : if max [ i ] % 2 == 0 : answer += 1 else : answer += 0     print ( answer ) NEW_LINE


arr = input ( )     count = 0 insertion = 0 for i in range ( 1 , len ( arr ) ) : if arr [ i ] == arr [ i - 1 ] : count += 1 else : if ( count + 1 ) % 2 == 0 : insertion += 1 count = 0 if ( count + 1 ) % 2 == 0 : insertion += 1 print ( insertion ) NEW_LINE


import java . util . Scanner ; public class Pro { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; String s ; int n , i , c = 1 , f = 0 ; char ch1 , ch2 ; s = sc . nextLine ( ) ; s = s + " ▁ " ; n = s . length ( ) ; ch1 = s . charAt ( 0 ) ; for ( i = 0 ; i < n - 1 ; i ++ ) { if ( c == 1 ) ch1 = s . charAt ( i ) ; ch2 = s . charAt ( i + 1 ) ; if ( ch1 == ch2 ) c ++ ; else { if ( c % 2 == 0 ) f ++ ; c = 1 ; } } System . out . println ( f ) ; } }


import java . util . * ; public class P2 {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int a [ ] = new int [ n ] ; Map < Integer , Integer > map = new HashMap < > ( ) ; int c = 0 ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = sc . nextInt ( ) ; if ( ! map . containsKey ( a [ i ] ) ) { map . put ( a [ i ] , 1 ) ; } else { if ( a [ i ] != 0 ) { c ++ ; } int value = map . get ( a [ i ] ) ; value ++ ; map . replace ( a [ i ] , value ) ; } } int max = 0 ; for ( int k : map . keySet ( ) ) { if ( max < map . get ( k ) ) { if ( k != 0 ) max = map . get ( k ) ; } }

from collections import Counter   n = int ( input ( ) ) arr = list ( map ( int , input ( ) . split ( ) ) )   count = Counter ( arr ) ans = 0 for key , val in count . items ( ) : if val > 2 and key != 0 : print ( - 1 ) exit ( ) if val == 2 and key != 0 : ans += 1   print ( ans )     NEW_LINE


nenuzhnayadich = input ( ) arr = list ( map ( int , input ( ) . split ( ) ) ) meowcount , x = ( 0 , 0 )     def meow ( x , arr , meowcount ) : if x == len ( arr ) : print ( meowcount ) return ( meowcount ) elif arr . count ( arr [ x ] ) == 2 and arr [ x ] != 0 : meowcount += 1 arr . pop ( x ) return ( meow ( x , arr , meowcount ) ) elif arr . count ( arr [ x ] ) > 2 and arr [ x ] != 0 : print ( - 1 ) return ( - 1 ) elif arr [ x ] == 0 or arr . count ( arr [ x ] ) < 2 : x += 1 return ( meow ( x , arr , meowcount ) )     ''' def ▁ krya ( x , ▁ arr , ▁ meowcount ) : ▁ ▁ ▁ ▁ meow ( x , ▁ arr , ▁ meowcount ) '''     meow ( 0 , arr , 0 ) NEW_LINE


import systrash = int ( input ( ) ) - 1 ID = list ( map ( int , input ( ) . split ( ) ) ) otv = int ( ) ID . sort ( ) i = 0 while i < trash : if ID . count ( ID [ i ] ) == 2 and ID [ i ] != 0 : otv += 1 ID . remove ( ID [ i ] ) ID . remove ( ID [ i ] ) trash -= 2 continue elif ID . count ( ID [ i ] ) > 2 and ID [ i ] != 0 : print ( ' - 1' ) sys . exit ( ) i += 1 print ( otv ) NEW_LINE


n = int ( input ( ) ) li = list ( map ( int , input ( ) . rstrip ( ) . split ( ) ) ) cnt = 0 b = set ( li ) - { 0 } """ if ▁ n = = 1 : ▁ ▁ ▁ ▁ print ( 0 ) else : ▁ ▁ ▁ ▁ li . sort ( ) ▁ ▁ ▁ ▁ # print ( li ) ▁ ▁ ▁ ▁ for ▁ i ▁ in ▁ range ( n - 1 ) : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ if ▁ li [ i ] = = li [ i + 1 ] ▁ and ▁ i < ( n - 2 ) ▁ and ▁ li [ i ] ! = 0 : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ if ▁ li [ i + 1 ] = = li [ i + 2 ] : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ print ( -1 ) ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ exit ( ) ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ else : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ cnt + = 1 ▁ ▁ ▁ ▁ print ( cnt ) """   for i in b : p = li . count ( i ) if p > 2 : print ( - 1 ) exit ( ) elif p == 2 : cnt += 1 print ( cnt )     NEW_LINE


n = int ( input ( ) ) li = list ( map ( int , input ( ) . rstrip ( ) . split ( ) ) ) li . sort ( ) cnt = 0   i = 0 while i < n : if li [ i ] == 0 : i += 1 else : p = li [ i ] cnt1 = 1 j = i + 1 while j < n and li [ j ] == p : cnt1 += 1 j += 1 NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . List ; import java . util . stream . Collectors ; import java . util . stream . Stream ;   public class Polygamy {   public static void main ( String [ ] args ) throws IOException { BufferedReader reader = new BufferedReader ( new InputStreamReader ( System . in ) ) ; reader . readLine ( ) ; List < Integer > counts = Stream . of ( reader . readLine ( ) . trim ( ) . split ( " ▁ " ) ) . map ( Integer :: parseInt ) . sorted ( ) . collect ( Collectors . toList ( ) ) ; if ( counts . size ( ) == 1 ) { System . out . println ( "0" ) ; return ; } int result = 0 ; for ( int i = 0 ; i < counts . size ( ) - 2 ; i ++ ) { if ( counts . get ( i ) == 0 ) continue ; if ( counts . get ( i ) . equals ( counts . get ( i + 1 ) ) ) { if ( counts . get ( i ) . equals ( counts . get ( i + 2 ) ) ) { System . out . println ( " - 1" ) ; return ; } ++ i ; ++ result ; } } if ( counts . get ( counts . size ( ) - 1 ) . equals ( counts . get ( counts . size ( ) - 2 ) ) && ! counts . get ( counts . size ( ) - 1 ) . equals ( 0 ) ) ++ result ; System . out . println ( result ) ; } }


import java . util . * ; import java . io . * ; import java . lang . * ;   public class MainClass { private static BufferedReader br = null ; private static StringTokenizer st = null ; static { br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; } private static String str ( ) throws IOException { return br . readLine ( ) ; } private static int ints ( ) throws IOException { return Integer . parseInt ( br . readLine ( ) ) ; } private static int [ ] ints ( int N ) throws IOException { st = new StringTokenizer ( br . readLine ( ) ) ; int [ ] nums = new int [ N ] ; for ( int i = 0 ; i < N ; i += 1 ) { nums [ i ] = Integer . parseInt ( st . nextToken ( ) ) ; } return nums ; } public static void main ( String [ ] args ) throws IOException { int N = ints ( ) ; int [ ] nums = ints ( N ) ; Solution obj = new Solution ( ) ; System . out . println ( obj . pairs ( nums , N ) ) ; } }   class Solution { public int pairs ( int [ ] nums , int N ) { Map < Integer , Integer > hm = new HashMap < > ( ) ; for ( int num : nums ) { if ( num == 0 ) continue ; hm . put ( num , hm . getOrDefault ( num , 0 ) + 1 ) ; } int cnt_pairs = 0 ; for ( int freq : hm . values ( ) ) { if ( freq > 2 ) return - 1 ; if ( freq == 2 ) cnt_pairs += 1 ; } return cnt_pairs == 0 ? 0 : cnt_pairs ; } }


import java . util . HashMap ; import java . util . Scanner ;   public class Problem63 {   public static void main ( String [ ] args ) {


import java . util . Scanner ; public class Clock { public static void main ( String [ ] args ) { Scanner userInput = new Scanner ( System . in ) ; int t = userInput . nextInt ( ) ; for ( int i = 0 ; i < t ; i ++ ) { int n = userInput . nextInt ( ) ; long k = userInput . nextLong ( ) ; int [ ] list = new int [ n ] ; for ( int j = 0 ; j < n ; j ++ ) { list [ j ] = userInput . nextInt ( ) ; } list = transform ( list ) ; if ( k % 2 == 0 ) list = transform ( list ) ; for ( int j : list ) { System . out . print ( j + " ▁ " ) ; } System . out . println ( ) ; } } static int [ ] transform ( int [ ] list ) { int d = list [ 0 ] ; for ( int i = 0 ; i < list . length ; i ++ ) { if ( list [ i ] > d ) d = list [ i ] ; } for ( int i = 0 ; i < list . length ; i ++ ) { list [ i ] = d - list [ i ] ; } return list ; } }

from collections import Counter NEW_LINE t = int ( input ( ) ) NEW_LINE for _ in range ( t ) : NEW_LINE INDENT n , k = map ( int , input ( ) . split ( ) ) NEW_LINE ali = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE q = max ( ali ) NEW_LINE for i in range ( n ) : NEW_LINE INDENT ali [ i ] = q - ali [ i ] NEW_LINE DEDENT if ( k % 2 == 0 ) : NEW_LINE INDENT q = max ( ali ) NEW_LINE for i in range ( n ) : NEW_LINE INDENT ali [ i ] = q - ali [ i ] NEW_LINE DEDENT DEDENT print ( * ali ) NEW_LINE DEDENT


t = int ( input ( ) ) NEW_LINE for _ in range ( t ) : NEW_LINE INDENT n , k = map ( int , input ( ) . split ( ) ) NEW_LINE l = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE a = max ( l ) NEW_LINE l1 = [ ] NEW_LINE for i in l : NEW_LINE INDENT l1 . append ( a - i ) NEW_LINE DEDENT b = max ( l1 ) NEW_LINE l2 = [ ] NEW_LINE for j in l1 : NEW_LINE INDENT l2 . append ( b - j ) NEW_LINE DEDENT if k % 2 == 1 : NEW_LINE INDENT print ( * l1 ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( * l2 ) NEW_LINE DEDENT DEDENT


for _ in range ( int ( input ( ) ) ) : NEW_LINE INDENT n , k = map ( int , input ( ) . split ( ) ) NEW_LINE l = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE for z in range ( 2 - k % 2 ) : NEW_LINE INDENT d = max ( l ) NEW_LINE for i in range ( len ( l ) ) : NEW_LINE INDENT l [ i ] = d - l [ i ] NEW_LINE DEDENT DEDENT print ( * l ) NEW_LINE DEDENT


import java . util . Scanner ; public class B1392 { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int T = in . nextInt ( ) ; StringBuilder output = new StringBuilder ( ) ; for ( int t = 0 ; t < T ; t ++ ) { int N = in . nextInt ( ) ; long K = in . nextLong ( ) ; int [ ] A = new int [ N ] ; for ( int n = 0 ; n < N ; n ++ ) { A [ n ] = in . nextInt ( ) ; } op ( A ) ; if ( K % 2 == 0 ) { op ( A ) ; } for ( int a : A ) { output . append ( a ) . append ( ' ▁ ' ) ; } output . append ( ' \n ' ) ; } System . out . print ( output ) ; } private static void op ( int [ ] A ) { int max = Integer . MIN_VALUE ; for ( int a : A ) { max = Math . max ( max , a ) ; } for ( int n = 0 ; n < A . length ; n ++ ) { A [ n ] = max - A [ n ] ; } } }


import java . util . * ; import java . io . * ; import java . math . * ; public class ModelB { public static void main ( String args [ ] ) throws Exception { BufferedReader infile = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( infile . readLine ( ) ) ; int T = Integer . parseInt ( st . nextToken ( ) ) ; StringBuilder sb = new StringBuilder ( ) ; while ( T -- > 0 ) { st = new StringTokenizer ( infile . readLine ( ) ) ; int N = Integer . parseInt ( st . nextToken ( ) ) ; long K = Long . parseLong ( st . nextToken ( ) ) % 2 ; if ( K == 0 ) K = 2 ; int [ ] arr = new int [ N ] ; st = new StringTokenizer ( infile . readLine ( ) ) ; for ( int i = 0 ; i < N ; i ++ ) arr [ i ] = Integer . parseInt ( st . nextToken ( ) ) ; for ( int turns = 0 ; turns < K ; turns ++ ) { int max = arr [ 0 ] ; for ( int x : arr ) max = Math . max ( max , x ) ; for ( int i = 0 ; i < N ; i ++ ) arr [ i ] = max - arr [ i ] ; } for ( int i = 0 ; i < N ; i ++ ) { sb . append ( arr [ i ] ) ; if ( i + 1 < N ) sb . append ( " ▁ " ) ; } sb . append ( " \n " ) ; } System . out . print ( sb ) ; } }


import java . io . * ; import java . util . * ; import java . math . * ; import static java . lang . Math . * ; import static java . lang . Integer . parseInt ; import static java . lang . Long . parseLong ; import static java . lang . Double . parseDouble ; import static java . lang . String . * ; public class Main { public static void main ( String [ ] args ) throws IOException { BufferedReader in = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringBuilder out = new StringBuilder ( ) ; StringTokenizer tk ; tk = new StringTokenizer ( in . readLine ( ) ) ; int n = parseInt ( tk . nextToken ( ) ) , t = parseInt ( tk . nextToken ( ) ) , k = parseInt ( tk . nextToken ( ) ) , d = parseInt ( tk . nextToken ( ) ) ; int g = ( n + k - 1 ) / k ; int o1 = 0 , o2 = d ; for ( int i = 0 ; i < g ; i ++ ) { if ( o1 <= o2 ) o1 += t ; else o2 += t ; } if ( max ( o1 , o2 ) < g * t ) System . out . println ( " YES " ) ; else System . out . println ( " NO " ) ; } }

n , t , k , d = map ( int , input ( ) . split ( ) )   c = 0   while c <= d :   n -= k c += t   if n > 0 : print ( " YES " ) else : print ( " NO " )   NEW_LINE


import sysinput = sys . stdin . readlineimport math   def inpit ( ) : NEW_LINE


l1 = input ( ) . split ( ) n = int ( l1 [ 0 ] ) t = int ( l1 [ 1 ] ) k = int ( l1 [ 2 ] ) d = int ( l1 [ 3 ] )   if ( ( - ( - n // k ) ) * t ) <= ( d + t ) : print ( ' NO ' ) else : print ( ' YES ' ) NEW_LINE


from math import ceil   n , t , k , d = map ( int , input ( ) . split ( ) ) time_o = ceil ( n / k ) * t                 if d + t >= time_o : print ( ' NO ' ) else : print ( ' YES ' ) NEW_LINE


n , t , k , d = map ( int , input ( ) . split ( ) ) ar = ( n // k + int ( n % k > 0 ) ) * tdd = d // tn -= dd * kki = ( n // ( k * 2 ) + int ( n % ( 2 * k ) > 0 ) ) * t + dd * tif ki < ar : print ( ' YES ' ) else : print ( ' NO ' ) NEW_LINE


import java . util . * ; import java . io . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ;


import java . util . Scanner ; public class ADrink { public static boolean isAlphaNumeric ( String s ) { return s != null && s . matches ( " ^ [ a - zA - Z0-9 ] * $ " ) ; } public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int n = input . nextInt ( ) , t = input . nextInt ( ) , k = input . nextInt ( ) , d = input . nextInt ( ) ; int x = t * ( n / k ) ; if ( n % k != 0 ) x += t ; System . out . println ( t + d >= x ? " NO " : " YES " ) ;


import java . util . * ; public class OPPJava {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) , t = sc . nextInt ( ) , k = sc . nextInt ( ) , d = sc . nextInt ( ) ; System . out . println ( ( n - 1 ) / k * t > d ? " YES " : " NO " ) ; }   }


import java . util . Scanner ;   public class CarrotCakes { private static final Scanner SCANNER = new Scanner ( System . in ) ;   public static void main ( String [ ] args ) { int n = SCANNER . nextInt ( ) ; int t = SCANNER . nextInt ( ) ; int k = SCANNER . nextInt ( ) ; int d = SCANNER . nextInt ( ) ;   int g = ( n + k - 1 ) / k ; int o1 = 0 , o2 = d ; for ( int i = 0 ; i < g ; i ++ ) { if ( o1 <= o2 ) o1 += t ; else o2 += t ; }   System . out . println ( Math . max ( o1 , o2 ) < g * t ? " YES " : " NO " ) ; } }


import java . util . Scanner ;   public class Main {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int t = in . nextInt ( ) ; while ( t > 0 ) { t -- ; int n = in . nextInt ( ) ; int m = in . nextInt ( ) ; if ( n == 2 ) System . out . println ( m ) ; else if ( n == 1 ) System . out . println ( 0 ) ; else System . out . println ( 2 * m ) ; } }   }

for _ in range ( int ( input ( ) ) ) : arr_size , max_sum = map ( int , input ( ) . split ( ) )   if arr_size == 1 : print ( 0 ) elif arr_size == 2 : print ( max_sum ) else : print ( 2 * max_sum ) NEW_LINE


for _ in range ( int ( input ( ) ) ) : n , m = map ( int , input ( ) . split ( ) ) if n == 1 : print ( 0 ) elif n == 2 : print ( m ) else : print ( 2 * m ) NEW_LINE


t = int ( input ( ) ) for i in range ( t ) : n , m = map ( int , input ( ) . split ( ) ) if n == 1 : print ( 0 ) elif n == 2 : print ( m ) else : print ( 2 * m ) NEW_LINE


for _ in range ( int ( input ( ) ) ) : n , m = map ( int , input ( ) . split ( ) )   print ( m * min ( 2 , n - 1 ) ) NEW_LINE


def main ( ) : t = int ( input ( ) ) for _ in range ( t ) : n , m = map ( int , input ( ) . split ( ) ) if n < 2 : print ( 0 ) elif n == 2 : print ( m ) else : print ( ( m * 2 ) )     if __name__ == ' _ _ main _ _ ' : main ( )     '''  arr = ▁ [ ] ▁ len ( arr ) ▁ = > ▁ nsum ( arr ) ▁ = > ▁ m ans ▁ = > ▁ sum ( arr ) *2 ▁  6 ▁ 5 [ ▁ 0 , ▁ 5 ▁ , 0 ▁ ] [ ▁ 0 , ▁ 2 , ▁ 3 , ▁ 0 ▁ ] ▁ = > ▁ [ ▁ 0 , ▁ 2 ▁ ] ▁ + [ ▁ 2 , ▁ 3 ▁ ] ▁ = > ▁ 2 ▁ + ▁ 1 ▁ = ▁ 3  [ ▁ 0,2,0,3,0 ]   ''' NEW_LINE


import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; long x = in . nextInt ( ) ; while ( x > 0 ) { x -- ; long n = in . nextInt ( ) ; long m = in . nextInt ( ) ; if ( n == 1 ) System . out . println ( "0" ) ; else if ( n == 2 ) System . out . println ( m ) ; else if ( n > 2 ) System . out . println ( 2 * m ) ;    } } }


import java . util . Scanner ;   public class MostUnstableArray {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int [ ] [ ] array = new int [ n ] [ 2 ] ; for ( int i = 0 ; i < n ; i ++ ) { array [ i ] [ 0 ] = sc . nextInt ( ) ; array [ i ] [ 1 ] = sc . nextInt ( ) ; } for ( int i = 0 ; i < n ; i ++ ) { switch ( array [ i ] [ 0 ] ) { case 1 : System . out . println ( 0 ) ; break ; case 2 : System . out . println ( array [ i ] [ 1 ] ) ; break ; default : System . out . println ( array [ i ] [ 1 ] * 2 ) ; break ; } } } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . Arrays ;   public class CF1353A { public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; int t = Integer . parseInt ( br . readLine ( ) ) ; while ( t -- > 0 ) { int [ ] nm = Arrays . stream ( br . readLine ( ) . split ( " \\ s + " ) ) . mapToInt ( Integer :: parseInt ) . toArray ( ) ; System . out . println ( Math . min ( 2 , nm [ 0 ] - 1 ) * nm [ 1 ] ) ; } } }


import java . io . * ; import java . util . * ;   public class E {   public static void main ( String [ ] args ) { new E ( ) ; } public E ( ) { FastScanner fs = new FastScanner ( ) ; PrintWriter out = new PrintWriter ( System . out ) ; int T = 1 ; while ( T -- > 0 ) { int K = fs . nextInt ( ) ; int [ ] arr = new int [ 1999 ] ; arr [ 0 ] = - 1 ; for ( int i = 1 ; i < arr . length - 1 ; i ++ ) arr [ i ] = 1 ; arr [ arr . length - 1 ] = 2 ; for ( int elem = arr . length - 1 ; elem > 0 ; elem -- ) { int canTake = 1000000 - arr [ elem ] ; canTake = Math . min ( canTake , K ) ; arr [ elem ] += canTake ; K -= canTake ; } out . println ( arr . length ) ; for ( int i = 0 ; i < arr . length ; i ++ ) { if ( i > 0 ) out . print ( " ▁ " ) ; out . print ( arr [ i ] ) ; } out . println ( ) ; } out . close ( ) ; } static class FastScanner { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( " " ) ; public String next ( ) { while ( ! st . hasMoreElements ( ) ) try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return st . nextToken ( ) ; } int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } }   }

n = int ( input ( ) ) ans = [ - 1 ] n += 1 while n > 0 : n += 1 add = min ( n , 1000000 ) ans . append ( add ) n -= addprint ( len ( ans ) ) for i in ans : print ( i , end = " ▁ " ) print ( ) NEW_LINE


def solve ( Z ) : if Z <= 1000000 - 10 : return [ - 1 , Z + 2 ] for l in range ( 2000 ) : m = l + 1 if m < 4 or m > 2000 : continue Y = ( Z + 1 ) // ( m - 1 ) + 1 c = Y * ( m - 1 ) - ( Z + 1 ) X = Y + c + 1 if X >= 1000000 or Y + 2 >= 1000000 : continue if Y >= m / 2 - 1 : ans = [ X , - ( X + 1 ) ] for _ in range ( m - 4 ) : ans . append ( 0 ) ans . append ( - 1 ) ans . append ( Y + 2 )           return ans return - 1   Z = int ( input ( ) ) ans = solve ( Z ) print ( len ( ans ) ) print ( ' ▁ ' . join ( [ str ( x ) for x in ans ] ) ) NEW_LINE


k = int ( input ( ) ) ans = [ - 1 ] while sum ( ans ) - len ( ans ) + 1 != k : ans . append ( min ( 10 ** 6 , k + len ( ans ) - sum ( ans ) ) ) print ( len ( ans ) ) print ( * ans ) NEW_LINE