import java . io . * ; import java . util . Scanner ; public class code_11A { public static void main ( String args [ ] ) throws IOException { Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) ; int d = in . nextInt ( ) ; int x [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) x [ i ] = in . nextInt ( ) ; int i = 1 , c = 0 ; while ( i < n ) { if ( x [ i - 1 ] < x [ i ] ) i ++ ; else if ( x [ i ] <= x [ i - 1 ] ) { double z = ( double ) ( ( x [ i - 1 ] - x [ i ] ) / ( double ) d ) ; if ( z == 0.0 ) z = 1.0 ; c += ( int ) ( Math . ceil ( z ) ) ; x [ i ] += ( d * ( ( int ) ( Math . ceil ( z ) ) ) ) ; if ( x [ i ] == x [ i - 1 ] ) { c += 1 ; x [ i ] += d ; } i ++ ; } } System . out . println ( c ) ; } }


import mathn , d = map ( int , input ( ) . split ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) answer = 0 for i in range ( 1 , len ( a ) ) : if ( a [ i ] <= a [ i - 1 ] ) : t = math . ceil ( ( a [ i - 1 ] - a [ i ] + 1 ) / d ) answer += t a [ i ] += t * dprint ( answer ) NEW_LINE


n , k = input ( ) . split ( ) n = int ( n ) k = int ( k ) li = [ ] p = input ( ) . split ( ) for i in p : li . append ( int ( i ) ) cnt = 0 for i in range ( 1 , n ) : if li [ i ] <= li [ i - 1 ] : p = ( li [ i - 1 ] - li [ i ] ) // k p = p + 1 cnt = cnt + p li [ i ] = li [ i ] + ( k * p ) print ( cnt ) NEW_LINE


n , d = map ( int , input ( ) . split ( ) ) arr = [ int ( i ) for i in input ( ) . split ( ) ] ans = 0 for i in range ( 1 , n ) : if arr [ i ] <= arr [ i - 1 ] : l , r = 0 , 10 ** 8 while ( r - l ) > 1 : mid = ( r + l ) // 2 k = mid * d if ( arr [ i ] + k ) > arr [ i - 1 ] : r = mid else : l = mid arr [ i ] += r * d ans += r print ( ans ) NEW_LINE


import java . util . Scanner ; public class Main { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int n = scan . nextInt ( ) , d = scan . nextInt ( ) ; int a [ ] = new int [ n + 1 ] ; for ( int i = 1 ; i <= n ; i ++ ) a [ i ] = scan . nextInt ( ) ; int ans = 0 ; for ( int i = 2 ; i <= n ; i ++ ) { if ( a [ i ] <= a [ i - 1 ] ) { ans += ( a [ i - 1 ] - a [ i ] ) / d + 1 ; a [ i ] += ( ( a [ i - 1 ] - a [ i ] ) / d + 1 ) * d ; } } System . out . print ( ans ) ; } }

''' Jana ▁ Goodman6 11A ▁ Increasing ▁ Sequence  ''' import mathSPACE = ' ▁ '   def min_moves ( n , d , b ) : result = 0 for i in range ( 0 , n - 1 ) : if b [ i + 1 ] <= b [ i ] : times = abs ( b [ i + 1 ] - b [ i ] ) // d + 1 b [ i + 1 ] += d * times result += times return result   if __name__ == ' _ _ main _ _ ' : n , d = map ( int , input ( ) . split ( SPACE ) ) b = list ( map ( int , input ( ) . split ( SPACE ) ) ) print ( min_moves ( n , d , b ) ) NEW_LINE


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


import java . util . Scanner ;   public class Main {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n , x ; n = sc . nextInt ( ) ; x = sc . nextInt ( ) ; int sum = 0 ;   for ( int i = 0 ; i < n ; i ++ ) { sum += sc . nextInt ( ) ; }   sum = Math . abs ( sum ) ;   int cards = 0 ;   while ( sum > 0 ) { cards ++ ; sum -= x ; }   System . out . println ( cards ) ; } }

from math import ceiln , x = map ( int , input ( ) . split ( ) ) l = list ( map ( int , input ( ) . split ( ) ) ) print ( ceil ( abs ( sum ( l ) ) / x ) ) NEW_LINE


import sysfrom math import ceil   def main ( ) : _ , m , * l = map ( int , sys . stdin . read ( ) . strip ( ) . split ( ) ) return int ( ceil ( abs ( sum ( l ) ) / m ) ) print ( main ( ) ) NEW_LINE


import mathn , x = map ( int , input ( ) . split ( ) ) l = [ ] c = 0 y = 0 list1 = [ ] l . extend ( map ( int , input ( ) . split ( ) ) ) sumy = sum ( l ) res = math . fabs ( sumy )   if res > x : while res > x : res -= x c += 1 else : c += 1 elif not res : print ( 0 ) else : print ( 1 ) if c : print ( c ) NEW_LINE


n , x = list ( map ( int , input ( ) . split ( ) ) ) val = abs ( sum ( list ( map ( int , input ( ) . split ( ) ) ) ) ) if val % x == 0 : print ( val // x ) else : print ( val // x + 1 ) NEW_LINE


import math     def main_function ( ) : n , x = [ int ( i ) for i in input ( ) . split ( " ▁ " ) ] cards = [ int ( i ) for i in input ( ) . split ( " ▁ " ) ] sum_negative = 0 sum_positive = 0 for i in cards : if i > 0 : sum_positive += i else : sum_negative += abs ( i ) dif = abs ( sum_negative - sum_positive ) cards = int ( math . ceil ( dif / x ) ) return cards             print ( main_function ( ) ) NEW_LINE


import java . util . * ; import java . math . * ; import java . lang . * ;   public class gfg { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int x = sc . nextInt ( ) ; int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) sum += sc . nextInt ( ) ; sum = Math . abs ( sum ) ; int ans = sum / x ; if ( sum % x == 0 ) System . out . println ( ans ) ; else System . out . println ( ans + 1 ) ; } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStream ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . ArrayList ; import java . util . HashMap ; import java . util . List ; import java . util . Map ; import java . util . StringTokenizer ; import java . util . TreeMap ;   public class Main implements Runnable { int n , m , k ; static boolean use_n_tests = false ;   void solve ( FastScanner in , PrintWriter out , int testNumber ) { n = in . nextInt ( ) ; int x = in . nextInt ( ) ; long sum = Math . abs ( Array . sum ( in . nextArray ( n ) ) ) ; out . println ( ( sum + x - 1 ) / x ) ; }


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


import java . util . Scanner ; public class Main { public static void main ( String args [ ] ) { Scanner s = new Scanner ( System . in ) ; int n = s . nextInt ( ) ; int k = s . nextInt ( ) ; int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { sum += s . nextInt ( ) ; } int ans = Math . abs ( sum ) / k ; if ( Math . abs ( sum ) % k > 0 ) { ans ++ ; } System . out . println ( ans ) ; } }


import java . util . * ; import java . io . * ; import java . text . * ; public class Main { static BufferedReader input = new BufferedReader ( new InputStreamReader ( System . in ) ) ; static StringTokenizer st ; static PrintWriter pr = new PrintWriter ( new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ) ; public static void main ( String [ ] args ) throws IOException { int n = readInt ( ) , v = readInt ( ) , arr [ ] = new int [ n ] , arr1 [ ] = new int [ n ] , val = 0 ; double min = Double . MAX_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = readInt ( ) ; val += arr [ i ] ; } for ( int i = 0 ; i < n ; i ++ ) { arr1 [ i ] = readInt ( ) ; min = Math . min ( min , arr1 [ i ] / 1.0 / arr [ i ] ) ; } for ( double i = min ; i >= 0 ; i -= 0.00001 ) { double cur = i * val ; if ( cur <= v ) { System . out . println ( cur ) ; return ; } } } static String next ( ) throws IOException { while ( st == null || ! st . hasMoreTokens ( ) ) st = new StringTokenizer ( input . readLine ( ) . trim ( ) ) ; return st . nextToken ( ) ; } static long readLong ( ) throws IOException { return Long . parseLong ( next ( ) ) ; } static int readInt ( ) throws IOException { return Integer . parseInt ( next ( ) ) ; } static double readDouble ( ) throws IOException { return Double . parseDouble ( next ( ) ) ; } static char readChar ( ) throws IOException { return next ( ) . charAt ( 0 ) ; } static String readLine ( ) throws IOException { return input . readLine ( ) . trim ( ) ; } }

n , V = map ( int , input ( ) . split ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) b = list ( map ( int , input ( ) . split ( ) ) ) Sa = sum ( a ) m = min ( b ) res = 0 for i in range ( n ) : cur_r = 0 for j in range ( n ) : if ( b [ j ] >= a [ j ] * b [ i ] / a [ i ] ) : cur_r += a [ j ] * b [ i ] / a [ i ] else : break else : res = max ( cur_r , res ) print ( min ( res , float ( V ) ) ) NEW_LINE


n , v = map ( int , input ( ) . split ( ) ) ar = list ( map ( int , input ( ) . split ( ) ) ) br = list ( map ( int , input ( ) . split ( ) ) ) x = min ( [ br [ i ] / ar [ i ] for i in range ( n ) ] ) sm = min ( v , sum ( ar ) * x ) print ( sm ) NEW_LINE


n , v = map ( int , input ( ) . split ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) b = list ( map ( int , input ( ) . split ( ) ) ) r = min ( b [ i ] / a [ i ] * sum ( a ) for i in range ( n ) ) print ( min ( r , v ) ) NEW_LINE


n , V = input ( ) . split ( ) n , V = int ( n ) , int ( V ) a = list ( map ( int , input ( ) . split ( ) ) ) b = list ( map ( int , input ( ) . split ( ) ) )   ratio = 100000     for i in range ( n ) : ratio = min ( ratio , b [ i ] / a [ i ] ) suma = 0 for i in range ( n ) : suma += ratio * a [ i ]   print ( min ( V , suma ) )   NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ;   public class GuiltyKitchen { public static void main ( String [ ] args ) throws IOException { BufferedReader r = new BufferedReader ( new InputStreamReader ( System . in ) ) ; String l = r . readLine ( ) ; String [ ] a = l . split ( " ▁ " ) ; int n = Integer . parseInt ( a [ 0 ] ) ; int v = Integer . parseInt ( a [ 1 ] ) ; l = r . readLine ( ) ; a = l . split ( " ▁ " ) ; float [ ] A = new float [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { A [ i ] = Float . parseFloat ( a [ i ] ) ; } l = r . readLine ( ) ; a = l . split ( " ▁ " ) ; float [ ] B = new float [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { B [ i ] = Float . parseFloat ( a [ i ] ) ; } float min = Float . MAX_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { min = Math . min ( B [ i ] / A [ i ] , min ) ; } float ans = 0 ; for ( int i = 0 ; i < n ; i ++ ) { ans += A [ i ] * min ; } ans = Math . min ( ans , v ) ; System . out . println ( ans ) ; } }


import java . io . BufferedReader ; import java . io . InputStreamReader ; import java . util . * ; public class cdfpc3c { static void merge ( int arr [ ] , int l , int m , int r ) { int n1 = m - l + 1 ; int n2 = r - m ; int L [ ] = new int [ n1 ] ; int R [ ] = new int [ n2 ] ; for ( int i = 0 ; i < n1 ; ++ i ) L [ i ] = arr [ l + i ] ; for ( int j = 0 ; j < n2 ; ++ j ) R [ j ] = arr [ m + 1 + j ] ; int i = 0 , j = 0 ; int k = l ; while ( i < n1 && j < n2 ) { if ( L [ i ] <= R [ j ] ) { arr [ k ] = L [ i ] ; i ++ ; } else { arr [ k ] = R [ j ] ; j ++ ; } k ++ ; } while ( i < n1 ) { arr [ k ] = L [ i ] ; i ++ ; k ++ ; } while ( j < n2 ) { arr [ k ] = R [ j ] ; j ++ ; k ++ ; } } static void sort ( int arr [ ] , int l , int r ) { if ( l < r ) { int m = ( l + r ) / 2 ; sort ( arr , l , m ) ; sort ( arr , m + 1 , r ) ; merge ( arr , l , m , r ) ; } } public static int lowerBound ( int [ ] array , int length , int value ) { int low = 0 ; int high = length ; while ( low < high ) { final int mid = ( low + high ) / 2 ;


import java . io . * ; import java . util . * ;   public class Main { static BufferedReader reader ; static StringTokenizer tokenizer ; static PrintWriter writer ;   static int nextInt ( ) throws IOException { return Integer . parseInt ( nextToken ( ) ) ; }   static long nextLong ( ) throws IOException { return Long . parseLong ( nextToken ( ) ) ; }   static double nextDouble ( ) throws IOException { return Double . parseDouble ( nextToken ( ) ) ; }   static String nextToken ( ) throws IOException { while ( tokenizer == null || ! tokenizer . hasMoreTokens ( ) ) { tokenizer = new StringTokenizer ( reader . readLine ( ) ) ; } return tokenizer . nextToken ( ) ; } static String nexts ( ) throws IOException { tokenizer = new StringTokenizer ( reader . readLine ( ) ) ; String s = " " ; while ( tokenizer . hasMoreTokens ( ) ) { s += tokenizer . nextElement ( ) + " ▁ " ; } return s ; }


import java . util . * ; import java . awt . Point ; import java . lang . Math ; import java . util . Arrays ; import java . util . Scanner ; import java . io . IOException ; import java . io . InputStream ; import java . io . PrintWriter ; import java . io . OutputStream ; import java . util . Comparator ; import java . math . BigInteger ; import java . io . BufferedReader ; import java . io . InputStreamReader ; import java . util . stream . IntStream ; import java . io . IOException ; import java . util . ArrayList ; import java . util . Collections ; import java . util . StringTokenizer ; public class Main { public static void main ( String [ ] args ) { FastScanner in = new FastScanner ( ) ; OutputStream outputStream = System . out ; PrintWriter out = new PrintWriter ( outputStream ) ; int a [ ] [ ] = new int [ 26 ] [ 9 ] ; for ( int i = 0 ; i < 3 ; i ++ ) { String S = in . n ( ) ; a [ S . charAt ( 1 ) - ' a ' ] [ S . charAt ( 0 ) - '1' ] ++ ; } int max = 0 ; for ( int c = 0 ; c < 26 ; c ++ ) { for ( int d = 0 ; d < 9 ; d ++ ) { max = Math . max ( max , a [ c ] [ d ] ) ; } } int minKoutsu = 3 - max ; max = 0 ; for ( int c = 0 ; c < 26 ; c ++ ) { for ( int d = 2 ; d < 9 ; d ++ ) { int count = 0 ; for ( int i = - 2 ; i <= 0 ; i ++ ) { if ( a [ c ] [ d + i ] > 0 ) { count ++ ; } } max = Math . max ( max , count ) ; } } int minShuntsu = 3 - max ; int answer = Math . min ( minKoutsu , minShuntsu ) ; System . out . println ( answer ) ; } private static int sumOfDigits ( int number ) { if ( number <= 0 ) return 0 ; int sum = 0 ; while ( number > 0 ) { sum += number % 10 ; number /= 10 ; } return sum ; } static void ruffle_sort ( int [ ] a ) {


cards = list ( map ( str , input ( ) . split ( ) ) ) sArr = [ 0 ] * 9 mArr = [ 0 ] * 9 pArr = [ 0 ] * 9   for i in cards :   val = int ( i [ 0 ] )   if i [ 1 ] == ' s ' : sArr [ val - 1 ] += 1   elif i [ 1 ] == ' m ' :   mArr [ val - 1 ] += 1   else :   pArr [ val - 1 ] += 1     maxNum = max ( sArr , mArr , pArr ) maxNum = max ( maxNum )     if maxNum == 2 : print ( 1 ) elif maxNum == 3 : print ( 0 ) else : trio = 0 for i in range ( 7 ) : trio = max ( trio , sArr [ i ] + sArr [ i + 1 ] + sArr [ i + 2 ] )   for i in range ( 7 ) : trio = max ( trio , mArr [ i ] + mArr [ i + 1 ] + mArr [ i + 2 ] )   for i in range ( 7 ) : trio = max ( trio , pArr [ i ] + pArr [ i + 1 ] + pArr [ i + 2 ] )   print ( 3 - trio ) NEW_LINE


from sys import stdin , stdoutfrom math import floor , gcd , fabs , factorial , fmod , sqrt , inf , logfrom collections import defaultdict as dd , dequefrom heapq import merge , heapify , heappop , heappush , nsmallestfrom bisect import bisect_left as bl , bisect_right as br , bisect mod = pow ( 10 , 9 ) + 7 mod2 = 998244353 def inp ( ) : return stdin . readline ( ) . strip ( ) def out ( var , end = " \n " ) : stdout . write ( str ( var ) + " \n " ) def outa ( * var , end = " \n " ) : stdout . write ( ' ▁ ' . join ( map ( str , var ) ) + end ) def lmp ( ) : return list ( mp ( ) ) def mp ( ) : return map ( int , inp ( ) . split ( ) ) def smp ( ) : return map ( str , inp ( ) . split ( ) ) def l1d ( n , val = 0 ) : return [ val for i in range ( n ) ] def l2d ( n , m , val = 0 ) : return [ l1d ( m , val ) for j in range ( n ) ] def remadd ( x , y ) : return 1 if x % y else 0 def ceil ( a , b ) : return ( a + b - 1 ) // b def isprime ( x ) : if x <= 1 : return False if x in ( 2 , 3 ) : return True if x % 2 == 0 : return False for i in range ( 3 , int ( sqrt ( x ) ) + 1 , 2 ) : if x % i == 0 : return False return True ml = inp ( ) . split ( ) ans = len ( set ( ml ) ) - 1 for i in range ( 1 , 10 ) : for j in " psm " : k = 3 if str ( i ) + j in ml : k -= 1 if str ( i + 1 ) + j in ml : k -= 1 if str ( i + 2 ) + j in ml : k -= 1 ans = min ( ans , k ) print ( ans ) NEW_LINE


if __name__ == ' _ _ main _ _ ' : cin = input d = { " m " : [ ] , " s " : [ ] , " p " : [ ] } mx = 2   for i in cin ( ) . split ( ) : d [ i [ 1 ] ] . append ( int ( i [ 0 ] ) ) for i in d . keys ( ) : b = sorted ( d [ i ] ) if 3 - len ( d [ i ] ) == 0 : b = [ b [ i ] - b [ i - 1 ] for i in range ( 1 , 3 ) ] if b [ 0 ] == b [ 1 ] == 0 or b [ 0 ] == b [ 1 ] == 1 : mx = 0 elif min ( b [ 0 ] , b [ 1 ] ) < 3 : mx = 1 else : mx = 2 break elif 3 - len ( d [ i ] ) == 1 : mx = 2 if b [ 1 ] - b [ 0 ] > 2 else 1 break else : mx = 2 print ( mx ) NEW_LINE


if __name__ == ' _ _ main _ _ ' : cin = input d = { " m " : [ ] , " s " : [ ] , " p " : [ ] } mx = 2   for i in cin ( ) . split ( ) : d [ i [ 1 ] ] . append ( int ( i [ 0 ] ) ) for i in d . keys ( ) : b = sorted ( d [ i ] ) if 3 - len ( d [ i ] ) == 0 : b = [ b [ i ] - b [ i - 1 ] for i in range ( 1 , 3 ) ] mx = 0 if b [ 0 ] == b [ 1 ] and b [ 0 ] in ( 0 , 1 ) else 1 if min ( b [ 0 ] , b [ 1 ] ) < 3 else 2 break if 3 - len ( d [ i ] ) == 1 : mx = 2 if b [ 1 ] - b [ 0 ] > 2 else 1 break print ( mx ) NEW_LINE


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


import java . util . Arrays ; import java . util . Scanner ;   public class TokitsukazeMahjong { public static void main ( String [ ] args ) {   Scanner in = new Scanner ( System . in ) ; String s1 = in . next ( ) , s2 = in . next ( ) , s3 = in . next ( ) ; in . close ( ) ;   char c1 = s1 . charAt ( 1 ) , c2 = s2 . charAt ( 1 ) , c3 = s3 . charAt ( 1 ) ; int i1 = Integer . valueOf ( s1 . substring ( 0 , 1 ) ) , i2 = Integer . valueOf ( s2 . substring ( 0 , 1 ) ) , i3 = Integer . valueOf ( s3 . substring ( 0 , 1 ) ) , a [ ] = new int [ ] { i1 , i2 , i3 } ;   Arrays . sort ( a ) ; if ( s1 . equals ( s2 ) && s1 . equals ( s3 ) || ( a [ 2 ] - a [ 1 ] == 1 && a [ 1 ] - a [ 0 ] == 1 && c1 == c2 && c1 == c3 ) ) { System . out . println ( 0 ) ; } else if ( s1 . equals ( s2 ) || s1 . equals ( s3 ) || s2 . equals ( s3 ) || ( c1 == c2 && Math . abs ( i1 - i2 ) < 3 ) || ( c1 == c3 && Math . abs ( i1 - i3 ) < 3 ) || ( c2 == c3 && Math . abs ( i2 - i3 ) < 3 ) ) { System . out . println ( 1 ) ; } else { System . out . println ( 2 ) ; } } }


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

time = input ( ) NEW_LINE if int ( time [ 0 ] + time [ 1 ] ) >= 12 : newtime = str ( int ( time [ 0 ] + time [ 1 ] ) - 12 ) . zfill ( 2 ) + time [ 2 : ]   else : newtime = time   hour = int ( newtime [ 0 ] + newtime [ 1 ] ) NEW_LINE min = int ( newtime [ 3 ] + newtime [ 4 ] )   hourhand = 360 * ( hour / 12 ) + ( min / 60 ) * 30 NEW_LINE minhand = 360 * ( min / 60 )   print ( hourhand , minhand )   NEW_LINE


s = input ( ) NEW_LINE if s [ 0 ] == "0" : NEW_LINE INDENT h = int ( s [ 1 ] ) else : NEW_LINE h = int ( s [ : 2 ] ) NEW_LINE DEDENT if s [ 3 ] == "0" : NEW_LINE INDENT m = int ( s [ 4 ] ) else : NEW_LINE m = int ( s [ 3 : ] ) NEW_LINE DEDENT a = ( ( h ) * 30 + 6 * ( 5 * m / 60 ) ) % 360 NEW_LINE if str ( a ) [ - 1 ] == "0" : a = int ( a ) NEW_LINE b = 6 * mprint ( a , b ) NEW_LINE


h , m = map ( float , input ( ) . split ( " : " ) ) NEW_LINE if h > 12 : h -= 12 NEW_LINE rh = h * 30 NEW_LINE rh += m / 2 NEW_LINE rm = m * 6 NEW_LINE rh %= 360 NEW_LINE rm %= 360 NEW_LINE if int ( rh ) == rh : rh = int ( rh ) NEW_LINE if int ( rm ) == rm : rm = int ( rm ) NEW_LINE print ( ( rh ) , ( rm ) ) NEW_LINE


h , m = map ( int , input ( ) . split ( ' : ' ) ) NEW_LINE if ( h >= 12 ) : h -= 12 NEW_LINE print ( h * 30 + 30 * m / 60 , m * 6 ) NEW_LINE


import java . util . Scanner ;   public class Apple {   public static void main ( String args [ ] ) {   try {   Scanner sc = new Scanner ( System . in ) ;   String str [ ] = new String [ 2 ] ; str = sc . next ( ) . split ( " : " ) ;   double a = Integer . parseInt ( str [ 0 ] ) ; double b = Integer . parseInt ( str [ 1 ] ) ;   double min = b * 6 ;   double hr = a * 30 + b / 2 ; if ( hr >= 360.0 ) { hr = hr - 360 ; }   System . out . println ( hr + " ▁ " + min ) ;   } catch (   Exception e ) { return ;   } } }


import java . util . * ; import java . io . * ; public class Main { public static void main ( String args [ ] ) {   FastReader in = new FastReader ( ) ; PrintWriter so = new PrintWriter ( new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ) ; String s = in . next ( ) ; int h = Integer . parseInt ( s . substring ( 0 , 2 ) ) ; int m = Integer . parseInt ( s . substring ( 3 , 5 ) ) ; h = ( h >= 12 ) ? h - 12 : h ; so . println ( ( h * 60 * 0.5 ) + ( m * 0.5 ) + " ▁ " + ( m * 60 * 0.1 ) ) ; so . flush ( ) ; } 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 ( ) ) ; }   int [ ] readIntArray ( int n ) { int a [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = nextInt ( ) ; return a ; }   long [ ] readLongArray ( int n ) { long a [ ] = new long [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = nextLong ( ) ; return a ; }   String nextLine ( ) { String str = " " ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return str ; } } }


import java . util . * ;   public class Main { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; String s [ ] = scan . next ( ) . split ( " : " ) ; int h = Integer . parseInt ( s [ 0 ] ) ; int m = Integer . parseInt ( s [ 1 ] ) ; int nm = ( 6 * m ) ; double nh = ( 30 * h ) % 360 ; nh += 30 * m / 60.00 ; System . out . println ( nh + " ▁ " + nm ) ; } }


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

t = int ( input ( ) ) NEW_LINE ans = [ ] NEW_LINE for i in range ( t ) : n = input ( ) NEW_LINE p = input ( ) . split ( ) NEW_LINE p . reverse ( ) NEW_LINE ans . append ( p ) NEW_LINE for j in ans : print ( " ▁ " . join ( j ) ) NEW_LINE


from collections import Countert = int ( input ( ) ) NEW_LINE for _ in range ( t ) : n = int ( input ( ) ) NEW_LINE ali = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE q = reversed ( ali ) NEW_LINE print ( * q ) NEW_LINE


t = int ( input ( ) ) NEW_LINE for _ in range ( t ) : n = int ( input ( ) ) NEW_LINE arr = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE print ( * arr [ : : - 1 ] ) NEW_LINE


t = int ( input ( ) ) NEW_LINE for _ in range ( t ) : n = int ( input ( ) ) NEW_LINE a = [ int ( s ) for s in input ( ) . split ( " ▁ " ) ] NEW_LINE a . reverse ( ) NEW_LINE print ( " ▁ " . join ( map ( str , a ) ) ) NEW_LINE


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


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . ArrayList ; import java . util . StringTokenizer ; public class B { static class FastScanner { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( " " ) ;   String next ( ) { while ( ! st . hasMoreTokens ( ) ) try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return st . nextToken ( ) ; }   int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   int [ ] nextArray ( int n ) { int [ ] a = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = nextInt ( ) ; return a ; }   long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } } static class FastWriter extends PrintWriter { FastWriter ( ) { super ( System . out ) ; }   void println ( int [ ] array ) { for ( int i = 0 ; i < array . length ; i ++ ) { print ( array [ i ] + " ▁ " ) ; } println ( ) ; }   void println ( long [ ] array ) { for ( int i = 0 ; i < array . length ; i ++ ) { print ( array [ i ] + " ▁ " ) ; } println ( ) ; } } public static void main ( String [ ] args ) {


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


import java . util . ArrayList ; import java . util . Arrays ; import java . util . Scanner ;   public class Singleton_Pattern { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int [ ] a = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { int x = sc . nextInt ( ) ; a [ i ] = x ; }   int m = sc . nextInt ( ) ; int [ ] b = new int [ m ] ; for ( int i = 0 ; i < m ; i ++ ) { int x = sc . nextInt ( ) ; b [ i ] = x ; } Arrays . sort ( a ) ; Arrays . sort ( b ) ; System . out . println ( a [ a . length - 1 ] + " ▁ " + b [ b . length - 1 ] ) ; } }

n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) m = int ( input ( ) ) b = list ( map ( int , input ( ) . split ( ) ) ) print ( max ( a ) , max ( b ) ) NEW_LINE


a = int ( input ( ) ) b = map ( int , input ( ) . split ( ) ) c = int ( input ( ) ) d = map ( int , input ( ) . split ( ) ) print ( max ( b ) , max ( d ) ) NEW_LINE


print ( * ( max ( map ( int , input ( ) and input ( ) . split ( ) ) ) for _ in '00' ) ) NEW_LINE


n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) )   m = int ( input ( ) ) b = list ( map ( int , input ( ) . split ( ) ) )   a . sort ( ) b . sort ( )   print ( str ( a [ len ( a ) - 1 ] ) + " ▁ " + str ( b [ len ( b ) - 1 ] ) ) NEW_LINE


n = input ( ) a = list ( map ( int , input ( ) . split ( ) ) ) m = input ( ) b = list ( map ( int , input ( ) . split ( ) ) ) print ( max ( a ) , max ( b ) ) NEW_LINE


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


import java . util . Scanner ; public class Main { public static void main ( String args [ ] ) { Scanner s = new Scanner ( System . in ) ; int n = s . nextInt ( ) ; int arr [ ] = new int [ n ] ; int dp [ ] = new int [ 500 ] ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = s . nextInt ( ) ; dp [ arr [ i ] ] ++ ; } int m = s . nextInt ( ) ; int bar [ ] = new int [ m ] ; for ( int i = 0 ; i < m ; i ++ ) { bar [ i ] = s . nextInt ( ) ; dp [ bar [ i ] ] ++ ; } for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < m ; j ++ ) { if ( dp [ bar [ j ] + arr [ i ] ] == 0 ) { System . out . println ( arr [ i ] + " ▁ " + bar [ j ] ) ; return ; } } } } }


import java . util . * ; public class Main { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int arr [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) arr [ i ] = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; int arr2 [ ] = new int [ m ] ; for ( int i = 0 ; i < m ; i ++ ) arr2 [ i ] = sc . nextInt ( ) ; Arrays . sort ( arr ) ; Arrays . sort ( arr2 ) ; System . out . println ( arr [ arr . length - 1 ] + " ▁ " + arr2 [ arr2 . length - 1 ] ) ; } }


import java . util . Scanner ;   public class A1206 { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int n = scanner . nextInt ( ) , max1 = Integer . MIN_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { int a = scanner . nextInt ( ) ; if ( a > max1 ) { max1 = a ; } } int m = scanner . nextInt ( ) , max2 = Integer . MIN_VALUE ; for ( int i = 0 ; i < m ; i ++ ) { int b = scanner . nextInt ( ) ; if ( b > max2 ) { max2 = b ; } } System . out . print ( max1 + " ▁ " + max2 ) ; } }


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 . HashSet ; 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 long l [ ] ; static int k ; static int cycle = 0 ; static InputReader rd = new InputReader ( System . in ) ; public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; long a [ ] = new long [ n ] ; long tot = 0 ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = sc . nextLong ( ) ; tot += a [ i ] ; } Arrays . parallelSort ( a ) ; int sel = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] > sel ) sel ++ ; } long lc = a [ n - 1 ] - sel ; long rem = tot - lc - n ; System . out . println ( rem ) ; } static void findCycle ( ArrayList < Integer > adj [ ] , int v , int visited [ ] , boolean visitedc [ ] ) { visited [ v ] = 1 ; visitedc [ v ] = true ; for ( int i : adj [ v ] ) { if ( visited [ i ] == 1 ) {

''' input3 ▁ 33 ▁ 1 ▁ 1 '''   n , m = map ( int , input ( ) . split ( " ▁ " ) )   l = list ( map ( int , input ( ) . split ( " ▁ " ) ) )   l . sort ( ) prev = 0 req = 0   for i in range ( len ( l ) ) : req += 1   if l [ i ] > prev : prev += 1   req += l [ len ( l ) - 1 ] - prev NEW_LINE


n , h = map ( int , input ( ) . split ( ) ) lst = list ( map ( int , input ( ) . split ( ) ) ) lst . sort ( reverse = True ) ans = 0 for i in range ( 1 , n ) : if lst [ i - 1 ] == 1 : ans += lst [ i ] - 1 lst [ i ] = 1 else : if lst [ i - 1 ] <= lst [ i ] : ans += lst [ i ] - lst [ i - 1 ] + 1 lst [ i ] = lst [ i - 1 ] - 1 for i in range ( n - 1 ) : if lst [ i ] != lst [ i + 1 ] : ans += lst [ i + 1 ] print ( ans ) NEW_LINE


n , m = map ( int , input ( ) . split ( ) ) a = [ int ( x ) for x in input ( ) . split ( ) ] a . sort ( ) j = 1 for i in a : if i >= j : j += 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 ;


n = int ( input ( ) ) a = 2 * n - 1 print ( a , 2 ) print ( 1 , 2 )

import osimport sysfrom io import BytesIO , IOBase   BUFSIZE = 8192     class FastIO ( IOBase ) : newlines = 0   def __init__ ( self , file ) : self . _fd = file . fileno ( ) self . buffer = BytesIO ( ) self . writable = " x " in file . mode or " r " not in file . mode self . write = self . buffer . write if self . writable else None   def read ( self ) : while True : b = os . read ( self . _fd , max ( os . fstat ( self . _fd ) . st_size , BUFSIZE ) ) if not b : break ptr = self . buffer . tell ( ) self . buffer . seek ( 0 , 2 ) , self . buffer . write ( b ) , self . buffer . seek ( ptr ) self . newlines = 0 return self . buffer . read ( )   def readline ( self ) : while self . newlines == 0 : b = os . read ( self . _fd , max ( os . fstat ( self . _fd ) . st_size , BUFSIZE ) ) self . newlines = b . count ( b " \n " ) + ( not b ) ptr = self . buffer . tell ( ) self . buffer . seek ( 0 , 2 ) , self . buffer . write ( b ) , self . buffer . seek ( ptr ) self . newlines -= 1 return self . buffer . readline ( )   def flush ( self ) : if self . writable : os . write ( self . _fd , self . buffer . getvalue ( ) ) self . buffer . truncate ( 0 ) , self . buffer . seek ( 0 )     class IOWrapper ( IOBase ) : def __init__ ( self , file ) : self . buffer = FastIO ( file ) self . flush = self . buffer . flush self . writable = self . buffer . writable self . write = lambda s : self . buffer . write ( s . encode ( " ascii " ) ) self . read = lambda : self . buffer . read ( ) . decode ( " ascii " ) self . readline = lambda : self . buffer . readline ( ) . decode ( " ascii " )     sys . stdin , sys . stdout = IOWrapper ( sys . stdin ) , IOWrapper ( sys . stdout ) input = lambda : sys . stdin . readline ( ) . rstrip ( " \n " ) NEW_LINE


n = int ( input ( ) ) if n == 1 : print ( 1 , 1 ) print ( 1 ) else : print ( ( n - 1 ) * 2 , 2 ) print ( 1 , 2 ) NEW_LINE


n = int ( input ( ) ) a = 2 * n - 1 print ( a , 2 ) print ( 1 , 2 ) NEW_LINE


n = int ( input ( ) ) print ( max ( 1 , 2 * n - 2 ) , 2 ) print ( 1 , 2 ) NEW_LINE


import sys import math   def IO ( ) : sys . stdin = open ( " pyinput . txt " , ' r ' ) sys . stdout = open ( " pyoutput . txt " , ' w ' )   def GCD ( a , b ) : if ( b == 0 ) : return a else : return GCD ( b , a % b )   def LCM ( a , b ) : return a * ( b // GCD ( a , b ) )   def scan ( TYPE_1 , TYPE_2 = 0 ) : if ( TYPE_1 == int ) : return map ( int , sys . stdin . readline ( ) . strip ( ) . split ( ) ) elif ( TYPE_1 == float ) : return map ( float , sys . stdin . readline ( ) . strip ( ) . split ( ) ) elif ( TYPE_1 == list and TYPE_2 == float ) : return list ( map ( float , sys . stdin . readline ( ) . strip ( ) . split ( ) ) ) elif ( TYPE_1 == list and TYPE_2 == int ) : return list ( map ( int , sys . stdin . readline ( ) . strip ( ) . split ( ) ) ) elif ( TYPE_1 == str ) : return sys . stdin . readline ( ) . strip ( ) else : print ( " ERROR ! ! ! ! " )         def main ( ) : n = int ( scan ( str ) )   if ( n == 1 ) : print ( 1 , 1 ) print ( 1 ) return   print ( ( n - 1 ) * 2 , 2 ) print ( 1 , 2 ) 	   NEW_LINE


n = int ( input ( ) ) if n == 1 : print ( 1 , 1 ) print ( 1 ) else : print ( ( n - 1 ) * 2 , 2 ) print ( 1 , 2 )


import java . util . Scanner ;   public class A865 {   public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; int a = s . nextInt ( ) ; System . out . println ( " " + ( 2 * a - 1 ) + " ▁ 2" ) ; System . out . println ( "1 ▁ 2" ) ; } }


import java . io . * ; import java . util . * ; import java . util . regex . * ; public class vk18 { public static void main ( String [ ] stp ) throws Exception { Scanner scan = new Scanner ( System . in ) ; PrintWriter pw = new PrintWriter ( System . out ) ; BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( br . readLine ( ) ) ; int n = Integer . parseInt ( st . nextToken ( ) ) ; pw . println ( ( 2 * n - 1 ) + " ▁ 2" ) ; pw . write ( "1 ▁ 2" ) ; pw . flush ( ) ;   }   }


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 ; public class B { public static PrintWriter out = new PrintWriter ( new BufferedOutputStream ( System . out ) ) ;


import java . util . ArrayList ; import java . util . Arrays ; import java . util . HashMap ; import java . util . LinkedHashMap ; import java . util . Map ; import java . util . Scanner ; import java . util . * ; import java . util . stream . Collectors ;   public class absolute { public static int binary ( int n , int m , int k ) { int st = 0 , end = k , pos = - 1 ; while ( st <= end ) { int mid = st + ( end - st ) / 2 ;

t = int ( input ( ) )   for _ in range ( t ) : s , i , e = map ( int , input ( ) . split ( ) ) minAddStr = max ( 0 , ( e + i - s + 2 ) // 2 ) print ( max ( e - minAddStr + 1 , 0 ) ) NEW_LINE


def STR ( ) : return list ( input ( ) ) def INT ( ) : return int ( input ( ) ) def MAP ( ) : return map ( int , input ( ) . split ( ) ) def MAP2 ( ) : return map ( float , input ( ) . split ( ) ) def LIST ( ) : return list ( map ( int , input ( ) . split ( ) ) ) def STRING ( ) : return input ( ) from heapq import heappop , heappushfrom bisect import * from collections import deque , Counterfrom math import * from itertools import permutationsdx = [ - 1 , 1 , 0 , 0 ] dy = [ 0 , 0 , 1 , - 1 ] NEW_LINE


for t in range ( int ( input ( ) ) ) : s , i , e = map ( int , input ( ) . split ( ) ) low = 0 high = e NEW_LINE


for t in range ( int ( input ( ) ) ) : s , i , e = map ( int , input ( ) . split ( ) ) low = 0 high = e low_pos = high_pos = e + 1 while low <= high : mid = low + ( high - low ) // 2 if mid + s > i + ( e - mid ) : low_pos = mid high = mid - 1 else : low = mid + 1 print ( high_pos - low_pos ) NEW_LINE


import java . io . IOException ; import java . io . InputStream ; import java . io . OutputStream ; import java . io . PrintWriter ; import java . math . BigInteger ; import java . util . * ;     public class AccidentalVictory {   public static void main ( String [ ] args ) {   InputStream inputStream = System . in ; OutputStream outputStream = System . out ; InputReader sc = new InputReader ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; Solver solver = new Solver ( ) ; int t = sc . nextInt ( ) ;


import java . io . * ; import java . util . * ; public class Main { static BufferedReader br ; static PrintWriter pr ; static int cin ( ) throws Exception { return Integer . valueOf ( br . readLine ( ) ) ; } static int [ ] split ( ) throws Exception { String [ ] cmd = br . readLine ( ) . split ( " ▁ " ) ; int [ ] ans = new int [ cmd . length ] ; for ( int i = 0 ; i < cmd . length ; i ++ ) { ans [ i ] = Integer . valueOf ( cmd [ i ] ) ; } return ans ; } static long [ ] splitL ( ) throws IOException { String [ ] cmd = br . readLine ( ) . split ( " ▁ " ) ; long [ ] ans = new long [ cmd . length ] ; for ( int i = 0 ; i < cmd . length ; i ++ ) { ans [ i ] = Long . valueOf ( cmd [ i ] ) ; } return ans ; } static int sum ( long n ) { int ans = 0 ; while ( n != 0 ) { ans = ans + ( int ) ( n % 10 ) ; n = n / 10 ; } return ans ; } static int gcd ( int x , int y ) { if ( x == 0 ) return y ; if ( y == 0 ) return x ; if ( x > y ) return gcd ( x % y , y ) ; else return gcd ( x , y % x ) ; } public static void main ( String [ ] args ) throws Exception {


import java . util . Scanner ; public class Main { public static void main ( String args [ ] ) { Scanner in = new Scanner ( System . in ) ; int testCases = in . nextInt ( ) ; for ( int i = 0 ; i < testCases ; i ++ ) { long str = in . nextLong ( ) ; long intel = in . nextLong ( ) ; long exp = in . nextLong ( ) ; System . out . println ( possibilities ( str , intel , exp ) ) ; } }   public static long possibilities ( long str , long intel , long exp ) { if ( str + exp <= intel ) return 0 ; if ( intel >= str ) { exp -= intel - str + 1 ; str = intel + 1 ; } long difference = exp - intel + str ; long possibilities = ( long ) Math . min ( exp + 1 , difference / 2 + difference % 2 ) ; return possibilities ; } }


import java . io . * ; import java . util . * ; public class Main { public static void main ( String [ ] args ) throws Exception { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; String s = br . readLine ( ) ; String str [ ] = s . split ( " ▁ " ) ; int n = Integer . parseInt ( str [ 0 ] ) ; int m = Integer . parseInt ( str [ 1 ] ) ; int i = Integer . parseInt ( str [ 2 ] ) ; int j = Integer . parseInt ( str [ 3 ] ) ; int a = Integer . parseInt ( str [ 4 ] ) ; int b = Integer . parseInt ( str [ 5 ] ) ; int ar1 [ ] = { 1 , n , n , 1 } ; int ar2 [ ] = { m , 1 , m , 1 } ; int min = - 1 ; for ( int l = 0 ; l < 4 ; l ++ ) { int temp1 = Math . abs ( ar1 [ l ] - i ) ; int temp2 = Math . abs ( ar2 [ l ] - j ) ; if ( temp1 % a != 0 || temp2 % b != 0 ) continue ; temp1 /= a ; temp2 /= b ; if ( temp1 % 2 != temp2 % 2 ) continue ; int d = Math . max ( temp1 , temp2 ) ; if ( min == - 1 || d < min ) min = d ; } if ( a + i > n && i - a <= 0 && min != 0 || b + j > m && j - b <= 0 && min != 0 ) System . out . println ( " Poor ▁ Inna ▁ and ▁ pony ! " ) ; else if ( min == - 1 ) System . out . println ( " Poor ▁ Inna ▁ and ▁ pony ! " ) ; else System . out . println ( min ) ; } }

def fun ( x , y ) : if abs ( x - i ) % a == 0 and abs ( y - j ) % b == 0 and ( abs ( x - i ) // a - abs ( y - j ) // b ) % 2 == 0 : return max ( abs ( x - i ) // a , abs ( y - j ) // b ) return 1000000000 n , m , i , j , a , b = map ( int , input ( ) . split ( ) ) ans = min ( fun ( 1 , 1 ) , fun ( n , m ) , fun ( 1 , m ) , fun ( n , 1 ) ) NEW_LINE


n , m , i , j , a , b = map ( int , input ( ) . split ( ) ) corners = [ ( 1 , 1 ) , ( 1 , m ) , ( n , 1 ) , ( n , m ) ] result = Falseans = - 1 for cnt in corners : if ( abs ( cnt [ 0 ] - i ) % a == 0 ) and ( abs ( cnt [ 1 ] - j ) % b == 0 ) : result = True t1 , t2 = abs ( cnt [ 0 ] - i ) // a , abs ( cnt [ 1 ] - j ) // b if ( t1 + t2 ) % 2 == 0 : if ans == - 1 : ans = max ( abs ( cnt [ 0 ] - i ) // a , abs ( cnt [ 1 ] - j ) // b ) else : ans = min ( max ( abs ( cnt [ 0 ] - i ) // a , abs ( cnt [ 1 ] - j ) // b ) , ans ) if ans == 0 : print ( ans ) elif not result or ( i + a > n and i - a < 1 ) or ( j + b > m and j - b < 1 ) or ans == - 1 : print ( " Poor ▁ Inna ▁ and ▁ pony ! " ) else : print ( ans ) NEW_LINE


n , m , i , j , a , b = map ( int , input ( ) . split ( ) ) l = [ ] if ( i - 1 ) % a == 0 and ( j - 1 ) % b == 0 : s1 = ( i - 1 ) // a s2 = ( j - 1 ) // b if ( s1 + s2 ) % 2 == 0 : l . append ( max ( s1 , s2 ) ) if ( i - 1 ) % a == 0 and ( m - j ) % b == 0 : s1 = ( i - 1 ) // a s2 = ( m - j ) // b if ( s1 + s2 ) % 2 == 0 : l . append ( max ( s1 , s2 ) ) if ( n - i ) % a == 0 and ( j - 1 ) % b == 0 : s1 = ( n - i ) // a s2 = ( j - 1 ) // b if ( s1 + s2 ) % 2 == 0 : l . append ( max ( s1 , s2 ) ) if ( n - i ) % a == 0 and ( m - j ) % b == 0 : s1 = ( n - i ) // a s2 = ( m - j ) // b if ( s1 + s2 ) % 2 == 0 : l . append ( max ( s1 , s2 ) ) if ( i , j ) == ( 0 , 0 ) or ( i , j ) == ( n , m ) or ( i , j ) == ( n , 1 ) or ( i , j ) == ( 1 , m ) : print ( 0 ) elif i + a > n and i - a < 1 : print ( " Poor ▁ Inna ▁ and ▁ pony ! " ) elif j + b > m and j - b < 1 : print ( " Poor ▁ Inna ▁ and ▁ pony ! " ) elif len ( l ) == 0 : print ( " Poor ▁ Inna ▁ and ▁ pony ! " ) else : print ( min ( l ) ) NEW_LINE


n , m , ix , jy , a , b = list ( map ( int , input ( ) . rstrip ( ) . split ( ) ) )   def check ( x , y ) : ax = abs ( x - ix ) by = abs ( y - jy ) q1 = ax / a q2 = by / b if q2 == int ( q2 ) and q1 == int ( q1 ) : maxm = max ( int ( q1 ) , int ( q2 ) ) minm = min ( int ( q1 ) , int ( q2 ) ) NEW_LINE


import java . util . * ; import java . lang . * ; import java . io . * ;   public class Ideone { public static void main ( String [ ] args ) throws java . lang . Exception { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; int i = sc . nextInt ( ) ; int j = sc . nextInt ( ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; if ( ( i == 1 && j == m ) || ( i == 1 && j == 1 ) || ( i == n && j == 1 ) || ( i == n && j == m ) ) { System . out . println ( 0 ) ; return ; } int sol = Integer . MAX_VALUE ;


import java . util . Scanner ;   public class innaandPinky {   public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; int i = sc . nextInt ( ) ; int j = sc . nextInt ( ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int ans = Integer . MAX_VALUE ; ans = Math . min ( ans , sol ( 1 , 1 , i , j , a , b ) ) ; ans = Math . min ( ans , sol ( 1 , m , i , j , a , b ) ) ; ans = Math . min ( ans , sol ( n , 1 , i , j , a , b ) ) ; ans = Math . min ( ans , sol ( n , m , i , j , a , b ) ) ;   if ( ans == Integer . MAX_VALUE || ( ( i - a < 1 && i + a > n ) || ( j - b < 1 && j + b > m ) ) && ans != 0 ) { System . out . println ( " Poor ▁ Inna ▁ and ▁ pony ! " ) ; } else { System . out . println ( ans ) ; } }   private static int sol ( int n , int m , int i , int j , int a , int b ) { if ( i == n && m == j ) return 0 ; int x = Math . abs ( n - i ) ; int y = Math . abs ( m - j ) ;   if ( x % a == 0 && y % b == 0 ) { if ( ( x / a ) % 2 == ( y / b ) % 2 ) { x = x / a ; y = y / b ; return Math . max ( x , y ) ; } } return Integer . MAX_VALUE ; } }


import java . util . * ;   public class Supermarket {   public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int n = scan . nextInt ( ) ; int m = scan . nextInt ( ) ; double min = Double . MAX_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { double a = scan . nextDouble ( ) ; double b = scan . nextDouble ( ) ; min = Math . min ( min , a / b ) ; } System . out . println ( min * m ) ; } }

n , m = map ( int , input ( ) . split ( ) ) l = [ ] for i in range ( n ) : a , b = map ( int , input ( ) . split ( ) ) l . append ( m * ( a / b ) ) print ( min ( l ) ) NEW_LINE


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


import sys n , m = map ( int , input ( ) . split ( ) ) k = sys . maxsizefor _ in range ( n ) : x , y = map ( int , input ( ) . split ( ) ) k = min ( k , x / y ) print ( round ( m * k , 8 ) ) NEW_LINE


import math   def main_function ( ) : output_list = [ ] n , m = [ int ( i ) for i in input ( ) . split ( " ▁ " ) ] for i in range ( n ) : a , b = [ int ( i ) for i in input ( ) . split ( " ▁ " ) ] output_list . append ( ( a / b ) * m ) return min ( output_list )               print ( main_function ( ) ) NEW_LINE


import java . util . Scanner ;   public class Supermarket {   public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ;   int n = input . nextInt ( ) ; int m = input . nextInt ( ) ; double ans = Double . MAX_VALUE ; while ( n -- > 0 ) { int a = input . nextInt ( ) ; int b = input . nextInt ( ) ; ans = Math . min ( ans , ( double ) a / b * ( m ) ) ; } System . out . printf ( " % .8f " , ans ) ; System . out . println ( " ▁ " ) ; }   }


import java . util . Scanner ;   public class Supermarket { public static void main ( String [ ] args ) {   Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) , m = in . nextInt ( ) ; double c = Double . POSITIVE_INFINITY ;   while ( n -- > 0 ) { double a = in . nextDouble ( ) , b = in . nextDouble ( ) ; if ( a / b < c ) { c = a / b ; } } in . close ( ) ; System . out . println ( c * m ) ; } }


import java . util . * ; import java . io . * ;   public class Supermarket {   public static void main ( String [ ] args ) {   FastScanner fs = new FastScanner ( ) ; final double PI = 3.141593 ; int num = fs . nextInt ( ) ; int m = fs . nextInt ( ) ; double ans = 999999999.99 ; for ( int i = 0 ; i < num ; i ++ ) { int a = fs . nextInt ( ) ; int b = fs . nextInt ( ) ; ans = Math . min ( ans , ( double ) ( a * m ) / b ) ; } System . out . println ( ans ) ; }   static class FastScanner { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( " " ) ;   public String next ( ) { while ( ! st . hasMoreElements ( ) ) try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return st . nextToken ( ) ; }   public int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   public long nextLong ( ) { return Long . parseLong ( next ( ) ) ; }   public int [ ] readArray ( int n ) { int [ ] a = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = nextInt ( ) ; } return a ; }   public double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; } } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . math . BigInteger ; import java . util . * ; import static java . util . Arrays . sort ; import javafx . util . Pair ;   public class Main {   public static void main ( String [ ] args ) {   FastScanner input = new FastScanner ( ) ; int n = input . nextInt ( ) ; int k = input . nextInt ( ) ; int a [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = input . nextInt ( ) ; } if ( n <= k ) { System . out . println ( a [ n - 1 ] ) ; } else { int i = 0 ; int j = n - ( k * 2 - n ) - 1 ; int max = Integer . MIN_VALUE ; while ( i <= j ) { max = Math . max ( max , a [ i ] + a [ j ] ) ; i ++ ; j -- ; } max = Math . max ( max , a [ a . length - 1 ] ) ; System . out . println ( max ) ; }   }   static class FastScanner {   BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( " " ) ;   String next ( ) { while ( ! st . hasMoreTokens ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; }   int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   long nextLong ( ) {   return Long . parseLong ( next ( ) ) ; }   double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; }   String nextLine ( ) throws IOException { return br . readLine ( ) ; } }   }

n , k = map ( int , input ( ) . split ( ) ) A = list ( map ( int , input ( ) . split ( ) ) ) Max = A [ - 1 ] while 2 * k > len ( A ) and A != [ ] : del A [ - 1 ] k -= 1 while A != [ ] : Max = max ( Max , A [ 0 ] + A [ - 1 ] ) del A [ 0 ] , A [ - 1 ] print ( Max ) NEW_LINE


n , k = map ( int , input ( ) . split ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) if k >= n : print ( max ( a ) ) else : i = n - 1 ans = 0 for j in range ( 2 * k - n ) : ans = max ( ans , a [ i ] ) i -= 1 start = 0 while start < i : ans = max ( ans , a [ i ] + a [ start ] ) i -= 1 start += 1 print ( ans ) NEW_LINE


n , k = map ( int , input ( ) . split ( ) ) arr = list ( map ( int , input ( ) . split ( ) ) ) [ : : - 1 ] high = arr [ 0 ] for i in range ( k , n ) : high = max ( high , arr [ i ] + arr [ 2 * k - i - 1 ] ) print ( high ) NEW_LINE


n , k = map ( int , input ( ) . split ( ) ) arr = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE


import java . util . Scanner ;   public class BoxPacking { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ;   int n = scanner . nextInt ( ) ; int k = scanner . nextInt ( ) ;   Integer [ ] size = new Integer [ n ] ;   for ( int i = 0 ; i < n ; i ++ ) size [ i ] = scanner . nextInt ( ) ;   int max = size [ n - 1 ] ;   if ( n > k ) { int last = 2 * ( n - k ) - 1 ; for ( int i = 0 ; i <= last ; i ++ ) { max = Math . max ( max , size [ i ] + size [ last - i ] ) ; } } System . out . println ( max ) ; } }


import java . util . * ; import java . io . * ; import java . math . * ; public class Code {   static BufferedReader input = new BufferedReader ( new InputStreamReader ( System . in ) ) ; static StringTokenizer st ; static PrintWriter pr = new PrintWriter ( new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ) ; public static void main ( String [ ] args ) throws IOException { int n = readInt ( ) , k = readInt ( ) , arr [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = readInt ( ) ; } Arrays . sort ( arr ) ; int boxes = ( n - k ) * 2 ; ArrayList < Integer > s = new ArrayList ( ) ; int ans = arr [ n - 1 ] ; for ( int i = 0 ; i < boxes ; i ++ ) { s . add ( arr [ i ] ) ; } int left = 0 , right = s . size ( ) - 1 ; while ( left < right ) { ans = Math . max ( ans , s . get ( left ) + s . get ( right ) ) ; left ++ ; right -- ; } println ( ans ) ; } static String next ( ) throws IOException { while ( st == null || ! st . hasMoreTokens ( ) ) st = new StringTokenizer ( input . readLine ( ) . trim ( ) ) ; return st . nextToken ( ) ; } static long readLong ( ) throws IOException { return Long . parseLong ( next ( ) ) ; } static int readInt ( ) throws IOException { return Integer . parseInt ( next ( ) ) ; } static double readDouble ( ) throws IOException { return Double . parseDouble ( next ( ) ) ; } static char readChar ( ) throws IOException { return next ( ) . charAt ( 0 ) ; } static String readLine ( ) throws IOException { return input . readLine ( ) . trim ( ) ; } static void print ( Object b ) { System . out . print ( b ) ; } static void println ( Object b ) { System . out . println ( b ) ; } static void println ( ) { System . out . println ( ) ; } }


import java . util . * ;   public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int x = sc . nextInt ( ) ; int [ ] a = new int [ n ] ; int size = 0 ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = sc . nextInt ( ) ; size = Math . max ( size , a [ i ] ) ; } for ( int i = 0 ; i < n - x ; i ++ ) { size = Math . max ( size , a [ i ] + a [ 2 * ( n - x ) - 1 - i ] ) ; } System . out . println ( size ) ; } }


import java . io . BufferedInputStream ; import java . io . BufferedOutputStream ; import java . io . BufferedReader ; import java . io . FileNotFoundException ; import java . io . IOException ; import java . io . InputStream ; import java . io . InputStreamReader ; import java . io . OutputStreamWriter ; import java . io . PrintWriter ; import java . util . StringTokenizer ;   public class Main { public static void main ( String [ ] args ) throws FileNotFoundException , IOException { InputReader in = new InputReader ( new BufferedInputStream ( System . in ) ) ; PrintWriter out = new PrintWriter ( new OutputStreamWriter ( new BufferedOutputStream ( System . out ) ) ) ; TaskB solver = new TaskB ( ) ; long t1 = System . currentTimeMillis ( ) ; solver . solve ( 1 , in , out ) ; out . flush ( ) ; long t2 = System . currentTimeMillis ( ) ;

""" ▁ A ▁ : ▁ Determine ▁ if ▁ three ▁ line ▁ segments ▁ form ▁ A ▁ """     def cross ( vecA , vecB ) : return vecA [ 0 ] * vecB [ 1 ] - vecA [ 1 ] * vecB [ 0 ]     def dot ( vecA , vecB ) : return vecA [ 0 ] * vecB [ 0 ] + vecA [ 1 ] * vecB [ 1 ]     def angle ( lineA , lineB ) : x1 , y1 = ( lineA [ 0 ] [ 0 ] - lineA [ 1 ] [ 0 ] , lineA [ 0 ] [ 1 ] - lineA [ 1 ] [ 1 ] ) x2 , y2 = ( lineB [ 0 ] [ 0 ] - lineB [ 1 ] [ 0 ] , lineB [ 0 ] [ 1 ] - lineB [ 1 ] [ 1 ] ) d1 = ( x1 ** 2 + y1 ** 2 ) ** 0.5 d2 = ( x2 ** 2 + y2 ** 2 ) ** 0.5 return ( x1 * x2 + y1 * y2 ) / ( d1 * d2 )     def div_ratio ( line , point ) : NEW_LINE


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 ) ; HashMap < Integer , Integer > hmap = new HashMap < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { hmap . put ( a [ i ] , i ) ; } int max = 0 ; int ans = 0 ; for ( int key : hmap . keySet ( ) ) { if ( n - hmap . get ( key ) > max ) { max = n - hmap . get ( key ) ; ans = key ; } } System . out . println ( ans ) ; }

n = int ( input ( ) ) r = lambda : list ( map ( int , input ( ) . split ( ) ) ) arr = r ( )   x = set ( arr ) arr = arr [ : : - 1 ] y = set ( ) for i in arr : y . add ( i ) if len ( y ) == len ( x ) : print ( i ) break NEW_LINE


m = input ( ) a = list ( map ( int , input ( ) . split ( ) ) ) a . reverse ( ) dic = { } ; i = 0 for m in a : if m not in dic : dic [ m ] = i i += 1 print ( max ( dic , key = dic . get ) ) NEW_LINE


import sys , mathsys . setrecursionlimit ( 10 ** 8 ) ''' def ▁ fun ( ) : ▁ ▁ ▁ ▁ for ▁ i ▁ in ▁ range ( 16 ) : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ for ▁ j ▁ in ▁ range ( 4 ) : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ if ▁ i & (1 < < j ) : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ print ( j , end = ' ' ) ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ print ( ) import ▁ binarytreefrom ▁ collections ▁ import ▁ dequebst ▁ = ▁ binarytree . tree ( height = 4 , is _ perfect = True ) print ( bst ) def ▁ s ( bst ) : ▁ ▁ ▁ ▁ if ▁ bst : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ bst . left , bst . right ▁ = ▁ bst . right , bst . left ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ s ( bst . right ) ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ s ( bst . left ) s ( bst ) print ( bst ) ''' t = int ( input ( ) ) arr = list ( map ( int , input ( ) . split ( ) ) ) arr = arr [ : : - 1 ] se = set ( arr ) l = len ( se ) se1 = set ( ) for i in arr : if ( i in se and i not in se1 ) : se1 . add ( i ) if l == 1 : print ( i ) l -= 1 NEW_LINE


import sys , mathsys . setrecursionlimit ( 10 ** 8 ) ''' def ▁ fun ( ) : ▁ ▁ ▁ ▁ for ▁ i ▁ in ▁ range ( 16 ) : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ for ▁ j ▁ in ▁ range ( 4 ) : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ if ▁ i & (1 < < j ) : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ print ( j , end = ' ' ) ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ print ( ) import ▁ binarytreefrom ▁ collections ▁ import ▁ dequebst ▁ = ▁ binarytree . tree ( height = 4 , is _ perfect = True ) print ( bst ) def ▁ s ( bst ) : ▁ ▁ ▁ ▁ if ▁ bst : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ bst . left , bst . right ▁ = ▁ bst . right , bst . left ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ s ( bst . right ) ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ s ( bst . left ) s ( bst ) print ( bst ) ''' t = int ( input ( ) ) arr = list ( map ( int , input ( ) . split ( ) ) ) arr = arr [ : : - 1 ] d = { i : 0 for i in set ( arr ) } l = len ( d ) for i in arr : if d [ i ] == 0 : d [ i ] += 1 if l == 1 : print ( i ) l -= 1 else : d [ i ] += 1 NEW_LINE


import java . util . * ; import java . io . * ; public class Main { public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; int n = Integer . parseInt ( br . readLine ( ) ) ; StringTokenizer st = new StringTokenizer ( br . readLine ( ) ) ; Integer [ ] visit = new Integer [ n ] ; Set < Integer > cafes = new HashSet < Integer > ( ) ; for ( int i = 0 ; i < n ; ++ i ) { visit [ i ] = Integer . parseInt ( st . nextToken ( ) ) ; if ( ! cafes . contains ( visit [ i ] ) ) cafes . add ( visit [ i ] ) ; } Map < Integer , Integer > last = new HashMap < Integer , Integer > ( ) ; for ( int i = n - 1 ; i >= 0 ; -- i ) { Integer v = last . getOrDefault ( visit [ i ] , null ) ; if ( v == null ) last . put ( visit [ i ] , n - i ) ; } Integer winner = null ; int winnerScore = 0 ; for ( Integer i : cafes ) { int score = last . get ( i ) ; if ( winner == null || winnerScore < score ) { winner = i ; winnerScore = score ; } } System . out . println ( winner ) ; } }


import java . util . * ; public class A { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int a [ ] = new int [ n ] ; HashMap < Integer , Integer > hm = new HashMap < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = sc . nextInt ( ) ; hm . put ( a [ i ] , i + 1 ) ; } int min = Integer . MAX_VALUE ; int ans = 0 ; for ( Map . Entry < Integer , Integer > entry : hm . entrySet ( ) ) { int x = entry . getKey ( ) ; int y = entry . getValue ( ) ; if ( y < min ) { min = y ; ans = x ; } } System . out . println ( ans ) ; } }


import java . io . * ; import java . util . * ; public class VsRohan { static Reader sc = new Reader ( ) ; static PrintWriter out = new PrintWriter ( ( System . out ) ) ; public static void main ( String args [ ] ) throws IOException { int t = sc . nextInt ( ) ; int arr [ ] = new int [ 200001 ] ; Arrays . fill ( arr , ( int ) 1e9 ) ; for ( int i = 0 ; i < t ; ++ i ) { int a = sc . nextInt ( ) ; arr [ a ] = i ; } int min = ( int ) 1e9 , ans = 0 ; ; for ( int i = 0 ; i < arr . length ; ++ i ) { if ( arr [ i ] < min ) { min = arr [ i ] ; ans = i ; } } out . println ( ans ) ; out . close ( ) ; }   static class Reader { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( " " ) ; public String next ( ) { while ( ! st . hasMoreTokens ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( Exception 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 ( ) { try { return br . readLine ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } return null ; } public boolean hasNext ( ) { String next = null ; try { next = br . readLine ( ) ; } catch ( Exception e ) { } if ( next == null ) { return false ; } st = new StringTokenizer ( next ) ; return true ; } } }


import java . io . IOException ; import java . util . * ; public class Petya2 { public static void main ( String [ ] args ) throws IOException { Scanner input = new Scanner ( System . in ) ; String x = input . next ( ) ; Stack < Character > stk = new Stack < > ( ) ; for ( int i = x . length ( ) - 1 ; i >= 0 ; i -- ) { if ( ! stk . empty ( ) && stk . peek ( ) == x . charAt ( i ) ) { stk . pop ( ) ; } else stk . push ( x . charAt ( i ) ) ; } int size = stk . size ( ) ; StringBuffer ans = new StringBuffer ( " " ) ; for ( int i = 0 ; i < size ; i ++ ) ans . append ( stk . pop ( ) ) ; System . out . println ( ans ) ; } }

from collections import deque   charlist = list ( input ( ) ) NEW_LINE n = len ( charlist ) NEW_LINE string = deque ( charlist [ n - 1 ] ) NEW_LINE charlist . pop ( ) NEW_LINE n = len ( charlist ) NEW_LINE for i in reversed ( range ( 0 , n ) ) : if NEW_LINE INDENT ( len ( string ) == 0 ) : string . append ( charlist [ i ] ) elif ( string [ - 1 ] == charlist [ i ] ) : charlist . pop ( ) NEW_LINE DEDENT string . pop ( ) else : string . append ( charlist [ i ] )   print ( " " . join ( string ) [ : : - 1 ] )                         NEW_LINE


s = input ( )   i = 0 NEW_LINE t = [ ] NEW_LINE while i < len ( s ) : j = i NEW_LINE while j + 1 < len ( s ) and s [ j + 1 ] == s [ i ] : j += 1 NEW_LINE if ( j - i + 1 ) % 2 == 1 : if NEW_LINE t and t [ - 1 ] == s [ i ] : t . pop ( ) else : t . append ( s [ i ] ) NEW_LINE i = j + 1   print ( ' ' . join ( t ) ) NEW_LINE


s = input ( )   length = len ( s ) NEW_LINE ans = [ ] NEW_LINE ans . append ( s [ 0 ] )   for i in range ( 1 , length ) : length1 = len ( ans ) NEW_LINE


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


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


import java . io . BufferedReader ; import java . io . InputStreamReader ; import java . util . Stack ;   public class CF { public static void main ( String [ ] args ) throws Exception { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; String s = br . readLine ( ) ; Stack < Character > stk = new Stack < Character > ( ) ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( stk . empty ( ) ) { stk . push ( s . charAt ( i ) ) ; } else { if ( stk . peek ( ) != s . charAt ( i ) ) stk . push ( s . charAt ( i ) ) ; else stk . pop ( ) ; } } StringBuilder sb = new StringBuilder ( ) ; while ( ! stk . empty ( ) ) sb . append ( stk . pop ( ) ) ;   System . out . println ( sb . reverse ( ) . toString ( ) ) ; } }


import java . io . BufferedReader ; import java . io . File ; import java . io . FileWriter ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . math . BigInteger ; import java . util . * ;   public class Main {   public static void main ( String [ ] args ) throws IOException { FastScanner input = new FastScanner ( ) ; String s = input . next ( ) ; int len = s . length ( ) ; StringBuilder ans = new StringBuilder ( ) ; for ( int i = 0 ; i < len ; i ++ ) { if ( ans . length ( ) > 0 && ans . charAt ( ans . length ( ) - 1 ) == s . charAt ( i ) ) { ans . deleteCharAt ( ans . length ( ) - 1 ) ; } else { ans . append ( s . charAt ( i ) ) ; } } System . out . println ( ans ) ; }   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 ( ) ) ; } }   }


import java . util . Arrays ; import java . util . Scanner ;   public class AlyonaAndMex { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; Integer [ ] a = new Integer [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = sc . nextInt ( ) ; Arrays . sort ( a ) ; int cur = 1 ; for ( int i = 0 ; i < n ; i ++ ) if ( a [ i ] >= cur ) cur ++ ; System . out . println ( cur ) ; sc . close ( ) ; } }

n = int ( input ( ) ) a = [ int ( x ) for x in input ( ) . split ( ) ] k = 1 a . sort ( ) for i in range ( n ) : if a [ i ] >= k : k += 1 print ( k ) NEW_LINE


x = int ( input ( ) )   arr = list ( map ( int , input ( ) . split ( ) ) ) [ : x ] arr . sort ( )   cur = 1 for i in arr : if i >= cur : cur += 1 else : i += 1 print ( cur ) NEW_LINE


n = int ( input ( ) ) w = list ( map ( int , input ( ) . split ( ) ) ) w . sort ( ) ans = 1 for i in w : ans += i >= ansprint ( ans ) NEW_LINE


n = int ( input ( ) ) a = sorted ( [ 0 ] + [ int ( x ) for x in input ( ) . split ( ) ] ) for i in range ( 1 , n + 1 ) : if a [ i ] != a [ i - 1 ] : a [ i ] = a [ i - 1 ] + 1 print ( a [ - 1 ] + 1 ) NEW_LINE


n = int ( input ( ) ) ar = list ( map ( int , input ( ) . split ( ) ) ) ; ar = sorted ( ar ) ele = 1 for i in range ( n ) : if ar [ i ] >= ele : ele += 1 print ( ele ) NEW_LINE


import java . util . ArrayList ; import java . util . Arrays ; import java . util . Collections ; import java . util . Scanner ; import java . util . TreeMap ; import java . util . TreeSet ;    public class Main {   public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int n = input . nextInt ( ) ; Integer a [ ] = new Integer [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = input . nextInt ( ) ; } if ( n == 1 ) { System . out . println ( "2" ) ; return ; } Arrays . sort ( a ) ; int min = 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] >= min ) { min ++ ; } } System . out . println ( min ) ; } }


import java . util . Arrays ; import java . util . Scanner ;   public class MexArray { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ;   int n = scan . nextInt ( ) ; Integer [ ] a = new Integer [ n ] ;   for ( int i = 0 ; i < n ; i ++ ) a [ i ] = scan . nextInt ( ) ;   Arrays . sort ( a ) ;   int mex = n + 1 ; int pp = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] < i + 1 - pp ) { mex -- ; pp ++ ; } }   System . out . println ( mex ) ; } }


import java . io . OutputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . OutputStream ; import java . io . PrintWriter ; import java . io . BufferedWriter ; import java . io . Writer ; import java . io . OutputStreamWriter ; import java . util . InputMismatchException ; import java . util . Random ; 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 ) ; OutputWriter out = new OutputWriter ( outputStream ) ; Task1039B solver = new Task1039B ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; }   static class Task1039B { private InputReader in ; private OutputWriter out ; private long n ; private long l ; private long r ; private int k ;   public void solve ( int testNumber , InputReader in , OutputWriter out ) { this . in = in ; this . out = out ; n = in . nextLong ( ) ; k = in . nextInt ( ) ; l = 1 ; r = n ; while ( true ) { while ( r - l >= 48 ) { getInterval ( ) ;

import sys   input = sys . stdin . readline   from random import randint   def solve ( ) : n , k = map ( int , input ( ) . split ( ) ) l = 1 r = n while True : c = ( l + r ) // 2 w1 = min ( c + k , n ) - max ( l - k , 1 ) w2 = min ( r + k , n ) - max ( c + 1 - k , 1 ) if max ( w1 , w2 ) + 1 >= r - l + 1 : pos = randint ( l , r ) print ( pos , pos ) sys . stdout . flush ( ) if input ( ) . strip ( ) == ' Yes ' : break else : print ( l , c ) sys . stdout . flush ( ) if input ( ) . strip ( ) == ' Yes ' : if l == c : break r = c else : l = c + 1 l = max ( l - k , 1 ) r = min ( r + k , n )   solve ( ) NEW_LINE


n , k = map ( int , raw_input ( ) . split ( ) ) i_from = 1 i_to = nq_limit = 4500 - 100 NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . Arrays ; import java . util . Random ; import java . util . StringTokenizer ;   public class _507B {   public static void main ( String [ ] args ) { FastScanner fs = new FastScanner ( ) ; long n = fs . nextLong ( ) , k = fs . nextLong ( ) ; long min = 1 , max = n ; Random r = new Random ( ) ; while ( true ) { if ( max - min > 100 ) { long mid = ( max + min ) / 2 ; System . out . println ( min + " ▁ " + mid ) ; System . out . flush ( ) ; String input = fs . next ( ) ; if ( input . equals ( " Yes " ) ) { max = mid ; } else { min = mid + 1 ; } } else { long toPick = r . nextInt ( ( int ) ( max - min + 1 ) ) + min ; System . out . println ( toPick + " ▁ " + toPick ) ; System . out . flush ( ) ; String input = fs . next ( ) ; if ( input . equals ( " Yes " ) ) { return ; } else {


import java . util . Scanner ;   public class FindTheBone {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; int k = sc . nextInt ( ) ; int [ ] h = new int [ n + 1 ] ; for ( int i = 0 ; i < m ; i ++ ) h [ sc . nextInt ( ) ] ++ ; int i = 0 , pos = 1 , u , v ; while ( i < k ) { i ++ ; u = sc . nextInt ( ) ; v = sc . nextInt ( ) ; if ( h [ pos ] > 0 ) continue ; if ( u != pos && v != pos ) continue ; pos = pos != u ? u : v ; } System . out . println ( pos ) ; sc . close ( ) ; } }

n , m , k = map ( int , input ( ) . split ( ) ) holes = set ( map ( int , input ( ) . split ( ) ) ) p = 1 f = Truefor _ in range ( k ) : u , v = map ( int , input ( ) . split ( ) ) if not f : continue else : if p in holes : f = False break elif u == p : p = v elif v == p : p = uprint ( p ) NEW_LINE


import sys     def read ( func = int ) : return func ( sys . stdin . readline ( ) . strip ( ) )   def readList ( func = int ) : return list ( map ( func , sys . stdin . readline ( ) . strip ( ) . split ( ) ) )     n , m , k = readList ( ) H = set ( readList ( ) ) position = 1 locked = position in Hfor _ in range ( k ) : u , v = readList ( ) if u == position : if not locked : position = v   elif v == position : if not locked : position = u   locked = position in H     print ( position )   NEW_LINE


n , m , k = map ( int , input ( ) . split ( ) ) h = { int ( x ) for x in input ( ) . split ( ) } x = 1 for _ in range ( k ) : if x in h : break u , v = map ( int , input ( ) . split ( ) ) if u == x : x = v elif v == x : x = uprint ( x ) NEW_LINE


nmk = input ( ) . split ( )   n = int ( nmk [ 0 ] ) NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . math . BigInteger ; import java . util . * ; import static java . util . Arrays . sort ; import javafx . util . Pair ;   public class Main {   public static void main ( String [ ] args ) {   FastScanner input = new FastScanner ( ) ; int n = input . nextInt ( ) ; int m = input . nextInt ( ) ; int k = input . nextInt ( ) ; TreeSet < Integer > set = new TreeSet < > ( ) ; for ( int i = 0 ; i < m ; i ++ ) { set . add ( input . nextInt ( ) ) ; } int start = 1 ; for ( int i = 0 ; i < k ; i ++ ) { int u = input . nextInt ( ) ; int v = input . nextInt ( ) ; if ( set . contains ( start ) ) { System . out . println ( start ) ; return ; } if ( start == u ) { start = v ; } else if ( start == v ) { start = u ; } } System . out . println ( start ) ; }   static class FastScanner {   BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( " " ) ;   String next ( ) { while ( ! st . hasMoreTokens ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; }   int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   long nextLong ( ) {   return Long . parseLong ( next ( ) ) ; }   double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; }   String nextLine ( ) throws IOException { return br . readLine ( ) ; } }   }


import java . util . * ; import java . io . * ; import java . lang . * ;    public class Forces {   public static PrintWriter cout ; public static void main ( String ... arg ) throws IOException {


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


import javax . print . DocFlavor ; import javax . swing . * ; import java . awt . image . BandedSampleModel ; import java . util . * ;   public class Example { static long [ ] [ ] dp ;

n , k = map ( int , input ( ) . split ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) for i in range ( 1 , n + 1 ) : if k > i : k -= i else : breakprint ( a [ k - 1 ] ) NEW_LINE


n , k = map ( int , input ( ) . split ( ' ▁ ' ) ) arr = list ( map ( int , input ( ) . split ( ' ▁ ' ) ) )   l = len ( arr )   def ans ( ) : greater = 0 prev = 0 for i in range ( l ) : greater = ( .5 * ( ( i + 1 ) ** 2 ) ) + ( .5 * ( i + 1 ) ) if greater >= k : dif = int ( k - prev ) return arr [ dif - 1 ] prev = greaterprint ( ans ( ) ) NEW_LINE


import sysinput = sys . stdin . readline   n , k = [ int ( i ) for i in input ( ) . split ( ) ] a = [ int ( i ) for i in input ( ) . split ( ) ] count = 1 while k - count > 0 : k -= count count += 1 print ( a [ k - 1 ] ) NEW_LINE


import sysinput = sys . stdin . readline   n , k = [ int ( i ) for i in input ( ) . split ( ) ] a = [ int ( i ) for i in input ( ) . split ( ) ] count = 1 while k > count : k -= count count += 1 print ( a [ k - 1 ] ) NEW_LINE


import java . util . * ;   public class Check2 { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; long n = sc . nextLong ( ) ; long k = sc . nextLong ( ) ; long [ ] ar = new long [ ( int ) ( n + 1 ) ] ; for ( int i = 1 ; i <= n ; i ++ ) { ar [ i ] = sc . nextLong ( ) ; } long y = 0 ; for ( long j = k ; j >= 0 ; j -- ) { long g = ( 1 + 8 * j ) ;


import java . util . HashMap ; import java . util . Map ; import java . util . Scanner ;   public class Letter {


import java . util . HashMap ; import java . util . Map ; import java . util . Scanner ;   public class Letter {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int k = sc . nextInt ( ) ; int [ ] a = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = sc . nextInt ( ) ; int count = 0 , ans = - 1 ; for ( int i = 0 ; i < n ; i ++ ) { count += ( i + 1 ) ; if ( count >= k ) { ans = a [ i - ( count - k ) ] ; break ; } } System . out . println ( ans ) ; sc . close ( ) ; } }


import java . io . BufferedReader ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . math . BigDecimal ; import java . math . BigInteger ; import java . util . Arrays ; import java . util . StringTokenizer ;   public class Main { public static void main ( String [ ] args )

from ctypes import c_int32   def gcd ( a , b ) :   if b == 0 :   return a   return gcd ( b , a % b )             def normalize_rational ( num , den ) :   NEW_LINE


def gcd ( a , b ) : if b == 0 : return a return gcd ( b , a % b ) def normalize_rational ( num , den ) : NEW_LINE


from ctypes import c_int32def gcd ( a , b ) : if b == 0 : return a return gcd ( b , a % b ) def normalize_rational ( num , den ) : NEW_LINE


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

import heapqimport sys   input = sys . stdin . readline     n , k = map ( int , input ( ) . split ( ) ) adj = [ [ ] for _ in range ( n ) ] for _ in range ( n - 1 ) : u , v = map ( int , input ( ) . split ( ) ) u -= 1 v -= 1 adj [ u ] . append ( v ) adj [ v ] . append ( u ) size = [ 1 ] * n   s = [ ] s . append ( ( 0 , - 1 , True ) ) while s : u , p , open = s . pop ( ) if open : s . append ( ( u , p , False ) ) for v in adj [ u ] : if v != p : s . append ( ( v , u , True ) ) else : for v in adj [ u ] : if v != p : size [ u ] += size [ v ]   q = [ ] heapq . heappush ( q , ( - ( size [ 0 ] - 1 ) , 0 , - 1 , 0 ) ) res = 0 for _ in range ( n - k ) : if not q : break d , u , p , a = heapq . heappop ( q ) res += - d for v in adj [ u ] : if v != p : a2 = a + 1 heapq . heappush ( q , ( - ( size [ v ] - a2 - 1 ) , v , u , a2 ) ) print ( res ) NEW_LINE


from sys import stdininput = stdin . readline   def dfs ( ) : size = [ 0 ] * n parent = [ 0 ] * n depth = [ 0 ] * n marked = [ False ] * n stack = [ 0 ] while stack : node = stack [ - 1 ] if marked [ node ] : stack . pop ( ) if node != 0 : size [ parent [ node ] ] += size [ node ] + 1 continue marked [ node ] = True for neighbor in tree [ node ] : if neighbor == parent [ node ] : continue parent [ neighbor ] = node depth [ neighbor ] = depth [ node ] + 1 stack . append ( neighbor ) return ( depth , size )   n , k = [ int ( x ) for x in input ( ) . split ( ) ] tree = [ [ ] for _ in range ( n ) ] for i in range ( n - 1 ) : u , v = [ int ( x ) for x in input ( ) . split ( ) ] tree [ u - 1 ] . append ( v - 1 ) tree [ v - 1 ] . append ( u - 1 ) depth , size = dfs ( ) ans = sum ( sorted ( [ depth [ i ] - size [ i ] for i in range ( n ) ] ) [ - k : ] ) print ( ans ) NEW_LINE


''' from ▁ heapq ▁ import ▁ * t = int ( input ( ) ) for ▁ i ▁ in ▁ range ( t ) : ▁ ▁ ▁ ▁ n = int ( input ( ) ) ▁ ▁ ▁ ▁ arr = [ 0 ▁ for ▁ i ▁ in ▁ range ( n ) ] ▁ ▁ ▁ ▁ heap = [ ] ▁ ▁ ▁ ▁ heappush ( heap , [ n , 1 ] ) ▁ ▁ ▁ ▁ while ▁ heap : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ pop = heappop ( heap ) ''' import sys , threadingsys . setrecursionlimit ( 300000 ) threading . stack_size ( 10 ** 8 ) def solve ( ) : n , k = map ( int , input ( ) . split ( ) ) n1 = [ n , k ] adj = { } depths = { } cities = [ ] subtrees = { } nums = { } for i in range ( n - 1 ) : a , b = map ( int , input ( ) . split ( ) ) if a not in adj : adj [ a ] = [ ] if b not in adj : adj [ b ] = [ ] adj [ a ] . append ( b ) adj [ b ] . append ( a ) v = set ( ) def dfs ( node , depth ) : v . add ( node ) depths [ node ] = depth subtrees [ node ] = 0 for child in adj . get ( node , [ ] ) : if child not in v : NEW_LINE


import sysimport threadingfrom collections import defaultdict   n , k = list ( map ( int , input ( ) . split ( ) ) ) adj = defaultdict ( list ) for _ in range ( n - 1 ) : a , b = list ( map ( int , input ( ) . split ( ) ) ) adj [ a ] . append ( b ) adj [ b ] . append ( a ) li = [ ]     def fun ( node , par , ht ) : size = 1 for ch in adj [ node ] : if ch != par : size += fun ( ch , node , ht + 1 ) li . append ( ht - size ) return size   def main ( ) : fun ( 1 , - 1 , 1 ) li . sort ( reverse = True ) print ( sum ( li [ : k ] ) ) if __name__ == " _ _ main _ _ " : sys . setrecursionlimit ( 10 ** 6 ) threading . stack_size ( 10 ** 8 ) t = threading . Thread ( target = main ) t . start ( ) t . join ( ) NEW_LINE


import java . util . * ; import java . io . * ; import java . math . * ;   public class Main {   final static int mod = 1000000007 ; static FastReader sc ; static PrintWriter out ; static boolean test_case_input = false ;   public static void solution ( ) throws IOException {


import java . io . * ; import java . util . * ;   public class KIndustrialCities { public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; BufferedWriter bw = new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ;   String [ ] nk = br . readLine ( ) . split ( " ▁ " ) ; int n = Integer . parseInt ( nk [ 0 ] ) ; int k = Integer . parseInt ( nk [ 1 ] ) ;   ArrayList < Integer > [ ] adj = new ArrayList [ n + 1 ] ; for ( int i = 0 ; i < ( n + 1 ) ; i ++ ) { adj [ i ] = new ArrayList < Integer > ( ) ; } adj [ 1 ] . add ( 0 ) ; for ( int l = 0 ; l < ( n - 1 ) ; l ++ ) {


import java . util . Scanner ; public class Main { static Scanner in = new Scanner ( System . in ) ; public static void main ( String [ ] args ) { int n , d , e ; int ans = Integer . MAX_VALUE ; n = in . nextInt ( ) ; d = in . nextInt ( ) ; e = in . nextInt ( ) ; int num ; for ( int i = 0 ; i <= ( n / ( e * 5 ) ) ; i ++ ) { num = ( n - e * 5 * i ) % d ; ans = Math . min ( ans , num ) ; } System . out . println ( ans ) ; } }

n , d , e = int ( input ( ) ) , int ( input ( ) ) , int ( input ( ) ) * 5   minn = nfor i in range ( d ) : for j in range ( e ) : if i + j != 0 : k = n % ( d * i + e * j ) % d % e if minn > k : minn = kprint ( minn ) NEW_LINE


n = int ( input ( ) ) d = int ( input ( ) ) e = int ( input ( ) ) ans = n % dwhile n >= 5 * e : n -= ( 5 * e ) ans = min ( ans , n % d ) print ( ans )   NEW_LINE


rub = int ( input ( ) ) dolls = int ( input ( ) ) eur = int ( input ( ) )   dollars = [ ] euros = [ ] for i in [ 1 , 2 , 5 , 10 , 20 , 50 , 100 ] : dollars . append ( dolls * i ) for j in [ 5 , 10 , 20 , 50 , 100 , 200 ] : euros . append ( eur * j )   res = float ( ' inf ' )   for i in range ( 0 , rub + 1 , euros [ 0 ] ) : res = min ( res , ( rub - i ) % dollars [ 0 ] )   print ( rub if res == float ( ' inf ' ) else res ) NEW_LINE


n = int ( input ( ) ) d = int ( input ( ) ) e = int ( input ( ) ) i = 0 ans = nwhile ( i * e * 5 <= n ) : ans = min ( ans , ( n - i * e * 5 ) % d ) i += 1 print ( ans ) NEW_LINE


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


import java . util . Scanner ;   public class A1214 {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int N = in . nextInt ( ) ; int D = in . nextInt ( ) ; int E = 5 * in . nextInt ( ) ; int min = N ; for ( int e = 0 ; e <= N ; e += E ) { min = Math . min ( min , ( N - e ) % D ) ; } System . out . println ( min ) ; }   }


import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int d = sc . nextInt ( ) ; int e = sc . nextInt ( ) ; int eumin = 5 * e , rel = n ; for ( int i = 0 ; i * d <= n ; i ++ ) {


import java . io . * ; import java . util . * ; import java . util . ArrayList ; public class CodeForce { static BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; static StringBuilder sb = new StringBuilder ( ) ; static int next ( String [ ] sr , int ind ) { if ( sr [ ind ] . equals ( " S " ) || sr [ ind ] . equals ( " F " ) ) return 1000 ; return Integer . parseInt ( sr [ ind ] ) ; } public static void main ( String [ ] args ) throws IOException { int m = Integer . parseInt ( br . readLine ( ) ) ; int [ ] [ ] gf = new int [ 5 ] [ 5 ] ; for ( int i = 0 ; i < m ; i ++ ) { String [ ] sr = br . readLine ( ) . split ( " ▁ " ) ; int a = next ( sr , 0 ) ; int b = next ( sr , 1 ) ; gf [ a - 1 ] [ b - 1 ] = 1 ; gf [ b - 1 ] [ a - 1 ] = 1 ; } for ( int i = 0 ; i < 5 ; i ++ ) for ( int j = 0 ; j != i && j < 5 ; j ++ ) for ( int k = 0 ; k != i & k != j && k < 5 ; k ++ ) { if ( gf [ i ] [ j ] == 1 && gf [ j ] [ k ] == 1 && gf [ i ] [ k ] == 1 ) { System . out . println ( " WIN " ) ; return ; } else if ( gf [ i ] [ j ] == 0 && gf [ i ] [ k ] == 0 && gf [ j ] [ k ] == 0 ) { System . out . println ( " WIN " ) ; return ; } } System . out . println ( " FAIL " ) ; } }

m = int ( input ( ) ) NEW_LINE n = { } NEW_LINE n [ 1 ] = 0 NEW_LINE n [ 2 ] = 0 NEW_LINE n [ 3 ] = 0 NEW_LINE n [ 4 ] = 0 NEW_LINE n [ 5 ] = 0 NEW_LINE for i in range ( m ) : NEW_LINE INDENT a , b = map ( int , input ( ) . split ( ) ) NEW_LINE n [ a ] += 1 NEW_LINE n [ b ] += 1 NEW_LINE DEDENT if ( n [ 1 ] == n [ 2 ] == n [ 3 ] == n [ 4 ] == n [ 5 ] and n [ 1 ] == 2 ) : NEW_LINE INDENT print ( " FAIL " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " WIN " ) NEW_LINE DEDENT


import sys NEW_LINE from array import array NEW_LINE def input ( ) : NEW_LINE INDENT return sys . stdin . buffer . readline ( ) . decode ( ' utf - 8' ) NEW_LINE DEDENT n = int ( input ( ) ) NEW_LINE matrix = [ [ 0 ] * 5 for _ in range ( 5 ) ] NEW_LINE for u , v in ( map ( int , input ( ) . split ( ) ) for _ in range ( n ) ) : NEW_LINE INDENT matrix [ u - 1 ] [ v - 1 ] = matrix [ v - 1 ] [ u - 1 ] = 1 NEW_LINE DEDENT for i in range ( 5 ) : NEW_LINE INDENT if sum ( matrix [ i ] [ j ] for j in range ( 5 ) if i != j ) != 2 : NEW_LINE INDENT print ( ' WIN ' ) NEW_LINE exit ( ) NEW_LINE DEDENT DEDENT print ( ' FAIL ' ) NEW_LINE


from collections import Counter NEW_LINE n = int ( input ( ) ) NEW_LINE l = [ ] NEW_LINE for i in range ( n ) : NEW_LINE INDENT x , y = map ( int , input ( ) . split ( ) ) NEW_LINE l . append ( x ) NEW_LINE l . append ( y ) NEW_LINE DEDENT d = Counter ( l ) NEW_LINE s1 = list ( d . values ( ) ) NEW_LINE f = True NEW_LINE if ( len ( list ( d . keys ( ) ) ) <= 4 ) : NEW_LINE INDENT print ( ' WIN ' ) NEW_LINE exit ( ) NEW_LINE DEDENT for p in s1 : NEW_LINE INDENT if ( p == 1 ) : NEW_LINE INDENT print ( ' WIN ' ) NEW_LINE f = False NEW_LINE break NEW_LINE DEDENT elif ( p >= 3 ) : NEW_LINE INDENT print ( ' WIN ' ) NEW_LINE f = False NEW_LINE break NEW_LINE DEDENT DEDENT if ( f ) : NEW_LINE INDENT print ( ' FAIL ' ) NEW_LINE DEDENT


def createMatrix ( rowCount , colCount , dataList ) : NEW_LINE INDENT mat = [ ] NEW_LINE for i in range ( rowCount ) : NEW_LINE INDENT rowList = [ ] NEW_LINE for j in range ( colCount ) : NEW_LINE INDENT rowList . append ( dataList [ rowCount * i + j ] ) NEW_LINE DEDENT mat . append ( rowList ) NEW_LINE DEDENT return mat NEW_LINE DEDENT def check_range ( friends_mat ) : NEW_LINE INDENT for i in range ( 2 , 5 ) : NEW_LINE INDENT for j in range ( 0 , i ) : NEW_LINE INDENT for k in range ( 0 , j ) : NEW_LINE INDENT if ( friends_mat [ i ] [ j ] == 1 and friends_mat [ i ] [ k ] == 1 and friends_mat [ k ] [ j ] == 1 ) or ( friends_mat [ i ] [ j ] == 0 and friends_mat [ i ] [ k ] == 0 and friends_mat [ k ] [ j ] == 0 ) : NEW_LINE INDENT return True NEW_LINE DEDENT DEDENT DEDENT DEDENT return False NEW_LINE DEDENT alpha = [ 0 ] * 25 NEW_LINE friends_relations = createMatrix ( 5 , 5 , alpha ) NEW_LINE n = int ( input ( ) ) NEW_LINE while n : NEW_LINE INDENT A = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE row = A [ 0 ] NEW_LINE col = A [ 1 ] NEW_LINE friends_relations [ row - 1 ] [ col - 1 ] = 1 NEW_LINE friends_relations [ col - 1 ] [ row - 1 ] = 1 NEW_LINE n -= 1 NEW_LINE DEDENT if check_range ( friends_relations ) : NEW_LINE INDENT print ( " WIN " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " FAIL " ) NEW_LINE DEDENT


m = int ( input ( ) ) NEW_LINE n = { } NEW_LINE n [ 5 ] = 0 NEW_LINE n [ 4 ] = 0 NEW_LINE n [ 3 ] = 0 NEW_LINE n [ 2 ] = 0 NEW_LINE n [ 1 ] = 0 NEW_LINE for i in range ( m ) : NEW_LINE INDENT g = input ( ) . split ( ) NEW_LINE n [ int ( g [ 0 ] ) ] += 1 NEW_LINE n [ int ( g [ 1 ] ) ] += 1 NEW_LINE DEDENT if n [ 1 ] == n [ 2 ] == n [ 3 ] == n [ 4 ] == n [ 5 ] == 2 : NEW_LINE INDENT print ( ' FAIL ' ) NEW_LINE exit ( ) NEW_LINE DEDENT print ( ' WIN ' ) NEW_LINE


import java . util . * ; public class saitama_hotel {   public static void main ( String args [ ] ) { Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) ; int s = in . nextInt ( ) ; int a [ ] = new int [ s + 1 ] ; for ( int i = 0 ; i < n ; i ++ ) { int x = in . nextInt ( ) ; int y = in . nextInt ( ) ; a [ x ] = Math . max ( a [ x ] , y ) ; } int ans = 0 ; while ( s > 0 ) { if ( a [ s ] - ans >= 0 ) ans = ans + a [ s ] - ans ; s -- ;   ans ++ ; } System . out . println ( ans ) ; } }

n , s = map ( int , input ( ) . split ( ) ) ans = sfor _ in range ( n ) : f , t = map ( int , input ( ) . split ( ) ) ans = max ( ans , f + t ) print ( ans ) NEW_LINE


n , s = map ( int , input ( ) . split ( ) ) for i in range ( n ) : t , f = map ( int , input ( ) . split ( ) ) s = max ( s , t + f ) print ( s )       NEW_LINE


n , top = map ( int , input ( ) . split ( ) )   r = lambda : list ( map ( int , input ( ) . split ( ) ) ) arr = [ r ( ) for _ in range ( n ) ]   arr . sort ( reverse = True , key = lambda x : x [ 0 ] ) arr . append ( [ 0 , 0 ] ) c = 0   NEW_LINE


n , s = map ( int , input ( ) . split ( ) )   ft = [ ] for _ in range ( n ) : f , t = map ( int , input ( ) . split ( ) ) ft . append ( [ f , t ] ) ft . sort ( reverse = True ) prevf , ans = s , 0 for f , t in ft : ans += prevf - f if ans < t : ans = t prevf = fans += ft [ - 1 ] [ 0 ] print ( ans ) NEW_LINE


import com . sun . org . apache . bcel . internal . generic . AALOAD ; import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . math . BigInteger ; import java . util . * ; import java . util . stream . IntStream ; import javafx . util . Pair ;   public class Main {   static void sort ( double a [ ] ) { Random ran = new Random ( ) ; for ( int i = 0 ; i < a . length ; i ++ ) { int r = ran . nextInt ( a . length ) ; double temp = a [ r ] ; a [ r ] = a [ i ] ; a [ i ] = temp ; }   Arrays . sort ( a ) ; }   public static void main ( String [ ] args ) throws IOException { Scanner input = new Scanner ( System . in ) ; int n = input . nextInt ( ) ; int s = input . nextInt ( ) ; long total = s ; for ( int i = 1 ; i <= n ; i ++ ) { total = Math . max ( total , input . nextInt ( ) + input . nextInt ( ) ) ; } System . out . println ( total ) ; }   }


import java . util . Scanner ;   public class SaitamaFuckedUp { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ;   int n = scan . nextInt ( ) ; int s = scan . nextInt ( ) ; int [ ] [ ] floor = new int [ n ] [ 2 ] ; int t = 0 ;   for ( int i = 0 ; i < n ; i ++ ) { floor [ i ] [ 0 ] = scan . nextInt ( ) ; floor [ i ] [ 1 ] = scan . nextInt ( ) ; }   for ( int i = 0 ; i < n ; i ++ ) { for ( int j = i + 1 ; j < n ; j ++ ) { if ( floor [ i ] [ 0 ] < floor [ j ] [ 0 ] ) { int x = floor [ i ] [ 0 ] ; floor [ i ] [ 0 ] = floor [ j ] [ 0 ] ; floor [ j ] [ 0 ] = x ;   x = floor [ i ] [ 1 ] ; floor [ i ] [ 1 ] = floor [ j ] [ 1 ] ; floor [ j ] [ 1 ] = x ; } } t += s - floor [ i ] [ 0 ] ; s = floor [ i ] [ 0 ] ; if ( floor [ i ] [ 1 ] > t ) { t = floor [ i ] [ 1 ] ; } } System . out . println ( t + s ) ; } }


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


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 , f = map ( int , input ( ) . split ( ) ) gain = [ ] sold = 0 for i in range ( n ) : k , l = map ( int , input ( ) . split ( ) ) sold += min ( l , k ) if l == 0 or k == 0 or l < k : gain . append ( 0 ) else : if 2 * k > l : gain . append ( l - k ) else : gain . append ( k )   gain = sorted ( gain , reverse = True ) for i in range ( f ) : sold += gain [ i ] print ( sold ) NEW_LINE


planDays , chosenDays = map ( int , input ( ) . split ( ) ) total = [ ] t = 0 for i in range ( planDays ) : products , clients = map ( int , input ( ) . split ( ) )   NEW_LINE


numOfDays , sellOffDays = map ( int , input ( ) . split ( ) ) totalProductsSold = 0 l = [ ] for i in range ( numOfDays ) : numOfProduct , numOfClients = map ( int , input ( ) . split ( ) ) totalProductsSold += min ( numOfProduct , numOfClients ) l . append ( min ( 2 * numOfProduct , numOfClients ) - min ( numOfProduct , numOfClients ) ) l . sort ( ) print ( totalProductsSold + sum ( l [ numOfDays - sellOffDays : ] ) ) NEW_LINE


def solve ( n , f , kls ) : base = sum ( min ( k , l ) for k , l in kls ) plus = sorted ( [ min ( 2 * k , l ) - min ( k , l ) for k , l in kls ] ) [ : : - 1 ] res = base + sum ( plus [ : f ] ) print ( res )   def main ( ) : n , f = map ( int , input ( ) . split ( ) ) kls = [ ] for _ in range ( n ) : k , l = map ( int , input ( ) . split ( ) ) kls . append ( ( k , l ) ) solve ( n , f , kls )   if __name__ == ' _ _ main _ _ ' : main ( ) NEW_LINE


import java . io . * ; import java . math . BigDecimal ; import java . math . BigInteger ; import java . math . RoundingMode ; import java . util . * ; import java . util . concurrent . LinkedBlockingDeque ;    public class scratch_25 {

from sys import stdin , stdoutfor _ in range ( int ( stdin . readline ( ) ) ) : NEW_LINE


import sysinput = lambda : sys . stdin . readline ( ) . rstrip ( ) t = int ( input ( ) ) for _ in range ( t ) : s , t = input ( ) . split ( ) s = list ( s ) ss = sorted ( s ) t = list ( t ) for i in range ( len ( s ) ) : if s [ i ] == ss [ i ] : continue for j in range ( len ( s ) - 1 , - 1 , - 1 ) : if s [ j ] == ss [ i ] : s [ i ] , s [ j ] = s [ j ] , s [ i ] break break for i , j in zip ( s , t ) : if i < j : print ( ' ' . join ( s ) ) break elif i > j : print ( ' - - - ' ) break else : if len ( s ) < len ( t ) : print ( ' ' . join ( s ) ) else : print ( ' - - - ' ) NEW_LINE


for i in range ( int ( input ( ) ) ) : a , b = map ( list , input ( ) . split ( ) ) ind = - 1 for i in range ( len ( a ) ) : if a [ i ] != ' A ' : m = a [ i ] flag = False ind = i for g in range ( i + 1 , len ( a ) ) : if flag : if a [ g ] <= m : m = a [ g ] ind = g else : if a [ g ] < m : flag = True m = a [ g ] ind = g if flag : a [ i ] , a [ ind ] = a [ ind ] , a [ i ] break a = " " . join ( a ) b = " " . join ( b ) if a < b : print ( a ) else :     print ( ' - - - ' ) NEW_LINE


for i in range ( int ( input ( ) ) ) : a , b = map ( list , input ( ) . split ( ) ) minAtSuffix = [ 0 ] * ( len ( a ) - 1 ) minAtSuffixPos = [ 0 ] * ( len ( a ) - 1 ) minAtSuffix [ - 1 ] = a [ - 1 ] minAtSuffixPos [ - 1 ] = len ( a ) - 1   for i in range ( len ( a ) - 3 , - 1 , - 1 ) :   if a [ i + 1 ] < minAtSuffix [ i + 1 ] :   minAtSuffix [ i ] = a [ i + 1 ] minAtSuffixPos [ i ] = i + 1 else :   minAtSuffix [ i ] = minAtSuffix [ i + 1 ] minAtSuffixPos [ i ] = minAtSuffixPos [ i + 1 ]   for i in range ( len ( a ) - 1 ) : if minAtSuffix [ i ] < a [ i ] : a [ i ] , a [ minAtSuffixPos [ i ] ] = a [ minAtSuffixPos [ i ] ] , a [ i ] break a = " " . join ( a ) b = " " . join ( b ) if a >= b : print ( ' - - - ' ) else : print ( a ) NEW_LINE


n = int ( input ( ) ) k = list ( map ( int , input ( ) . split ( ) ) ) s = list ( map ( int , input ( ) . split ( ) ) )    def t_s ( j , u ) : while ( u - j ) > 1e-6 : f = ( u - j ) / 3 x2 = t_p ( j + f ) x3 = t_p ( u - f ) if x2 < x3 : u = j + 2 * f else : j = j + f return t_p ( ( j + u ) / 2 )    def t_p ( p ) : return max ( abs ( p - k [ i ] ) / s [ i ] for i in range ( n ) )    r = 0 t = 1e10f or p in k : r = max ( p , r ) t = min ( p , t ) print ( t_s ( t , r ) )

from math import isclosen = int ( input ( ) ) x = list ( map ( int , input ( ) . split ( ) ) ) v = list ( map ( int , input ( ) . split ( ) ) ) xx = list ( ( x [ i ] , v [ i ] ) for i in range ( n ) ) xx . sort ( ) l , h = xx [ 0 ] [ 0 ] , xx [ - 1 ] [ 0 ] m = ( h + l ) / 2 while not isclose ( l , h ) : m = ( h + l ) / 2 t = abs ( m - xx [ 0 ] [ 0 ] ) / xx [ 0 ] [ 1 ] a , b = True , t for i in range ( 1 , n ) : t2 = abs ( m - xx [ i ] [ 0 ] ) / xx [ i ] [ 1 ] if not isclose ( t , t2 ) : s = False if t2 > b : b = t2 a = bool ( xx [ i ] [ 0 ] < m ) if a : h = m else : l = mprint ( max ( abs ( m - xx [ i ] [ 0 ] ) / xx [ i ] [ 1 ] for i in range ( n ) ) ) NEW_LINE


n = int ( input ( ) ) k = list ( map ( int , input ( ) . split ( ) ) ) s = list ( map ( int , input ( ) . split ( ) ) )     def t_s ( j , u ) : while ( u - j ) > 1e-6 : f = ( u - j ) / 3 x2 = t_p ( j + f ) x3 = t_p ( u - f ) if x2 < x3 : u = j + 2 * f else : j = j + f return t_p ( ( j + u ) / 2 )     def t_p ( p ) : return max ( abs ( p - k [ i ] ) / s [ i ] for i in range ( n ) )     r = 0 t = 1e10 for p in k : r = max ( p , r ) t = min ( p , t ) print ( t_s ( t , r ) ) NEW_LINE


import java . util . * ; import java . io . * ;   public class CF780B2 { static BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; static BufferedWriter bw = new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ; static int [ ] [ ] arr ; static int n ; static final double PRECISION = 1e-8 ;   public static void main ( String [ ] args ) throws IOException { n = Integer . parseInt ( br . readLine ( ) ) ; arr = new int [ n ] [ 2 ] ; String [ ] stringArr = br . readLine ( ) . split ( " ▁ " ) ; int largest = 0 ; for ( int i = 0 ; i < n ; i ++ ) { int curr = Integer . parseInt ( stringArr [ i ] ) ; arr [ i ] [ 0 ] = curr ; largest = Math . max ( largest , curr ) ; }   stringArr = br . readLine ( ) . split ( " ▁ " ) ; for ( int i = 0 ; i < n ; i ++ ) { int curr = Integer . parseInt ( stringArr [ i ] ) ; arr [ i ] [ 1 ] = curr ; }


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 ; public class Codeforces { public static PrintWriter out = new PrintWriter ( new BufferedOutputStream ( System . out ) ) ; static long MOD = ( long ) ( 1e9 + 7 ) ;