import java . util . * ; public class functions { public static void main ( String [ ] args ) { int t ; String n ; Scanner sc = new Scanner ( System . in ) ;   t = sc . nextInt ( ) ;   while ( t -- > 0 ) { n = sc . next ( ) ;   System . out . println ( n . length ( ) ) ; } } }

import java . util . Scanner ;   public class kick {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int n ; n = in . nextInt ( ) ; in . nextLine ( ) ; String a ; while ( n -- != 0 ) { a = in . nextLine ( ) ; System . out . println ( a . length ( ) ) ; } } }

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

import java . util . Scanner ;   public class A1455 {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int T = in . nextInt ( ) ; for ( int t = 0 ; t < T ; t ++ ) { String S = in . next ( ) ; System . out . println ( S . length ( ) ) ; } }   }

import java . util . Scanner ;   public class A1455 { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int t = scanner . nextInt ( ) ; for ( int i = 0 ; i < t ; i ++ ) { String n = scanner . next ( ) ; System . out . println ( n . length ( ) ) ; } } }

for _ in range ( int ( input ( ) ) ) : n = input ( ) NEW_LINE fx = n [ : : - 1 ] NEW_LINE ffx = fx [ : : - 1 ] NEW_LINE if int ( ffx ) == int ( n ) : NEW_LINE INDENT print ( len ( n ) ) else : NEW_LINE print ( len ( fx ) ) NEW_LINE DEDENT

for t in range ( int ( input ( ) ) ) : n = input ( ) NEW_LINE print ( len ( n ) ) NEW_LINE

num = int ( input ( ) ) NEW_LINE for _ in range ( num ) : string = str ( input ( ) ) NEW_LINE print ( len ( string ) ) NEW_LINE

for _ in range ( int ( input ( ) ) ) : print ( len ( input ( ) ) ) NEW_LINE


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

import java . io . * ; import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner scn = new Scanner ( System . in ) ; int n = scn . nextInt ( ) ; int a = 0 ; int b = 1 ; int c = 0 ; int a1 = 0 ; int b1 = 1 ; int c1 = 0 ; int count = 0 ; while ( c != n ) { c = a + b ; a = b ; b = c ; count ++ ; } int [ ] arr = new int [ count + 2 ] ; arr [ 0 ] = a1 ; arr [ 1 ] = b1 ; for ( int i = 2 ; i < arr . length ; i ++ ) { c1 = a1 + b1 ; a1 = b1 ; b1 = c1 ; arr [ i ] = c1 ; } int ans1 = 0 ; int ans2 = 0 ; if ( arr . length - 3 >= 0 ) { ans1 = arr [ arr . length - 3 ] ; } if ( arr . length - 2 >= 0 ) { ans2 = arr [ arr . length - 2 ] ; } System . out . println ( arr [ 0 ] + " ▁ " + ans1 + " ▁ " + ans2 ) ; } }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . * ;   public class experiment { static int M = 1_000_000_007 ; static int INF = Integer . MAX_VALUE ; static final FastScanner fs = new FastScanner ( ) ;

import java . util . Scanner ;   public class Hexadecimaltheorem { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int n = scanner . nextInt ( ) ; System . out . println ( 0 + " ▁ " + 0 + " ▁ " + n ) ; } }

n = input ( ) print ( '0 ▁ ' + '0 ▁ ' + n ) NEW_LINE

n = int ( input ( ) ) print ( 0 , 0 , n ) NEW_LINE

n = int ( input ( ) ) fibs = [ 0 , 1 ]   while fibs [ - 1 ] < n : fibs . append ( sum ( fibs [ - 2 : ] ) ) if n <= 3 : print ( " ▁ " . join ( [ "0" ] * ( 3 - n ) + [ "1" ] * n ) ) else : print ( fibs [ - 5 ] , fibs [ - 4 ] , fibs [ - 2 ] ) NEW_LINE


import java . io . BufferedReader ; import java . io . InputStream ; import java . io . InputStreamReader ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . Scanner ; import java . util . StringTokenizer ;    public class relative {   public static void main ( String [ ] args ) {

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . math . BigInteger ; import java . util . * ; import static java . util . Arrays . sort ; import javafx . util . Pair ;   public class Main { public static void main ( String [ ] args ) {   FastScanner input = new FastScanner ( ) ; int n = input . nextInt ( ) ; int male [ ] = new int [ 367 ] ; int female [ ] = new int [ 367 ] ; for ( int i = 0 ; i < n ; i ++ ) { char ch = input . next ( ) . charAt ( 0 ) ; int a = input . nextInt ( ) ; int b = input . nextInt ( ) ; if ( ch == ' M ' ) { for ( int j = a ; j <= b ; j ++ ) { male [ j ] ++ ; } } else { for ( int j = a ; j <= b ; j ++ ) { female [ j ] ++ ; } } } int ans = Integer . MIN_VALUE ; for ( int i = 1 ; i < 367 ; i ++ ) { ans = Math . max ( ans , Math . min ( male [ i ] , female [ i ] ) ) ; } System . out . println ( ans * 2 ) ; }   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 ( ) ; } }   }

n = int ( input ( ) ) m1 = { } m2 = { } for x in range ( 367 ) : m1 [ x ] = 0 for y in range ( 367 ) : m2 [ y ] = 0 for friend in range ( n ) : g , a , b = input ( ) . split ( ) for bruh in range ( int ( a ) , int ( b ) + 1 ) : if g == " M " : m1 [ bruh ] += 1 elif g == " F " : m2 [ bruh ] += 1 attendees = [ ] for day in range ( 367 ) : attendees . append ( min ( m1 [ day ] , m2 [ day ] ) )   print ( max ( attendees ) * 2 )     NEW_LINE

import sysdef input ( ) : return sys . stdin . readline ( ) . strip ( ) def iinput ( ) : return int ( input ( ) ) def minput ( ) : return map ( int , input ( ) . split ( ) ) def listinput ( ) : return list ( map ( int , input ( ) . split ( ) ) ) Male , Female = [ ] , [ ] days = [ [ 0 , 0 ] for _ in range ( 366 ) ] for _ in range ( iinput ( ) ) : a , b , c = map ( str , input ( ) . split ( ) ) if a == ' M ' : for i in range ( int ( b ) - 1 , int ( c ) ) : days [ i ] [ 0 ] += 1 else : for i in range ( int ( b ) - 1 , int ( c ) ) : days [ i ] [ 1 ] += 1 answer = - 1 for j in days : answer = max ( answer , min ( j ) * 2 ) print ( answer )   NEW_LINE

t = int ( input ( ) ) lst1 = [ ] lstm = [ 0 ] * 367 lstf = [ 0 ] * 367 lst2 = [ ] lst4 = [ ] count = 0 for k in range ( t ) : x , y , z = input ( ) . split ( ) for i in range ( int ( y ) , int ( z ) + 1 ) : if ( x == ' M ' ) : lstm [ i ] = lstm [ i ] + 1 elif ( x == ' F ' ) : lstf [ i ] = lstf [ i ] + 1 maxx = 0 for l in range ( 1 , 367 ) : num = 2 * min ( lstf [ l ] , lstm [ l ] ) if ( num >= maxx ) : maxx = numprint ( maxx )                   NEW_LINE

class friends : def __init__ ( self , gender , start , end ) : self . gender = gender self . start = start self . end = end   n = int ( input ( ) ) obj = [ ] for _ in range ( n ) : gender , start , end = input ( ) . split ( ) obj . append ( friends ( gender , int ( start ) , int ( end ) ) ) obj . sort ( key = lambda x : x . start ) invit = [ ]   m = [ 0 ] * 367 f = [ 0 ] * 367 for i in obj :   for j in range ( i . start , i . end + 1 ) : if i . gender == ' M ' : m [ j ] += 1 elif i . gender == ' F ' : f [ j ] += 1 maxx = 0   for i in range ( 367 ) : num = 2 * min ( m [ i ] , f [ i ] ) maxx = num if num > maxx else maxx   print ( maxx )             NEW_LINE

M = [ 0 for i in range ( 367 ) ] F = [ 0 for i in range ( 367 ) ] n = int ( input ( ) ) for _ in range ( n ) : g , n1 , n2 = input ( ) . split ( ) b = int ( n1 ) c = int ( n2 ) for j in range ( b , c + 1 ) : if g == ' M ' : M [ j ] += 1 else : F [ j ] += 1 k = 0 for i in range ( 367 ) : m = min ( M [ i ] , F [ i ] ) if m > k : k = mprint ( k * 2 )   NEW_LINE


import java . util . * ; import java . io . * ;   public class DoggoRecoloring { public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; InputReader in = new InputReader ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; Task solver = new Task ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; }   static class Task { public void solve ( int testNumber , InputReader in , PrintWriter out ) { int N = in . nextInt ( ) ; String s = in . next ( ) ; Map < Character , Integer > hm = new HashMap ( ) ; int cnt = 0 ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { char c = s . charAt ( i ) ; hm . put ( c , hm . getOrDefault ( c , 0 ) + 1 ) ; } for ( Integer i : hm . values ( ) ) if ( i == 1 ) cnt ++ ; if ( cnt == N && N != 1 ) out . println ( " NO " ) ; else out . println ( " YES " ) ; } }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . StringTokenizer ;   public class Main { 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 ) { FastReader scan = new FastReader ( ) ; PrintWriter rt = new PrintWriter ( System . out ) ;   int y = scan . nextInt ( ) ; String s = scan . next ( ) ;   if ( y == 1 ) { rt . print ( " Yes " ) ; rt . close ( ) ; return ; }   else {   int arr [ ] = new int [ 27 ] ;   for ( int i = 0 ; i < s . length ( ) ; i ++ ) { arr [ s . charAt ( i ) - 97 ] ++ ;   if ( arr [ s . charAt ( i ) - 97 ] == 2 ) { rt . print ( " YES " ) ; rt . close ( ) ; return ; } } } rt . print ( " NO " ) ; rt . close ( ) ; return ; } }

import java . io . * ; import java . util . * ;   public class test {   static String pangrams ( String s ) { if ( s . length ( ) == 1 ) return " Yes " ; ArrayList < Character > alphas = new ArrayList < > ( ) ; ArrayList < Character > alphac = new ArrayList < > ( ) ; for ( int i = ' A ' ; i <= ' Z ' ; i ++ ) { alphas . add ( ( char ) i ) ; } for ( int i = ' a ' ; i <= ' z ' ; i ++ ) { alphac . add ( ( char ) i ) ; } int [ ] c = new int [ alphac . size ( ) ] ; Arrays . fill ( c , 0 ) ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { int indexs = alphas . indexOf ( s . charAt ( i ) ) ; int indexc = alphac . indexOf ( s . charAt ( i ) ) ; if ( indexc >= 0 ) c [ indexc ] ++ ; if ( indexs >= 0 ) c [ indexs ] ++ ; } for ( int i : c ) { if ( i > 1 ) return " Yes " ; } return " No " ; }   private static final Scanner scanner = new Scanner ( System . in ) ;   public static void main ( String [ ] args ) throws IOException { scanner . nextLine ( ) ; String s = scanner . nextLine ( ) ;   String result = pangrams ( s ) ;   System . out . println ( result ) ;   scanner . close ( ) ; } }

import java . io . OutputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . PrintWriter ; import java . util . StringTokenizer ; import java . io . IOException ; import java . io . BufferedReader ; import java . io . InputStreamReader ; import java . io . InputStream ;   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 ) ; ADoggoRecoloring solver = new ADoggoRecoloring ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; }   static class ADoggoRecoloring { public void solve ( int testNumber , InputReader in , PrintWriter out ) { int n = in . nextInt ( ) ; int [ ] count = new int [ ' z ' + 1 ] ; String s = in . next ( ) ; for ( int i = 0 ; i < n ; i ++ ) { count [ s . charAt ( i ) ] ++ ; if ( count [ s . charAt ( i ) ] > 1 ) { out . println ( " Yes " ) ; return ; } } out . println ( n == 1 ? " Yes " : " No " ) ; }   }   static class InputReader { private BufferedReader reader ; private StringTokenizer tokenizer ;   public InputReader ( InputStream inputStream ) { reader = new BufferedReader ( new InputStreamReader ( inputStream ) ) ; }   public String next ( ) { while ( tokenizer == null || ! tokenizer . hasMoreTokens ( ) ) { try { tokenizer = new StringTokenizer ( reader . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return tokenizer . nextToken ( ) ; }   public int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   } }

import java . util . Scanner ;   public class Slava {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int p = 0 ; String s = sc . next ( ) ; for ( int i = 0 ; i < s . length ( ) - 1 ; i ++ ) { for ( int j = i + 1 ; j < s . length ( ) ; j ++ ) { if ( s . charAt ( i ) != s . charAt ( j ) ) { continue ; } else { p ++ ; break ; } } } if ( n == 1 ) { System . out . println ( " YES " ) ; } else { System . out . println ( p > 0 ? " YES " : " NO " ) ; } }   }

n = int ( input ( ) ) s = input ( ) a = [ 0 ] * 26 for i in s : a [ ord ( i ) - ord ( ' a ' ) ] += 1 a . sort ( reverse = True ) if a [ 0 ] > 1 or n == 1 : print ( " Yes " ) else : print ( " No " ) NEW_LINE

numTests = int ( input ( ) ) string = input ( )     if numTests > 26 or numTests == 1 : print ( " Yes " ) else : temp = [ ] result = " No " for x in string : if x in temp : result = " Yes " break else : temp . append ( x ) print ( result ) NEW_LINE

n = int ( input ( ) ) s = input ( ) if n == 1 : print ( " YES " ) elif len ( set ( s ) ) == len ( s ) : print ( " NO " ) else : print ( " YES " ) NEW_LINE

num = int ( input ( ) ) pup = input ( )   lst = [ ] for i in range ( num ) : lst . append ( pup [ i ] )   lst . sort ( )   if num > 1 : for i in range ( num ) : if i < num - 1 : if lst [ i ] == lst [ i + 1 ] : print ( " YES " ) break   if i == ( num - 1 ) : print ( " NO " )   elif num == 1 : print ( " YES " ) NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . OutputStream ; import java . io . PrintWriter ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . HashMap ; import java . util . List ; import java . util . Map ; import java . util . StringTokenizer ;   public class Gym {   static Map < Integer , Long > map = new HashMap < > ( ) ;   public static void main ( String [ ] args ) { FastScanner fs = new FastScanner ( ) ; OutputStream outputStream = System . out ; PrintWriter out = new PrintWriter ( outputStream ) ; int t = 1 ;

import java . util . * ;   public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int [ ] arr = new int [ n ] ; int ans = Integer . MAX_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = sc . nextInt ( ) ; } Arrays . sort ( arr ) ; boolean found = true ; int i = 0 ; for ( i = 1 ; i < n ; i ++ ) { if ( arr [ i ] % arr [ 0 ] == 0 ) found = true ; else { found = false ; break ; } } if ( found ) System . out . println ( arr [ 0 ] ) ; else System . out . println ( - 1 ) ; } }

import java . util . * ; public class Main { public static void main ( String args [ ] ) { Scanner scanner = new Scanner ( System . in ) ; int n = scanner . nextInt ( ) ; int arr [ ] = new int [ n ] ; int count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = scanner . nextInt ( ) ; } Arrays . sort ( arr ) ; for ( int i = 1 ; i < n ; i ++ ) { if ( arr [ i ] % arr [ 0 ] == 0 ) { count += 1 ; } } if ( count == n - 1 ) System . out . println ( arr [ 0 ] ) ; else System . out . println ( - 1 ) ; } }

import java . io . * ; import java . util . * ;   public class A_299 { static PrintWriter pw = new PrintWriter ( System . out ) ;   public static void main ( String arg [ ] ) throws IOException { InputStreamReader isr = new InputStreamReader ( System . in ) ; BufferedReader br = new BufferedReader ( isr ) ; StringTokenizer token = new StringTokenizer ( " ▁ " ) ;   int n = 0 ; int arr [ ] ; int i = 0 ; int j = 0 ; int min = Integer . MAX_VALUE ;   n = Integer . parseInt ( br . readLine ( ) ) ; arr = new int [ n ] ;   token = new StringTokenizer ( br . readLine ( ) ) ;   for ( j = 0 ; j <= n - 1 ; j ++ ) { arr [ j ] = Integer . parseInt ( token . nextToken ( ) ) ; if ( arr [ j ] < min ) min = arr [ j ] ; }   pw . println ( getResult ( arr , n , min ) ) ; pw . close ( ) ;   }   private static long getResult ( int arr [ ] , int n , int min ) { int i = 0 ;   for ( i = 0 ; i <= n - 1 ; i ++ ) if ( arr [ i ] % min != 0 ) return - 1 ;   return min ;   } }

n = int ( input ( ) ) a = [ int ( x ) for x in input ( ) . split ( ) ] a . sort ( ) flag = 0 for i in range ( 1 , n ) : if a [ i ] % a [ 0 ] : flag = 1 breakif flag : print ( - 1 ) else : print ( a [ 0 ] ) NEW_LINE

import mathn = int ( input ( ) ) l = list ( map ( int , input ( ) . split ( ) ) ) gc = l [ 0 ] for i in range ( 1 , n ) : gc = math . gcd ( gc , l [ i ] ) print ( gc if gc in l else " - 1" ) NEW_LINE

from sys import stdininput = stdin . readline   n = int ( input ( ) ) a = [ int ( x ) for x in input ( ) . split ( ) ] x = min ( a ) for i in a : if i % x > 0 : print ( - 1 ) breakelse : print ( x ) NEW_LINE

n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) m = min ( a ) for i in range ( n ) : if a [ i ] % m != 0 : print ( - 1 ) exit ( ) print ( m ) NEW_LINE

n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) k = min ( a ) for i in a : if i % k != 0 : exit ( print ( - 1 ) ) print ( k )                                   NEW_LINE


import java . util . Scanner ;   public class incARG { public static void main ( String [ ] args ) {   Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) ; String s = in . next ( ) ;   in . close ( ) ; System . out . println ( s . indexOf ( '0' ) >= 0 ? s . indexOf ( '0' ) + 1 : n ) ; } }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . * ;   import static java . lang . Integer . lowestOneBit ; import static java . lang . Integer . parseInt ;   public class Example {   public static void main ( String [ ] args ) {        Scanner sc = new Scanner ( System . in ) ;    int t = sc . nextInt ( ) ; String s = sc . next ( ) ; int ans = 0 ; int i = 0 ; while ( s . charAt ( i ) != '0' ) { ans ++ ; i ++ ; if ( i == s . length ( ) ) { break ; } } if ( ans + 1 >= s . length ( ) ) { System . out . println ( s . length ( ) ) ; } else { System . out . println ( ans + 1 ) ; }    } }

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

import java . util . Scanner ;   public class Main {   public static void main ( String [ ] args ) { int n ; String cells ; Scanner sc = new Scanner ( System . in ) ; int affectedCells = 0 ;   n = sc . nextInt ( ) ; cells = sc . next ( ) ;   for ( int i = 0 ; i < n ; i ++ ) { if ( cells . charAt ( i ) == '1' ) { affectedCells ++ ; } else { affectedCells ++ ; break ; }   }   System . out . println ( affectedCells ) ;   } }

INDENT n = int ( input ( ) ) a = input ( ) flag = 0   for i in range ( n ) : if ( a [ i ] == '0' ) : print ( i + 1 ) flag = 1 breakif ( flag == 0 ) : print ( n ) NEW_LINE DEDENT

n = int ( input ( ) ) s = str ( input ( ) ) y = s [ : : - 1 ] t = 0j = 1 for i in range ( n ) : if y [ n - j ] == '1' : t += 1 j += 1 else : print ( t + 1 ) exit ( ) print ( t ) NEW_LINE

n = int ( input ( ) ) s = input ( ) x = 1 for i in range ( n ) : if ( s [ i ] != '1' ) : break x += 1 if x > n : x = nprint ( x )                       NEW_LINE

counter = 0 num = int ( input ( ) ) binary = input ( ) for i in range ( num ) : if ( binary [ i ] == '1' ) : counter += 1 else : breakif ( num > counter + 1 ) : print ( counter + 1 ) else : print ( num ) NEW_LINE

n = int ( input ( ) ) s = input ( ) c = 1 changes = 0 if ( n >= 1 and n <= 100 ) : for i in range ( n ) : if ( s [ i ] == '1' and c == 1 ) : c = 1 changes += 1 elif ( s [ i ] == '0' and c == 1 ) : c = 0 changes += 1 elif ( s [ i ] == '1' and c == 0 ) : c = 0 else : c = 0 print ( changes ) NEW_LINE


import java . util . ArrayList ; import java . util . Collections ; import java . util . List ; import java . util . Scanner ;   public class Main { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int n = scanner . nextInt ( ) ; List < Integer > list = new ArrayList < > ( ) ; for ( int i = 0 ; i < n ; ++ i ) { list . add ( scanner . nextInt ( ) ) ; }

import java . io . BufferedReader ; import java . io . InputStreamReader ; import java . util . ArrayList ; import java . util . Collections ; import java . util . List ;   public class Main { public static void main ( String [ ] args ) throws Exception { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; int n = Integer . parseInt ( br . readLine ( ) ) ; String [ ] s = br . readLine ( ) . split ( " ▁ " ) ; List < Integer > arr = new ArrayList < Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { arr . add ( Integer . parseInt ( s [ i ] ) ) ; } Collections . sort ( arr ) ; System . out . println ( arr . get ( ( n + 1 ) / 2 - 1 ) ) ; } }

import java . util . Scanner ;   public class Middle { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) ; long [ ] arr = new long [ n ] ; in . nextLine ( ) ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = in . nextInt ( ) ; } mergeSort ( arr , 0 , n - 1 ) ; long res = findMiddle ( arr , n ) ; System . out . printf ( String . valueOf ( res ) ) ; }   public static void mergeSort ( long [ ] arr , int start , int end ) {

import java . util . ArrayList ; import java . util . Collections ; import java . util . List ; import java . util . Scanner ;    public class mindist { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int n = scanner . nextInt ( ) ; int [ ] x = new int [ n ] ; List < Integer > list = new ArrayList < Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { list . add ( scanner . nextInt ( ) ) ; } Collections . sort ( list ) ;   System . out . println ( list . get ( n / 2 + n % 2 - 1 ) ) ; } }

import java . util . * ;   public class CodeForces710B { public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int n = input . nextInt ( ) ; Integer [ ] a = new Integer [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = input . nextInt ( ) ; }   Arrays . sort ( a ) ; System . out . println ( n % 2 == 0 ? a [ n / 2 - 1 ] : a [ n / 2 ] ) ;   } }

n = int ( input ( ) ) ar = list ( map ( int , input ( ) . split ( ) ) ) ar = sorted ( ar ) print ( ar [ ( n + 1 ) // 2 - 1 ] )     NEW_LINE

n = int ( input ( ) ) nums = list ( map ( int , input ( ) . split ( ) ) ) nums = sorted ( nums ) if n % 2 == 0 : print ( nums [ int ( n / 2 ) - 1 ] ) else : print ( nums [ n // 2 ] ) NEW_LINE

if __name__ == " _ _ main _ _ " : n = int ( input ( ) ) arr = list ( map ( int , input ( ) . split ( ) ) ) arr . sort ( ) print ( arr [ ( 1 + n ) // 2 - 1 ] ) NEW_LINE

n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) a . sort ( ) print ( a [ ( n - 1 ) // 2 ] ) NEW_LINE


import java . util . * ; public class Solution { public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; int n = s . nextInt ( ) ; int a = s . nextInt ( ) ; int x = s . nextInt ( ) ; int b = s . nextInt ( ) ; int y = s . nextInt ( ) ; int found = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { a = a + 1 ; if ( a == n + 1 ) a = a % n ; b = b - 1 ; if ( b == 0 ) b = n ; if ( a == x || b == y ) { boolean v = check ( a , b ) ; if ( v == true ) found = 1 ; break ; } boolean v1 = check ( a , b ) ; if ( v1 == true ) { found = 1 ; break ; } } if ( found == 1 ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } public static boolean check ( int a , int b ) { boolean c = false ; if ( a == b ) c = true ; return c ; } }

import java . util . * ;   public class Absolutezero { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int a = sc . nextInt ( ) ; int x = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int y = sc . nextInt ( ) ; int p1 = a ; int p2 = b ;   List < Integer > st1 = new ArrayList < > ( ) ; List < Integer > st2 = new ArrayList < > ( ) ; while ( p1 != x ) { st1 . add ( p1 ) ; p1 ++ ; if ( p1 == ( n + 1 ) ) { p1 = 1 ; } } st1 . add ( p1 ) ; while ( p2 != y ) { st2 . add ( p2 ) ; p2 -- ; if ( p2 == ( 0 ) ) { p2 = n ; } } st2 . add ( p2 ) ; for ( int i = 0 ; i < Math . min ( st1 . size ( ) , st2 . size ( ) ) ; i ++ ) { if ( st1 . get ( i ) . equals ( st2 . get ( i ) ) ) { System . out . println ( " YES " ) ; return ; } } System . out . println ( " NO " ) ;    }   static int countSetBits ( int n ) { int count = 0 ; while ( n > 0 ) { count += n & 1 ; n >>= 1 ; } return count ; }   public List < Integer > getDivisors ( int n ) { List < Integer > list = new ArrayList < > ( ) ; for ( int d = 2 ; d * d <= n ; d ++ ) { while ( n % d == 0 ) { list . add ( d ) ; n /= d ; } } if ( n > 1 ) { list . add ( n ) ; } return list ; }   public int lcm ( int n1 , int n2 ) { int gcd = 1 ; for ( int i = 1 ; i <= n1 && i <= n2 ; ++ i ) {

import java . util . * ; import java . util . Arrays ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int a = sc . nextInt ( ) ; int x = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int y = sc . nextInt ( ) ; a -- ; b -- ; x -- ; y -- ; while ( true ) { if ( a == b ) { System . out . println ( " YES " ) ; break ; } if ( a == x || b == y ) { System . out . println ( " NO " ) ; break ; } a = ( a + 1 ) % n ; b = ( b - 1 + n ) % n ; } } }

s = " NO " n , a , x , b , y = map ( int , input ( ) . split ( ) ) while a != x and b != y : a += 1 b -= 1 if a > n : a = 1 if b < 1 : b = n if a == b : s = " YES " breakprint ( s ) NEW_LINE

n , a , x , b , y = map ( int , input ( ) . split ( ) ) for i in range ( n ) : if a == b : print ( ' YES ' ) exit ( 0 ) if a == x or b == y : break a = ( a + 1 ) % n if a == 0 : a = n b = ( b - 1 ) if b <= 0 : b = n + bprint ( ' NO ' ) NEW_LINE

n , a , x , b , y = map ( int , input ( ) . split ( ) ) flag = 0 while a != x and b != y : a += 1 b -= 1 if a == n + 1 : a = 1 if b == 0 : b = n if a == b : flag = 1 breakif flag == 0 : print ( ' NO ' ) else : print ( ' YES ' ) NEW_LINE

no_of_station , Daniel_start , Daniel_finish , Vlad_start , Vlad_finish = map ( int , input ( ) . split ( ) ) station_of_daniel = Daniel_start station_of_vlad = Vlad_startflag = 0     while True : if ( station_of_vlad == station_of_daniel ) : print ( " YES " ) flag = 1 break if ( station_of_daniel == Daniel_finish or station_of_vlad == Vlad_finish ) : break if ( station_of_daniel + 1 <= no_of_station ) : station_of_daniel += 1 else : station_of_daniel = 1 if ( station_of_vlad - 1 > 0 ) : station_of_vlad -= 1 else : station_of_vlad = no_of_station if ( flag == 0 ) : print ( " NO " ) NEW_LINE


import java . io . Writer ; import java . io . BufferedWriter ; import java . io . OutputStreamWriter ; import java . io . OutputStream ; import java . io . PrintWriter ; import java . io . IOException ; import java . io . InputStream ; import java . math . BigInteger ; import java . util . Arrays ; import java . util . ArrayList ; import java . util . InputMismatchException ; import java . util . * ; import java . io . * ; import java . math . * ; import java . util . concurrent . TimeUnit ;   public class C1013 { static class pair { int val , idx ; pair ( int a , int b ) { val = a ; idx = b ; } public String toString ( ) { return " ( val : ▁ " + val + " ▁ idx : ▁ " + idx + " ) " ; } }    static class ProblemSolver { public void solveTheProblem ( InputReader in , OutputWriter out , NumberTheory nt , Debug dbg ) { dbg . setLocal ( 1 ) ; int test = 1 ;

import java . util . * ; import java . io . * ; import java . net . URI ; public class b {   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 ( final String [ ] args ) throws IOException { FastReader sc = new FastReader ( ) ; int n = sc . nextInt ( ) ; n = 2 * n ;   long [ ] x = new long [ n ] ;   for ( int i = 0 ; i < n ; i ++ ) x [ i ] = sc . nextLong ( ) ;   Arrays . sort ( x ) ;   long area = Math . abs ( x [ 0 ] - x [ n / 2 - 1 ] ) * Math . abs ( x [ n / 2 ] - x [ n - 1 ] ) ;   long z = Integer . MAX_VALUE ;   for ( int i = 1 ; i < n / 2 ; i ++ ) z = Math . min ( z , Math . abs ( x [ i ] - x [ i + ( n / 2 ) - 1 ] ) ) ;   long sarea = z * Math . abs ( x [ 0 ] - x [ n - 1 ] ) ;   System . out . println ( Math . min ( area , sarea ) ) ;    } }

import java . io . BufferedReader ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . Arrays ; import java . util . StringTokenizer ;   public class Problem500A { public static void main ( String [ ] args ) throws Exception { BufferedReader reader = new BufferedReader ( new InputStreamReader ( System . in ) ) ; PrintWriter writer = new PrintWriter ( System . out ) ;   int n = Integer . parseInt ( reader . readLine ( ) ) ; StringTokenizer tokenizer = new StringTokenizer ( reader . readLine ( ) ) ;   Long [ ] coords = new Long [ 2 * n ] ; for ( int i = 0 ; i < 2 * n ; i ++ ) { coords [ i ] = ( long ) Integer . parseInt ( tokenizer . nextToken ( ) ) ; }   Arrays . sort ( coords ) ;   long minCoord = coords [ 0 ] ; long maxCoord = coords [ coords . length - 1 ] ;   long minArea = ( coords [ n - 1 ] - coords [ 0 ] ) * ( coords [ 2 * n - 1 ] - coords [ n ] ) ; for ( int i = 1 ; i < n ; i ++ ) { minArea = Math . min ( minArea , ( maxCoord - minCoord ) * ( coords [ i + n - 1 ] - coords [ i ] ) ) ; }   writer . println ( minArea ) ;    reader . close ( ) ; writer . close ( ) ; } }

n = int ( input ( ) ) ls = list ( map ( int , input ( ) . split ( ) ) ) ls . sort ( ) x = ls [ len ( ls ) - 1 ] - ls [ 0 ] y = 0x7fffffffff or i in range ( 1 , n ) : tep = ls [ i + n - 1 ] - ls [ i ] if tep < y : y = tepans = x * yx = ls [ n - 1 ] - ls [ 0 ] y = ls [ len ( ls ) - 1 ] - ls [ n ] ans = min ( ans , x * y ) print ( ans ) NEW_LINE

n = int ( input ( ) ) l = list ( map ( int , input ( ) . split ( ) ) ) l . sort ( ) ans = ( l [ n - 1 ] - l [ 0 ] ) * ( l [ 2 * n - 1 ] - l [ n ] ) for i in range ( 1 , n ) : ans = min ( ans , ( l [ n + i - 1 ] - l [ i ] ) * ( l [ 2 * n - 1 ] - l [ 0 ] ) ) print ( ans ) NEW_LINE

n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) a . sort ( ) minn = 10000000000000 for i in range ( n ) : minn = min ( minn , a [ i + n - 1 ] - a [ i ] ) if n == 1 : print ( 0 ) else : print ( min ( ( ( a [ 2 * n - 1 ] - a [ 0 ] ) * ( minn ) ) , ( a [ n - 1 ] - a [ 0 ] ) * ( a [ 2 * n - 1 ] - a [ n ] ) ) ) NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . math . BigInteger ; import java . util . * ; import static java . util . Arrays . sort ; import javafx . util . Pair ;   public class Main {   public static void main ( String [ ] args ) {   FastScanner input = new FastScanner ( ) ; String s = input . next ( ) ; int letter [ ] = new int [ 26 ] ;   for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) == ' a ' ) { letter [ 0 ] ++ ; } else { for ( int j = 0 ; j < s . charAt ( i ) - ' a ' ; j ++ ) { if ( letter [ j ] == 0 ) { System . out . println ( " NO " ) ; return ; } } letter [ s . charAt ( i ) - ' a ' ] ++ ; } } System . out . println ( " YES " ) ; }   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 . * ; import java . util . stream . Collectors ; import java . lang . * ; import java . io . * ; public class Problem { public static void main ( String [ ] args ) throws java . lang . Exception { Scanner sc = new Scanner ( System . in ) ; String s = sc . next ( ) ; String temp = " a " ; String ans = " YES " ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( temp . indexOf ( s . charAt ( i ) ) != - 1 ) continue ; if ( s . charAt ( i ) == temp . charAt ( temp . length ( ) - 1 ) + 1 && i > 0 ) { temp += s . charAt ( i ) + " " ; } else { ans = " NO " ; break ; } } System . out . println ( ans ) ; }   }

s = input ( ) st = [ ' a ' , ' b ' , ' c ' , ' d ' , ' e ' , ' f ' , ' g ' , ' h ' , ' i ' , ' j ' , ' k ' , ' l ' , ' m ' , ' n ' , ' o ' , ' p ' , ' q ' , ' r ' , ' s ' , ' t ' , ' u ' , ' v ' , ' w ' , ' x ' , ' y ' , ' z ' ] f = Trueuse = set ( ) last = - 1 for i in range ( len ( s ) ) : if s [ i ] in use : pass elif s [ i ] != st [ last + 1 ] : f = False break else : use . add ( s [ i ] ) last += 1 if f : print ( " YES " ) else : print ( " NO " ) NEW_LINE

s = input ( ) a = " abcdefghijklmnopqrstuvwxyz " x = [ i for i in s ] y = [ ] for i in x : if i in y : continue else : y . append ( i ) l = len ( y ) j = " " . join ( y ) if a [ : l ] == j : print ( " YES " ) else : print ( " NO " ) NEW_LINE

import string   def solve ( seq ) : ref = list ( string . ascii_lowercase ) index = 0 for x in seq : if x > ref [ index ] : return " NO " elif x == ref [ index ] : if index == 25 : continue index += 1 return " YES " print ( solve ( input ( ) ) )                                         NEW_LINE

import string   obf = [ x for x in input ( ) ] obf = [ x for i , x in enumerate ( obf ) if x not in obf [ : i ] ] n = len ( obf )   letters = list ( string . ascii_lowercase ) letters = letters [ : n ]   if obf == letters : print ( ' Yes ' ) else : print ( ' No ' )   NEW_LINE


import java . util . Scanner ;   public class GeraldHexagonC313Q1 { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int [ ] arr = new int [ 6 ] ; for ( int i = 0 ; i < 6 ; i ++ ) { arr [ i ] = sc . nextInt ( ) ; } int a1 = arr [ 0 ] ; int a2 = arr [ 1 ] ; int a3 = arr [ 2 ] ; int a5 = arr [ 4 ] ; System . out . println ( ( a1 + a2 + a3 ) * ( a1 + a2 + a3 ) - a1 * a1 - a3 * a3 - a5 * a5 ) ; sc . close ( ) ; } }

import java . io . File ; import java . util . Scanner ; import java . util . StringTokenizer ;   public class p006 { public static void main ( String args [ ] ) throws Exception { StringTokenizer stok = new StringTokenizer ( new Scanner ( System . in ) . useDelimiter ( " \\ A " ) . next ( ) ) ; StringBuilder sb = new StringBuilder ( ) ; int a1 = Integer . parseInt ( stok . nextToken ( ) ) ; int a2 = Integer . parseInt ( stok . nextToken ( ) ) ; int a3 = Integer . parseInt ( stok . nextToken ( ) ) ; int a4 = Integer . parseInt ( stok . nextToken ( ) ) ; int a5 = Integer . parseInt ( stok . nextToken ( ) ) ; int a6 = Integer . parseInt ( stok . nextToken ( ) ) ; int v = a1 ; long tot = 0 ; for ( int i = 0 ; i < Math . min ( a2 , a6 ) ; i ++ , v ++ ) tot += v * 2 + 1 ; for ( int i = Math . min ( a2 , a6 ) ; i < Math . max ( a2 , a6 ) ; i ++ ) tot += 2 * v ; for ( int i = Math . max ( a2 , a6 ) ; i < a2 + a3 ; i ++ , v -- ) tot += 2 * v - 1 ; System . out . println ( tot ) ; } }

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

import math , sys , bisect , heapq , osfrom collections import defaultdict , Counter , dequefrom itertools import groupby , accumulatefrom functools import lru_cache NEW_LINE

a , b , c , d , e , f = list ( map ( int , input ( ) . split ( ) ) ) print ( ( a + b + c ) ** 2 - a * a - e * e - c * c ) NEW_LINE

sides = input ( ) seperate = sides . split ( " ▁ " ) a , b , c , d , e , f = seperatea = int ( a ) b = int ( b ) c = int ( c ) d = int ( d ) e = int ( e ) f = int ( f ) area1 = 0 area2 = 0 area3 = 0 if b == f and c == e : for i in range ( b ) : area1 += ( 2 * a ) + 1 a += 1 for i in range ( e ) : area2 += ( 2 * d ) + 1 d += 1 else : if b > f : for i in range ( f ) : area1 += ( 2 * a ) + 1 a += 1 b = b - f for i in range ( b ) : area2 += ( 2 * a ) e = e - b for i in range ( c ) : area3 += ( 2 * d ) + 1 d += 1   elif b < f : for i in range ( b ) : area1 += ( 2 * a ) + 1 a += 1 f = f - b for i in range ( f ) : area2 += ( 2 * a ) c = c - f for i in range ( e ) : area3 += ( 2 * d ) + 1 d += 1 print ( ( area1 + area3 + area2 ) )   NEW_LINE


import java . util . * ; import java . math . * ; import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . StringTokenizer ;

import java . io . FileInputStream ; import java . io . FileNotFoundException ; import java . io . IOException ; import java . io . PrintWriter ; import java . util . Arrays ; import java . util . Collection ; import java . util . List ; import java . util . Scanner ; import java . util . function . Function ; import java . util . stream . Collectors ; public class _p000965A { static public void main ( final String [ ] args ) throws IOException { p000965A . _main ( args ) ; }

import java . util . Scanner ;   public class PaperAirplanes { public static void main ( String [ ] args ) {   Scanner in = new Scanner ( System . in ) ; double k = in . nextDouble ( ) , n = in . nextDouble ( ) , s = in . nextDouble ( ) , p = in . nextDouble ( ) ;   in . close ( ) ; System . out . println ( ( int ) Math . ceil ( Math . ceil ( n / s ) * k / p ) ) ; } }

import java . util . * ; import java . io . * ;   public class tr0 { static PrintWriter out ; static StringBuilder sb ; static int mod = ( int ) 1e9 + 7 ; static long inf = ( long ) 1e14 ; static int n , m , c ; static int [ ] [ ] ad ; static int [ ] [ ] [ ] memo ; static boolean f ; static boolean vis [ ] ; static int [ ] px , Q [ ] ; static HashMap < Integer , Integer > hm ;   public static void main ( String [ ] args ) throws Exception { Scanner sc = new Scanner ( System . in ) ; out = new PrintWriter ( System . out ) ; int k = sc . nextInt ( ) ; int n = sc . nextInt ( ) ; int s = sc . nextInt ( ) ; int p = sc . nextInt ( ) ; long lo = 0 ; long hi = ( long ) 1e9 ; long ans = 0 ; while ( lo <= hi ) { long i = lo + hi >> 1 ; long paper = p * 1l * i ; long in = paper / k ; long kk = in * 1l * s ;

import java . util . * ;   public class P3 { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int k = sc . nextInt ( ) ; int n = sc . nextInt ( ) ; int s = sc . nextInt ( ) ; int p = sc . nextInt ( ) ; int r = 0 ; if ( n <= s ) { if ( k % p == 0 ) { r = k / p ; } else { r = ( k / p ) + 1 ; } } else {   int d = 0 ; if ( n % s == 0 ) {   d = n / s ; } else { d = ( n / s ) + 1 ; } if ( ( k * d ) % p == 0 ) { r = ( k * d ) / p ; } else { r = ( k * d ) / p + 1 ; } } System . out . println ( r ) ; } }

import mathk , n , s , p = [ int ( x ) for x in input ( ) . split ( ) ] x = math . ceil ( n / s ) y = math . ceil ( x * k / p ) print ( y ) NEW_LINE

k , n , s , p = map ( int , input ( ) . split ( ) ) x = ( n + s - 1 ) // sx *= kprint ( ( x + p - 1 ) // p )     NEW_LINE

k , n , s , p = map ( int , input ( ) . split ( ' ▁ ' ) ) if ( 1 * n ) % s == 0 : need = ( 1 * n ) // s if need == 0 and k % p == 0 : print ( k // p ) elif ( k * need ) % p == 0 : print ( ( k * need ) // p ) else : print ( ( ( k * need ) // p ) + 1 ) else : need = ( ( 1 * n ) // s ) + 1 if need == 0 and k % p == 0 : print ( k // p ) elif ( k * need ) % p == 0 : print ( ( k * need ) // p ) else : print ( ( ( k * need ) // p ) + 1 ) NEW_LINE

k , n , s , p = map ( int , input ( ) . split ( ) )   paper_person = ( n + s - 1 ) // s   total_needed = paper_person * k   ans = ( total_needed + p - 1 ) // p   print ( ans )     NEW_LINE

import mathk , n , s , p = map ( int , input ( ) . split ( ) ) sheets = math . ceil ( n / s ) * kprint ( math . ceil ( sheets / p ) ) NEW_LINE


import java . util . * ; public class Solution { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; for ( int i = 0 ; i < t ; i ++ ) { int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int c = Math . abs ( a - b ) ; if ( c % 10 == 0 ) { System . out . println ( c / 10 ) ; } else { System . out . println ( ( c / 10 ) + 1 ) ; } }   } }

import java . util . * ; public class Solutions { public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; int t = s . nextInt ( ) ; while ( t -- > 0 ) { int a = s . nextInt ( ) ; int b = s . nextInt ( ) ; int diff = Math . abs ( a - b ) ; int sum = 10 ; int step = 0 ; while ( diff != 0 ) { if ( diff >= sum ) { int p = diff / sum ; diff = diff - p * sum ; step += p ; } else { sum -- ; } } System . out . println ( step ) ; } } }

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 -- ; long a = in . nextLong ( ) ; long b = in . nextLong ( ) ; long difference ; long x ; if ( a == b ) System . out . println ( 0 ) ; else { difference = Math . abs ( b - a ) ; x = difference / 10 ; if ( difference % 10 == 0 ) System . out . println ( x ) ; else System . out . println ( x + 1 ) ; }   }   }

import java . util . Scanner ;   public class yet_another_two_integer_problem {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ;   int t = in . nextInt ( ) ; int a , b ; while ( t -- != 0 ) { a = in . nextInt ( ) ; b = in . nextInt ( ) ; System . out . println ( ( int ) Math . ceil ( ( Math . abs ( a - b ) / 10.0 ) ) ) ;   } }   }

import java . util . Scanner ;   public class A { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; while ( t -- > 0 ) { int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int s = Math . abs ( a - b ) ; int ans = s / 10 ; if ( s % 10 != 0 ) ans ++ ; System . out . println ( ans ) ; }   } }

if __name__ == ' _ _ main _ _ ' :     NEW_LINE t = int ( input ( ) ) NEW_LINE result = [ ] NEW_LINE for _ in range ( t ) : c = input ( ) . split ( ) NEW_LINE a , b = int ( c [ 0 ] ) , int ( c [ 1 ] ) NEW_LINE if a > b : NEW_LINE INDENT difference = a - b else : NEW_LINE difference = b - a   dif = difference // 10 NEW_LINE DEDENT mod = 1 if difference % 10 else 0 NEW_LINE print ( dif + mod )   """ 65 ▁ 513 ▁ 4218 ▁ 41337 ▁ 420123456789 ▁ 1000000000100500 ▁ 9000  """ NEW_LINE

for x in range ( int ( input ( ) ) ) : a , b = map ( int , input ( ) . split ( ) ) NEW_LINE c = abs ( a - b ) NEW_LINE if c % 10 == 0 : NEW_LINE INDENT print ( c // 10 ) else : NEW_LINE print ( ( c // 10 ) + 1 ) NEW_LINE DEDENT

from math import ceilt = int ( input ( ) ) NEW_LINE for i in range ( t ) : a , b = map ( int , input ( ) . split ( ) ) NEW_LINE print ( ceil ( ( abs ( a - b ) / 10 ) ) ) NEW_LINE

for _ in range ( int ( input ( ) ) ) : a , b = map ( int , input ( ) . split ( " ▁ " ) ) NEW_LINE count = 0 NEW_LINE if a != b : if NEW_LINE a < b : count = ( ( b - a ) // 10 ) NEW_LINE a += 10 * ( ( b - a ) // 10 ) NEW_LINE if b - a : NEW_LINE INDENT count += 1 else : NEW_LINE count += ( ( a - b ) // 10 ) NEW_LINE DEDENT a -= 10 * ( ( a - b ) // 10 ) NEW_LINE if a - b : count += 1 NEW_LINE print ( count ) NEW_LINE

cases = int ( input ( ) ) NEW_LINE for i in range ( cases ) : a , b = map ( int , input ( ) . split ( ) ) NEW_LINE temp = abs ( a - b ) NEW_LINE count = 0 NEW_LINE if temp == 0 : NEW_LINE INDENT print ( 0 ) else : NEW_LINE count = temp // 10 NEW_LINE DEDENT temp = temp - 10 * count NEW_LINE if temp % 10 != 0 : count += 1   print ( count ) NEW_LINE


import java . util . Scanner ;   public class BrainsPhotos { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int n = scan . nextInt ( ) ; int m = scan . nextInt ( ) ; boolean a = true ; for ( int i = 0 ; i <= n ; i ++ ) { String s = scan . nextLine ( ) ; for ( int j = 0 ; j < s . length ( ) ; j ++ ) { if ( s . charAt ( j ) == ' ▁ ' ) { continue ; } if ( s . charAt ( j ) == ' Y ' || s . charAt ( j ) == ' M ' || s . charAt ( j ) == ' C ' ) { a = false ; } } } if ( a == false ) { System . out . println ( " # Color " ) ; } else { System . out . println ( " # Black & White " ) ; } scan . close ( ) ; } }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . StringTokenizer ;   public class Brains_Photos { static class RealScanner { 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 ) { RealScanner sc = new RealScanner ( ) ; int m , n ; m = sc . nextInt ( ) ; n = sc . nextInt ( ) ; String [ ] [ ] s = new String [ m ] [ n ] ; for ( int i = 0 ; i < m ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { s [ i ] [ j ] = sc . next ( ) ; } } int count = 0 ; boolean check = true ; for ( int i = 0 ; i < m ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { if ( s [ i ] [ j ] . equals ( " B " ) || s [ i ] [ j ] . equals ( " W " ) || s [ i ] [ j ] . equals ( " G " ) ) {   } else { count ++ ; check = false ; } } } if ( count < 3 && check ) { System . out . println ( " # Black & White " ) ; } else { System . out . println ( " # Color " ) ; } } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int a = sc . nextInt ( ) * sc . nextInt ( ) ; while ( a -- > 0 ) { String x = sc . next ( ) ; if ( ! ( x . equals ( " B " ) | x . equals ( " G " ) | x . equals ( " W " ) ) ) { System . out . println ( " # Color " ) ; return ; } } System . out . println ( " # Black & White " ) ; } }

import java . util . Scanner ;   public class Brains_Photos {   static Scanner sc = new Scanner ( System . in ) ;   public static void main ( String [ ] args ) { int number = sc . nextInt ( ) + 1 ; int temp = sc . nextInt ( ) ; String s = " " ; String c = " C " , m = " M " , y = " Y " ; while ( number > 0 ) { s = s + sc . nextLine ( ) ; number -- ; } if ( s . contains ( c ) || s . contains ( m ) || s . contains ( y ) ) { System . out . println ( " # Color " ) ; } else { System . out . println ( " # Black & White " ) ; } } }

import java . io . BufferedReader ; import java . io . InputStreamReader ; import java . util . * ;   public class Main {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( new BufferedReader ( new InputStreamReader ( System . in ) ) ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ;   for ( int i = 0 ; i < n * m ; i ++ ) { String s = sc . next ( ) ; if ( s . equalsIgnoreCase ( " C " ) || s . equalsIgnoreCase ( " M " ) || s . equalsIgnoreCase ( " Y " ) ) { System . out . println ( " # Color " ) ; return ; } }   System . out . println ( " # Black & White " ) ; } }

p , s = map ( int , input ( ) . split ( ) ) c = 0 for i in range ( p ) : h = list ( map ( str , input ( ) . split ( ) ) ) if ( ( " C " in h ) or ( " M " in h ) or ( " Y " in h ) ) : c = 1 if ( c == 1 ) : print ( " # Color " ) elif ( c == 0 ) : print ( " # Black & White " ) NEW_LINE

n , m = map ( int , input ( ) . split ( ) ) s = ' ' for i in range ( n ) : s += input ( ) if ' C ' in s or ' M ' in s or ' Y ' in s : print ( ' # Color ' ) else : print ( ' # Black & White ' ) NEW_LINE

n , m = map ( int , input ( ) . split ( ) ) s = 0 for i in range ( n ) : a = [ i for i in input ( ) . split ( ) ] s += a . count ( ' W ' ) + a . count ( ' B ' ) + a . count ( ' G ' ) if s == n * m : print ( ' # Black & White ' ) else : print ( ' # Color ' ) NEW_LINE

a , b = map ( int , input ( ) . split ( ) ) for i in range ( a ) : curStr = input ( ) if ' C ' in curStr or ' M ' in curStr or ' Y ' in curStr : print ( " # Color " ) breakelse : print ( " # Black & White " ) NEW_LINE

n , m = map ( int , input ( ) . split ( ) ) z = 0 for i in range ( n ) : l = input ( ) . split ( ) if ( ' C ' in l or ' M ' in l or ' Y ' in l ) : z = 1 break   if ( z == 0 ) : print ( " # Black & White " ) else : print ( " # Color " ) NEW_LINE


import java . io . OutputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . PrintWriter ; import java . util . * ; import java . io . IOException ; import java . io . BufferedReader ; import java . io . InputStreamReader ; import java . io . InputStream ;   public class Two {   public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; InputReader in = new InputReader ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; TaskA solver = new TaskA ( ) ; int t ;

import java . io . * ; import java . util . * ;   public class Solution { public static void main ( String [ ] args ) throws Exception { long [ ] A = in . readLA ( ) ; long max = 0 ; for ( int i = 0 ; i < A . length ; i ++ ) { long cur = 0 , add = A [ i ] / 14 , nz = A [ i ] % 14 ;

import java . util . Scanner ;   public class B975 {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int [ ] A = new int [ 14 ] ; for ( int i = 0 ; i < 14 ; i ++ ) { A [ i ] = in . nextInt ( ) ; } long max = 0 ; for ( int from = 0 ; from < 14 ; from ++ ) { int a = A [ from ] ; int remains = a / 14 ; long score = ( remains % 2 == 0 ) ? remains : 0 ; for ( int i = 1 ; i < 14 ; i ++ ) { int count = A [ ( from + i ) % 14 ] + ( a + 14 - i ) / 14 ; if ( count % 2 == 0 ) { score += count ; } } max = Math . max ( max , score ) ; } System . out . println ( max ) ; }   }

from copy import copy   a = list ( map ( int , input ( ) . split ( ) ) )   ans = 0 for i in range ( 14 ) : b = copy ( a ) b [ i ] = 0   for j in range ( 1 , 14 + 1 ) : b [ ( i + j ) % 14 ] += ( a [ i ] - 1 ) // 14 + ( ( a [ i ] - 1 ) % 14 + 1 > j - 1 )   ans = max ( ans , sum ( el * ( el % 2 == 0 ) for el in b ) )   print ( ans ) NEW_LINE

if __name__ == ' _ _ main _ _ ' : a = [ int ( i ) for i in input ( ) . split ( ) ]   mx = - 1   for i in range ( 14 ) : b = a . copy ( ) if a [ i ] : b [ i ] , d , ans = 0 , i + 1 , 0 r = ( a [ i ] + d ) // 14 l = ( a [ i ] + d ) % 14   if d + a [ i ] < 14 : ans = sum ( [ j + 1 for j in a [ d : d + a [ i ] ] if not ( j + 1 ) % 2 ] ) else : for j in range ( 14 ) : b [ j ] += r if d > l : for j in range ( l , d ) : b [ j ] -= 1 else : for j in range ( d , d + abs ( d - l ) ) : b [ j ] += 1 ans = sum ( [ p for p in b if not p % 2 ] ) mx = max ( mx , ans )   print ( mx ) NEW_LINE

A = list ( map ( int , input ( ) . split ( ) ) )   ans = 0 for i in range ( 14 ) : if A [ i ] == 0 : continue B = A + A B [ i + 14 ] = 0 q , r = divmod ( B [ i ] , 14 ) for j in range ( 1 , 15 ) : if j <= r : B [ i + j ] += ( q + 1 ) else : B [ i + j ] += q NEW_LINE

a = list ( map ( int , input ( ) . split ( ) ) ) n = len ( a ) k = [ i for i in a ] lst = [ ] for i in range ( n ) : p = k [ i ] % n ans = 0 a = k [ i + 1 : ] + k [ : i + 1 ] a [ - 1 ] = 0 for j in range ( n ) : if ( a [ j ] + 1 + int ( k [ i ] // n ) ) % 2 == 0 and j < p : ans += a [ j ] + 1 + int ( k [ i ] // n ) elif ( a [ j ] + int ( k [ i ] // n ) ) % 2 == 0 and j >= p : ans += a [ j ] + int ( k [ i ] // n ) lst . append ( ans )   print ( max ( lst ) ) NEW_LINE


import java . util . * ;   public class ICPC { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; boolean ar [ ] = new boolean [ 5000 + 1 ] ; for ( int i = 0 ; i < n ; i ++ ) { ar [ sc . nextInt ( ) ] = true ;   } int c = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { if ( ! ar [ i ] ) { c ++ ; }   } System . out . println ( c ) ;   }        public List < Integer > getDivisors ( int n ) { List < Integer > list = new ArrayList < > ( ) ; for ( int d = 2 ; d * d <= n ; d ++ ) { while ( n % d == 0 ) { list . add ( d ) ; n /= d ; } } if ( n > 1 ) { list . add ( n ) ; } return list ; }   public int gcd ( int n1 , int n2 ) { int gcd = 1 ; for ( int i = 1 ; i <= n1 && i <= n2 ; ++ i ) {

import java . math . BigInteger ; import java . util . * ;   public class Example { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ;   int n = sc . nextInt ( ) ; int [ ] a = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = sc . nextInt ( ) ;   } int ans = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { boolean tt = false ; for ( int j = 0 ; j < n ; j ++ ) { if ( i == a [ j ] ) { tt = true ; break ; } } if ( ! tt ) ans ++ ; } System . out . println ( ans ) ; } }

import java . util . * ;   public class cPermutation { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ;

n = int ( input ( ) ) arr = [ int ( x ) for x in input ( ) . split ( ) ] s = 0 for i in range ( 1 , n + 1 ) : if i not in arr : s += 1 print ( s ) NEW_LINE

n = int ( input ( ) ) arr = list ( map ( int , input ( ) . split ( ) ) ) values = [ 0 ] * nc = 0 for i in range ( n ) : if ( arr [ i ] > n ) : c += 1 else : values [ arr [ i ] - 1 ] += 1 if ( values [ arr [ i ] - 1 ] > 1 ) : c += 1 print ( c ) NEW_LINE

n = int ( input ( ) )   seq = [ int ( i ) for i in input ( ) . split ( ) ]   l_n = [ i for i in seq if i <= n ] ans = n - len ( set ( l_n ) )   print ( ans ) NEW_LINE

a = int ( input ( ) ) b = list ( map ( int , input ( ) . split ( ) ) ) d = { } for x in range ( a ) : if d . get ( b [ x ] ) == None : d [ b [ x ] ] = 1 else : d [ b [ x ] ] += 1   h = 0 for x in d : if x > a : h += d [ x ] else : h += d [ x ] - 1   print ( h )   NEW_LINE

n = int ( input ( ) ) l = list ( map ( int , input ( ) . split ( ) ) ) s = set ( l ) c = 0 for i in s : if ( ( i > n ) or ( i < 0 ) ) : c = c + 1 c = c + ( n - ( len ( s ) ) ) print ( c ) NEW_LINE


import java . util . * ; import java . io . * ; import java . math . * ;   public class Task {

import java . io . BufferedReader ; import java . io . FileReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . Scanner ; import java . util . StringTokenizer ; import java . util . * ; import java . io . * ; public class codeforces { static class Student { int x , y ; Student ( int x , int y ) { this . x = x ; this . y = y ;

import java . io . * ; import java . util . * ; public class Main {   public static final int mod = 1000000007 ; static long [ ] [ ] dp ; public static void main ( String [ ] args ) throws IOException {

def nck ( n , k ) : if ( n < k ) : return 0 num = 1 den = 1 if ( k > n - k ) : return nck ( n , n - k ) for i in range ( k ) : num = num * ( n - i ) den = den * ( i + 1 ) return num // denl = input ( ) . split ( ) n = int ( l [ 0 ] ) m = int ( l [ 1 ] ) h = int ( l [ 2 ] ) l = input ( ) . split ( ) li = [ int ( i ) for i in l ] poss = sum ( li ) - 1 if ( poss < n - 1 ) : print ( - 1 ) else : ki = li [ h - 1 ] - 1 print ( 1 - ( nck ( poss - ki , n - 1 ) / nck ( poss , n - 1 ) ) ) NEW_LINE

def nCk ( n , k ) : res = 1 for i in range ( 1 , k + 1 ) : res = res * ( n - i + 1 ) // i return res     n , _ , me = map ( int , input ( ) . split ( ) ) a = [ 0 ] + list ( map ( int , input ( ) . split ( ) ) )   s = sum ( a ) if n > s : print ( - 1 ) exit ( )   allWays = nCk ( s - 1 , n - 1 ) aa = nCk ( s - a [ me ] , n - 1 ) print ( 1 - aa / allWays ) NEW_LINE

from math import combif __name__ == ' _ _ main _ _ ' : n , m , h = map ( int , input ( ) . split ( ) ) h -= 1   arr = [ int ( i ) for i in input ( ) . split ( ) ] arr [ h ] -= 1 n -= 1   total = sum ( arr ) if total < n : print ( - 1 ) exit ( 0 ) ans = comb ( total - arr [ h ] , n ) / comb ( total , n ) print ( 1 - ans ) NEW_LINE


import java . util . * ; public class asd { static Scanner s = new Scanner ( System . in ) ; public static void main ( String args [ ] ) { int t = 1 ; while ( t -- > 0 ) { solve ( ) ; } } public static void solve ( ) { int a = s . nextInt ( ) ; int b = s . nextInt ( ) ; int c = s . nextInt ( ) ; if ( 2 * c > ( Math . min ( a , b ) ) ) System . out . println ( " Second " ) ; else System . out . println ( " First " ) ;   } }

import java . util . Scanner ;   public class TestBetter { public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int a , b , r ; a = input . nextInt ( ) ; b = input . nextInt ( ) ; r = input . nextInt ( ) ;   System . out . println ( ( ( ( 2 * r ) <= a ) && ( ( 2 * r ) <= b ) ) ? " First " : " Second " ) ; } }

import java . io . * ; import java . util . * ;    public class PlateGame {   public static void main ( String args [ ] ) { FastReader sc = new FastReader ( ) ; PrintWriter out = new PrintWriter ( System . out ) ;   int a , b , r , i , j ; String s ;   a = sc . nextInt ( ) ; b = sc . nextInt ( ) ; r = sc . nextInt ( ) ; if ( 2 * r <= a && 2 * r <= b ) out . println ( " First " ) ; else out . println ( " Second " ) ;   out . close ( ) ; }      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 ; } int [ ] readArray ( int n ) { int arr [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) arr [ i ] = nextInt ( ) ; return arr ; } } }

import java . util . * ; import java . io . * ; import java . math . * ;   public class x197A { public static void main ( String hi [ ] ) throws Exception { BufferedReader infile = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( infile . readLine ( ) ) ; int A = Integer . parseInt ( st . nextToken ( ) ) ; int B = Integer . parseInt ( st . nextToken ( ) ) ; int R = Integer . parseInt ( st . nextToken ( ) ) ;

a , b , r = map ( int , input ( ) . split ( ) ) d = r + rk = a // dp = b // d   if ( k > 0 and p > 0 ) : print ( " First " ) else : print ( " Second " ) NEW_LINE

a , b , r = map ( int , input ( ) . split ( ) ) Sc = 3.14 * ( r ** 2 ) Ss = a * bp = " First " if a < r * 2 or b < r * 2 : print ( " Second " ) else : print ( " First " ) NEW_LINE

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

a , b , r = map ( int , input ( ) . split ( ) ) if ( 2 * r > min ( a , b ) ) : print ( " Second " ) else : print ( " First " ) NEW_LINE


import java . util . Scanner ;   public class ElectionSystem { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ;   int n = scanner . nextInt ( ) ; int m = scanner . nextInt ( ) ;   int [ ] candidate = new int [ n ] ;   for ( int i = 0 ; i < m ; i ++ ) { int max = 0 ; int maxVal = 0 ;   for ( int j = 0 ; j < n ; j ++ ) { int curr = scanner . nextInt ( ) ; if ( maxVal < curr ) { maxVal = curr ; max = j ; } }   candidate [ max ] ++ ; }   int max = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( candidate [ max ] < candidate [ i ] ) max = i ; }   System . out . println ( max + 1 ) ; } }

import java . io . File ; import java . io . FileNotFoundException ; import java . io . IOException ; import java . io . PrintWriter ; import java . util . * ;   public class Main { public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int n = input . nextInt ( ) ; int m = input . nextInt ( ) ; int ans [ ] = new int [ n ] ; for ( int i = 0 ; i < m ; i ++ ) { int max = Integer . MIN_VALUE ; int maxIndex = - 1 ; for ( int j = 0 ; j < n ; j ++ ) { int value = input . nextInt ( ) ; if ( value > max ) { max = value ; maxIndex = j ; } } ans [ maxIndex ] ++ ; } int max = Integer . MIN_VALUE ; int maxIndex = - 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( max < ans [ i ] ) { max = ans [ i ] ; maxIndex = i ; } } System . out . println ( maxIndex + 1 ) ;

import java . util . * ; import java . lang . * ;

import java . util . * ; import java . io . * ;   public class Main { 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 [ ] ) { FastReader sc = new FastReader ( ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; long a [ ] = new long [ n ] ; for ( int i = 0 ; i < m ; i ++ ) { long max = - 1 ; int ans = 0 ; for ( int j = 0 ; j < n ; j ++ ) { int k = sc . nextInt ( ) ; if ( max < k ) { max = k ; ans = j ; } } a [ ans ] ++ ; } long max = - 1 ; int ans = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( max < a [ i ] ) { max = a [ i ] ; ans = i ; }   } System . out . println ( ans + 1 ) ;   } }

n , m = map ( int , input ( ) . split ( ) )   wins = [ 0 ] * nfor _ in range ( m ) : t = list ( map ( int , input ( ) . split ( ) ) ) winner = 0 for x in range ( 1 , n ) : if t [ x ] > t [ winner ] : winner = x   wins [ winner ] += 1   winner = 0 for x in range ( 1 , n ) : if wins [ x ] > wins [ winner ] : winner = x   print ( winner + 1 ) NEW_LINE

def most_common ( lst ) : return max ( set ( lst ) , key = lst . count ) n , m = [ int ( x ) for x in input ( ) . split ( ) ] a = [ ] for i in range ( m ) : t = [ int ( x ) for x in input ( ) . split ( ) ] a . append ( t . index ( max ( t ) ) + 1 ) print ( most_common ( a ) ) NEW_LINE

n , m = [ int ( j ) for j in input ( ) . split ( ) ] mat = [ ] for j in range ( m ) : mat . append ( [ int ( j ) for j in input ( ) . split ( ) ] ) stream = n * [ 0 ] for j in range ( m ) : index = 0 for k in range ( 1 , n ) : if mat [ j ] [ k ] > mat [ j ] [ index ] : index = k stream [ index ] += 1 print ( stream . index ( max ( stream ) ) + 1 ) NEW_LINE

ad , cit = list ( map ( int , input ( ) . split ( ) ) ) d = { } for i in range ( cit ) : l = list ( map ( int , input ( ) . split ( ) ) ) maxi = l [ 0 ] ind = 1 for i in range ( len ( l ) ) : if l [ i ] > maxi : maxi = l [ i ] ind = i + 1 if not ind in d : d [ ind ] = 0 d [ ind ] += 1 maxi = - 1 for adam , say in d . items ( ) : if say > maxi : maxi = say qalib = adam elif say == maxi and qalib > adam : qalib = adamprint ( qalib ) NEW_LINE

if __name__ == ' _ _ main _ _ ' : Y = lambda : list ( map ( int , input ( ) . split ( ) ) ) P = lambda : map ( int , input ( ) . split ( ) )   n , m = P ( ) c = [ 0 ] * n   while m > 0 : a = Y ( ) c [ a . index ( max ( a ) ) ] += 1 m -= 1 print ( c . index ( max ( c ) ) + 1 ) NEW_LINE


import java . util . * ; import java . lang . * ; public class Main { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int a = sc . nextInt ( ) ; for ( int i = 0 ; i < a ; i ++ ) { int x = sc . nextInt ( ) ; int y = sc . nextInt ( ) ; System . out . println ( x + y ) ; } } }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . StringTokenizer ;   public class Cv {

import java . util . Scanner ;   public class Task { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int t = in . nextInt ( ) ; while ( t -- > 0 ) { System . out . println ( in . nextInt ( ) + in . nextInt ( ) ) ; } } }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . Arrays ; import java . util . HashSet ; import java . util . StringTokenizer ; public class Main { 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 [ ] nextArray ( int n ) { int [ ] a = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = nextInt ( ) ; return a ; } long [ ] nextArray ( long n ) { long [ ] a = new long [ ( int ) n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = nextLong ( ) ; return a ; }   long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } } static class FastWriter extends PrintWriter { FastWriter ( ) { super ( System . out ) ; } void println ( int [ ] array ) { for ( int i = 0 ; i < array . length ; i ++ ) { print ( array [ i ] + " ▁ " ) ; } println ( ) ; } void println ( long [ ] array ) { for ( int i = 0 ; i < array . length ; i ++ ) { print ( array [ i ] + " ▁ " ) ; } println ( ) ; } } public static void main ( String [ ] args ) { FastScanner in = new FastScanner ( ) ; FastWriter out = new FastWriter ( ) ; int t = in . nextInt ( ) ; outer : while ( t -- > 0 ) { int n = in . nextInt ( ) ; int m = in . nextInt ( ) ; out . println ( n + m ) ; } out . close ( ) ; } }

t = int ( input ( ) )   while t : a , b = map ( int , input ( ) . split ( ) ) print ( a + b ) t -= 1 NEW_LINE

t = int ( input ( ) )   while t > 0 : t -= 1 a , b = map ( int , input ( ) . split ( " ▁ " ) ) print ( a + b ) NEW_LINE

for t in range ( int ( input ( ) ) ) : a , b = map ( int , input ( ) . split ( ) ) print ( a + b ) NEW_LINE

t = int ( input ( ) ) for _ in range ( t ) : a , b = map ( int , input ( ) . split ( ) ) print ( a + b ) NEW_LINE

for _ in range ( int ( input ( ) ) ) : a , b = map ( int , input ( ) . split ( ) ) print ( a + b ) NEW_LINE


import java . util . Scanner ;   public class Main {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ;   int n = in . nextInt ( ) ;   boolean [ ] levels = new boolean [ n ] ;   while ( in . hasNext ( ) ) { int p = in . nextInt ( ) ; for ( int i = 0 ; i < p ; i ++ ) { levels [ in . nextInt ( ) - 1 ] = true ; } }   for ( boolean level : levels ) { if ( ! level ) { System . out . println ( " Oh , ▁ my ▁ keyboard ! " ) ; return ; } }   System . out . println ( " I ▁ become ▁ the ▁ guy . " ) ;    } }

import java . util . Scanner ; public class Main {   public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int n = input . nextInt ( ) ; int s [ ] = new int [ n + 1 ] ; int p = input . nextInt ( ) ; int f = 0 ; int c ; for ( int i = 1 ; i <= p ; i ++ ) { c = input . nextInt ( ) ; s [ c ] ++ ; } int y = input . nextInt ( ) ; for ( int i = 1 ; i <= y ; i ++ ) { c = input . nextInt ( ) ; s [ c ] ++ ; } for ( int i = 1 ; i < s . length ; i ++ ) if ( s [ i ] == 0 ) f = 1 ; if ( f == 0 ) System . out . println ( " I ▁ become ▁ the ▁ guy . " ) ; else System . out . println ( " Oh , ▁ my ▁ keyboard ! " ) ; } }

import java . util . LinkedHashSet ; import java . util . Scanner ; import java . util . Set ;   public class i_Wanna_Be_The_Guy { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ;   int n = sc . nextInt ( ) ; int p = sc . nextInt ( ) ; Set < Integer > elements = new LinkedHashSet < > ( ) ;   while ( p -- >= 1 ) { elements . add ( sc . nextInt ( ) ) ; } int q = sc . nextInt ( ) ; while ( q -- >= 1 ) { elements . add ( sc . nextInt ( ) ) ; } if ( elements . size ( ) == n ) { System . out . println ( " I ▁ become ▁ the ▁ guy . " ) ; } else System . out . println ( " Oh , ▁ my ▁ keyboard ! " ) ; } }

n = int ( input ( ) ) s = set ( list ( map ( int , input ( ) . split ( ) ) ) [ 1 : ] + list ( map ( int , input ( ) . split ( ) ) ) [ 1 : ] ) s . discard ( 0 ) if len ( s ) == n : print ( " I ▁ become ▁ the ▁ guy . " ) else : print ( " Oh , ▁ my ▁ keyboard ! " ) NEW_LINE

n = int ( input ( ) ) l = list ( map ( int , input ( ) . split ( ) ) ) m = list ( map ( int , input ( ) . split ( ) ) ) k = [ ] for i in range ( 1 , len ( l ) ) : k . append ( l [ i ] ) for i in range ( 1 , len ( m ) ) : k . append ( m [ i ] ) k = list ( set ( k ) ) if ( len ( k ) == n ) : print ( " I ▁ become ▁ the ▁ guy . " ) else : print ( " Oh , ▁ my ▁ keyboard ! " ) NEW_LINE

def f1 ( list3 ) : return list ( set ( list3 ) ) import sysn = int ( input ( ) ) list1 = list ( range ( 1 , n + 1 ) ) list2 = list ( map ( int , input ( ) . split ( ) ) ) list3 = list ( map ( int , input ( ) . split ( ) ) ) list4 = list2 [ 1 : ] list5 = list3 [ 1 : ] if list2 [ 0 ] + list3 [ 0 ] < n : print ( ' Oh , ▁ my ▁ keyboard ! ' ) sys . exit ( ) list6 = list4 + list5 NEW_LINE

n = int ( input ( ) ) x = list ( map ( int , input ( ) . split ( ) ) ) y = list ( map ( int , input ( ) . split ( ) ) ) l = x [ 1 : ] + y [ 1 : ] l = set ( l ) if len ( l ) == n : print ( " I ▁ become ▁ the ▁ guy . " ) else : print ( " Oh , ▁ my ▁ keyboard ! " ) NEW_LINE

games = int ( input ( ) ) x = input ( ) . split ( " ▁ " ) y = input ( ) . split ( " ▁ " )   x . pop ( 0 ) y . pop ( 0 )   levels = x + y   for i in range ( 1 , games + 1 ) : if str ( i ) not in levels : print ( " Oh , ▁ my ▁ keyboard ! " ) break   if i == games and str ( i ) in levels : print ( " I ▁ become ▁ the ▁ guy . " ) break NEW_LINE


import java . util . Scanner ;   public class A { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; while ( t -- > 0 ) { long a , b , c ; a = sc . nextLong ( ) ; b = sc . nextLong ( ) ; c = sc . nextLong ( ) ; System . out . println ( ( a + b + c ) / 2 ) ; } } }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . Arrays ; import java . util . HashMap ; import java . util . Random ; import java . util . * ; import java . util . StringTokenizer ; import java . util . Scanner ; public class Comptetive { static class Pair { int f ; int s ; Pair ( int f , int s ) { this . f = f ; this . s = s ; } } public static void main ( String [ ] args ) { FastScanner fs = new FastScanner ( ) ; int q = fs . nextInt ( ) ; while ( q -- != 0 ) { long a = fs . nextLong ( ) , b = fs . nextLong ( ) , c = fs . nextLong ( ) ; long sum = a + b + c ; System . out . println ( sum / 2 ) ; } } static int pow ( int x , int y ) { if ( y == 0 ) return 1 ; int res = pow ( x , y / 2 ) ; if ( y % 2 == 0 ) { return res * res ; } else { return res * res * x ; } } static final Random random = new Random ( ) ; static void ruffleSort ( int [ ] a ) { int n = a . length ;

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . StringTokenizer ;   public class A_Three_Piles_of_Candies {   static Scanner scanner = new Scanner ( ) ; static int testCases ; static long a , b , c ; public static void main ( String [ ] args ) throws IOException { testCases = scanner . nextInt ( ) ; for ( int i = 0 ; i < testCases ; i ++ ) { a = scanner . nextLong ( ) ; b = scanner . nextLong ( ) ; c = scanner . nextLong ( ) ; System . out . println ( ( a + b + c ) / 2 ) ; } } static class Scanner { BufferedReader in ; StringTokenizer st ;   public Scanner ( ) {   in = new BufferedReader ( new InputStreamReader ( System . in ) ) ; }   String next ( ) throws IOException { while ( st == null || ! st . hasMoreElements ( ) ) { st = new StringTokenizer ( in . readLine ( ) ) ; } return st . nextToken ( ) ; } String nextLine ( ) throws IOException { return in . readLine ( ) ; } int nextInt ( ) throws IOException { return Integer . parseInt ( next ( ) ) ; } long nextLong ( ) throws IOException { return Long . parseLong ( next ( ) ) ; } } }

import java . util . Scanner ;   public class Nk { public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ;   int t = input . nextInt ( ) ;   while ( t -- > 0 ) {   long a = input . nextLong ( ) ; long b = input . nextLong ( ) ; long c = input . nextLong ( ) ; long u = ( a + b + c ) / 2 ;   System . out . println ( u ) ; } } }

for t in range ( int ( input ( ) ) ) : a = list ( map ( int , input ( ) . split ( ) ) ) print ( sum ( a ) // 2 ) NEW_LINE

t = int ( input ( ) ) for i in range ( t ) : a , b , c = map ( int , input ( ) . split ( ) ) s = a + b + c print ( s // 2 ) NEW_LINE

t = int ( input ( ) ) for i in range ( t ) : a , b , c = map ( int , input ( ) . split ( ) ) print ( ( a + b + c ) // 2 ) NEW_LINE

import sys , math , itertoolsfrom collections import Counter , deque , defaultdictfrom bisect import bisect_left , bisect_right from heapq import heappop , heappush , heapifymod = 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 = inps ( ) ; return list ( tmp [ : x ] ) def err ( x ) : print ( x ) ; exit ( )   for _ in range ( inp ( ) ) : a = inpl ( ) print ( sum ( a ) // 2 ) NEW_LINE


import java . util . * ;   public class Check2 { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; long n = sc . nextLong ( ) ; String s = String . valueOf ( n ) ; long copy1 = n ; if ( n >= 10 ) { long y1 = ( long ) ( n / ( Math . pow ( 10 , s . length ( ) - 1 ) ) ) + 1 ;

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

import java . util . * ; import java . io . * ; import java . util . stream . * ; public class Solution { public static void main ( String [ ] args ) throws Exception { Scanner scan = new Scanner ( System . in ) ; int n = scan . nextInt ( ) ; int result = 0 ; int temp = n ; int pow = 1 ; while ( temp >= 10 ) { temp = temp / 10 ; pow = pow * 10 ; } result = ( ( temp + 1 ) * pow ) - n ; System . out . println ( result ) ; } }

s = input ( ) s = s [ 1 : ]   l = len ( s ) bigg = 10 ** lif not s : print ( 1 ) else : print ( bigg - int ( s ) ) NEW_LINE

n = input ( )   l = len ( n ) f = int ( n [ 0 ] ) f = f + 1   n = int ( n )   x = 1 for i in range ( l - 1 ) : x = x * 10   print ( f * x - n )     NEW_LINE

s = input ( ) ans = " " if len ( s ) == 1 : print ( 1 ) else : ans += str ( int ( s [ 0 ] ) + 1 ) for i in range ( 1 , len ( s ) ) : ans += "0" print ( int ( ans ) - int ( s ) ) NEW_LINE

n = int ( input ( ) ) l = 0 tmp = nwhile n > 0 : r = n % 10 n = n // 10 l += 1 if tmp < 10 : print ( 1 ) else : print ( ( r + 1 ) * ( 10 ** ( l - 1 ) ) - tmp ) NEW_LINE

def culc ( ) : for i in range ( 10 ) : for j in range ( 1 , 10 ) : yield j * 10 ** i   n = int ( input ( ) )   for i in culc ( ) : if i > n : print ( i - n ) break NEW_LINE


import java . util . * ;   public class Solve {   static Scanner scan = new Scanner ( System . in ) ;   public static void solve ( long n , long m ) {   long count = 0 , temp ;   if ( m % n == 0 ) { temp = m / n ; while ( temp % 2 == 0 ) { count ++ ; temp /= 2 ; } while ( temp % 3 == 0 ) { count ++ ; temp /= 3 ; } if ( temp == 1 ) { System . out . println ( count ) ; } else { System . out . println ( - 1 ) ; } } else { System . out . println ( - 1 ) ; } }   public static void main ( String [ ] args ) {   int n = scan . nextInt ( ) ;   int [ ] arr = new int [ 2460 ] ; while ( n -- > 0 ) { int h = scan . nextInt ( ) ; int m = scan . nextInt ( ) ;   arr [ h * 100 + m ] ++ ; } int max = 1 ; for ( int j : arr ) { if ( max < j ) { max = j ; } } System . out . println ( max ) ; } }

import javax . swing . plaf . IconUIResource ; import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . * ;   public class codeforces { static int M = 1_000_000_007 ; static int INF = Integer . MAX_VALUE ; static final FastScanner fs = new FastScanner ( ) ;

import java . util . HashMap ; import java . util . Scanner ;   public class Problem_237A { public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; int n = s . nextInt ( ) ; HashMap < String , Integer > timeFreq = new HashMap < > ( ) ; int cashes = 1 ; while ( n -- > 0 ) { String H = s . next ( ) ; String M = s . next ( ) ; String time = H . concat ( " : " ) . concat ( M ) ;   timeFreq . computeIfPresent ( time , ( K , V ) -> V + 1 ) ; timeFreq . putIfAbsent ( time , 1 ) ; cashes = Math . max ( timeFreq . get ( time ) , cashes ) ; }   System . out . println ( cashes ) ; } }

import java . util . ArrayList ; import java . util . Arrays ; import java . util . Scanner ;   public class P237A { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int [ ] hash = new int [ 2460 ] ; int time = 0 , count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { int hi = sc . nextInt ( ) ; int mi = sc . nextInt ( ) ; time = hi * 100 + mi ; count = Math . max ( count , ++ hash [ time ] ) ; } System . out . println ( count ) ; } }

visitor = dict ( ) for __ in range ( int ( input ( ) ) ) : h , m = map ( int , input ( ) . split ( ) ) visitor [ ( h , m ) ] = visitor . get ( ( h , m ) , 0 ) + 1 print ( max ( visitor . values ( ) ) ) NEW_LINE

n = int ( input ( ) ) list1 = [ ] list2 = [ ] cas = 1 answer = [ ] for i in range ( n ) : h , m = map ( int , input ( ) . split ( ) ) list1 . append ( m ) list2 . append ( h ) for j in range ( 1 , len ( list1 ) ) : if list2 [ j ] == list2 [ j - 1 ] and list1 [ j ] == list1 [ j - 1 ] : cas += 1 if list2 [ j ] != list2 [ j - 1 ] or list1 [ j ] != list1 [ j - 1 ] : answer . append ( cas ) cas = 1 if j == len ( list1 ) - 1 : answer . append ( cas ) if len ( answer ) == 0 : print ( 1 ) else : print ( max ( answer ) ) NEW_LINE

count , prev , great_count = 1 , - 1 , 0 for i in range ( int ( input ( ) ) ) : h , m = map ( int , input ( ) . split ( ) )   if h * 60 + m == prev : count += 1 else : prev = h * 60 + m if count > great_count : great_count = count count = 1   print ( max ( great_count , count ) ) NEW_LINE

count , prev , great_count = 1 , - 1 , 1 for i in range ( int ( input ( ) ) ) : h , m = map ( int , input ( ) . split ( ) )   if h * 60 + m == prev : count += 1 if count > great_count : great_count = count else : count = 1 prev = h * 60 + m   print ( great_count ) NEW_LINE

n = int ( input ( ) ) a = - 1 b = - 1 mmm = 0 c = 1 while n > 0 : n -= 1 h , m = map ( int , input ( ) . split ( ) ) if h == a and b == m : c += 1 else : c = 1 if c > mmm : mmm = c a = h b = m   print ( mmm ) NEW_LINE


import java . util . Scanner ;   public class StrangePartition { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int n , x ; int [ ] ints ; int testCases = scanner . nextInt ( ) ; long [ ] [ ] result = new long [ testCases ] [ 2 ] ; long [ ] base ; for ( int i = 0 ; i < testCases ; i ++ ) { n = scanner . nextInt ( ) ; x = scanner . nextInt ( ) ; ints = new int [ n ] ;   for ( int j = 0 ; j < n ; j ++ ) { ints [ j ] = scanner . nextInt ( ) ; }   base = solve ( ints , x ) ;   for ( int k = 0 ; k < 2 ; k ++ ) { result [ i ] [ k ] = base [ k ] ; }   }   for ( int i = 0 ; i < testCases ; i ++ ) { for ( int i1 = 0 ; i1 < 2 ; i1 ++ ) { System . out . print ( result [ i ] [ i1 ] + " ▁ " ) ; } System . out . println ( ) ; } }   public static long [ ] solve ( int [ ] ints , int x ) { long min ; long sum = 0 ; long max = 0 ; for ( int i = 0 ; i < ints . length ; i ++ ) { sum += ints [ i ] ; max += ( long ) Math . ceil ( ( double ) ints [ i ] / x ) ; } min = ( long ) Math . ceil ( ( double ) sum / x ) ; long [ ] result = { min , max } ; return result ; } }

import java . util . Scanner ;   public class AStrangePartition { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; while ( t -- > 0 ) { long n = sc . nextInt ( ) ; long k = sc . nextInt ( ) ; long ans1 = 0 ; long sum = 0 ; for ( long i = 0 ; i < n ; i ++ ) { long x = sc . nextInt ( ) ; sum += x ; ans1 += ( x + k - 1 ) / k ; } long ans2 = ( sum + k - 1 ) / k ; System . out . println ( ans2 + " ▁ " + ans1 ) ; } sc . close ( ) ; } }

import java . util . Scanner ;   public class StrangePartition { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int n , x ; int [ ] ints ; int testCases = scanner . nextInt ( ) ; long [ ] [ ] result = new long [ testCases ] [ 2 ] ; long [ ] base ; for ( int i = 0 ; i < testCases ; i ++ ) { n = scanner . nextInt ( ) ; x = scanner . nextInt ( ) ; ints = new int [ n ] ;   for ( int j = 0 ; j < ints . length ; j ++ ) { ints [ j ] = scanner . nextInt ( ) ; }   base = solve ( ints , x ) ;   for ( int k = 0 ; k < 2 ; k ++ ) { result [ i ] [ k ] = base [ k ] ; }   }   for ( int i = 0 ; i < testCases ; i ++ ) { for ( int i1 = 0 ; i1 < 2 ; i1 ++ ) { System . out . print ( result [ i ] [ i1 ] + " ▁ " ) ; } System . out . println ( ) ; } }   public static long [ ] solve ( int [ ] ints , int x ) { long min ; long sum = 0 ; double max = 0 ; for ( int i = 0 ; i < ints . length ; i ++ ) { sum += ints [ i ] ; max += Math . ceil ( ( double ) ints [ i ] / x ) ; } min = ( long ) Math . ceil ( ( double ) sum / x ) ; long [ ] result = { min , ( long ) max } ; return result ; } }

import java . util . Scanner ;   public class A1471 {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int T = in . nextInt ( ) ; for ( int t = 0 ; t < T ; t ++ ) { int N = in . nextInt ( ) ; long X = in . nextLong ( ) ; long maxBeauty = 0 ; long sum = 0 ; for ( int n = 0 ; n < N ; n ++ ) { int a = in . nextInt ( ) ; sum += a ; maxBeauty += ( a + X - 1 ) / X ; } long minBeauty = ( sum + X - 1 ) / X ; System . out . println ( minBeauty + " ▁ " + maxBeauty ) ; } }   }

import math     for testcase in range ( int ( input ( ) ) ) : arr = [ int ( x ) for x in input ( ) . split ( ) ] NEW_LINE n , k = arr [ 0 ] , arr [ 1 ] NEW_LINE arr = [ int ( x ) for x in input ( ) . split ( ) ] NEW_LINE c , s = 0 , 0 NEW_LINE for ele in arr : if NEW_LINE INDENT ( ele % k != 0 ) : c += 1 NEW_LINE DEDENT s += ele NEW_LINE maxc , minc = 0 , 0 NEW_LINE for ele in arr : if NEW_LINE INDENT ( ele % k == 0 ) : maxc += ( ele // k ) NEW_LINE DEDENT minc += ( ele // k ) else : m = math . ceil ( ele / k ) NEW_LINE maxc += m NEW_LINE m = math . ceil ( s / k ) NEW_LINE minc += m NEW_LINE print ( minc , maxc ) NEW_LINE

from math import ceilfor NEW_LINE _ in range ( int ( input ( ) ) ) : n , k = map ( int , input ( ) . split ( ) ) NEW_LINE l = list ( map ( int , input ( ) . split ( ' ▁ ' ) ) ) NEW_LINE maxi = ans = value = 0 NEW_LINE for i in l : maxi += ceil ( i / k ) NEW_LINE for i in l : if NEW_LINE i % k == 0 : ans += i // k else : value += i NEW_LINE if value % k == 0 : ans += value // k NEW_LINE value = 0 NEW_LINE ans += ceil ( value / k ) NEW_LINE print ( ans , maxi ) NEW_LINE

from math import ceilt = int ( input ( ) )   for i in range ( t ) : n , x = map ( int , input ( ) . split ( ) ) NEW_LINE a = list ( map ( int , input ( ) . split ( ) ) )   max_a = 0 NEW_LINE for j in a : max_a += ceil ( j / x ) NEW_LINE min_a = ceil ( sum ( a ) / x )   print ( min_a , max_a ) NEW_LINE

import io , os , sysfrom NEW_LINE math NEW_LINE import ceil NEW_LINE input = io . BytesIO ( os . read ( 0 , os . fstat ( 0 ) . st_size ) ) . readline NEW_LINE def sswrite ( val ) : sys . stdout . write ( str ( val ) + ' \n ' ) NEW_LINE def intmap ( ) : return map ( int , input ( ) . decode ( ) . split ( ' ▁ ' ) ) NEW_LINE t = int ( input ( ) . decode ( ) ) NEW_LINE def solve ( n , x , a ) : x1 = ceil ( sum ( a ) / x ) NEW_LINE x2 = 0 NEW_LINE for i in range ( n ) : x2 += ceil ( a [ i ] / x ) NEW_LINE return f ' { x1 } ▁ { x2 } ' NEW_LINE for i in range ( t ) : n , x = intmap ( ) NEW_LINE a = list ( intmap ( ) ) NEW_LINE print ( solve ( n , x , a ) ) NEW_LINE


import java . util . Scanner ; public class Main { public static void main ( String args [ ] ) { Scanner scan = new Scanner ( System . in ) ; int n = scan . nextInt ( ) ; String [ ] arr = new String [ n ] ; int temp = n ; scan . nextLine ( ) ; int j = 0 ; while ( n -- != 0 ) { String s = scan . nextLine ( ) ; arr [ j ] = s ; j ++ ; } int c = 0 , m = 0 , index = - 1 ; int k = 0 ; while ( temp -- != 0 ) { if ( arr [ k ] . equals ( arr [ 0 ] ) ) { c ++ ; } else { index = k ; m ++ ; } k ++ ; } if ( c > m ) { System . out . print ( arr [ 0 ] ) ; } else { System . out . print ( arr [ index ] ) ; } } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int countA = 0 ; int countB = 0 ; int n = sc . nextInt ( ) ; String a = sc . next ( ) ; String b = " " ; countA ++ ; while ( n -- > 1 ) { String y = sc . next ( ) ; if ( y . equals ( a ) ) { countA ++ ; } else { b = y ; countB ++ ; } } System . out . println ( countA > countB ? a : b ) ; } }

import java . util . * ;   public class NewClass { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) , cx = 0 , cy = 0 ; String x = null , y = null ; for ( int i = 0 ; i < n ; i ++ ) { String g = sc . next ( ) ; if ( x == null ) { x = g ; cx ++ ; } else if ( y == null && ! g . equals ( x ) ) { y = g ; cy ++ ; } else if ( g . equals ( y ) ) cy ++ ; else cx ++ ; } if ( cy > cx ) System . out . println ( y ) ; else System . out . println ( x ) ; } }

counter = { } max_goal = 0 for _ in range ( int ( input ( ) ) ) : team = input ( ) counter [ team ] = counter . get ( team , 0 ) + 1 max_goal = max ( max_goal , counter [ team ] )   for team in counter . keys ( ) : if counter [ team ] == max_goal : print ( team ) NEW_LINE

l = list ( ) for i in range ( int ( input ( ) ) ) : s = input ( ) l . append ( s ) print ( max ( l , key = l . count ) ) NEW_LINE

d1 = { }   for i in range ( int ( input ( ) ) ) : s1 = input ( ) if ( s1 in d1 ) : d1 [ s1 ] += 1 else : d1 [ s1 ] = 1 l1 = list ( d1 . values ( ) ) l2 = list ( d1 . keys ( ) ) print ( l2 [ l1 . index ( max ( l1 ) ) ] ) NEW_LINE

N = int ( input ( ) ) ch = input ( ) equipe1 = chNb1 = 1 Nb2 = 0 for i in range ( 1 , N ) : ch = input ( ) if ( ch == equipe1 ) : Nb1 += 1 else : equipe2 = ch Nb2 += 1 if ( Nb1 > Nb2 ) : print ( equipe1 ) else : print ( equipe2 ) NEW_LINE


import java . io . BufferedReader ; import java . io . File ; import java . io . FileInputStream ; import java . io . FileNotFoundException ; import java . io . FileOutputStream ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . math . BigInteger ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . BitSet ; import java . util . Calendar ; import java . util . Collections ; import java . util . Comparator ; import java . util . HashMap ; import java . util . HashSet ; import java . util . LinkedList ; import java . util . PriorityQueue ; import java . util . SortedSet ; import java . util . Stack ; import java . util . StringTokenizer ; import java . util . TreeMap ; import java . util . TreeSet ;   public class B_Round_573_Div1 { public static long MOD = 1000000007 ; static int [ ] dp ;   public static void main ( String [ ] args ) throws FileNotFoundException {

import java . util . * ; import java . util . Arrays ;   public class Main { static int inf = 1000000000 ; static int MOD = 1000000007 ; public static void main ( String ards [ ] ) { Scanner cin = new Scanner ( System . in ) ; int n = cin . nextInt ( ) ; long [ ] a = new long [ 100010 ] ; for ( int i = 1 ; i <= n ; i ++ ) { a [ i ] = cin . nextLong ( ) ; } Arrays . sort ( a , 1 , n + 1 ) ; int flag = 0 ; long sum = 0 ; for ( int i = 1 ; i < n ; i ++ ) { if ( a [ i ] == a [ i + 1 ] ) { flag ++ ; if ( a [ i ] == a [ i - 1 ] + 1 && i > 1 ) { flag ++ ; } } sum += a [ i ] - i + 1 ; } sum += a [ n ] - n + 1 ; if ( flag > 1 ) { System . out . println ( " cslnb " ) ; } else if ( a [ 1 ] == 0 && a [ 2 ] == 0 ) { System . out . println ( " cslnb " ) ; } else { if ( sum % 2 == 0 ) { System . out . println ( " cslnb " ) ; } else { System . out . println ( " sjfnb " ) ; } } } }

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

n = int ( input ( ) ) a = [ - 1 ] + list ( map ( int , input ( ) . split ( ) ) ) s = set ( ) s . add ( - 1 ) a . sort ( ) count , add = 0 , 0 flag = 0 for i in range ( 1 , n + 1 ) : if a [ i ] in s and a [ i ] - 1 in s : flag = 1 break if a [ i ] in s : add += 1 if ( add == 2 ) : flag = 1 break s . add ( a [ i ] ) count += a [ i ] - ( i - 1 ) if ( flag == 0 and count % 2 == 1 ) : print ( " sjfnb " ) else : print ( " cslnb " ) NEW_LINE


import java . util . * ; import java . lang . * ; import java . io . * ;   public class Ideone { public static void main ( String [ ] args ) throws java . lang . Exception {

import java . util . * ; import java . util . Map . Entry ; import java . io . * ; import java . text . * ;   import static java . lang . System . out ; import static java . util . Arrays . * ; import static java . lang . Math . * ; public class ContestMain { private static Reader in = new Reader ( ) ; private static StringBuilder ans = new StringBuilder ( ) ; private static long MOD = 1000000007 ;

import sys   input = sys . stdin . readlines = input ( ) . strip ( ) xc = yc = zc = 0 xlis , ylis , zlis = [ 0 ] , [ 0 ] , [ 0 ] for i in s : xlis . append ( xlis [ - 1 ] + int ( i == ' x ' ) ) ylis . append ( ylis [ - 1 ] + int ( i == ' y ' ) ) zlis . append ( zlis [ - 1 ] + int ( i == ' z ' ) ) for __ in range ( int ( input ( ) ) ) : l , r = map ( int , input ( ) . split ( ) ) if r - l < 2 : print ( ' YES ' ) continue xc = xlis [ r ] - xlis [ l - 1 ] yc = ylis [ r ] - ylis [ l - 1 ] zc = zlis [ r ] - zlis [ l - 1 ] if max ( xc , yc , zc ) - min ( xc , yc , zc ) > 1 : print ( ' NO ' ) else : print ( ' YES ' ) NEW_LINE

from sys import stdin , stdout   def readIn ( ) : return tuple ( map ( int , input ( ) . split ( ) ) )   s = input ( ) sz = len ( s ) + 1 cnt = [ [ 0 ] * 3 for _ in range ( sz ) ] for i in range ( sz - 1 ) : for j in range ( 3 ) : cnt [ i + 1 ] [ j ] = cnt [ i ] [ j ] if s [ i ] == ' x ' : cnt [ i + 1 ] [ 0 ] += 1 elif s [ i ] == ' y ' : cnt [ i + 1 ] [ 1 ] += 1 else : cnt [ i + 1 ] [ 2 ] += 1   n = int ( input ( ) ) res = [ ] for _ in range ( n ) : l , r = readIn ( ) tmp = [ cnt [ r ] [ i ] - cnt [ l - 1 ] [ i ] for i in range ( 3 ) ] res . append ( ' YES ' if r - l < 2 or max ( tmp ) - min ( tmp ) < 2 else ' NO ' ) print ( ' \n ' . join ( res ) ) NEW_LINE

from sys import stdin , stdout   def readIn ( ) : return ( map ( int , input ( ) . split ( ) ) )   s = input ( ) sz = len ( s ) + 1 cnt = [ [ 0 ] * 3 for _ in range ( sz ) ] for i in range ( sz - 1 ) : for j in range ( 3 ) : cnt [ i + 1 ] [ j ] = cnt [ i ] [ j ] if s [ i ] == ' x ' : cnt [ i + 1 ] [ 0 ] += 1 elif s [ i ] == ' y ' : cnt [ i + 1 ] [ 1 ] += 1 else : cnt [ i + 1 ] [ 2 ] += 1   n = int ( input ( ) ) res = [ ] for _ in range ( n ) : l , r = readIn ( ) tmp = [ cnt [ r ] [ i ] - cnt [ l - 1 ] [ i ] for i in range ( 3 ) ] res . append ( ' YES ' if r - l < 2 or max ( tmp ) - min ( tmp ) < 2 else ' NO ' ) print ( ' \n ' . join ( res ) ) NEW_LINE

def f ( t ) : return t [ 2 ] - t [ 0 ] > 1   t = input ( )   n , m , p = len ( t ) , int ( input ( ) ) , { ' x ' : 0 , ' y ' : 1 , ' z ' : 2 }   s = [ [ 0 ] * ( n + 1 ) for i in range ( 3 ) ]   for i , c in enumerate ( t , 1 ) : s [ p [ c ] ] [ i ] = 1   for i in range ( 3 ) :   for j in range ( 1 , n ) : s [ i ] [ j + 1 ] += s [ i ] [ j ]   a , b , c = s   q , d = [ map ( int , input ( ) . split ( ) ) for i in range ( m ) ] , [ ' YES ' ] * m   for i , ( l , r ) in enumerate ( q ) :   if r - l > 1 and f ( sorted ( [ a [ r ] - a [ l - 1 ] , b [ r ] - b [ l - 1 ] , c [ r ] - c [ l - 1 ] ] ) ) : d [ i ] = ' NO '   print ( ' \n ' . join ( d ) )   NEW_LINE

s = input ( ) cnt = list ( [ 0 ] * 3 for _ in range ( len ( s ) + 1 ) ) for i in range ( len ( s ) ) : for j in range ( 3 ) : cnt [ i + 1 ] [ j ] = cnt [ i ] [ j ] if s [ i ] == ' x ' : cnt [ i + 1 ] [ 0 ] += 1 elif s [ i ] == ' y ' : cnt [ i + 1 ] [ 1 ] += 1 else : cnt [ i + 1 ] [ 2 ] += 1 n = int ( input ( ) ) res = [ ] for _ in range ( n ) : l , r = map ( int , input ( ) . split ( ) ) t = [ cnt [ r ] [ i ] - cnt [ l - 1 ] [ i ] for i in range ( 3 ) ] res . append ( ' YES ' if r - l < 2 or max ( t ) - min ( t ) < 2 else ' NO ' ) print ( ' \n ' . join ( res ) ) NEW_LINE


import java . io . * ;   public class TestClass { public static void main ( String args [ ] ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; int n = Integer . parseInt ( br . readLine ( ) ) ; int [ ] arr = new int [ n + 1 ] ; if ( n % 4 > 1 ) System . out . println ( - 1 ) ; else { int loops = n / 4 ; int start_ind = 1 ; int end_ind = n ; int front = 1 ; int end = n ; for ( int i = 0 ; i < loops ; i ++ ) { arr [ end_ind - 1 ] = front ++ ; arr [ start_ind ] = front ++ ; arr [ start_ind + 1 ] = end -- ; arr [ end_ind ] = end -- ;   start_ind += 2 ; end_ind -= 2 ; } if ( n % 2 == 1 ) { arr [ n / 2 + 1 ] = n / 2 + 1 ; }   for ( int i = 1 ; i < arr . length ; i ++ ) { System . out . print ( arr [ i ] + " ▁ " ) ; } } } }

n = int ( input ( ) ) if ( n % 4 > 1 ) : print ( - 1 ) else : ans = [ 0 ] * ( n + 1 ) i , j , a , b = 1 , n , 1 , n while ( i < j and a <= n and b >= 1 ) : ans [ i ] , ans [ j ] = a + 1 , b - 1 ans [ i + 1 ] , ans [ j - 1 ] = b , a i += 2 j -= 2 a += 2 b -= 2 if ( i == j ) : ans [ i ] = a for i in range ( 1 , n + 1 ) : print ( ans [ i ] , end = ' ▁ ' ) NEW_LINE

import sysfrom collections import dequen = int ( input ( ) ) if n % 4 == 2 or n % 4 == 3 : print ( ' - 1' ) sys . exit ( )   arr = [ None ] * ( n + 1 ) qt = deque ( [ i for i in range ( 1 , n + 1 ) ] ) mark = set ( ) while qt : while qt and qt [ 0 ] in mark : qt . popleft ( ) if not qt : break a = qt . popleft ( ) while qt and qt [ 0 ] in mark : qt . popleft ( ) if not qt : break b = qt . popleft ( ) for i in range ( 4 ) : mark . add ( a ) mark . add ( b ) arr [ a ] = b arr [ b ] = n - a + 1 a = b b = arr [ b ]   for i in range ( 1 , n + 1 ) : if not arr [ i ] : arr [ i ] = a breakprint ( ' ▁ ' . join ( map ( str , arr [ 1 : ] ) ) ) NEW_LINE

n = int ( input ( ) ) if n == 1 : print ( 1 ) exit ( ) if n % 4 > 1 : print ( - 1 ) exit ( ) ans = [ - 1 ] * nleft = nstart = n - 2 nums = 1 nume = nwhile left >= 4 : ans [ start ] = nums ans [ nums - 1 ] = nums + 1 ans [ nums ] = nume ans [ nume - 1 ] = nume - 1 start -= 2 nums += 2 nume -= 2 left -= 4 NEW_LINE