import java . util . Scanner ; import java . util . StringTokenizer ;   public class Mishka { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int rounds = Integer . parseInt ( scanner . nextLine ( ) ) ;   int m = 0 ; for ( int i = 0 ; i < rounds ; i ++ ) { String line = scanner . nextLine ( ) ; StringTokenizer tokenizer = new StringTokenizer ( line ) ; int r1 = Integer . parseInt ( tokenizer . nextToken ( ) ) ; int r2 = Integer . parseInt ( tokenizer . nextToken ( ) ) ;   if ( r1 > r2 ) { m ++ ; } else if ( r1 < r2 ) { m -- ; } }   if ( m == 0 ) { System . out . println ( " Friendship ▁ is ▁ magic ! ^ ^ " ) ; } else if ( m > 0 ) { System . out . println ( " Mishka " ) ; } else { System . out . println ( " Chris " ) ; } } }


n = int ( input ( ) ) c1 , c2 = 0 , 0 for i in range ( n ) : a , b = map ( int , input ( ) . split ( ) ) if a > b : c1 += 1 elif a < b : c2 += 1 if c1 > c2 : print ( " Mishka " ) elif c1 < c2 : print ( " Chris " ) else : print ( " Friendship ▁ is ▁ magic ! ^ ^ " ) NEW_LINE


n = int ( input ( ) ) c_score , m_score = 0 , 0 for i in range ( n ) : m , c = map ( int , input ( ) . split ( ) ) if c > m : c_score += 1 elif c < m : m_score += 1 else : continueif c_score > m_score : print ( " Chris " ) elif c_score < m_score : print ( " Mishka " ) else : print ( " Friendship ▁ is ▁ magic ! ^ ^ " ) NEW_LINE


mishka = 0 chris = 0 for i in range ( int ( input ( ) ) ) : m , c = map ( int , input ( ) . split ( ) ) if m > c : mishka += 1 elif m < c : chris += 1 else : continue   if mishka > chris : print ( ' Mishka ' ) elif mishka < chris : print ( ' Chris ' ) else : print ( ' Friendship ▁ is ▁ magic ! ^ ^ ' ) NEW_LINE


import java . io . * ; import java . util . * ; public class Asd { static PrintWriter w = new PrintWriter ( System . out ) ; static FastScanner s = new FastScanner ( ) ;   public static void main ( String [ ] args ) {

n = int ( input ( ) )   a = 1234567 b = 123456 c = 1234   nat = ' NO ' for i in range ( n // a + 1 ) : n2 = n - a * i           for i2 in range ( n2 // b + 1 ) :                   if ( n2 - b * i2 ) % c == 0 : nat = ' YES ' print ( nat )                             NEW_LINE


s = int ( input ( ) ) n = 0 l = [ ] for i in range ( 0 , s , 1234567 ) : for j in range ( 0 , s , 123456 ) : n = s - i - j l . append ( n ) if any ( i >= 0 and i % 1234 == 0 for i in l ) : print ( " YES " ) elif s % 1234567 == 0 or s % 123456 == 0 or s % 1234 == 0 : print ( " YES " ) else : print ( " NO " ) NEW_LINE


n = int ( input ( ) ) for i in range ( 0 , n + 1 , 1234567 ) : for j in range ( 0 , n + 1 , 123456 ) : if ( n - ( i + j ) ) % 1234 == 0 and i + j <= n : print ( ' YES ' ) exit ( ) print ( ' NO ' ) NEW_LINE


import java . util . Scanner ;   public class MoneySpender { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ;   int n = scanner . nextInt ( ) ;   for ( int i = 0 ; i <= n ; i += 1234567 ) { for ( int j = 0 ; j <= n ; j += 123456 ) { int sum = i + j ;   if ( sum > n ) break ;   if ( ( n - sum ) % 1234 == 0 ) { System . out . println ( " YES " ) ; return ; } } }   System . out . println ( " NO " ) ; } }


import static java . lang . Math . max ; import static java . lang . Math . min ; import static java . lang . Math . abs ; import java . util . * ; import java . io . * ; import java . math . * ;   public class B { public static final long A = 1234567 ; public static final long B = 123456 ; public static final long C = 1234 ; public static void main ( String hi [ ] ) throws Exception { BufferedReader infile = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( infile . readLine ( ) ) ; int N = Integer . parseInt ( st . nextToken ( ) ) ; for ( int v = 0 ; v <= 1000 ; v ++ ) { if ( A * v > N ) break ; long left = N - A * v ; for ( int b = 0 ; b <= 100000 ; b ++ ) { if ( B * b > left ) break ; if ( ( left - B * b ) % C == 0 ) { System . out . println ( " YES " ) ; return ; } } } System . out . println ( " NO " ) ; } public static long gcd ( long a , long b ) { if ( a > b ) { long t = a ; a = b ; b = t ; } if ( a == 0L ) return b ; return gcd ( b % a , a ) ; } }


import java . io . * ; import java . util . StringTokenizer ;   public class Main { public void solve ( ) { int a [ ] = new int [ 3 ] ; for ( int i = 0 ; i < 3 ; i ++ ) { a [ i ] = ni ( ) ; } long l = ni ( ) ;   long total = ( l + 1 ) * ( l + 2 ) * ( l + 3 ) / 6 ;

a , b , c , l = map ( int , input ( ) . split ( ) ) cnt = ( l + 3 ) * ( l + 2 ) * ( l + 1 ) // 3 for i in ( a , b , c ) : s = 2 * i - a - b - c for x in range ( max ( 0 , - s ) , l + 1 ) : m = min ( s + x , l - x ) cnt -= ( m + 1 ) * ( m + 2 ) print ( cnt // 2 )   NEW_LINE


''' import ▁ syssys . stdin ▁ = ▁ open ( " input . txt " , ▁ " r " ) sys . stdout ▁ = ▁ open ( " output . txt " , ▁ " w " ) ''' def Solve ( a , b , c , l ) : delta = a - b - c if delta < 0 : return 0 k = min ( l , delta ) + 1 return k * ( k + 1 ) // 2   a , b , c , l = map ( int , input ( ) . split ( ) )   ans = ( l + 3 ) * ( l + 2 ) * ( l + 1 ) // 6   for d in range ( l + 1 ) : ans -= Solve ( a + d , b , c , l - d ) + Solve ( b + d , a , c , l - d ) + Solve ( c + d , a , b , l - d ) print ( ans ) NEW_LINE


a , b , c , l = map ( int , input ( ) . split ( ) ) ans = ( l + 3 ) * ( l + 2 ) // 2 * ( l + 1 ) // 3 for z in ( a , b , c ) : s = 2 * z - a - b - c for x in range ( l + 1 ) : m = min ( s + x , l - x ) if m >= 0 : ans -= ( m + 1 ) * ( m + 2 ) >> 1 print ( ans ) NEW_LINE


a , b , c , l = map ( int , input ( ) . split ( ) ) ans = ( l + 3 ) * ( l + 2 ) * ( l + 1 ) // 3 for z in ( a , b , c ) : s = 2 * z - a - b - c for x in range ( max ( 0 , - s ) , l + 1 ) : m = min ( s + x , l - x ) ans -= ( m + 1 ) * ( m + 2 ) print ( ans // 2 ) NEW_LINE


import java . util . Scanner ;    public class Main { public static Scanner in = new Scanner ( System . in ) ; public static int a , b , c , L ; public static long cal ( int l ) { int ti [ ] = new int [ 3 ] ; ti [ 0 ] = ( l + a + b - c + 1 ) / 2 ; ti [ 1 ] = ( l + a + c - b + 1 ) / 2 ; ti [ 2 ] = ( l + c + b - a + 1 ) / 2 ; for ( int i = 0 ; i < 3 ; i ++ ) if ( ti [ i ] <= 0 ) return 0 ;


import java . util . * ;   public class A {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; long [ ] a = new long [ 3 ] ; a [ 0 ] = sc . nextLong ( ) ; a [ 1 ] = sc . nextLong ( ) ; a [ 2 ] = sc . nextLong ( ) ; long l = sc . nextLong ( ) ; long total = ( l + 1 ) * ( l + 2 ) * ( l + 3 ) / 6 ; for ( int i = 0 ; i < 3 ; i ++ ) { for ( long la = 0L ; la <= l ; la ++ ) { long x = Math . min ( a [ i ] - a [ ( i + 1 ) % 3 ] - a [ ( i + 2 ) % 3 ] + la , l - la ) ; if ( x >= 0 ) { total -= ( x + 1 ) * ( x + 2 ) / 2 ; } } } System . out . println ( " " + total ) ; }   }


n = int ( input ( ) ) a , b = set ( ) , set ( ) for i in list ( map ( int , input ( ) . split ( ) ) ) : a = { i | j for j in a } a . add ( i ) b . update ( a ) print ( len ( b ) )

n , a , b = input ( ) , set ( ) , set ( ) for i in map ( int , input ( ) . split ( ) ) : b = set ( i | j for j in b ) b . add ( i ) a . update ( b ) print ( len ( a ) ) NEW_LINE


import sys , math , osfrom io import BytesIO , IOBase NEW_LINE


n = int ( input ( ) ) a , b = set ( ) , set ( ) for i in list ( map ( int , input ( ) . split ( ) ) ) : a = { i | j for j in a } a . add ( i ) b . update ( a ) print ( len ( b ) ) NEW_LINE


n = input ( ) r = set ( ) s = set ( ) l = list ( map ( int , input ( ) . split ( ' ▁ ' ) ) ) for i in l : s = { i | a for a in s } s . add ( i ) r |= sprint ( len ( r ) )   NEW_LINE


import java . io . * ; import java . util . * ; import java . lang . * ; import java . math . * ; import java . text . DecimalFormat ; import java . lang . reflect . Array ; import java . io . BufferedOutputStream ; import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . math . BigDecimal ; import java . util . * ; public class Codeforces { public static PrintWriter out = new PrintWriter ( new BufferedOutputStream ( System . out ) ) ; static long MOD = ( long ) ( 1e9 + 7 ) ;


import java . util . * ; import java . io . * ;   public class Main { public static void main ( String [ ] args ) throws IOException { FastScanner in = new FastScanner ( System . in ) ; PrintWriter out = new PrintWriter ( System . out ) ; new Main ( ) . run ( in , out ) ; out . close ( ) ; }   void run ( FastScanner in , PrintWriter out ) {   int N = in . nextInt ( ) ; int [ ] a = new int [ N ] ; int allSet = 0 ; for ( int i = 0 ; i < N ; i ++ ) { a [ i ] = in . nextInt ( ) ; allSet |= a [ i ] ; }   Set < Integer > s = new HashSet < > ( ) ; int [ ] prev = new int [ N ] ; Arrays . fill ( prev , - 1 ) ; for ( int l = 0 ; l < N ; l ++ ) { int x = 0 ; for ( int r = l ; r < N ; r ++ ) { x |= a [ r ] ; if ( x == prev [ r ] ) break ; s . add ( x ) ; prev [ r ] = x ; } }   out . println ( s . size ( ) ) ; }   static class FastScanner { BufferedReader br ; StringTokenizer st ;   public FastScanner ( InputStream in ) { br = new BufferedReader ( new InputStreamReader ( in ) ) ; st = null ; }   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 ( ) ) ; } } }


import java . math . BigInteger ; import java . sql . Array ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . Collection ; import java . util . Collections ; import java . util . Comparator ; import java . util . HashMap ; import java . util . InputMismatchException ; import java . util . Iterator ; import java . util . LinkedHashSet ; import java . util . LinkedList ; import java . util . List ; import java . util . Map ; import java . util . Map . Entry ; import java . util . PriorityQueue ; import java . util . Queue ; import java . util . Scanner ; import java . util . Set ; import java . util . Stack ; import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStream ; import java . io . InputStreamReader ; import java . util . Scanner ; import java . util . StringTokenizer ; import java . util . TreeMap ; import java . util . TreeSet ; public class Main { static InputReader rd = new InputReader ( System . in ) ; public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; outer : while ( t -- > 0 ) { int n = sc . nextInt ( ) ; ArrayList < Helper > A = new ArrayList < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { A . add ( new Helper ( sc . nextInt ( ) , i ) ) ; } Collections . sort ( A , new Comparator < Helper > ( ) { @ Override public int compare ( Helper o1 , Helper o2 ) {

import java . math . * ; import java . io . * ; import java . util . * ; import java . awt . * ;   public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; while ( t - -> 0 ) { int n = sc . nextInt ( ) ; int a = sc . nextInt ( ) ; boolean flag = true ; for ( int i = 1 ; i < n ; i + + ) { int b = sc . nextInt ( ) ; if ( a < b & & b - a > 1 ) flag = false ; a = b ; } if ( flag ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } } } NEW_LINE


import sysinput = sys . stdin . buffer . readline NEW_LINE


import math , string , itertools , fractions , heapq , collections , re , array , bisect , sys , copy , functools NEW_LINE


from operator import itemgetter   t = int ( input ( ) ) for i in range ( t ) : n = int ( input ( ) ) pi = list ( map ( int , input ( ) . split ( ) ) ) ans = [ " Yes " , " No " ] if n < 3 : print ( ans [ 0 ] ) continue pi2 = [ [ pi [ i ] , i ] for i in range ( n ) ] pi2 . sort ( key = itemgetter ( 0 ) ) i = 0 num = 0 while i < n : j = pi2 [ i ] [ 1 ] + 1 while j < n : if pi [ j ] > pi [ j - 1 ] + 1 : ans [ 0 ] = ans [ 1 ] i = n if pi [ j ] < pi [ j - 1 ] : break j += 1 i = pi [ j - 1 ] print ( ans [ 0 ] ) NEW_LINE


import java . io . * ; import java . util . * ;   public final class test { public static void main ( String [ ] args ) { FastScanner sc = new FastScanner ( System . in ) ; StringBuilder result = new StringBuilder ( " " ) ;   int t = sc . nextInt ( ) ; while ( t -- != 0 ) { int n = sc . nextInt ( ) ; int p [ ] = new int [ n ] ;   for ( int i = 0 ; i < n ; i ++ ) p [ i ] = sc . nextInt ( ) ; boolean flag = false ;   for ( int i = 0 ; i < n - 1 ; i ++ ) { if ( p [ i ] < p [ i + 1 ] && p [ i + 1 ] != 1 + p [ i ] ) { flag = true ; result . append ( " No \n " ) ; break ; } }   if ( ! flag ) result . append ( " Yes \n " ) ; }   System . out . println ( result ) ; } }   class FastScanner { BufferedReader br ; StringTokenizer st ;   public FastScanner ( InputStream stream ) { br = new BufferedReader ( new InputStreamReader ( stream ) ) ; }   public String next ( ) { while ( st == null || ! st . hasMoreElements ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; }   public int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   public long nextLong ( ) { return Long . parseLong ( next ( ) ) ; }   public double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; }   public String nextLine ( ) { String str = " " ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return str ; }   public int [ ] readArray ( int n ) { int [ ] a = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = nextInt ( ) ; return a ; } }


import java . util . * ; import java . io . * ; import java . math . * ;   public class Main { public static void main ( String [ ] args ) throws Exception { BufferedReader infile = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( infile . readLine ( ) ) ; int cas = Integer . parseInt ( st . nextToken ( ) ) ; StringBuilder res = new StringBuilder ( ) ; while ( cas -- > 0 ) { st = new StringTokenizer ( infile . readLine ( ) ) ; int n = Integer . parseInt ( st . nextToken ( ) ) ; st = new StringTokenizer ( infile . readLine ( ) ) ; int [ ] arr = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = Integer . parseInt ( st . nextToken ( ) ) ; } int min = n , to = n , ok = 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( min > arr [ i ] ) min = arr [ i ] ; if ( arr [ i ] != to ) { if ( i == n - 1 || arr [ i ] != arr [ i + 1 ] - 1 ) { ok = 0 ; } } else if ( arr [ i ] == to ) to = min - 1 ; } if ( ok == 1 ) res . append ( " Yes " ) ; else res . append ( " No " ) ; res . append ( ' \n ' ) ; } System . out . println ( res ) ; } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ;   public class A_Map_of_the_Cat_1800 { public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; String Response ; int numnos = 0 ; try { for ( int i = 0 ; i <= 9 ; i ++ ) { System . out . println ( i ) ; Response = br . readLine ( ) ; if ( Response . equals ( " cool " ) || Response . equals ( " great ! " ) || Response . equals ( " not ▁ bad " ) || Response . equals ( " don ' t ▁ think ▁ so " ) || Response . equals ( " don ' t ▁ touch ▁ me ! " ) ) { System . out . println ( " normal " ) ; break ; } else if ( Response . equals ( " terrible " ) || Response . equals ( " worse " ) || Response . equals ( " no ▁ way " ) || Response . equals ( " don ' t ▁ even " ) || Response . equals ( " are ▁ you ▁ serious ? " ) || Response . equals ( " go ▁ die ▁ in ▁ a ▁ hole " ) ) { System . out . println ( " grumpy " ) ; break ; } if ( Response . equals ( " no " ) ) { if ( ++ numnos > 3 ) { System . out . println ( " normal " ) ; } } } } catch ( Exception e ) { e . printStackTrace ( ) ; } } }

from sys import stdout   def ask ( index ) : print ( index ) stdout . flush ( ) x = input ( ) return x   normal = [ " cool " , " not ▁ bad " , " don ' t ▁ think ▁ so " , " don ' t ▁ touch ▁ me " , " great " ] grumpy = [ " terrible " , " worse " , " go ▁ die ▁ in ▁ a ▁ hole " , " are ▁ you ▁ serious " , " don ' t ▁ even " , " no ▁ way " ] normal . sort ( ) grumpy . sort ( )   ans = [ ] for i in range ( 10 ) : s = ask ( i ) if s == " no " : continue if s in normal : ans = " normal " else : ans = " grumpy " breakprint ( ans ) NEW_LINE


good = set ( [ ' great ' , ' great ! ' , " don ' t ▁ think ▁ so " , ' not ▁ bad ' , ' cool ' ] ) grumpy = set ( [ ' are ▁ you ▁ serious ' , ' are ▁ you ▁ serious ? ' , ' go ▁ die ▁ in ▁ a ▁ hole ' , ' worse ' , ' terrible ' , ' no ▁ way ' , " don ' t ▁ even " ] ) for i in range ( 10 ) : print ( i ) ans = input ( ) . lower ( ) . strip ( ) if ans in good : print ( ' normal ' ) break elif ans in grumpy : print ( ' grumpy ' ) break NEW_LINE


normal = [ " don ' t ▁ think ▁ so " , " don ' t ▁ touch ▁ me " , " not ▁ bad " , " cool " , " great " ] grumpy = [ " are ▁ you ▁ serious ? " , " go ▁ die ▁ in ▁ a ▁ hole " , " worse " , ' terrible ' , " don ' t ▁ even " ] for i in range ( 0 , 10 ) : print ( i ) S = input ( ) if S in normal : print ( " normal " ) break elif S in grumpy : print ( " grumpy " ) break NEW_LINE


for i in range ( 10 ) : print ( i ) s = input ( ) if s in [ " great ! " , " don ' t ▁ think ▁ so " , " not ▁ bad " , " cool " , " don ' t ▁ touch ▁ me " ] : print ( " normal " ) exit ( 0 ) if s in [ " no ▁ way " , " don ' t ▁ even " , " are ▁ you ▁ serious ? " , " worse " , " terrible " ] : print ( " grumpy " ) exit ( 0 ) NEW_LINE


import sysa = [ ' cool ' , ' not ▁ bad ' , ' great ' , " don ' t ▁ think ▁ so " , " don ' t ▁ touch ▁ me " ] b = [ ' terrible ' , ' worse ' , ' go ▁ die ▁ in ▁ a ▁ hole ' , ' are ▁ you ▁ serious ' , " don ' t ▁ even " , ' no ▁ way ' ] i = 1 while i < 10 : print ( i ) sys . stdout . flush ( ) q = input ( ) if q == ' no ' : i += 1 elif q in a : print ( ' normal ' ) sys . stdout . flush ( ) exit ( ) elif q in b : print ( ' grumpy ' ) sys . stdout . flush ( ) exit ( ) NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . math . BigDecimal ; import java . math . BigInteger ; import java . util . ArrayList ; import java . util . Scanner ;   public class Main {    public static String NORMALS [ ] = { " cool " , " not ▁ bad " , " don ' t ▁ touch ▁ me " , " don ' t ▁ think ▁ so " , " great " } ; public static String NO = " no " ; public static String NORMAL = " normal " ; public static String GRUMPY = " grumpy " ; public static void main ( String [ ] args ) throws IOException { BufferedReader bufferedReader = new BufferedReader ( new InputStreamReader ( System . in ) ) ; for ( int i = 0 ; i <= 9 ; ++ i ) { System . out . println ( i ) ; System . out . flush ( ) ; String line = bufferedReader . readLine ( ) ; if ( ! line . startsWith ( NO ) ) { for ( String w : NORMALS ) { if ( line . startsWith ( w ) ) { System . out . println ( NORMAL ) ; System . out . flush ( ) ; return ; } } System . out . println ( GRUMPY ) ; System . out . flush ( ) ; return ; } }   } }


import java . util . * ; public class name { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int n = 9 ; for ( int i = 0 ; i <= 9 ; i ++ ) { System . out . println ( i ) ; String x = scan . nextLine ( ) ; if ( x . equals ( " worse " ) || x . equals ( " terrible " ) || x . equals ( " don ' t ▁ even " ) || x . equals ( " are ▁ you ▁ serious ? " ) || x . equals ( " go ▁ die ▁ in ▁ a ▁ hole " ) || x . equals ( " no ▁ way " ) ) { System . out . println ( " grumpy " ) ; break ; } if ( x . equals ( " great " ) || x . equals ( " cool " ) || x . equals ( " not ▁ bad " ) || x . equals ( " don ' t ▁ touch ▁ me ! " ) || x . equals ( " don ' t ▁ think ▁ so " ) ) { System . out . println ( " normal " ) ; break ; } else System . out . flush ( ) ; } } }


import java . util . * ; public class name { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int n = 9 ; for ( int i = 0 ; i <= 9 ; i ++ ) { System . out . println ( i ) ; String x = scan . nextLine ( ) ; if ( x . equals ( " worse " ) || x . equals ( " terrible " ) || x . equals ( " don ' t ▁ even " ) || x . equals ( " are ▁ you ▁ serious ? " ) || x . equals ( " go ▁ die ▁ in ▁ a ▁ hole " ) || x . equals ( " no ▁ way " ) ) { System . out . println ( " grumpy " ) ; break ; } if ( x . equals ( " great " ) || x . equals ( " cool " ) || x . equals ( " not ▁ bad " ) || x . equals ( " don ' t ▁ touch ▁ me ! " ) || x . equals ( " don ' t ▁ think ▁ so " ) ) { System . out . println ( " normal " ) ; break ; } } } }


import java . awt . image . AreaAveragingScaleFilter ; import java . util . * ; import java . io . * ; import java . text . * ;   public class CF_464B {

import itertoolsfrom itertools import permutations as perm   l = [ [ int ( x ) for x in input ( ) . split ( ) ] for i in range ( 8 ) ]   def dist2 ( p0 , p1 ) : return sum ( [ ( p0 [ i ] - p1 [ i ] ) ** 2 for i in range ( 3 ) ] )   def sub ( p0 , p1 ) : return [ p0 [ i ] - p1 [ i ] for i in range ( 3 ) ]   def add ( p0 , p1 ) : return [ p0 [ i ] + p1 [ i ] for i in range ( 3 ) ]   def div ( p0 , x ) : return [ p0 [ i ] // x for i in range ( 3 ) ]   def cross ( p0 , p1 ) : return [ p0 [ ( i + 1 ) % 3 ] * p1 [ ( i + 2 ) % 3 ] - p0 [ ( i + 2 ) % 3 ] * p1 [ ( i + 1 ) % 3 ] for i in range ( 3 ) ]   def match ( p0 , p1 ) : return sorted ( p0 ) == sorted ( p1 )   solved = Falsefor l2 in perm ( l , 3 ) : p0 = l2 [ 0 ] for p1 in perm ( l2 [ 1 ] ) : s2 = dist2 ( p0 , p1 ) if s2 == 0 : continue s = round ( s2 ** .5 ) NEW_LINE


import itertoolsfrom itertools import permutations as permimport copy   def getPerm ( it , index ) : if index == 0 : return it elif index == 1 : return [ it [ 0 ] , it [ 2 ] , it [ 1 ] ] elif index == 2 : return [ it [ 1 ] , it [ 0 ] , it [ 2 ] ] elif index == 3 : return [ it [ 1 ] , it [ 2 ] , it [ 0 ] ] elif index == 4 : return [ it [ 2 ] , it [ 0 ] , it [ 1 ] ] elif index == 5 : return [ it [ 2 ] , it [ 1 ] , it [ 0 ] ]   def distance ( coord1 , coord2 ) : return ( ( coord2 [ 0 ] - coord1 [ 0 ] ) ** 2 + ( coord2 [ 1 ] - coord1 [ 1 ] ) ** 2 + ( coord2 [ 2 ] - coord1 [ 2 ] ) ** 2 )   dists = ( [ 0 ] * 6 ) * 7   pointList = [ [ int ( x ) for x in input ( ) . split ( ) ] for y in range ( 0 , 8 ) ]   p0 = pointList [ 0 ]   for x in range ( 0 , 7 ) : y = 0 for pt in perm ( pointList [ x + 1 ] , 3 ) : NEW_LINE


from itertools import permutations as p       d = lambda a , b : sum ( ( i - j ) ** 2 for i , j in zip ( a , b ) )   f = lambda a , b : [ i + j - k for i , j , k in zip ( a , b , q ) ]   g = lambda t : sorted ( sorted ( q ) for q in t )       v = [ sorted ( map ( int , input ( ) . split ( ) ) ) for i in range ( 8 ) ]   q = v . pop ( )       def yes ( t , v ) :   print ( ' YES ' )   d = { }   for q in t :   s = str ( sorted ( q ) )   d [ s ] = d . get ( s , [ ] ) + [ q ]   for q in v :   i , j , k = d [ str ( q ) ] . pop ( )   print ( i , j , k )   exit ( )       u = g ( v )   for a , b , c in p ( v , 3 ) :   for x in p ( a ) :   s = 2 * d ( q , x )   if s == 0 : continue   for y in p ( b ) :   if not 2 * d ( q , y ) == d ( x , y ) == s : continue   for z in p ( c ) :   if not 2 * d ( q , z ) == d ( x , z ) == d ( y , z ) == s : continue   t = [ x , y , z ] + [ f ( x , y ) , f ( x , z ) , f ( y , z ) , f ( f ( x , y ) , z ) ]   if g ( t ) == u : yes ( t + [ q ] , v + [ q ] )       print ( ' NO ' )       NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . Collections ; import java . util . HashMap ; import java . util . PriorityQueue ; import java . util . Random ; import java . util . StringTokenizer ; import java . util . TreeMap ; import java . util . stream . LongStream ;   public class Solution { static int [ ] [ ] a ; static PrintWriter out = new PrintWriter ( System . out ) ; public static void main ( String [ ] args ) throws IOException { FastScanner fs = new FastScanner ( ) ;


import java . io . * ; public class p374B { public static void main ( String [ ] args ) throws IOException { BufferedReader in = new BufferedReader ( new InputStreamReader ( System . in ) ) ; BufferedWriter out = new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ; char s [ ] = in . readLine ( ) . toCharArray ( ) ; long c = 1 , a = 1 ; for ( int i = 1 ; i < s . length ; i ++ ) if ( s [ i ] + s [ i - 1 ] == ' i ' ) c ++ ; else { if ( c % 2 == 1 ) a *= c / 2 + 1 ; c = 1 ; } if ( c % 2 == 1 ) a *= ( c / 2 + 1 ) ; out . write ( a + " " ) ; out . flush ( ) ; } }

a = input ( ) n = len ( a ) ans = 1 c = 0 for i in range ( n - 1 ) : if int ( a [ i + 1 ] ) + int ( a [ i ] ) == 9 : c += 1 else : if c % 2 == 0 and c != 0 : NEW_LINE


s , a , c = input ( ) , 1 , 1 for i in range ( 1 , len ( s ) ) : if int ( s [ i ] ) + int ( s [ i - 1 ] ) == 9 : c += 1 elif c % 2 : a *= c // 2 + 1 ; c = 1 else : c = 1 if ( c % 2 ) : a *= c // 2 + 1 print ( a ) NEW_LINE


p = 10 cnt = 0 r = 1 for c in input ( ) : c = int ( c ) if c + p == 9 : cnt += 1 else : if cnt > 0 and cnt % 2 == 0 : r *= cnt // 2 + 1 cnt = 0 p = cif cnt > 0 and cnt % 2 == 0 : r *= cnt // 2 + 1 print ( r ) NEW_LINE


import java . util . Scanner ;   public class A {   public static int MOD = 1_000_000_007 ; public static void main ( String [ ] args ) {   Scanner scanner = new Scanner ( System . in ) ; long ans = 1 ;   char [ ] a = scanner . next ( ) . toCharArray ( ) ; int n = a . length ; int count = 0 ; for ( int i = 0 ; i < n - 1 ; ++ i ) { if ( a [ i ] - '0' + a [ i + 1 ] - '0' == 9 ) { if ( count == 0 ) count += 2 ; else count ++ ; } else { if ( count % 2 == 1 ) ans *= ( 1 + count / 2 ) ; count = 0 ; } }   if ( count % 2 == 1 ) ans *= ( 1 + count / 2 ) ; System . out . println ( ans ) ; } }


import java . io . * ; import java . util . * ; public final class code


import java . util . * ; public class First { public static void main ( String [ ] args ) throws java . lang . Exception { Scanner s = new Scanner ( System . in ) ;   int n = s . nextInt ( ) ; int a [ ] = new int [ n ] ; int d = s . nextInt ( ) ; int l = s . nextInt ( ) ; int d1 = ( int ) Math . floor ( n * 1.0 / 2 ) , d2 = ( int ) Math . ceil ( n * 1.0 / 2 ) ; int temp1 = d2 * l - d1 ; int temp2 = d2 - d1 * l ; if ( temp1 < d || d < temp2 ) System . out . println ( - 1 ) ; else { for ( int i = 0 ; i < n ; i ++ ) { if ( d > 0 ) { a [ i ] = l ; d = a [ i ] - d ; } else { a [ i ] = 1 ; d = a [ i ] - d ; } } a [ n - 1 ] -= d ; for ( int i = 0 ; i < n ; i ++ ) { System . out . print ( a [ i ] + " ▁ " ) ; } System . out . println ( ) ; } } }


def magic ( n , d , l ) : arr = [ 1 ] * ( n ) odd = arr [ 0 : : 2 ] even = arr [ 1 : : 2 ] if d > 0 : val = d - ( sum ( odd ) - sum ( even ) ) while val : for i in range ( len ( odd ) ) : if val : odd [ i ] += 1 val -= 1 else : break if d <= 0 : val = abs ( d ) - ( sum ( even ) - sum ( odd ) ) while val : for i in range ( len ( even ) ) : if val : even [ i ] += 1 val -= 1 else : break if max ( odd ) > l or max ( even ) > l : return - 1 arr [ 0 : : 2 ] = odd arr [ 1 : : 2 ] = even print ( * arr ) return " " a , b , c = map ( int , input ( ) . strip ( ) . split ( ) ) print ( magic ( a , b , c ) ) NEW_LINE


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


def magic ( n , d , l ) : ans = [ d ] flag = 0 for i in range ( n - 1 ) : temp = ans [ i ] if temp < 1 : ans [ i ] = 1 ans . append ( 1 - temp ) else : ans [ i ] = l ans . append ( l - temp ) if not 1 <= ans [ n - 1 ] <= l : flag = 1 if flag == 0 : return ans else : return - 1     if __name__ == " _ _ main _ _ " : n , d , l = map ( int , input ( ) . split ( ) ) magic = magic ( n , d , l ) if magic != - 1 : for i in range ( n ) : print ( magic [ i ] , end = " ▁ " ) else : print ( - 1 ) NEW_LINE


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


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


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

import mathn , S = map ( int , input ( ) . split ( " ▁ " ) ) print ( math . ceil ( S / n ) ) NEW_LINE


n , s = map ( int , input ( ) . split ( " ▁ " ) ) ans = 1 ans = ( s + n - 1 ) / nprint ( int ( ans ) ) NEW_LINE


max_coin , aim = map ( int , input ( ) . split ( ) ) need_more = aimcoins_used = 0   while ( max_coin > 0 ) : coins_used += need_more // max_coin need_more = need_more % max_coin max_coin -= 1   print ( coins_used ) NEW_LINE


n , s = map ( int , input ( ) . split ( ) ) count = s // nif ( s % n == 0 ) : print ( count ) else : print ( count + 1 ) NEW_LINE


import java . io . * ; import java . math . BigDecimal ; import java . math . BigInteger ; import java . math . MathContext ; import java . util . ArrayList ; import java . util . Locale ; import java . util . Scanner ;   public class CodeForces { public static void main ( String [ ] args ) throws IOException { Scanner scan = new Scanner ( System . in ) ;   int n = scan . nextInt ( ) ; int s = scan . nextInt ( ) ; int count = 0 ; int sum = 0 ;   for ( int i = n ; i >= 0 ; ) {   sum += i ; if ( sum <= s ) { count ++ ; if ( sum == s ) { System . out . println ( count ) ; break ; } } else { sum -= i ; i -- ; } }    } }


import java . io . * ; import java . util . * ;   public class Codeforces { public static void main ( String [ ] args ) throws UnsupportedEncodingException , IOException , Exception { StringBuilder out = new StringBuilder ( ) ; StringTokenizer tk ; Reader . init ( System . in ) ; int n = Reader . nextInt ( ) ; int s = Reader . nextInt ( ) ; if ( s % n == 0 ) { System . out . println ( s / n ) ; } else { System . out . println ( ( s / n ) + 1 ) ; }   } }   class Reader {   static BufferedReader reader ; static StringTokenizer tokenizer ;   static void init ( InputStream input ) throws UnsupportedEncodingException { reader = new BufferedReader ( new InputStreamReader ( input , " UTF - 8" ) ) ; tokenizer = new StringTokenizer ( " " ) ; }   static String next ( ) throws IOException { while ( ! tokenizer . hasMoreTokens ( ) ) {


import java . io . IOException ; import java . util . Scanner ;   public class Codeforce {   public static void main ( String [ ] args ) throws IOException {   Scanner input = new Scanner ( System . in ) ; int x = input . nextInt ( ) , y = input . nextInt ( ) ; System . out . println ( ( x + y - 1 ) / x ) ; } }


import java . util . * ; public class Test1 { public static int gcd ( int a , int b ) { while ( b != 0 ) { int p = a % b ; a = b ; b = p ; } return a ; } public static void main ( String [ ] args ) throws java . lang . Exception { Scanner scan = new Scanner ( System . in ) ; int l = scan . nextInt ( ) ; int r = scan . nextInt ( ) ; int x = scan . nextInt ( ) ; int y = scan . nextInt ( ) ; int v = 0 ; if ( y % x == 0 ) { y = y / x ; for ( int i = 1 ; i * i <= y ; i ++ ) { int p = y / i ; if ( y % i == 0 && gcd ( p , i ) == 1 && ( x * i ) >= l && ( x * i ) <= r && ( x * p ) >= l && ( x * p ) <= r ) { if ( p != i ) { v = v + 2 ; } else { v ++ ; } } } } System . out . println ( v ) ; } }

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


def gcd ( a , b ) : while b : a %= b a , b = b , a return al , r , x , y = map ( int , input ( ) . split ( ) ) if y % x != 0 : print ( 0 ) exit ( ) ans = 0 n = y // xi = 1 while i * i <= n : if n % i == 0 : c = n // i if l <= c * x <= r and l <= i * x <= r and gcd ( i , c ) == 1 : if i * i == n : ans += 1 else : ans += 2 i += 1 print ( ans ) NEW_LINE


def make_divisors ( n ) : divisors = [ ] for i in range ( 1 , int ( n ** 0.5 ) + 1 ) : if n % i == 0 : divisors . append ( i ) if i != n // i : divisors . append ( n // i )   NEW_LINE


from math import * l , r , x , y = map ( int , input ( ) . split ( ) ) m = int ( sqrt ( y ) - 0.1 ) + 1 s = list ( i for i in range ( 1 , m ) if y % i == 0 ) s += list ( y // i for i in s ) if m * m == y : s += [ m ] print ( sum ( sum ( int ( l <= i <= r and l <= j <= r and i * j == x * y and gcd ( i , j ) == x ) for i in s ) for j in s ) ) NEW_LINE


import java . io . * ; import java . util . * ;   public class Main {   public static void main ( String [ ] args ) throws Exception { BufferedReader in = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( in . readLine ( ) ) ; long l = Integer . parseInt ( st . nextToken ( ) ) ; long r = Integer . parseInt ( st . nextToken ( ) ) ; long gcd = Integer . parseInt ( st . nextToken ( ) ) ; long lcm = Integer . parseInt ( st . nextToken ( ) ) ; long n = gcd * lcm ; long res = 0 ; long sqrt = ( long ) ( Math . sqrt ( n ) ) ; for ( long i = gcd ; i <= sqrt ; i += gcd ) { long j = n / i ; if ( i >= l && i <= r && j >= l && j <= r ) { if ( gcd ( i , j ) == gcd && lcm ( i , j ) == lcm ) { if ( i == j ) { res ++ ; } else { res += 2 ; } } } } System . out . println ( res ) ; } static long gcd ( long p , long q ) { if ( q == 0 ) return p ; else return gcd ( q , p % q ) ; } static long lcm ( long a , long b ) { return ( a * b ) / ( gcd ( a , b ) ) ; } }


import java . io . ByteArrayInputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . PrintWriter ; import java . util . Arrays ; import java . util . HashSet ; import java . util . InputMismatchException ; import java . util . Set ;   public class Main {   private static final int MAXN = 5000 ; private static final String NO = " NO " ; private static final String YES = " YES " ; InputStream is ; PrintWriter out ; String INPUT = " " ;   private static long MOD = 1000000009 ;   void solve ( ) { long l = nl ( ) ; long r = nl ( ) ; long gcd = nl ( ) ; long lcm = nl ( ) ;   long m = lcm / gcd ;   int ans = 0 ; if ( lcm % gcd == 0 ) for ( int a = 1 ; a <= Math . sqrt ( m ) ; a ++ ) { if ( m % a == 0 && a * gcd <= r && a * gcd >= l && m / a * gcd <= r && m / a * gcd >= l && gcd ( a , m / a ) == 1 ) {


import java . util . * ;   public class CodeForces992B { public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int l = input . nextInt ( ) ; int r = input . nextInt ( ) ; int x = input . nextInt ( ) ; int y = input . nextInt ( ) ;    if ( y % x != 0 ) { System . out . println ( 0 ) ; } else { int ans = 0 ; int n = y / x ; for ( int d = 1 ; d * d <= n ; d ++ ) { if ( n % d == 0 ) { int c = n / d ; if ( l <= c * x && c * x <= r && l <= d * x && d * x <= r && gcd ( c , d ) == 1 ) { if ( d * d == n ) { ans ++ ; } else { ans += 2 ; } } } }   System . out . println ( ans ) ; } }   public static int gcd ( int a , int b ) { while ( b > 0 ) { int t = a % b ; a = b ; b = t ; } return a ; } }


import java . util . * ; import java . io . * ; public class A { public static FastReader sc = new FastReader ( ) ; public static PrintWriter out = new PrintWriter ( System . out ) ; public static void taskSolver ( ) { int n = sc . nextInt ( ) ; int arr [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) arr [ i ] = sc . nextInt ( ) ; int min = Integer . MAX_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { int num = arr [ i ] ; int coins = 0 ; for ( int j = 0 ; j < n ; j ++ ) { if ( num % 2 == 0 ) { if ( arr [ j ] % 2 != 0 ) coins ++ ; } else { if ( arr [ j ] % 2 == 0 ) coins ++ ; } } min = Math . min ( min , coins ) ; } out . println ( min ) ; } public static void main ( String args [ ] ) throws java . lang . Exception { taskSolver ( ) ; 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 ; } } }

n = int ( input ( ) ) l = list ( map ( int , input ( ) . split ( ) ) ) ev = 0 od = 0   for i in range ( len ( l ) ) : if ( l [ i ] % 2 == 0 ) : ev += 1 else : od += 1   print ( min ( ev , od ) ) NEW_LINE


import sys , math , itertoolsfrom collections import Counter , deque , defaultdictfrom bisect import bisect_left , bisect_right from heapq import heappop , heappush , heapifyfrom copy import deepcopymod = 10 ** 9 + 7 INF = float ( ' inf ' ) def inp ( ) : return int ( sys . stdin . readline ( ) ) def inpl ( ) : return list ( map ( int , sys . stdin . readline ( ) . split ( ) ) ) def inpl_1 ( ) : return list ( map ( lambda x : int ( x ) - 1 , sys . stdin . readline ( ) . split ( ) ) ) def inps ( ) : return sys . stdin . readline ( ) def inpsl ( x ) : tmp = sys . stdin . readline ( ) ; return list ( tmp [ : x ] ) def err ( x ) : print ( x ) ; exit ( )   n = inp ( ) a = inpl ( ) e = [ 0 , 0 ] for x in a : e [ x % 2 ] += 1 print ( min ( e ) ) NEW_LINE


n = int ( input ( ) ) x = list ( map ( int , input ( ) . split ( ) ) ) k = 0 l = 0 for i in range ( len ( x ) ) : if x [ i ] % 2 == 0 : k = k + 1 else : l = l + 1 m = min ( k , l ) print ( m ) NEW_LINE


import mathimport sysinput = sys . stdin . readlinedef inp ( ) : return ( int ( input ( ) ) ) def inlt ( ) : return ( list ( map ( int , input ( ) . split ( ) ) ) ) def insr ( ) : s = input ( ) . strip ( ) return ( list ( s [ : len ( s ) ] ) ) def invr ( ) : return ( map ( int , input ( ) . split ( ) ) ) n = inp ( ) l = inlt ( ) n_eve = 0 n_odd = 0 for i in range ( n ) : if l [ i ] % 2 == 0 : n_eve += 1 else : n_odd += 1 print ( min ( n_eve , n_odd ) ) NEW_LINE


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


import java . util . ArrayList ; import java . util . Collections ; import java . util . HashMap ; import java . util . Scanner ;   public class Main { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ;   int n = scan . nextInt ( ) ; long [ ] arr = new long [ n ] ; int cntO = 0 ;   for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = scan . nextLong ( ) ; if ( arr [ i ] % 2 != 0 ) cntO += 1 ; } System . out . println ( Math . min ( cntO , n - cntO ) ) ; } }


import java . util . Scanner ; import java . util . Arrays ; public class Main { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int n , sum = 0 , minsum = Integer . MAX_VALUE , man = 0 ; int [ ] a = new int [ 101 ] ; n = in . nextInt ( ) ; for ( int i = 1 ; i <= n ; i ++ ) { a [ i ] = in . nextInt ( ) ; } for ( int x = 1 ; x <= n ; x ++ ) { sum = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { man = 0 ; man += 2 * ( Math . abs ( i - x ) + Math . abs ( i - 1 ) + Math . abs ( 1 - x ) ) ; sum += man * a [ i ] ; } if ( sum < minsum ) { minsum = sum ; } } System . out . println ( minsum ) ; in . close ( ) ; } }

n = int ( input ( ) ) a = [ 1 ] + [ int ( x ) for x in input ( ) . strip ( ) . split ( ' ▁ ' ) ] res = 0 power = [ ] for i in range ( 1 , n + 1 ) : for j in range ( 1 , n + 1 ) : if j > i : res = a [ j ] * ( ( j - i ) * 2 + ( j - 1 ) * 2 ) * 2 + res else : res = a [ j ] * ( j - 1 ) * 2 * 2 + res power . append ( res ) res = 0   ans = min ( power ) print ( ans )   NEW_LINE


n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) pas = 0 for i in range ( n ) : pas += a [ i ] * i * 4 print ( pas ) NEW_LINE


n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) ans = 0 for i in range ( 1 , n ) : ans += 4 * a [ i ] * iprint ( ans ) NEW_LINE


n = int ( input ( ) ) A = list ( map ( int , input ( ) . split ( ) ) ) ans = 10 ** 18 for i in range ( n ) : x = i + 1 temp = 0 for j in range ( n ) : k = j + 1 temp += ( abs ( k - x ) + abs ( k - 1 ) + abs ( x - 1 ) ) * A [ j ] temp += ( abs ( 1 - x ) + abs ( 1 - k ) + abs ( k - x ) ) * A [ j ] y = abs ( k - x ) + abs ( x - 1 ) + abs ( x - 1 ) + abs ( 1 - x ) + abs ( 1 - k ) + abs ( k - x ) NEW_LINE


import java . util . * ;   public class Test { public static void main ( String [ ] args ) {   Scanner input = new Scanner ( System . in ) ; int n = input . nextInt ( ) ; int [ ] a = new int [ n ] ;   for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = input . nextInt ( ) ; }   int min = 0 ; for ( int i = 0 ; i < n ; i ++ ) {   int temp = 0 ; for ( int j = 0 ; j < n ; j ++ ) { temp += 2 * ( Math . abs ( i - j ) + i + j ) * a [ j ] ; } if ( i == 0 || temp < min ) { min = temp ; } } System . out . println ( min ) ; } }


import java . util . * ; import java . lang . * ; import java . io . * ;   public class Codechef { public static void main ( String [ ] args ) throws java . lang . Exception { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; while ( t != 0 ) { int n = sc . nextInt ( ) ; long s1 = 0 , s2 = 0 ; long arr [ ] = new long [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = sc . nextInt ( ) ; if ( i % 2 == 0 ) s1 += arr [ i ] ; else s2 += arr [ i ] ; } if ( s1 < s2 ) { for ( int i = 0 ; i < n ; i ++ ) { if ( i % 2 == 0 ) arr [ i ] = 1 ; System . out . print ( arr [ i ] ) ; System . out . print ( " ▁ " ) ; } } else { for ( int i = 0 ; i < n ; i ++ ) { if ( i % 2 == 1 ) arr [ i ] = 1 ; System . out . print ( arr [ i ] ) ; System . out . print ( " ▁ " ) ; } } System . out . println ( ) ; t = t - 1 ; } } }

import bisectimport NEW_LINE sysinput = sys . stdin . readline   t = int ( input ( ) ) NEW_LINE pow2 = [ 1 ] NEW_LINE for _ in range ( 32 ) : pow2 . append ( 2 * pow2 [ - 1 ] ) NEW_LINE for _ in range ( t ) : n = int ( input ( ) ) NEW_LINE a = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE b = [ ] NEW_LINE for i in a : j = bisect . bisect_left ( pow2 , i + 0.5 ) - 1 NEW_LINE if i - pow2 [ j ] <= pow2 [ j + 1 ] - i or j >= 29 : NEW_LINE INDENT b . append ( pow2 [ j ] ) else : NEW_LINE b . append ( pow2 [ j + 1 ] ) NEW_LINE DEDENT print ( * b ) NEW_LINE


import math   for _ in range ( int ( input ( ) ) ) : n = int ( input ( ) ) NEW_LINE a = [ int ( x ) for x in input ( ) . split ( ) ] NEW_LINE print ( ' ▁ ' . join ( [ str ( 1 << int ( math . log2 ( x ) ) ) for x in a ] ) ) NEW_LINE


for _ in range ( int ( input ( ) ) ) : n = int ( input ( ) ) NEW_LINE l = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE sum_e = sum_o = 0 NEW_LINE for i in range ( n ) : if NEW_LINE i % 2 == 0 : sum_e += l [ i ] else : sum_o += l [ i ] NEW_LINE if sum_e < sum_o : NEW_LINE INDENT t = 1 else : NEW_LINE t = 0 NEW_LINE DEDENT ans = [ ] NEW_LINE for i in range ( n ) : if NEW_LINE i % 2 == t : ans . append ( l [ i ] ) else : ans . append ( 1 )   print ( * ans ) NEW_LINE


def read ( ) : return list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE   for _ in range ( int ( input ( ) ) ) : n = int ( input ( ) ) NEW_LINE a = read ( ) NEW_LINE res = [ ] NEW_LINE t = 1 NEW_LINE for i in a : while NEW_LINE t <= i / 2 : t <<= 1 NEW_LINE while t >= i * 1.5 : t >>= 1 NEW_LINE res . append ( t ) NEW_LINE print ( * res ) NEW_LINE


import sys , mathfrom NEW_LINE collections NEW_LINE import defaultdict , dequeinput = sys . stdin . readline   NEW_LINE def check ( arr ) : cur = 0 NEW_LINE for i in range ( n ) : cur += ( l [ i ] - arr [ i ] ) NEW_LINE return ( 2 * cur ) <= s   t = int ( input ( ) ) NEW_LINE while ( t > 0 ) : n = int ( input ( ) ) NEW_LINE l = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE s = sum ( l ) NEW_LINE b1 = [ 1 for _ in range ( n ) ] NEW_LINE b2 = [ 1 for _ in range ( n ) ] NEW_LINE for i in range ( 0 , n , 2 ) : b1 [ i ] = l [ i ] NEW_LINE for i in range ( 1 , n , 2 ) : b2 [ i ] = l [ i ] NEW_LINE if ( check ( b1 ) ) : NEW_LINE INDENT print ( * b1 ) else : NEW_LINE print ( * b2 ) NEW_LINE DEDENT t -= 1 NEW_LINE


import java . io . BufferedReader ; import java . io . File ; import java . io . FileWriter ; import java . io . IOException ; import java . io . InputStreamReader ; import java . math . BigInteger ; import java . util . * ;   import javafx . util . Pair ;   public class Main {   public static void main ( String args [ ] ) { FastScanner input = new FastScanner ( ) ; int tc = input . nextInt ( ) ; while ( tc -- > 0 ) { int n = input . nextInt ( ) ; long sum = 0 ; int a [ ] = new int [ n ] ; int max = 0 ; int maxIndex = - 1 ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = input . nextInt ( ) ; sum += a [ i ] ; if ( max <= a [ i ] ) { max = a [ i ] ; maxIndex = i ; } } long total1 = 0 , total2 = 0 ;


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . StringTokenizer ;   public class Zad1463B {   public static void main ( String [ ] args ) {


import java . io . * ; import java . lang . * ; import java . util . * ; import java . io . * ; import java . util . * ; public class Main { static Scanner scanner = new Scanner ( System . in ) ; public static void main ( String [ ] args ) { int t = scanner . nextInt ( ) ; while ( t -- > 0 ) { StringBuilder sb = new StringBuilder ( ) ; int n = scanner . nextInt ( ) ; int a [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = scanner . nextInt ( ) ; int b [ ] = new int [ n ] , c [ ] = new int [ n ] ; long compare = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( i % 2 == 0 ) { compare += a [ i ] - 1 ; b [ i ] = 1 ; } else { b [ i ] = a [ i ] ; } } for ( int i = 0 ; i < n ; i ++ ) { if ( i % 2 == 1 ) { compare -= a [ i ] - 1 ; c [ i ] = 1 ; } else { c [ i ] = a [ i ] ; } } if ( compare < 0 ) { for ( int i = 0 ; i < n ; i ++ ) sb . append ( b [ i ] + " ▁ " ) ; } else { for ( int i = 0 ; i < n ; i ++ ) sb . append ( c [ i ] + " ▁ " ) ; } System . out . println ( sb ) ; } } }


import java . io . OutputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . PrintWriter ; import java . util . InputMismatchException ; import java . io . IOException ; 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 ) ; BSameParitySummands solver = new BSameParitySummands ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; }   static class BSameParitySummands { public void solve ( int testNumber , InputReader in , PrintWriter out ) { int t = in . nextInt ( ) ; while ( t -- > 0 ) { long n = in . nextLong ( ) ; int k = in . nextInt ( ) ;

for _ in range ( int ( input ( ) ) ) : n , k = map ( int , input ( ) . split ( ) ) if n < k : print ( " NO " ) continue if ( n // k + n % k ) % 2 == ( n // k ) % 2 : print ( " YES " ) print ( * ( [ n // k + n % k ] + [ n // k ] * ( k - 1 ) ) ) elif ( n // k > 1 ) & ( ( k - 1 ) % 2 == 0 ) : print ( " YES " ) print ( * ( [ n // k + n % k ] + [ n // k - 1 , n // k + 1 ] * ( ( k - 1 ) // 2 ) ) ) else : print ( " NO " ) NEW_LINE


def answer ( n , k ) : if k > n : print ( ' NO ' ) return if k == n : print ( ' YES ' ) lst = [ '1' for i in range ( k ) ] print ( ' ▁ ' . join ( lst ) ) return NEW_LINE


def p ( k , n ) : r = n // k print ( ' YES ' ) for _ in range ( k - 1 ) : print ( r , end = ' ▁ ' ) print ( r + ( n % k ) ) def raf ( ) : n , k = map ( int , input ( ) . split ( ) ) if n < k : print ( ' NO ' ) ; return if n % k == 0 : print ( ' YES ' ) for _ in range ( k ) : print ( n // k , end = ' ▁ ' ) print ( ) return if k % 2 == 1 : if n % 2 == 0 : if ( n // k ) % 2 == 0 : p ( k , n ) else : if n // k == 1 : print ( ' NO ' ) else : print ( ' YES ' ) r = ( n // k ) - 1 a = ( n // k ) + ( n % k ) + ( k - 1 ) for _ in range ( k - 1 ) : print ( r , end = " ▁ " ) print ( a ) else : if ( n // k ) % 2 == 0 : if n // k == 1 : print ( ' NO ' ) else : print ( ' YES ' ) r = ( n // k ) - 1 a = ( n // k ) + ( n % k ) + ( k - 1 ) for _ in range ( k - 1 ) : print ( r , end = " ▁ " ) print ( a ) else : p ( k , n ) else : if n % 2 == 0 : p ( k , n ) else : print ( ' NO ' ) def main ( ) : for _ in range ( int ( input ( ) ) ) : raf ( ) if __name__ == ' _ _ main _ _ ' : main ( ) NEW_LINE


for _ in range ( int ( input ( ) ) ) : n , k = map ( int , input ( ) . split ( ) ) a = [ 1 ] * ( k - 1 ) + [ ( n - k + 1 ) ] if a [ - 1 ] % 2 == 1 and a [ - 1 ] > 0 : print ( " YES " ) print ( * a ) continue a = [ 2 ] * ( k - 1 ) + [ n - 2 * ( k - 1 ) ] if a [ - 1 ] % 2 == 0 and a [ - 1 ] > 0 : print ( " YES " ) print ( * a ) continue print ( " NO " ) NEW_LINE


t = int ( input ( ) ) for i in range ( t ) : n , k = map ( int , input ( ) . split ( ) ) if k > n : print ( " NO " ) elif ( ( n - k + 1 ) % 2 != 0 ) : print ( " YES " ) for i in range ( 1 , k ) : print ( 1 , end = ' ▁ ' ) print ( n - k + 1 ) elif ( ( n - 2 * ( k - 1 ) ) % 2 == 0 and ( n - 2 * ( k - 1 ) ) > 0 ) : print ( " YES " ) for i in range ( 1 , k ) : print ( 2 , end = ' ▁ ' ) print ( n - 2 * ( k - 1 ) ) else : print ( " NO " ) NEW_LINE


import java . util . HashMap ; import java . util . Map ; import java . util . Scanner ;   public class Learn { public static void main ( String [ ] args ) { Scanner cin = new Scanner ( System . in ) ; int t = cin . nextInt ( ) ; while ( t -- > 0 ) { int n , k ; n = cin . nextInt ( ) ; k = cin . nextInt ( ) ; if ( n % 2 == 0 && n >= 2 * k ) { int ans = n / 2 ; if ( ans >= k ) { System . out . println ( " YES " ) ; for ( int i = 1 ; i < k ; i ++ ) { System . out . print ( 2 + " ▁ " ) ; } System . out . println ( n - k * 2 + 2 ) ; continue ; } } if ( n >= k && k % 2 == n % 2 ) { System . out . println ( " YES " ) ; for ( int i = 1 ; i < k ; i ++ ) { System . out . print ( 1 + " ▁ " ) ; } System . out . println ( n - k + 1 ) ; continue ; } System . out . println ( " NO " ) ; } } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . ArrayList ; import java . util . StringTokenizer ;   public class Main {   public static void main ( String [ ] args ) throws IOException { Solution solution = new Solution ( ) ; solution . solve ( ) ; } }   class Solution { Solution ( ) { }   void solve ( ) throws IOException { int t = Reader . nextInt ( ) ; int count = 0 ; while ( count < t ) { int n = Reader . nextInt ( ) ; int k = Reader . nextInt ( ) ; boolean flag = false ; ArrayList < Integer > arrayList = new ArrayList < > ( ) ; if ( n >= k ) { if ( ( n - ( k - 1 ) ) % 2 == 1 ) { flag = true ; arrayList . add ( n - ( k - 1 ) ) ; for ( int i = 0 ; i < k - 1 ; i ++ ) { arrayList . add ( 1 ) ; } } } if ( n >= k * 2 ) { if ( ( n - 2 * ( k - 1 ) ) % 2 == 0 ) { flag = true ; arrayList . add ( n - 2 * ( k - 1 ) ) ; for ( int i = 0 ; i < k - 1 ; i ++ ) { arrayList . add ( 2 ) ; } } }   if ( flag ) { System . out . println ( " YES " ) ; for ( int i = 0 ; i < k ; i ++ ) { System . out . print ( arrayList . get ( i ) + " ▁ " ) ; } System . out . println ( ) ; } else { System . out . println ( " NO " ) ; } count ++ ; } } }   class Reader { static BufferedReader reader = new BufferedReader ( new InputStreamReader ( System . in ) ) ; static StringTokenizer tokenizer = new StringTokenizer ( " " ) ; static String nextLine ( ) throws IOException {


import java . util . Scanner ;   public class Balloons {   public static void main ( String args [ ] ) { Scanner scan = new Scanner ( System . in ) ; int n = scan . nextInt ( ) ; int [ ] a = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = scan . nextInt ( ) ; } if ( n == 1 ) { System . out . println ( - 1 ) ; } else if ( n == 2 && a [ 0 ] == a [ 1 ] ) { System . out . println ( - 1 ) ; } else { int mn = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ mn ] > a [ i ] ) { mn = i ; } } System . out . println ( "1" ) ; System . out . println ( mn + 1 ) ; } } }

n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) total = sum ( a ) if n == 1 : print ( - 1 ) else : ans = - 1 for i in range ( n ) : if a [ i ] != total - a [ i ] : ans = i break if ans == - 1 : print ( - 1 ) else : print ( 1 ) print ( ans + 1 ) NEW_LINE


import sysn = int ( input ( ) ) arr = list ( map ( int , sys . stdin . readline ( ) . rstrip ( ) . split ( " ▁ " ) ) ) l = len ( arr ) g = 0 a = 0 if n == 1 : print ( " - 1" ) elif n == 2 : for i in range ( l - 1 ) : if int ( arr [ i ] ) != int ( arr [ i + 1 ] ) : print ( "1" ) print ( "1" ) else : print ( " - 1" ) else : for i in range ( l - 1 ) : if int ( arr [ i ] <= arr [ i + 1 ] ) : print ( "1" ) print ( "1" ) break else : print ( "1" ) j = arr . index ( arr [ i + 1 ] ) print ( j + 1 ) break   NEW_LINE


import sysn = int ( sys . stdin . readline ( ) . strip ( ) ) arr = list ( map ( int , sys . stdin . readline ( ) . rstrip ( ) . split ( " ▁ " ) ) ) a1 = [ ] a2 = [ ] s1 = s2 = 0 val = min ( arr ) index = arr . index ( val ) a1 . append ( index )   for i in range ( 0 , len ( arr ) ) : a2 . append ( i )   for j in a1 : s1 = s1 + arr [ int ( j ) ] for k in a2 : s2 = s2 + arr [ int ( k ) ] s2 = s2 - val   NEW_LINE


n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) g = d = 0 lst = [ ] for i in range ( n ) : if i % 2 == 0 : g += a [ i ] lst . append ( a [ i ] ) else : d += a [ i ] if d > 0 and g > 0 and g != d : print ( 1 ) print ( 2 ) elif g == d and n > 2 : print ( 1 ) print ( 1 ) else : print ( - 1 ) NEW_LINE


import java . util . * ; import java . math . * ; import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . StringTokenizer ;   public class a { static int [ ] count , count1 , count2 ; static Node [ ] nodes ; static int [ ] arr ; static char [ ] ch , ch1 ; static int [ ] darr , farr ; static Character [ ] [ ] mat , mat1 ; static long x , h ; static long maxl ; static double dec ; static String s ; static long minl ; static int mx = ( int ) 1e9 + 5 ; static long mod = 998244353l ;


import java . util . * ; import java . io . * ; public class A { public static void main ( String args [ ] ) { FastScanner in = new FastScanner ( ) ; int n = in . nextInt ( ) ; int a [ ] = in . nextArray ( n ) ; int sum1 = 0 , sum2 = 0 ; int min = Integer . MAX_VALUE , ind = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] < min ) { min = a [ i ] ; ind = i ; } sum1 = sum1 + a [ i ] ; } sum1 = sum1 - a [ ind ] ; sum2 = a [ ind ] ; if ( sum1 != sum2 && sum1 != 0 && sum2 != 0 ) { System . out . println ( 1 ) ; System . out . println ( ind + 1 ) ; } else System . out . println ( - 1 ) ; }


import java . util . Scanner ;   public class Balloons { public static void main ( String [ ] args ) {   Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) , i , a [ ] = new int [ n ] , s = 0 ;   for ( i = 0 ; i < n ; i ++ ) { a [ i ] = in . nextInt ( ) ; s += a [ i ] ; } in . close ( ) ;   for ( i = 0 ; i < n ; i ++ ) { if ( a [ i ] != s - a [ i ] && s != a [ i ] ) {   System . out . println ( 1 + " \n " + ( i + 1 ) ) ; return ; } } System . out . println ( - 1 ) ; } }


import java . util . * ; public class MyClass { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int k = sc . nextInt ( ) ; int [ ] arr = new int [ n ] ; HashSet < Integer > h = new HashSet < Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = sc . nextInt ( ) ; h . add ( arr [ i ] ) ; } int p = 0 ; int [ ] a1 = new int [ n ] ; if ( h . size ( ) >= k ) { System . out . println ( " YES " ) ; HashMap < Integer , Integer > hm = new HashMap < Integer , Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( ! hm . containsKey ( arr [ i ] ) ) { hm . put ( arr [ i ] , 1 ) ; a1 [ p ] = i + 1 ; p ++ ; } } for ( int i = 0 ; i < k ; i ++ ) System . out . print ( a1 [ i ] + " ▁ " ) ; } else System . out . println ( " NO " ) ; } }

R = lambda : map ( int , input ( ) . split ( ) ) n , k = R ( ) d = dict ( zip ( R ( ) , range ( 1 , n + 1 ) ) ) if len ( d ) < k : print ( ' NO ' ) else : print ( ' YES ' ) ; print ( * list ( d . values ( ) ) [ : k ] ) NEW_LINE


n , k = list ( map ( int , input ( ) . split ( ) ) ) arreglo = list ( map ( int , input ( ) . split ( ) ) )   set1 = set ( arreglo )   if len ( set1 ) >= k : print ( " YES " ) for i in range ( k ) : print ( arreglo . index ( set1 . pop ( ) ) + 1 , end = " ▁ " ) else : print ( " NO " ) NEW_LINE


n , k = map ( int , input ( ) . split ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) s = list ( set ( a ) ) if len ( s ) >= k : print ( " YES " ) for r in range ( k ) : print ( a . index ( s [ r ] ) + 1 , end = ' ▁ ' ) else : print ( " NO " ) NEW_LINE


n , k = map ( int , input ( ) . split ( ) ) l = list ( map ( int , input ( ) . split ( ) ) ) d = { } for i in l : if ( i in d ) : d [ i ] += 1 else : d [ i ] = 1 if ( len ( d ) < k ) : print ( ' NO ' ) else : print ( ' YES ' ) d1 = { } c = 0 for i in range ( n ) : if ( c < k and l [ i ] not in d1 ) : c += 1 print ( i + 1 , end = ' ▁ ' ) d1 [ l [ i ] ] = 1   NEW_LINE


import java . util . ArrayList ; import java . util . HashSet ; import java . util . Scanner ; import java . util . Set ;   public class DiverseTeam { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int k = sc . nextInt ( ) ; int [ ] arr = new int [ n ] ; ArrayList < Integer > a = new ArrayList < > ( ) ; int count = 0 ; Set < Integer > set = new HashSet < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = sc . nextInt ( ) ; if ( ! set . contains ( arr [ i ] ) ) { set . add ( arr [ i ] ) ; a . add ( i ) ; } } int [ ] arr1 = a . stream ( ) . mapToInt ( i -> i ) . toArray ( ) ; if ( set . size ( ) >= k ) { System . out . println ( " YES " ) ; for ( int i = 0 ; i < k ; i ++ ) { System . out . print ( arr1 [ i ] + 1 + " ▁ " ) ; } } else { System . out . println ( " NO " ) ; } } }


import java . io . BufferedReader ; import java . io . FileNotFoundException ; import java . io . FileReader ; import java . io . IOException ; import java . io . InputStream ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . * ;   public class Seg { public static void main ( String [ ] args ) throws Exception { Scanner sc = new Scanner ( System . in ) ; PrintWriter pw = new PrintWriter ( System . out ) ; int n = sc . nextInt ( ) ; int k = sc . nextInt ( ) ; int [ ] a = sc . nextArr ( n ) ; boolean isHere [ ] = new boolean [ 101 ] ; int c = 0 ; int [ ] temp = new int [ n + 1 ] ; int j = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ! isHere [ a [ i ] ] ) { c ++ ; isHere [ a [ i ] ] = true ; temp [ j ] = i + 1 ; j ++ ; if ( c >= k ) { break ; }   } }   if ( c >= k ) { System . out . println ( " YES " ) ; for ( int i = 0 ; i < j ; i ++ ) { System . out . print ( temp [ i ] + " ▁ " ) ; } } else { System . out . println ( " NO " ) ; }   pw . flush ( ) ; pw . close ( ) ; }   public static int findMaxSumSubarray ( int [ ] arr , int k ) { int maxValue = Integer . MIN_VALUE ; int currentRunningSum = 0 ; for ( int i = 0 ; i < arr . length ; i ++ ) { currentRunningSum += arr [ i ] ; if ( i >= k - 1 ) { maxValue = Math . max ( maxValue , currentRunningSum ) ; currentRunningSum -= arr [ i - ( k - 1 ) ] ;


import java . util . ArrayList ; import java . util . Scanner ;    public class DiverseTeam {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; ArrayList < Integer > p1 = new ArrayList < > ( ) ; ArrayList < Integer > p2 = new ArrayList < > ( ) ; int a [ ] = new int [ n + 1 ] ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = sc . nextInt ( ) ; if ( ! p1 . contains ( a [ i ] ) ) { p1 . add ( a [ i ] ) ; p2 . add ( i + 1 ) ; } } if ( p2 . size ( ) >= m ) { System . out . println ( " YES " ) ; for ( int i = 0 ; i < m ; i ++ ) { System . out . print ( p2 . get ( i ) + " ▁ " ) ; } } else { System . out . println ( " NO " ) ; } } }


import java . util . * ;   public class Absolutezero {    public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int k = sc . nextInt ( ) ; int sum = 0 ; List < Integer > list = new ArrayList < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { int n1 = sc . nextInt ( ) ; list . add ( n1 ) ; sum += n1 ; } int u1 = ( int ) Math . round ( ( double ) sum / n ) ;

a = [ int ( x ) for x in input ( ) . split ( ) ] b = [ int ( y ) for y in input ( ) . split ( ) ] sum1 = 0 for z in b : sum1 = sum1 + zavg = sum1 / a [ 0 ] if ( avg >= ( a [ 1 ] - 0.5 ) ) : print ( 0 ) else : print ( ( ( 2 * a [ 1 ] - 1 ) * a [ 0 ] ) - ( 2 * sum1 ) ) NEW_LINE


n , k = map ( int , input ( ) . split ( ) ) a = list ( map ( int , input ( ) . split ( ) ) )     i = 0 avg = round ( sum ( a ) / n , 10 )   while avg < k - 0.5 : i += 1 avg = round ( ( sum ( a ) + i * k ) / ( n + i ) , 10 )           print ( i )   NEW_LINE


n , k = list ( map ( int , input ( ) . split ( ) ) ) a = list ( map ( int , input ( ) . split ( ) ) ) temp = max ( a ) ans = 0 while sum ( a ) / len ( a ) < ( k - 0.5 ) : NEW_LINE


import sys   n , k = map ( int , input ( ) . split ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) c = 0 sum_ = sum ( a ) len_ = len ( a ) while sum_ / len_ < k - 0.5 : sum_ += k len_ += 1 c += 1 print ( c ) NEW_LINE


def grade ( ar ) : z = sum ( ar ) / len ( ar ) f = int ( z ) s = z - f if ( s >= 0.5 ) : return f + 1 else : return f   x , y = map ( int , input ( ' ' ) . split ( ) ) ar = list ( map ( int , input ( ' ' ) . split ( ) ) ) q = grade ( ar ) ct = 0 while ( q < y ) : ct = ct + 1 ar . append ( y ) q = grade ( ar )   print ( ct )   NEW_LINE


import java . util . * ;   public class Main {   public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int n = input . nextInt ( ) ; int k = input . nextInt ( ) ; int a [ ] = new int [ n ] ; long sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = input . nextInt ( ) ; sum += a [ i ] ; } for ( int i = 0 ; ; i ++ ) { long rd = Math . round ( ( i * k + sum * 1.0 ) / ( i + n * 1.0 ) ) ; if ( rd == k ) { System . out . println ( i ) ; return ; } } }       }


import java . io . * ; import java . util . * ; public class Main { public static void main ( String args [ ] ) { FastReader input = new FastReader ( ) ; PrintWriter out = new PrintWriter ( System . out ) ; int T = 1 ; while ( T -- > 0 ) { int n = input . nextInt ( ) ; int m = input . nextInt ( ) ; long sum = 0 ; for ( int i = 0 ; i < m ; i ++ ) { for ( int j = 0 ; j < m ; j ++ ) { if ( ( i * i + j * j ) % m == 0 ) { int r = n % m ; int dif = r - i ; if ( dif < 0 ) { dif += m ; } int v = n - dif ; int x = i ; if ( x == 0 ) { x += m ; } int s1 = ( v - x ) / m + 1 ; dif = r - j ; if ( dif < 0 ) { dif += m ; } v = n - dif ; x = j ; if ( x == 0 ) { x += m ; } int s2 = ( v - x ) / m + 1 ; sum += ( long ) s1 * ( long ) s2 ; } } } out . println ( sum ) ; } 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 ; } } }

import sysfrom math import sqrt   input = lambda : sys . stdin . readline ( ) . rstrip ( " \n " )   mod = 1000000007   n , m = map ( int , input ( ) . split ( ) ) t = n // mck = n % mans = 0 for i in range ( m ) : for j in range ( m ) : if ( i ** 2 + j ** 2 ) % m == 0 : a = b = t if i <= ck and i : a += 1 if j <= ck and j : b += 1 ans += a * bprint ( ans ) NEW_LINE


import sys , os , iodef rs ( ) : return sys . stdin . readline ( ) . rstrip ( ) def ri ( ) : return int ( sys . stdin . readline ( ) ) def ria ( ) : return list ( map ( int , sys . stdin . readline ( ) . split ( ) ) ) def ws ( s ) : sys . stdout . write ( s + ' \n ' ) def wi ( n ) : sys . stdout . write ( str ( n ) + ' \n ' ) def wia ( a ) : sys . stdout . write ( ' ▁ ' . join ( [ str ( x ) for x in a ] ) + ' \n ' ) import math , datetime , functools , itertools , operator , bisect , fractions , statisticsfrom collections import deque , defaultdict , OrderedDict , Counterfrom fractions import Fractionfrom decimal import Decimalfrom sys import stdoutfrom heapq import heappush , heappop , heapify , _heapify_max , _heappop_max , nsmallest , nlargest       def main ( ) : NEW_LINE


n , m = map ( int , input ( ) . split ( ) ) mat = [ [ 0 for i in range ( m ) ] for j in range ( m ) ] for i in range ( m ) : for j in range ( m ) : mat [ i ] [ j ] = ( ( i + 1 ) ** 2 ) + ( ( j + 1 ) ** 2 ) mat [ i ] [ j ] %= mzeros = [ [ 0 for i in range ( m ) ] for j in range ( m ) ] for j in range ( m ) : if ( mat [ 0 ] [ j ] == 0 ) : zeros [ 0 ] [ j ] = 1 for i in range ( 1 , m ) : zeros [ i ] [ j ] = zeros [ i - 1 ] [ j ] if ( mat [ i ] [ j ] == 0 ) : zeros [ i ] [ j ] += 1 downExtend = [ 0 for i in range ( m ) ] for i in range ( m ) : downExtend [ i ] = zeros [ m - 1 ] [ i ] * ( n // m ) if ( n % m != 0 ) : downExtend [ i ] += zeros [ n % m - 1 ] [ i ] SUM = sum ( downExtend ) ans = SUM * ( n // m ) + sum ( downExtend [ : n % m ] ) print ( ans ) NEW_LINE


n , m = map ( int , input ( ) . split ( ) ) ans = 0 for i in range ( 1 , m + 1 ) : for j in range ( 1 , m + 1 ) : if ( i ** 2 + j ** 2 ) % m == 0 : ans += ( ( n - i ) // m + 1 ) * ( ( n - j ) // m + 1 ) print ( ans ) NEW_LINE


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


import java . io . IOException ; import java . io . InputStreamReader ; import java . io . BufferedReader ; import java . util . * ; import java . math . * ; import java . io . * ;   public class hacker {


import java . util . * ; public class Main { public static void main ( String [ ] args ) throws java . lang . Exception { Scanner input = new Scanner ( System . in ) ; double a = input . nextDouble ( ) ; double d = input . nextDouble ( ) ; long n = input . nextLong ( ) ; double s = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { s = Math . abs ( ( i * d ) - ( ( long ) ( ( i * d ) / ( 4 * a ) ) ) * ( 4 * a ) ) ;

from math import ceila , d = map ( float , input ( ) . split ( ) ) n = int ( input ( ) ) s = a * 4 for i in range ( 1 , n + 1 ) : yy = ( d * i ) // s yy = ( d * i ) - ( yy * s ) NEW_LINE


a , d = map ( float , input ( ) . split ( ) ) n = int ( input ( ) ) s = 0 for i in range ( 1 , n + 1 ) : s += d s %= 4 * a t = s // a if t % 4 == 0 : print ( s % a , 0 ) elif t % 4 == 1 : print ( a , s % a ) elif t % 4 == 2 : print ( a - s % a , a ) elif t % 4 == 3 : print ( 0 , a - s % a ) NEW_LINE


a , m = map ( float , input ( ) . split ( ) ) n = int ( input ( ) ) x = 4 * a ; l = [ ] l . append ( m % x ) for i in range ( 1 , n ) : l . append ( ( l [ - 1 ] + m ) % x ) NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . StringTokenizer ;   public class Marathon { public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( br . readLine ( ) ) ; PrintWriter pw = new PrintWriter ( System . out ) ; double a = Double . parseDouble ( st . nextToken ( ) ) ; double d = Double . parseDouble ( st . nextToken ( ) ) % ( a * 4.0 ) ; int n = Integer . parseInt ( br . readLine ( ) ) ; int curEdge = 1 ; double x = 0.0 , y = 0.0 , dRemaining ; for ( int i = 0 ; i < n ; i ++ ) { dRemaining = d ; while ( true ) { if ( curEdge == 1 ) { if ( x + dRemaining > a ) { dRemaining -= a - x ; curEdge ++ ; x = a ; } else { x += dRemaining ; break ; } } else if ( curEdge == 2 ) { if ( y + dRemaining > a ) { dRemaining -= a - y ; curEdge ++ ; y = a ; } else { y += dRemaining ; break ; } } else if ( curEdge == 3 ) { if ( x < dRemaining ) { dRemaining -= x ; curEdge ++ ; x = 0.0 ; } else { x -= dRemaining ; break ; } } else { if ( y < dRemaining ) { dRemaining -= y ; curEdge = 1 ; y = 0.0 ; } else { y -= dRemaining ; break ; } } } pw . println ( x + " ▁ " + y ) ; } pw . flush ( ) ; pw . close ( ) ; } }


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

actual = input ( ) memorized1 = input ( ) memorized2 = input ( )   index1 = actual . find ( memorized1 ) index2 = actual . find ( memorized2 , index1 + len ( memorized1 ) ) index3 = actual [ : : - 1 ] . find ( memorized1 ) index4 = actual [ : : - 1 ] . find ( memorized2 , index3 + len ( memorized1 ) )   NEW_LINE


def check ( flags , first , second ) : if first not in flags or second not in flags : return False f_f_ind , l_s_ind = flags . index ( first ) , flags . rindex ( second ) return f_f_ind + len ( first ) - 1 < l_s_ind     flags , first , second = input ( ) , input ( ) , input ( ) f = check ( flags , first , second ) flags = flags [ : : - 1 ] b = check ( flags , first , second ) if f and b : print ( ' both ' ) elif f : print ( ' forward ' ) elif b : print ( ' backward ' ) else : print ( ' fantasy ' )   ''' ▁ ▁ ▁ ▁ ▁ ▁ 0123456flags ▁ = ▁ ' aaacaaa ' first ▁ = ▁ ' aca ' second ▁ = ▁ ' aa '   ''' NEW_LINE


def check ( flags : str , first : str , second : str ) -> bool : if first not in flags or second not in flags : return False f_f_ind = flags . index ( first ) l_s_ind = flags . rindex ( second ) return f_f_ind + len ( first ) - 1 < l_s_ind     flags , first , second = input ( ) , input ( ) , input ( ) f = check ( flags , first , second ) flags = flags [ : : - 1 ] b = check ( flags , first , second )   if f and b : print ( ' both ' ) elif f : print ( ' forward ' ) elif b : print ( ' backward ' ) else : print ( ' fantasy ' ) NEW_LINE


def check ( flags : str , first : str , second : str ) -> bool : if first not in flags or second not in flags : return False f_f_index = flags . index ( first ) s_l_index = flags . rindex ( second ) return f_f_index + len ( first ) - 1 < s_l_index     flags , first , second = input ( ) , input ( ) , input ( ) f = check ( flags , first , second ) flags = flags [ : : - 1 ] b = check ( flags , first , second ) if f and b : print ( ' both ' ) elif f : print ( ' forward ' ) elif b : print ( ' backward ' ) else : print ( ' fantasy ' )   ''' ▁ ▁ ▁ ▁ ▁ ▁ ▁ 0123456flags = " aaacaaa " first = " aca " second = " aa " ''' NEW_LINE


def main ( ) : s , a , b = input ( ) , input ( ) , input ( ) sh = pi = False la , ls , lb = len ( a ) , len ( s ) , len ( b ) fi = s . find ( a ) if fi != - 1 : if ls - ( fi + la ) >= lb and s . find ( b , fi + la ) != - 1 : sh = True s = ' ' . join ( reversed ( s ) ) fi = s . find ( a ) if fi != - 1 : if ls - ( fi + la ) >= lb and s . find ( b , fi + la ) != - 1 : pi = True if sh != True and pi != True : print ( ' fantasy ' ) elif sh == True and pi == True : print ( ' both ' ) elif sh == True : print ( ' forward ' ) elif pi == True : print ( ' backward ' ) if __name__ == ' _ _ main _ _ ' : main ( ) NEW_LINE


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


import java . io . * ;   public class Main { static String str , str1 , str2 ; static BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; static BufferedWriter bw = new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ;   public static void main ( String [ ] args ) throws IOException {


import java . util . Scanner ;   public class T8A {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; String flags = in . nextLine ( ) ; String first = in . nextLine ( ) ; String second = in . nextLine ( ) ;   boolean isForward = checkOccurrenceTwoSubstring ( flags , first , second ) ; boolean isBack = checkOccurrenceTwoSubstring ( new StringBuilder ( flags ) . reverse ( ) . toString ( ) , first , second ) ;   if ( isForward && isBack ) { System . out . println ( " both " ) ; } else if ( isForward ) { System . out . println ( " forward " ) ; } else if ( isBack ) { System . out . println ( " backward " ) ; } else { System . out . println ( " fantasy " ) ; }   }   public static boolean checkOccurrenceTwoSubstring ( String str , String first , String second ) { boolean check = true ; int firstIndex = str . indexOf ( first ) ; if ( firstIndex >= 0 ) { int secondIndex = str . substring ( firstIndex + first . length ( ) ) . indexOf ( second ) ; if ( secondIndex < 0 ) { check = false ; } } else { check = false ; }   return check ; }   }


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

n , m , k = map ( int , input ( ) . split ( ) ) cells = 0 for i in range ( 0 , k ) : cells += 2 * ( m + n - 2 - i * ( 8 ) ) print ( cells ) NEW_LINE


import java . util . * ; public class Main { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int w = sc . nextInt ( ) ; int h = sc . nextInt ( ) ; int k = sc . nextInt ( ) ; int res = 0 ; for ( int i = 0 ; i < k ; i + + ) { res = res + 2 * ( w + h - 2 ) ; w = w - 4 ; h = h - 4 ; } System . out . println ( res ) ; } } NEW_LINE


w , h , k = map ( int , input ( ) . split ( ) ) print ( 2 * ( w + h ) * k - 8 * k * k + 4 * k ) NEW_LINE


a , b , c = ( int ( x ) for x in input ( ) . split ( ) ) r = 0 for x in range ( c ) : r += ( ( ( a - x * 4 ) + ( b - x * 4 ) - 2 ) * 2 ) print ( r ) NEW_LINE


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


import java . io . * ; import java . util . Scanner ; import java . util . Arrays ; public class Solution {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int h = in . nextInt ( ) ; int w = in . nextInt ( ) ; int x = in . nextInt ( ) ; int c = 0 ; if ( x == 1 ) { c = c + ( h * 2 + w * 2 ) ; c = c - 4 ; } else if ( x > 1 ) { for ( int i = 1 ; i <= x ; i ++ ) { c = c + ( h * 2 + w * 2 ) ; c = c - 4 ; h = h - 4 ; w = w - 4 ; } } System . out . println ( c ) ; } }


import java . util . * ; public class P2 {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int w = sc . nextInt ( ) ; int h = sc . nextInt ( ) ; int k = sc . nextInt ( ) ; int r = 0 ; for ( int i = 0 ; i < k ; i ++ ) { r += 2 * ( h ) ; r += 2 * ( w - 2 ) ; w -= 4 ; h -= 4 ; } System . out . println ( r ) ; } }


import java . util . * ; import java . lang . * ; import java . io . * ; import java . math . * ;    public class file {

n = int ( input ( ) ) a = int ( input ( ) ) b = int ( input ( ) )   for x in range ( n + 1 ) : if ( n - ( x * a ) ) % b == 0 and ( n - ( x * a ) ) // b >= 0 : print ( " YES " ) print ( x , ( n - ( x * a ) ) // b ) exit ( ) print ( " NO " )   NEW_LINE


n = int ( input ( ) )   a = int ( input ( ) )   b = int ( input ( ) )   if n % 2 != 0 and a % 2 == 0 and b % 2 == 0 : print ( ' NO ' ) elif a == n or n % a == 0 : print ( ' YES ' ) print ( n // a , 0 , end = " ▁ " ) elif b == n or n % b == 0 : print ( ' YES ' ) print ( 0 , n // b , end = " ▁ " ) elif a == b : if n % a != 0 : print ( ' NO ' ) else : m = min ( n // a , n // b ) f = 0 for i in range ( 1 , m + 1 ) : if ( n - a * i ) % b == 0 : f = 1 print ( ' YES ' ) print ( i , ( n - a * i ) // b , end = ' ▁ ' ) break elif ( n - b * i ) % a == 0 : f = 1 print ( ' YES ' ) print ( ( n - b * i ) // a , i , end = ' ▁ ' ) break if f == 0 : print ( ' NO ' ) NEW_LINE


n = int ( input ( ) ) a = int ( input ( ) ) b = int ( input ( ) ) import mathdef extgcd ( a , b ) : NEW_LINE


import sys , os , iofrom sys import stdinfrom math import log , gcd , ceilfrom collections import defaultdict , deque , Counterfrom heapq import heappush , heappopfrom bisect import bisect_left , bisect_rightimport math       alphabets = list ( ' abcdefghijklmnopqrstuvwxyz ' )     def isPrime ( x ) : for i in range ( 2 , x ) : if i * i > x : break if ( x % i == 0 ) : return False return Truedef ncr ( n , r , p ) : num = den = 1 for i in range ( r ) : num = ( num * ( n - i ) ) % p den = ( den * ( i + 1 ) ) % p return ( num * pow ( den , p - 2 , p ) ) % pdef primeFactors ( n ) : l = [ ] while n % 2 == 0 : l . append ( 2 ) n = n / 2 for i in range ( 3 , int ( math . sqrt ( n ) ) + 1 , 2 ) : while n % i == 0 : l . append ( int ( i ) ) n = n / i if n > 2 : l . append ( n ) return list ( set ( l ) ) def power ( x , y , p ) : res = 1 x = x % p if ( x == 0 ) : return 0 while ( y > 0 ) : if ( ( y & 1 ) == 1 ) : res = ( res * x ) % p y = y >> 1 NEW_LINE


import java . util . * ;   import java . io . * ;   public class pn {   public static void main ( String [ ] args ) throws IOException { BufferedReader in = new BufferedReader ( new InputStreamReader ( System . in ) ) ; PrintWriter out = new PrintWriter ( System . out ) ; int n = Integer . parseInt ( in . readLine ( ) ) ; int a = Integer . parseInt ( in . readLine ( ) ) ; int b = Integer . parseInt ( in . readLine ( ) ) ; int num = 0 ; int f = 0 ; int ans = 0 ; int i = 0 ; boolean notfound = false ; boolean less = false ; while ( ! notfound ) { if ( i < 0 ) { less = true ; break ; } num = n - i * a ; if ( num < 0 ) { notfound = true ; } if ( num % b == 0 ) { f = 2 ; ans = i ; notfound = true ; } i ++ ; } if ( less || ( num / b ) < 0 ) { System . out . println ( " NO " ) ; } else if ( f == 2 ) { System . out . println ( " YES " ) ; System . out . println ( ans + " ▁ " + num / b ) ; } else { System . out . println ( " NO " ) ; } in . close ( ) ; out . close ( ) ; }   }


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 ( ) ; long n = input . nextLong ( ) ; long a = input . nextLong ( ) ; long b = input . nextLong ( ) ; for ( long i = 0 ; i <= n ; i ++ ) { if ( ( ( n - ( a * i ) ) / b ) >= 0 && ( n - ( a * i ) ) % b == 0 && ( i * a + ( ( ( n - ( a * i ) ) / b ) ) * b ) == n ) { System . out . println ( " YES " ) ; System . out . println ( i + " ▁ " + ( ( n - ( a * i ) ) / b ) ) ; return ; } } System . out . println ( " NO " ) ; }       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 . * ; public class Practice { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) , m = sc . nextInt ( ) , p = sc . nextInt ( ) , q = sc . nextInt ( ) ; int arr1 [ ] [ ] = new int [ n ] [ 2 ] ; int arr2 [ ] [ ] = new int [ m ] [ 2 ] ;   for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < 2 ; j ++ ) { arr1 [ i ] [ j ] = sc . nextInt ( ) ; } }   for ( int i = 0 ; i < m ; i ++ ) { for ( int j = 0 ; j < 2 ; j ++ ) { arr2 [ i ] [ j ] = sc . nextInt ( ) ; } }   int ans = 0 ;   for ( int k = p ; k <= q ; k ++ ) { z : for ( int i = 0 ; i < m ; i ++ ) { int aa = arr2 [ i ] [ 0 ] + k ; int bb = arr2 [ i ] [ 1 ] + k ; for ( int j = 0 ; j < n ; j ++ ) { if ( aa >= arr1 [ j ] [ 0 ] && bb <= arr1 [ j ] [ 1 ] || aa >= arr1 [ j ] [ 0 ] && aa <= arr1 [ j ] [ 1 ] || bb >= arr1 [ j ] [ 0 ] && bb <= arr1 [ j ] [ 1 ] || aa <= arr1 [ j ] [ 0 ] && bb >= arr1 [ j ] [ 1 ] ) { ans ++ ; break z ; } } } }   System . out . println ( ans ) ;   } }

def mingrid ( ) : for _ in range ( int ( input ( ) ) ) : n = int ( input ( ) ) segcost = input ( ) . split ( ) minodd = int ( segcost [ 0 ] ) mineven = int ( segcost [ 1 ] ) sumodd = minodd sumeven = mineven codd = 1 ceven = 1 res = sumodd + minodd * ( n - codd ) + sumeven + mineven * ( n - ceven ) for i in range ( 2 , n ) : now = int ( segcost [ i ] ) if ( i + 1 ) % 2 : NEW_LINE


p , q , l , r = map ( int , input ( ) . split ( ) )   x = [ ] z = [ ] for i in range ( p ) : a , b = map ( int , input ( ) . split ( ) ) for i in range ( a , b + 1 ) : z . append ( i ) for i in range ( q ) : a , b = map ( int , input ( ) . split ( ) ) for i in range ( a , b + 1 ) : x . append ( i ) t = 0 for i in range ( l , r + 1 ) : for val in x : if val + i in z : t += 1 break     print ( t ) NEW_LINE


def s ( a , b ) : return set ( range ( a , b + 1 ) )   p , q , l , r = map ( int , input ( ) . split ( ) )   fixed = set ( ) movable = set ( )   for i in range ( p ) : a , b = map ( int , input ( ) . split ( ) ) fixed = fixed . union ( s ( a , b ) )   for i in range ( q ) : a , b = map ( int , input ( ) . split ( ) ) movable = movable . union ( s ( a , b ) )   ans = 0   for i in range ( l , r + 1 ) : movable_new = set ( [ x + i for x in movable ] ) if movable_new . intersection ( fixed ) != set ( ) : ans += 1   print ( ans ) NEW_LINE


x , z , t = set ( ) , set ( ) , 0 p , q , l , r = map ( int , input ( ) . split ( ) ) for i in range ( p ) : a , b = map ( int , input ( ) . split ( ) ) for i in range ( a , b + 1 ) : z . add ( i ) for j in range ( q ) : c , d = map ( int , input ( ) . split ( ) ) for i in range ( c , d + 1 ) : x . add ( i ) for i in range ( l , r + 1 ) : for j in x : if j + i in z : t += 1 breakprint ( t ) NEW_LINE


import java . util . ArrayList ; import java . util . Arrays ; import java . util . Collections ; import java . util . Scanner ; import java . lang . Math ; public class Account { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int p = sc . nextInt ( ) ; int q = sc . nextInt ( ) ; int l = sc . nextInt ( ) ; int r = sc . nextInt ( ) ; int [ ] a = new int [ p ] ; int [ ] b = new int [ p ] ; int [ ] c = new int [ q ] ; int [ ] d = new int [ q ] ; for ( int i = 0 ; i < p ; i ++ ) { a [ i ] = sc . nextInt ( ) ; b [ i ] = sc . nextInt ( ) ; } for ( int i = 0 ; i < q ; i ++ ) { c [ i ] = sc . nextInt ( ) ; d [ i ] = sc . nextInt ( ) ; } int count = 0 , strt , end ; boolean flag ; for ( int i = l ; i <= r ; i ++ ) { flag = false ; for ( int j = 0 ; j < q ; j ++ ) { strt = c [ j ] + i ; end = d [ j ] + i ; for ( int k = 0 ; k < p ; k ++ ) { if ( strt > b [ k ] || end < a [ k ] ) { continue ; } else { count ++ ; flag = true ; break ; } } if ( flag == true ) { break ; } } } System . out . println ( count ) ; } }


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

def insertion_sort ( l ) : for i in range ( len ( l ) ) : for j in ( range ( i ) ) : k = i - j if l [ k ] >= l [ k - 1 ] : l [ k - 1 ] , l [ k ] = l [ k ] , l [ k - 1 ] else : break return l       def selection_sort ( l ) : for i in range ( len ( l ) ) : min_ind = i min_val = l [ i ] for j in range ( i , len ( l ) ) : if min_val > l [ j ] : min_val = l [ j ] min_ind = j l [ i ] , l [ min_ind ] = l [ min_ind ] , l [ i ] return l     def bubble_sort ( l ) : for i in range ( len ( l ) - 1 ) : for j in range ( len ( l ) - 1 - i ) : if l [ j ] > l [ j + 1 ] : l [ j ] , l [ j + 1 ] = l [ j + 1 ] , l [ j ] return l     NEW_LINE


t = int ( input ( ) ) for i in range ( t ) : temp = [ int ( x ) for x in input ( ) . split ( ) ] s = temp [ 0 ] a = temp [ 1 ] b = temp [ 2 ] c = temp [ 3 ] print ( ( ( s // c ) // a ) * ( a + b ) + ( s // c ) % a ) NEW_LINE


t = int ( input ( ) ) for i in range ( 0 , t ) : s , a , b , c = map ( int , input ( ) . split ( ) ) chocolates = 0 chocolates += s // c if s // c >= a : chocolates += ( chocolates // a ) * b print ( chocolates ) NEW_LINE


import sys   def main ( ) : inp = sys . stdin . read ( ) . strip ( ) . split ( ' \n ' ) out = [ ] for s in inp [ 1 : ] : s , a , b , c = map ( int , s . split ( ) ) out . append ( s // c + s // c // a * b ) return out print ( * main ( ) , sep = ' \n ' ) NEW_LINE


import java . util . * ; public class VasyaChocolate1065A { public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ;   int T = input . nextInt ( ) ; for ( int t = 0 ; t < T ; t ++ ) { long s = input . nextLong ( ) ; long a = input . nextLong ( ) ; long b = input . nextLong ( ) ; long c = input . nextLong ( ) ;   long boughtChocolate = s / c ; long extraChoco = ( boughtChocolate / a ) * b ; System . out . println ( boughtChocolate + extraChoco ) ; }    } }


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


import java . util . * ; import java . io . * ;     public class A {   public static void main ( String [ ] args ) throws IOException { FastReader sc = new FastReader ( ) ; PrintWriter out = new PrintWriter ( System . out ) ;   int n = sc . nextInt ( ) , m = sc . nextInt ( ) ; int x = sc . nextInt ( ) , y = sc . nextInt ( ) ; int k = sc . nextInt ( ) ; int r = Math . max ( n , m ) ; long count = 0 ; while ( k -- > 0 ) { int dx = sc . nextInt ( ) , dy = sc . nextInt ( ) ; int movx = Integer . MAX_VALUE ; int movy = Integer . MAX_VALUE ; if ( dx < 0 ) movx = ( 1 - x ) / dx ;   else if ( dx > 0 ) movx = ( n - x ) / dx ;   if ( dy < 0 ) movy = ( 1 - y ) / dy ;   else if ( dy > 0 ) movy = ( m - y ) / dy ;   int min = Math . min ( movx , movy ) ; count += min ; x += dx * min ; y += dy * min ; }   out . println ( count ) ; out . close ( ) ; } }


import sys     def ints_input ( ) : return [ int ( i ) for i in sys . stdin . readline ( ) . strip ( " \n " ) . split ( " ▁ " ) ]     def print_list ( arr ) : sys . stdout . writelines ( str ( x ) + " ▁ " for x in arr ) sys . stdout . write ( " \n " )     def fast_input ( type = str ) : return type ( sys . stdin . readline ( ) . strip ( " \n " ) )   def valid ( x , y ) : return 1 <= x <= n and 1 <= y <= m n , m = ints_input ( ) x , y = ints_input ( ) k = fast_input ( int ) ans = 0 for i in range ( k ) : c = 1100000000 dx , dy = ints_input ( ) while c > 0 : while valid ( x + c * dx , y + c * dy ) : x += c * dx y += c * dy ans += c c //= 2 print ( ans ) NEW_LINE


n , m = map ( int , input ( ) . split ( ) ) x , y = map ( int , input ( ) . split ( ) ) k = int ( input ( ) ) ans = 0 for i in range ( k ) : x1 , y1 = map ( int , input ( ) . split ( ) ) NEW_LINE


n , m = map ( int , input ( ) . split ( ) ) x , y = map ( int , input ( ) . split ( ) ) s = 0 for i in range ( int ( input ( ) ) ) : dx , dy = map ( int , input ( ) . split ( ) ) a , b = n , m if dy > 0 : a = ( m - y ) // dy elif dy < 0 : a = ( y - 1 ) // ( - dy ) if dx > 0 : b = ( n - x ) // dx elif dx < 0 : b = ( x - 1 ) // ( - dx ) d = min ( a , b ) x += d * dx y += d * dy s += dprint ( s ) NEW_LINE


import java . util . * ;   public class Main { public static class Pair { public long dx ; public long dy ;   public Pair ( int dx , int dy ) { this . dx = dx ; this . dy = dy ; }   @ Override public String toString ( ) { return dx + " ▁ " + dy ; } }   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; long n = in . nextLong ( ) ; long m = in . nextLong ( ) ; long xc = in . nextLong ( ) ; long yc = in . nextLong ( ) ; long k = in . nextLong ( ) ; List < Pair > list = new ArrayList < > ( ) ; for ( int i = 0 ; i < k ; i ++ ) { int x = in . nextInt ( ) ; int y = in . nextInt ( ) ; Pair pair = new Pair ( x , y ) ; list . add ( pair ) ; } long ans = 0 ; for ( int i = 0 ; i < k ; i ++ ) { long dx = list . get ( i ) . dx ; long dy = list . get ( i ) . dy ;   long temp1 = Integer . MAX_VALUE ; long temp2 = Integer . MAX_VALUE ; long min ; if ( dx != 0 ) { if ( dx > 0 ) temp1 = ( n - xc ) / dx ; else temp1 = ( xc % dx == 0 ) ? ( xc / Math . abs ( dx ) ) - 1 : xc / Math . abs ( dx ) ; } if ( dy != 0 ) { if ( dy > 0 ) temp2 = ( m - yc ) / dy ; else temp2 = ( yc % Math . abs ( dy ) == 0 ) ? ( yc / Math . abs ( dy ) ) - 1 : yc / Math . abs ( dy ) ; } min = Math . min ( temp1 , temp2 ) ; ans += min ; xc += min * dx ; yc += min * dy ; } System . out . println ( ans ) ; in . close ( ) ;   } }


import java . util . Scanner ;   public class B152 {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int maxX = in . nextInt ( ) ; int maxY = in . nextInt ( ) ; int x = in . nextInt ( ) ; int y = in . nextInt ( ) ; int K = in . nextInt ( ) ; long answer = 0 ; for ( int k = 0 ; k < K ; k ++ ) { int dx = in . nextInt ( ) ; int dy = in . nextInt ( ) ; int xSpace = dx > 0 ? ( maxX - x ) : ( x - 1 ) ; int ySpace = dy > 0 ? ( maxY - y ) : ( y - 1 ) ; int steps = Integer . MAX_VALUE ; if ( dx != 0 ) { steps = Math . min ( steps , xSpace / Math . abs ( dx ) ) ; } if ( dy != 0 ) { steps = Math . min ( steps , ySpace / Math . abs ( dy ) ) ; } x += steps * dx ; y += steps * dy ; answer += steps ; } System . out . println ( answer ) ; }   }


import java . util . * ; import java . io . * ;   public class Main { public static void main ( String [ ] args ) throws IOException { FastScanner in = new FastScanner ( System . in ) ; PrintWriter out = new PrintWriter ( System . out ) ; new Main ( ) . run ( in , out ) ; out . close ( ) ; }   public static long mod = 17352642619633L ;   int numStudents ; int numBugs ; long budget ;   int [ ] [ ] bug ; int [ ] [ ] student ;   void run ( FastScanner in , PrintWriter out ) {   numStudents = in . nextInt ( ) ; numBugs = in . nextInt ( ) ; budget = in . nextLong ( ) ;   bug = new int [ numBugs ] [ 2 ] ; student = new int [ numStudents ] [ 3 ] ;   for ( int i = 0 ; i < numBugs ; i ++ ) { bug [ i ] [ 0 ] = in . nextInt ( ) ; bug [ i ] [ 1 ] = i ; }   for ( int i = 0 ; i < numStudents ; i ++ ) { student [ i ] [ 0 ] = in . nextInt ( ) ; student [ i ] [ 2 ] = i ; } for ( int i = 0 ; i < numStudents ; i ++ ) student [ i ] [ 1 ] = in . nextInt ( ) ;   Arrays . sort ( bug , ( a , b ) -> a [ 0 ] - b [ 0 ] ) ; Arrays . sort ( student , ( a , b ) -> a [ 0 ] - b [ 0 ] ) ;

from sys import stdinimport heapq   n , m , s = [ int ( x ) for x in stdin . readline ( ) . split ( ) ]   bugs = [ int ( x ) for x in stdin . readline ( ) . split ( ) ] bugs = sorted ( [ ( bugs [ x ] , x ) for x in range ( m ) ] )   order = [ x [ 1 ] for x in bugs ] bugs = [ x [ 0 ] for x in bugs ]   students = [ int ( x ) for x in stdin . readline ( ) . split ( ) ] rate = [ int ( x ) for x in stdin . readline ( ) . split ( ) ]   valid = Falsefor x in range ( n ) : if students [ x ] >= bugs [ - 1 ] and rate [ x ] <= s : valid = Trueif not valid : print ( ' NO ' ) else : print ( ' YES ' ) NEW_LINE


import java . util . * ; import java . io . * ; public class Main { public static void main ( String [ ] args ) throws IOException , InterruptedException { Scanner sc = new Scanner ( System . in ) ;


import java . util . * ; import java . util . PrimitiveIterator . OfDouble ; import java . util . concurrent . CountDownLatch ; import java . util . zip . ZipEntry ;   import javax . jws . Oneway ; import javax . swing . plaf . basic . BasicScrollPaneUI . HSBChangeListener ;   import java . io . * ;   public class Main { public static void main ( String [ ] args ) throws Exception { int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; int s = sc . nextInt ( ) ; HashMap < Integer , Integer > hs = new HashMap < Integer , Integer > ( ) ; pair [ ] bugs = new pair [ m ] ; for ( int i = 0 ; i < m ; i ++ ) { bugs [ i ] = new pair ( sc . nextInt ( ) , i ) ; } Arrays . sort ( bugs ) ; tuble [ ] students = new tuble [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { students [ i ] = new tuble ( 0 , 0 , i + 1 ) ; students [ i ] . x = sc . nextInt ( ) ; } for ( int i = 0 ; i < n ; i ++ ) { students [ i ] . y = sc . nextInt ( ) ; } Arrays . sort ( students ) ; int start = - 1 ; int end = 1000007000 ; int mid = ( start + end ) / 2 ;


import java . io . OutputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . PrintWriter ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . Collections ; import java . util . Comparator ; import java . util . HashMap ; import java . util . HashSet ; import java . util . Iterator ; import java . util . List ; import java . util . Map ; import java . util . PriorityQueue ; import java . util . Set ; import java . util . Stack ; import java . util . StringTokenizer ; import java . util . TreeMap ; import java . util . TreeSet ; import java . util . function . Function ; import java . util . stream . Collectors ; import java . io . IOException ; import java . io . BufferedReader ; import java . io . InputStreamReader ; import java . io . InputStream ;    public class Solution {   public static int INF = Integer . MAX_VALUE ; public static long MOD = 1000000000 + 7L ;   public static int WHITE = 0 ; public static int GRAY = 1 ; public static int BLACK = 2 ;   public static int rr [ ] = { 0 , - 1 , 0 , 1 } ; public static int cc [ ] = { - 1 , 0 , 1 , 0 } ;    static class Student { public int index ; public int cost ; public int ability ; public int count = 0 ;   Student ( int i , int c , int a ) { index = i ; cost = c ; ability = a ; } Student ( int i , int c , int a , int cc ) { index = i ; cost = c ; ability = a ; count = cc ; }   public int getCost ( ) { return cost ; } public int getAbility ( ) { return ability ; } } static class Bug { int index ; int complexity ; Bug ( int i , int c ) { index = i ; complexity = c ; } public int getComplexity ( ) { return complexity ; } }   static class Solver { public int [ ] can ( long s , List < Bug > bugs , List < Student > students , int k ) { long taken = 0 ;


import java . util . * ; import java . io . * ;   public class Main { public static void main ( String [ ] args ) throws IOException { FastScanner in = new FastScanner ( System . in ) ; PrintWriter out = new PrintWriter ( System . out ) ; new Main ( ) . run ( in , out ) ; out . close ( ) ; }   public static long mod = 17352642619633L ;   int N , K ; long T ; long [ ] a ; void run ( FastScanner in , PrintWriter out ) { N = in . nextInt ( ) ; K = in . nextInt ( ) ; T = in . nextLong ( ) ; a = new long [ K ] ;   long tot = 0 ; for ( int i = 0 ; i < K ; i ++ ) { a [ i ] = in . nextLong ( ) ; tot += a [ i ] ; } Arrays . sort ( a ) ;

def solve ( n , k , M , t ) : task_sum = sum ( t ) t = sorted ( t ) NEW_LINE


import sys   n , k , m = map ( int , input ( ) . split ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) total = sum ( a )   if n * total <= m : print ( n * ( k + 1 ) ) exit ( )   ans = 0   for complete in range ( n ) : if complete * total > m : break   items = a * ( n - complete ) dp = [ - 1 ] * ( len ( items ) + 1 ) dp [ 0 ] = m - complete * total   for x in items : for i in range ( len ( items ) - 1 , - 1 , - 1 ) : dp [ i + 1 ] = max ( dp [ i + 1 ] , dp [ i ] - x )   for i in range ( len ( items ) , - 1 , - 1 ) : if dp [ i ] >= 0 : ans = max ( ans , i + complete * ( k + 1 ) ) break   print ( ans ) NEW_LINE


n , k , m = map ( int , input ( ) . split ( ) ) t = sorted ( map ( int , input ( ) . split ( ) ) , key = int ) s = sum ( t ) ans = 0   for i in range ( n + 1 ) : curr_ans = i * ( k + 1 ) tot = m - i * s if tot < 0 : break   for x in t : c = min ( n - i , tot // x ) if not c : break tot -= c * x curr_ans += c   ans = max ( ans , curr_ans )   print ( ans ) NEW_LINE


import java . util . * ; import java . io . * ; import java . math . * ;   public class x846B { public static void main ( String omkar [ ] ) throws Exception { BufferedReader infile = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( infile . readLine ( ) ) ; int N = Integer . parseInt ( st . nextToken ( ) ) ; int K = Integer . parseInt ( st . nextToken ( ) ) ; int M = Integer . parseInt ( st . nextToken ( ) ) ; int [ ] arr = new int [ K ] ; st = new StringTokenizer ( infile . readLine ( ) ) ; for ( int i = 0 ; i < K ; i ++ ) arr [ i ] = Integer . parseInt ( st . nextToken ( ) ) ; Arrays . sort ( arr ) ; int res = 0 ; for ( int complete = 0 ; complete <= N ; complete ++ ) { long sum = 0L ; for ( int x : arr ) sum += x ; sum *= complete ; if ( sum > M ) break ; int temp = complete * ( K + 1 ) ;


import java . util . * ; import java . io . * ;   public class Main { public static void main ( String [ ] args ) throws IOException { FastScanner in = new FastScanner ( System . in ) ; PrintWriter out = new PrintWriter ( System . out ) ; new Main ( ) . run ( in , out ) ; out . close ( ) ; }   public static long mod = 17352642619633L ;   int N , K ; long T ; long [ ] a ; long tot ; void run ( FastScanner in , PrintWriter out ) { N = in . nextInt ( ) ; K = in . nextInt ( ) ; T = in . nextLong ( ) ; a = new long [ K ] ;   tot = 0 ; for ( int i = 0 ; i < K ; i ++ ) { a [ i ] = in . nextLong ( ) ; tot += a [ i ] ; } Arrays . sort ( a ) ;