import java . util . * ; import java . io . * ;   public class Main { public static void main ( String [ ] args ) throws IOException { FastScanner in = new FastScanner ( System . in ) ; PrintWriter out = new PrintWriter ( System . out ) ; new Main ( ) . run ( in , out ) ; out . close ( ) ; }   public static long mod = 17352642619633L ;   void run ( FastScanner in , PrintWriter out ) { int N = in . nextInt ( ) ; int W = in . nextInt ( ) ; int H = in . nextInt ( ) ;   int [ ] g = new int [ N ] ; int [ ] p = new int [ N ] ; int [ ] t = new int [ N ] ;

from collections import namedtuple   Dancer = namedtuple ( ' Dancer ' , [ ' category ' , ' x ' , ' y ' , ' idx ' , ' group ' ] )   def read_dancer ( idx ) : group , pos , time = [ int ( x ) for x in input ( ) . split ( ' ▁ ' ) ] x , y = None , None if group == 1 : x , y = pos , 0 else : x , y = 0 , pos return Dancer ( time - pos , x , y , idx , group )   n , w , h = [ int ( x ) for x in input ( ) . split ( ' ▁ ' ) ]   dancers = [ read_dancer ( idx ) for idx in range ( n ) ]   dancers_in = sorted ( dancers , key = lambda d : ( d . category , - d . group , d . x , - d . y ) ) dancers_out = sorted ( dancers , key = lambda d : ( d . category , d . group , d . x , - d . y ) )     end_pos = [ None for _ in range ( n ) ]   def get_end_pos ( dancer ) : x , y = None , None if dancer . x == 0 : x , y = w , dancer . y else : x , y = dancer . x , h return ( x , y )   for i in range ( n ) : end_pos [ dancers_in [ i ] . idx ] = get_end_pos ( dancers_out [ i ] )   for i in range ( n ) : print ( * end_pos [ i ] ) NEW_LINE


n , w , h = map ( int , input ( ) . split ( ) )       D = [ ]       original = [ ]       for i in range ( n ) :   g , p , t = map ( int , input ( ) . split ( ) )       a = p - t       p = p if g == 1 else - p       original . append ( ( ) )   D . append ( ( a , p , i ) )       D . sort ( )       from bisect import bisect       res = [ None ] * n       i = 0   while i < len ( D ) :   a = D [ i ] [ 0 ]   j = bisect ( D , ( a + 1 , - n , 0 ) , lo = i )   m = bisect ( D , ( a , 0 , 0 ) , lo = i , hi = j )       L = D [ i : j ]   R = D [ m : j ] + D [ i : m ]       for t in range ( len ( L ) ) :   _ , _ , d = L [ t ]   _ , p , _ = R [ t ]   if p > 0 :   res [ d ] = ( p , h )   else :   res [ d ] = ( w , - p )       i = j       print ( ' \n ' . join ( str ( x ) + ' ▁ ' + str ( y ) for x , y in res ) )           NEW_LINE


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

def g ( t ) : return [ ( t [ i ] + t [ i - 1 ] ) // 2 for i in range ( 1 , len ( t ) ) ] + [ 1000000 ] NEW_LINE def h ( a , b , c ) : j = s = 0 NEW_LINE for i in b : while NEW_LINE i > c [ j ] : j += 1 NEW_LINE s += abs ( i - a [ j ] ) NEW_LINE return s   n , k = map ( int , input ( ) . split ( ) ) NEW_LINE q = ' abcdefghijklmnopqrstuvwxyz ' NEW_LINE s , a = 0 , { i : [ ] for i in q } NEW_LINE for i , j in enumerate ( input ( ) ) : a [ j ] . append ( i ) NEW_LINE c = { i : g ( a [ i ] ) for i in q }   NEW_LINE def f ( ) : s , b = 0 , { i : [ ] for i in q } NEW_LINE t = input ( ) NEW_LINE for i , j in enumerate ( t ) : b [ j ] . append ( i ) NEW_LINE for i in q : if NEW_LINE b [ i ] : NEW_LINE if a [ i ] : NEW_LINE INDENT s += h ( a [ i ] , b [ i ] , c [ i ] ) else : NEW_LINE s += len ( t ) * len ( b [ i ] ) NEW_LINE DEDENT return str ( s )   print ( ' \n ' . join ( f ( ) for i in range ( n ) ) ) NEW_LINE


from bisect import bisect_leftn , k = map ( int , input ( ) . split ( ) ) NEW_LINE q = " abcdefghijklmnopqrstuvwxyz " NEW_LINE a = { i : [ ] for i in q }   for key , value in enumerate ( input ( ) ) : a [ value ] . append ( key ) NEW_LINE


import java . io . * ; import java . math . BigInteger ; import java . text . DecimalFormat ; import java . util . * ;         public class Main { public static InputReader in ; public static PrintWriter pw ; public static void main ( String args [ ] ) { new Thread ( null , new Runnable ( ) { public void run ( ) { try { solve ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } } , "1" , 1 << 26 ) . start ( ) ; } static ArrayList < Integer > g [ ] ; static ArrayList < Integer > h [ ] ; static boolean visited [ ] ; static int [ ] parent ; static int par [ ] ; static int degree [ ] ; static int edjes = 0 ; static int start = - 1 ; static int end = - 1 ; static int Total = 0 ; static int time1 [ ] ; static int time2 [ ] ; static int glob = 0 ; static long ans [ ] = new long [ 1000000 ] ; static boolean vis2 [ ] [ ] ;


import javax . annotation . processing . SupportedSourceVersion ; import java . io . * ; import java . util . * ; import java . util . regex . Matcher ;   public class Main {   public static void main ( String [ ] args ) throws IOException { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; InputReader in = new InputReader ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; TaskB solver = new TaskB ( ) ; solver . solve ( in , out ) ; out . close ( ) ; }   private static class TaskB {   static final long max = 1000000000000000000L ; static final double eps = 0.0000001 ; static final long mod = 1000000007 ; static long X , Y ; static char line [ ] ;   void solve ( InputReader in , PrintWriter out ) throws IOException {   int a = in . nextInt ( ) ; line = in . nextLine ( ) . toCharArray ( ) ; List < Oper > list = new ArrayList < > ( ) ;   int last = - 1 ; for ( int i = 0 ; i < line . length ; i ++ ) {   if ( line [ i ] == ' a ' ) {   int C ;   if ( i == 0 ) { list . add ( new Oper ( 1 , 1 ) ) ; last = 2 ; } else if ( i - 2 >= 0 && i - 2 > last && line [ i - 1 ] == ' + ' && line [ i - 2 ] == ' + ' ) { if ( i - 3 >= 0 && line [ i - 3 ] == ' * ' ) C = getC ( i - 4 ) ; else if ( i - 3 >= 0 && line [ i - 3 ] == ' - ' ) C = - 1 ; else C = 1 ; list . add ( new Oper ( C , 0 ) ) ; last = i - 2 ; } else { if ( line [ i - 1 ] == ' * ' ) C = getC ( i - 2 ) ; else if ( line [ i - 1 ] == ' - ' ) C = - 1 ; else C = 1 ; list . add ( new Oper ( C , 1 ) ) ; last = i + 2 ; } } }


import re   class Term : def __init__ ( self , factor , type ) : self . factor = factor self . type = type def __str__ ( self ) : return ' ( % d ▁ * ▁ % s ) ' % ( self . factor , self . type )   a = int ( input ( ) ) s = ' + ' + input ( ) . strip ( ) terms = [ ] pos = 0 while pos != len ( s ) : sign = 1 if s [ pos ] == ' - ' : sign = - 1 factor = 1 if re . match ( ' \d ' , s [ pos + 1 ] ) : start = pos + 1 pos = start + 1 while s [ pos ] != ' * ' : pos += 1 factor = int ( s [ start : pos ] ) pos += 4 term_type = ' pre ' if s [ pos - 3 : pos ] == ' a + + ' : term_type = ' post ' terms . append ( Term ( sign * factor , term_type ) )   terms . sort ( key = lambda term : term . factor ) NEW_LINE


import re class Term : def __init__ ( self , factor , type ) : self . factor = factor self . type = type def __str__ ( self ) : return ' ( % d ▁ * ▁ % s ) ' % ( self . factor , self . type ) a = int ( input ( ) ) s = ' + ' + input ( ) . strip ( ) terms = [ ] pos = 0 while pos != len ( s ) : sign = 1 if s [ pos ] == ' - ' : sign = - 1 factor = 1 if re . match ( ' \d ' , s [ pos + 1 ] ) : start = pos + 1 pos = start + 1 while s [ pos ] != ' * ' : pos += 1 factor = int ( s [ start : pos ] ) pos += 4 term_type = ' pre ' if s [ pos - 3 : pos ] == ' a + + ' : term_type = ' post ' terms . append ( Term ( sign * factor , term_type ) ) terms . sort ( key = lambda term : term . factor ) NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; 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 ) {

t = int ( input ( ) )   while t : size , string = int ( input ( ) ) , input ( )   for i in range ( 0 , len ( string ) , 2 ) : print ( string [ i ] , end = ' ' ) print ( )           t -= 1 NEW_LINE


t = int ( input ( ) ) for _ in range ( t ) : n = int ( input ( ) ) s = input ( ) q = s [ n - 1 ] * n print ( q ) NEW_LINE


import matht = int ( input ( ) ) while t : n = int ( input ( ) ) s = input ( ) li = [ ] for i in range ( 0 , n ) : x = s [ i : i + n + 1 ] li . append ( x ) a = ' ' index = - 1 for i in range ( 0 , n ) : c = 0 d = 0 for j in li : if j [ i ] == '0' : c += 1 else : d += 1 if c == n : a = '0' index = i break elif d == n : a = '1' index = i break w = " " for i in range ( 0 , n ) : if i != index : w += "0" else : if d == n : w += "1" elif c == n : w += "0" print ( w ) t -= 1 NEW_LINE


for t in range ( int ( input ( ) ) ) : n = int ( input ( ) ) s = input ( ) print ( n * s [ n - 1 ] ) NEW_LINE


import java . util . Scanner ;   public class A1400 {   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 ( ) ; String S = in . next ( ) ; for ( int n = 0 ; n < N ; n ++ ) { output . append ( S . charAt ( 2 * n ) ) ; } output . append ( ' \n ' ) ; } System . out . print ( output ) ; }   }


import java . util . * ; public class Practice { void solve ( ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; while ( t -- > 0 ) { int n = sc . nextInt ( ) ; String bin = sc . next ( ) ; String ans = " " ; for ( int i = 0 ; i < bin . length ( ) ; i += 2 ) ans += " " + bin . charAt ( i ) ; System . out . println ( ans ) ; } } public static void main ( String [ ] args ) { Practice p = new Practice ( ) ; p . solve ( ) ; } }


import java . util . * ; public class sol { public static void main ( String ar [ ] ) { Scanner scan = new Scanner ( System . in ) ; int test = scan . nextInt ( ) ; while ( test -- > 0 ) { int n = Integer . parseInt ( scan . next ( ) ) ; String s = scan . next ( ) . trim ( ) ; String ch = "1" ; if ( s . charAt ( n - 1 ) == '0' ) ch = "0" ; while ( n -- > 0 ) System . out . print ( ch ) ; System . out . println ( ) ; } } }


import java . util . * ;   public class eDictonary { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int n = scan . nextInt ( ) ; String s = scan . next ( ) ; StringBuilder sb = new StringBuilder ( s ) ; int index = 0 ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( i == s . length ( ) - 1 ) { sb . deleteCharAt ( index ) ; break ; } else if ( sb . charAt ( index ) <= sb . charAt ( index + 1 ) ) { index ++ ; } else { sb . deleteCharAt ( index ) ; break ; } } System . out . println ( sb ) ; } }

n = int ( input ( ) ) s = input ( ) i = 1 while i < n and s [ i - 1 ] <= s [ i ] : i += 1 print ( s [ : i - 1 ] + s [ i : ] ) NEW_LINE


from sys import maxsize , stdout , stdin , stderrmod = int ( 1e9 + 7 ) def I ( ) : return int ( stdin . readline ( ) ) def lint ( ) : return [ int ( x ) for x in stdin . readline ( ) . split ( ) ] def S ( ) : return input ( ) . strip ( ) def grid ( r , c ) : return [ lint ( ) for i in range ( r ) ] from collections import defaultdictimport mathn = I ( ) s = input ( ) for i in range ( n - 1 ) : if ord ( s [ i ] ) > ord ( s [ i + 1 ] ) : s = s [ : i ] + s [ i + 1 : ] breakif len ( s ) == n : s = s [ : - 1 ] print ( s )   NEW_LINE


n = int ( input ( ) ) st = input ( ) for i in range ( n - 1 ) : if st [ i ] > st [ i + 1 ] : st = st [ : i ] + st [ i + 1 : ] breakif len ( st ) != n : print ( st ) else : print ( st [ : - 1 ] ) NEW_LINE


n = int ( input ( ) ) s = str ( input ( ) ) for i in range ( n - 1 ) : j = ord ( s [ i ] ) - ord ( ' a ' ) k = ord ( s [ i + 1 ] ) - ord ( ' a ' ) if j > k : p = i breakelse : print ( s [ 0 : n - 1 ] ) exit ( ) ans = s [ 0 : p ] + s [ p + 1 : n ] print ( ans ) NEW_LINE


import sysfrom os import pathif ( path . exists ( ' input . txt ' ) and path . exists ( ' output . txt ' ) ) : sys . stdout = open ( ' output . txt ' , ' w ' ) sys . stdin = open ( ' input . txt ' , ' r ' )   def main ( ) : n = int ( input ( ) ) s = input ( ) removed = False for i in range ( n - 1 ) : if s [ i ] > s [ i + 1 ] and not removed : removed = True continue print ( s [ i ] , end = ' ' ) if removed : print ( s [ n - 1 ] , end = ' ' ) main ( ) NEW_LINE


import java . util . * ; public class _1076A { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; String s = sc . next ( ) ; char c = ' \u0000' ; int f = 0 ; for ( int i = 0 ; i < n - 1 ; i ++ ) { char ch = s . charAt ( i ) ; char ch2 = s . charAt ( i + 1 ) ; if ( ch > ch2 ) { c = ch ; f = 1 ; break ; } } if ( f == 0 ) c = s . charAt ( n - 1 ) ; f = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( f == 0 && s . charAt ( i ) == c ) { f = 1 ; continue ; } System . out . print ( s . charAt ( i ) ) ; } } }


import javax . swing . plaf . IconUIResource ; import java . util . * ;


import java . lang . * ; import java . util . * ;   public class Abhishek { public static void main ( String [ ] args ) throws Exception { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; sc . nextLine ( ) ; StringBuilder s = new StringBuilder ( sc . nextLine ( ) ) ; char max = s . charAt ( 0 ) ; boolean fl = false ; for ( int i = 1 ; i < n ; i ++ ) { max = ( char ) Math . max ( s . charAt ( i ) , s . charAt ( i - 1 ) ) ; if ( s . charAt ( i - 1 ) > s . charAt ( i ) ) { s . deleteCharAt ( i - 1 ) ; fl = true ; break ; }   } if ( ! fl ) { s . deleteCharAt ( s . indexOf ( String . valueOf ( max ) ) ) ; }   System . out . println ( s ) ; } }


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 ( ) ) raw = input ( ) numbers = [ int ( token ) for token in raw . split ( ' ▁ ' ) ]   total = sum ( numbers )   smallest = 1000 for i in range ( N ) : for j in range ( i , N ) : sum1 = sum ( numbers [ i : j ] ) sum2 = total - sum1 smallest = min ( smallest , abs ( sum1 - sum2 ) )   print ( smallest )   NEW_LINE


import osimport sysfrom math import * from collections import *   NEW_LINE


n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) res = 360 for qq in range ( n ) : sm = 0 for i in range ( n - 1 ) : sm += a [ i ] q = 360 - sm res = min ( res , abs ( sm - q ) ) a = [ a [ - 1 ] ] + a [ : - 1 ] print ( res ) NEW_LINE


n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) )     res = float ( " inf " )     for i in range ( len ( a ) ) :   l , r = 0 , 360 for i in a [ i : ] + a [ : i ] : res = min ( res , abs ( l - r ) ) l += i r -= i   res = min ( res , abs ( l - r ) )   print ( res ) NEW_LINE


n = int ( input ( ) ) p = list ( map ( int , input ( ) . split ( ) ) ) r = [ 0 ] * nmn = 360 for i in range ( n ) : q = [ ] q . extend ( p [ i : ] ) if i > 0 : q . extend ( p [ 0 : i ] ) NEW_LINE


import java . util . Scanner ;   public class Main {   static int n , sol , auxs ; static int pizza [ ] ;   public static void main ( String args [ ] ) { Scanner l = new Scanner ( System . in ) ; n = l . nextInt ( ) ; pizza = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { pizza [ i ] = l . nextInt ( ) ; } sol = 360 ; for ( int i = 0 ; i < n ; i ++ ) { auxs = 0 ; for ( int k = 0 ; i + k <= n ; k ++ ) { sol = Math . min ( sol , Math . abs ( 360 - auxs * 2 ) ) ; if ( i + k < n ) { auxs += pizza [ i + k ] ; } } } System . out . println ( sol ) ; } }


import java . util . * ; import java . lang . * ; import java . io . * ;   public class Solution { public static void main ( String [ ] args ) throws java . lang . Exception { int n ; BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; n = Integer . parseInt ( br . readLine ( ) ) ; String s [ ] = br . readLine ( ) . split ( " ▁ " ) ; int arr [ ] = new int [ n ] ; arr [ 0 ] = Integer . parseInt ( s [ 0 ] ) ; int ans = Math . abs ( 180 - arr [ 0 ] ) ; for ( int i = 1 ; i < n ; i ++ ) { arr [ i ] += arr [ i - 1 ] + Integer . parseInt ( s [ i ] ) ; ans = Math . min ( ans , Math . abs ( arr [ i ] - 180 ) ) ; } for ( int i = 0 ; i < n ; i ++ ) { for ( int j = i ; j < n ; j ++ ) { int angle = arr [ j ] - arr [ i ] ; ans = Math . min ( Math . abs ( angle - 180 ) , ans ) ; } } System . out . println ( ans * 2 ) ;


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


import java . io . * ; import java . util . * ;   public class pizzaseparate { public static void main ( String [ ] args ) throws IOException { BufferedReader f = new BufferedReader ( new InputStreamReader ( System . in ) ) ; PrintWriter out = new PrintWriter ( System . out ) ; StringTokenizer st = new StringTokenizer ( f . readLine ( ) ) ; int n = Integer . parseInt ( ( st . nextToken ( ) ) ) ; int ans = 360 ; int [ ] slices = new int [ 360 ] ; st = new StringTokenizer ( f . readLine ( ) ) ; int total = 360 ; for ( int i = 0 ; i < n ; i ++ ) { slices [ i ] = Integer . parseInt ( ( st . nextToken ( ) ) ) ; } for ( int i = 0 ; i < n ; i ++ ) { int currentDiff = 0 ; for ( int j = i ; j < n ; j ++ ) { currentDiff += slices [ j ] ; ans = Math . min ( ans , Math . abs ( ( total - currentDiff ) - currentDiff ) ) ; } } out . println ( ans ) ; out . close ( ) ; } }


import java . io . * ; import java . util . HashMap ; public class sol { public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; int n = Integer . parseInt ( br . readLine ( ) ) ; String s = br . readLine ( ) ; String str [ ] = s . trim ( ) . split ( " \\ s + " ) ; int a [ ] = new int [ str . length ] ; for ( int i = 0 ; i < str . length ; i ++ ) { a [ i ] = Integer . parseInt ( str [ i ] ) ; } HashMap < Integer , Integer > data = new HashMap < Integer , Integer > ( ) ; for ( int i = 0 ; i < a . length ; i ++ ) { data . put ( a [ i ] , i + 1 ) ; } for ( int i = 1 ; i <= a . length ; i ++ ) { System . out . print ( data . get ( i ) + " ▁ " ) ; } } }

n = int ( input ( ) ) l = list ( map ( int , input ( ) . split ( ) ) ) for i in range ( len ( l ) ) : for j in range ( len ( l ) ) : if ( ( i + 1 ) == l [ j ] ) : print ( j + 1 , end = ' ▁ ' ) NEW_LINE


x = int ( input ( ) ) ; a = input ( ) . split ( ) ; print ( * [ a . index ( str ( i + 1 ) ) + 1 for i in range ( x ) ] ) NEW_LINE


import java . io . * ; import java . util . HashMap ; public class sol { public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; int n = Integer . parseInt ( br . readLine ( ) ) ; String s = br . readLine ( ) ; String str [ ] = s . trim ( ) . split ( " \\ s + " ) ; int a [ ] = new int [ str . length ] ; for ( int i = 0 ; i < str . length ; i ++ ) { a [ i ] = Integer . parseInt ( str [ i ] ) ; } HashMap < Integer , Integer > data = new HashMap < Integer , Integer > ( ) ; int t = 1 ; for ( int i = 0 ; i < a . length ; i ++ ) { data . put ( a [ i ] , t ) ; t ++ ; } t = 1 ; for ( int i = 0 ; i < a . length ; i ++ ) { System . out . print ( data . get ( t ) + " ▁ " ) ; t ++ ; } } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . StringTokenizer ;   public class A_Presents { public static void main ( String [ ] args ) { FastScanner fs = new FastScanner ( ) ; int n = fs . nextInt ( ) , p ; int [ ] ans = new int [ n + 1 ] ;   for ( int i = 1 ; i <= n ; i ++ ) { p = fs . nextInt ( ) ; ans [ p ] = i ; }   for ( int i = 1 ; i <= n ; i ++ ) { System . out . print ( ans [ i ] + " ▁ " ) ; } }   static int min ( int a , int b ) { return Math . min ( a , b ) ; }   static int max ( int a , int b ) { return Math . max ( a , b ) ; }   static long min ( long a , long b ) { return Math . min ( a , b ) ; }   static long max ( long a , long b ) { return Math . max ( a , b ) ; }   static class FastScanner { BufferedReader br ; StringTokenizer st ;   public FastScanner ( ) { 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 ( ) ) ; } char nextChar ( ) { return next ( ) . charAt ( 0 ) ; }   String nextLine ( ) { String str = " " ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return str ; } } }


import java . util . * ; import java . io . * ; public class Presents { public static void main ( String args [ ] ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; int n = Integer . parseInt ( br . readLine ( ) ) ; String str = br . readLine ( ) ; String split [ ] = str . split ( " ▁ " ) ; int a [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = Integer . parseInt ( split [ i ] ) ; calculatePresents ( a ) ; } private static void calculatePresents ( int a [ ] ) { int b [ ] = new int [ a . length ] ; for ( int i = 0 ; i < a . length ; i ++ ) { int no = a [ i ] ; b [ no - 1 ] = i ; } for ( int i = 0 ; i < b . length ; i ++ ) System . out . print ( b [ i ] + 1 + " ▁ " ) ; } }


import java . util . * ; import java . lang . * ; import java . io . * ; public class pyta   { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int arr [ ] = new int [ n ] ; for ( int j = 0 ; j < n ; j ++ ) { arr [ j ] = sc . nextInt ( ) ; } int ans [ ] = new int [ n ] ; int t = 0 ; int p = 1 ; for ( int b = 0 ; b < n ; b ++ ) { for ( int a = 0 ; a < n ; a ++ ) { if ( arr [ a ] == p ) { ans [ t ] = a + 1 ; t ++ ; p ++ ; } } } for ( int i = 0 ; i < n ; i ++ ) { System . out . print ( ans [ i ] + " ▁ " ) ; } } }


import java . util . Scanner ;   public class A134 {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int N = in . nextInt ( ) ; int [ ] A = new int [ N ] ; long sum = 0 ; for ( int n = 0 ; n < N ; n ++ ) { int a = in . nextInt ( ) ; sum += a ; A [ n ] = a ; } int count = 0 ; StringBuilder sb = new StringBuilder ( ) ; for ( int n = 0 ; n < N ; n ++ ) { if ( sum == N * A [ n ] ) { count ++ ; sb . append ( n + 1 ) . append ( ' ▁ ' ) ; } } System . out . println ( count ) ; System . out . println ( sb ) ; }   }

n = int ( input ( ) ) a = [ int ( c ) for c in input ( ) . split ( ) ] k = sum ( a ) / len ( a ) b = [ ] for i in range ( len ( a ) ) : if a [ i ] == k : b . append ( i + 1 ) print ( len ( b ) ) print ( * b ) NEW_LINE


import sysimport mathn = int ( input ( ) ) l = [ int ( i ) for i in input ( ) . split ( ) ] l1 = [ ] s = sum ( l ) c = 0 for i in range ( n ) : if ( l [ i ] == ( s - l [ i ] ) / ( n - 1 ) ) : c += 1 l1 . append ( i + 1 ) print ( c ) print ( * l1 ) NEW_LINE


n = int ( input ( ) ) ar = list ( map ( int , input ( ) . split ( ) ) ) sm = sum ( ar ) if ( sm // n * n != sm ) : print ( 0 ) else : vl = sm // n print ( ar . count ( vl ) ) print ( * [ x + 1 for x in range ( n ) if ar [ x ] == vl ] ) NEW_LINE


if __name__ == ' _ _ main _ _ ' : cin = input n = int ( cin ( ) ) a = [ int ( i ) for i in input ( ) . split ( ) ] s = sum ( a ) b = [ str ( i + 1 ) for i in range ( n ) if a [ i ] * ( n - 1 ) == s - a [ i ] ] print ( len ( b ) ) print ( " ▁ " . join ( b ) ) NEW_LINE


n = int ( input ( ) ) A = list ( map ( int , input ( ) . split ( ) ) ) B = [ ] srar = 0     for i in range ( n ) : srar += A [ i ] srar = srar / n       for i in range ( n ) : if ( ( srar * n ) - A [ i ] ) / ( n - 1 ) == A [ i ] : B . append ( i + 1 ) print ( len ( B ) ) for i in range ( len ( B ) ) : print ( B [ i ] , end = ' ▁ ' ) NEW_LINE


import java . io . * ; import java . util . * ; public class S { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) ; long a [ ] = new long [ n ] ; long sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = in . nextLong ( ) ; sum = sum + a [ i ] ; } ArrayList < Long > al = new ArrayList < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { sum -= a [ i ] ; if ( sum % ( n - 1 ) == 0 && sum / ( n - 1 ) == a [ i ] ) { al . add ( ( long ) i + 1 ) ; } sum += a [ i ] ; } System . out . println ( al . size ( ) ) ; for ( int i = 0 ; i < al . size ( ) ; i ++ ) { System . out . print ( al . get ( i ) + " ▁ " ) ; } } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . Scanner ; import java . util . StringTokenizer ; import java . util . * ; public class averageNumbers { static class FastReader { BufferedReader br ; StringTokenizer st ; public FastReader ( ) { br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; } String next ( ) { while ( st == null || ! st . hasMoreElements ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; } int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; } String nextLine ( ) { String str = " " ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return str ; } } public static void main ( String [ ] args ) { FastReader sc = new FastReader ( ) ; int n = sc . nextInt ( ) ; int a [ ] = new int [ n ] ; int c = 0 ; double sum = 0 ; int b [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = sc . nextInt ( ) ; sum = sum + a [ i ] ; } for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] == ( sum - a [ i ] ) / ( n - 1 ) ) { b [ c ] = i ; c ++ ; } } System . out . println ( c ) ; for ( int i = 0 ; i < c ; i ++ ) { System . out . print ( b [ i ] + 1 + " ▁ " ) ; } } }


import java . util . * ; public class Main { public static void main ( String args [ ] ) throws Exception { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int a [ ] = new int [ n ] ; int c = 0 ; double sum = 0 ; int b [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = sc . nextInt ( ) ; sum = sum + a [ i ] ; } for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] == ( sum - a [ i ] ) / ( n - 1 ) ) { b [ c ] = i ; c ++ ; } } System . out . println ( c ) ; for ( int i = 0 ; i < c ; i ++ ) { System . out . print ( b [ i ] + 1 + " ▁ " ) ; } } }


import java . util . Scanner ;   public class AverageNumbers {   public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int n = input . nextInt ( ) ; long arr [ ] = new long [ n ] ; long arr2 [ ] = new long [ n ] ; long sum = 0 ; int count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = input . nextInt ( ) ; sum += arr [ i ] ; } for ( int j = 0 ; j < n ; j ++ ) { if ( ( sum - arr [ j ] ) == ( arr [ j ] * ( n - 1 ) ) ) { arr2 [ count ] = j ; count ++ ; } } System . out . println ( count ) ; if ( count != 0 ) { for ( int k = 0 ; k < count ; k ++ ) { System . out . print ( arr2 [ k ] + 1 + " ▁ " ) ; } } input . close ( ) ; }   }


import java . util . * ; import java . io . * ; public class Main {   public static void main ( String [ ] args ) { FastReader sc = new FastReader ( ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; int k = sc . nextInt ( ) ; int p [ ] = new int [ n ] ; int s [ ] = new int [ n ] ; int d [ ] = new int [ m ] ; int count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { p [ i ] = sc . nextInt ( ) ; ; } for ( int i = 0 ; i < n ; i ++ ) { s [ i ] = sc . nextInt ( ) ; if ( p [ i ] > d [ s [ i ] - 1 ] ) { d [ s [ i ] - 1 ] = p [ i ] ; } } for ( int i = 0 ; i < k ; i ++ ) { int c = sc . nextInt ( ) ; if ( p [ c - 1 ] < d [ s [ c - 1 ] - 1 ] ) count ++ ; } System . out . println ( count ) ; }   }    class FastReader { BufferedReader br ; StringTokenizer st ;   public FastReader ( ) { br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; }   String next ( ) { while ( st == null || ! st . hasMoreElements ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; }   int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   long nextLong ( ) { return Long . parseLong ( next ( ) ) ; }   double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; }   String nextLine ( ) { String str = " " ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return str ; } }

n , m , k = map ( int , input ( ) . split ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) b = list ( map ( int , input ( ) . split ( ) ) ) c = list ( map ( int , input ( ) . split ( ) ) ) d = { } for i in range ( n ) : if d . get ( b [ i ] ) : if d [ b [ i ] ] < a [ i ] : d [ b [ i ] ] = a [ i ] else : d [ b [ i ] ] = a [ i ] ans = 0 for i in c : if a [ i - 1 ] < d [ b [ i - 1 ] ] : ans += 1 print ( ans ) NEW_LINE


n , m , k = map ( int , input ( ) . split ( ) ) p = list ( map ( int , input ( ) . split ( ) ) ) s = list ( map ( int , input ( ) . split ( ) ) ) c = sorted ( list ( map ( int , input ( ) . split ( ) ) ) ) dic = { } for i in range ( n ) : if s [ i ] not in dic : dic [ s [ i ] ] = p [ i ] else : if p [ i ] > dic [ s [ i ] ] : dic [ s [ i ] ] = p [ i ] ans = 0j = 0 for i in range ( n ) : if j < k : if c [ j ] == i + 1 : if p [ i ] < dic [ s [ i ] ] : ans += 1 j += 1 else : break print ( ans ) NEW_LINE


n , m , k = map ( int , input ( ) . split ( ) ) p = list ( map ( int , input ( ) . split ( ) ) ) s = list ( map ( int , input ( ) . split ( ) ) ) k = list ( map ( int , input ( ) . split ( ) ) ) count = 0 for i in k : l = s [ i - 1 ] t = p [ i - 1 ] for i in range ( n ) : if s [ i ] == l and p [ i ] > t : count += 1 breakprint ( count ) NEW_LINE


n , m , k = map ( int , input ( ) . split ( ) ) p = [ int ( i ) for i in input ( ) . split ( ) ] s = [ int ( i ) for i in input ( ) . split ( ) ] c = [ int ( i ) for i in input ( ) . split ( ) ] count = 0 for i in c : x = i - 1 school = s [ x ] for j in range ( n ) : if s [ j ] == school and p [ j ] > p [ x ] : count += 1 breakprint ( count ) NEW_LINE


n , m , k = map ( int , input ( ) . split ( ) ) P = list ( map ( int , input ( ) . split ( ) ) ) S = list ( map ( int , input ( ) . split ( ) ) ) C = list ( map ( int , input ( ) . split ( ) ) )   M = [ - 1 ] * md = { } for i , s in enumerate ( S ) : d [ i ] = s - 1 M [ s - 1 ] = max ( P [ i ] , M [ s - 1 ] )   ans = 0 for c in C : if M [ d [ c - 1 ] ] != P [ c - 1 ] : ans += 1 print ( ans ) NEW_LINE


import java . util . Scanner ; import java . util . Arrays ; public class Main { public static void main ( String [ ] args ) throws java . lang . Exception { try { Scanner sc = new Scanner ( System . in ) ; int t , n , m , i , j , k , count , min , sch , pow ; t = 1 ; while ( t > 0 ) { t -- ; n = sc . nextInt ( ) ; m = sc . nextInt ( ) ; k = sc . nextInt ( ) ; int p [ ] = new int [ n ] ; int s [ ] = new int [ n ] ; int c [ ] = new int [ k ] ; for ( i = 0 ; i < n ; i ++ ) p [ i ] = sc . nextInt ( ) ; for ( i = 0 ; i < n ; i ++ ) s [ i ] = sc . nextInt ( ) ; for ( i = 0 ; i < k ; i ++ ) c [ i ] = sc . nextInt ( ) ; count = 0 ; for ( i = 0 ; i < k ; i ++ ) { min = c [ i ] - 1 ; sch = s [ min ] ; pow = p [ min ] ; for ( j = 0 ; j < n ; j ++ ) { if ( s [ j ] == sch && p [ j ] > pow ) { count ++ ; break ; } } } System . out . println ( count ) ; } } catch ( Exception e ) { } } }


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 {


import java . io . * ; import java . util . * ; import java . math . BigInteger ; import java . lang . Object ;    public class Main { static class sort implements Comparator < int [ ] > { public int compare ( int [ ] a , int [ ] b ) {

def Work ( ) : global n , arr , f , last , ans NEW_LINE n = int ( input ( ) ) NEW_LINE arr = [ 0 ] * ( n + 1 ) NEW_LINE arr [ 1 : ] = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE f = [ 0 ] * ( n + 1 ) NEW_LINE ans = [ - 1 ] * ( n + 1 ) NEW_LINE last = [ 0 ] * ( n + 1 )   for i in range ( 1 , n + 1 ) : f [ arr [ i ] ] = max ( f [ arr [ i ] ] , i - last [ arr [ i ] ] ) NEW_LINE last [ arr [ i ] ] = i   for x in range ( 1 , n + 1 ) : f [ x ] = max ( f [ x ] , n - last [ x ] + 1 )   i = f [ x ] NEW_LINE while i <= n and ans [ i ] == - 1 : ans [ i ] = x NEW_LINE i += 1 NEW_LINE for e in range ( 1 , n + 1 ) : print ( ans [ e ] , end = " ▁ " ) NEW_LINE print ( )           if __name__ == " _ _ main _ _ " : t = int ( input ( ) ) NEW_LINE for _ in range ( t ) : Work ( )     ''' TC ▁ = ▁ O ( n )   / / ▁ array ▁ consists ▁ of ▁ number ▁ from ▁ 1 ▁ to ▁ n ▁ only / / ▁ Task ▁ - > ▁ for ▁ each ▁ i ▁ from ▁ 1 ▁ to ▁ k ▁ find ▁ number ▁ that ▁ occurs ▁ in ▁ all / / ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ subarrays ▁ of ▁ size ▁ i / / / / ▁ for ▁ every ▁ i ▁ from ▁ 1 ▁ to ▁ n ▁ we ▁ calculate ▁ value ▁ of ▁ min ▁ value ▁ of ▁ such ▁ k / / ▁ and ▁ say ▁ for ▁ a ▁ number ▁ i ▁ it ▁ value ▁ of ▁ k ▁ is ▁ f [ k ] / / ▁ / / ▁ for ▁ each ▁ i ▁ from ▁ 1 ▁ to ▁ n ▁ : / / ▁ ▁ ▁ ▁ ▁ ▁ x ▁ = ▁ arr [ i ] / / ▁ ▁ ▁ ▁ ▁ ▁ f [ x ] ▁ = ▁ max ( f [ x ] , i - last [ x ] ) ▁ / / ▁ in ▁ each ▁ iteration ▁ we ▁ are ▁ calciulating / / ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ / / ▁ value ▁ of ▁ f [ arr [ i ] ] ▁ and ▁ updating ▁ if ▁ i - last [ arr [ i ] ] / / ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ / / ▁ is ▁ greater ▁ than ▁ f [ arr [ i ] ] / / / / / / ▁ now ▁ for ▁ each ▁ x ▁ from ▁ 1 ▁ to ▁ n : / / ▁ ▁ ▁ ▁ ▁ ▁ f [ x ] ▁ = ▁ max ( f [ x ] , n - last [ x ] + 1 ) ▁ / / boundary ▁ condition / / ▁ ▁ ▁ ▁ ▁ ▁ update ▁ ans [ i ] ▁ such ▁ that ▁ i > = f [ x ] ▁ and ▁ ans [ i ] ! = - 1 / / / / print ▁ ans ''' NEW_LINE


from sys import stdin , stdout   outputs = [ ] NEW_LINE t = int ( stdin . readline ( ) . strip ( ) ) NEW_LINE for __ in range ( t ) : n = int ( stdin . readline ( ) . strip ( ) ) NEW_LINE res = [ n + 2 ] * n NEW_LINE arr = [ int ( num ) for num in stdin . readline ( ) . strip ( ) . split ( ) ] NEW_LINE req = [ [ - 1 , - 1 , - 1 ] for i in range ( n + 1 ) ] NEW_LINE


from collections import defaultdictdef NEW_LINE function ( A ) : n = len ( A ) NEW_LINE hash = defaultdict ( lambda : [ 0 , - 1 ] ) NEW_LINE for i in range ( n ) : prev = hash [ A [ i ] ] [ 1 ] NEW_LINE dist = i - prev NEW_LINE hash [ A [ i ] ] = [ max ( hash [ A [ i ] ] [ 0 ] , dist ) , i ] NEW_LINE visited = set ( ) NEW_LINE for i in range ( n - 1 , - 1 , - 1 ) : if NEW_LINE A [ i ] not in visited : visited . add ( A [ i ] ) NEW_LINE hash [ A [ i ] ] [ 0 ] = max ( hash [ A [ i ] ] [ 0 ] , n - hash [ A [ i ] ] [ 1 ] ) NEW_LINE z = dict ( ) NEW_LINE for u in hash . keys ( ) : z [ u ] = hash [ u ] [ 0 ] NEW_LINE length_to_x = defaultdict ( lambda : 2 ** 36 ) NEW_LINE for key in z : length_to_x [ z [ key ] ] = min ( length_to_x [ z [ key ] ] , key ) NEW_LINE res = [ 2 ** 36 for i in range ( n ) ] NEW_LINE if len ( set ( A ) ) != 1 : NEW_LINE INDENT res [ 0 ] = 2 ** 36 else : NEW_LINE res [ 0 ] = A [ 0 ] NEW_LINE DEDENT for i in range ( 1 , n ) : length = i + 1 NEW_LINE res [ i ] = res [ i - 1 ] NEW_LINE if length in length_to_x : res [ i ] = min ( res [ i ] , length_to_x [ length ] ) NEW_LINE for i in range ( n ) : if NEW_LINE res [ i ] == 2 ** 36 : res [ i ] = - 1 NEW_LINE return rest = int ( input ( ) ) NEW_LINE for u in range ( t ) : n = int ( input ( ) ) NEW_LINE A = [ int ( k ) for k in input ( ) . split ( ) ] [ : n ] NEW_LINE B = function ( A ) NEW_LINE for x in B : print ( x , " " , end = ' ' ) NEW_LINE print ( ) NEW_LINE


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


import java . util . * ; public class A { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int res = 1 ; for ( int i = 1 ; i < n ; i ++ ) { res += 4 * i ; } System . out . println ( res ) ; } }

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


def dp ( n ) : if n == 1 : return 1 return 4 * ( n - 1 ) + dp ( n - 1 ) print ( dp ( int ( input ( ) ) ) ) NEW_LINE


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


n = int ( input ( ) ) if ( n == 1 ) : print ( 1 ) else : ans = 2 * n - 1 while ( n >= 2 ) : ans += 4 * n - 6 n -= 1 print ( ans ) NEW_LINE


n = int ( input ( ) ) count = 2 * ( n - 1 ) ** 2 + 2 * n - 1 print ( count ) NEW_LINE


import java . util . * ; public class A { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int arr [ ] = new int [ 101 ] ; int n = sc . nextInt ( ) ; arr [ 0 ] = 1 ; arr [ 1 ] = 5 ; for ( int i = 2 ; i < 101 ; i ++ ) { arr [ i ] = arr [ i - 1 ] + 2 * ( arr [ i - 1 ] - arr [ i - 2 ] ) ; } System . out . println ( 2 * n * ( n - 1 ) + 1 ) ; } }


import java . io . * ; import java . util . * ; import java . text . * ; import java . math . * ; import java . util . regex . * ; public class Main { public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; int n = s . nextInt ( ) ; System . out . println ( n * n + ( n - 1 ) * ( n - 1 ) ) ; } }


import java . util . * ; import java . io . * ; import java . lang . * ;   public class Solution { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; System . out . println ( n * n + ( n - 1 ) * ( n - 1 ) ) ; sc . close ( ) ; } }


import java . util . Scanner ;   public class A1180 { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int n = scanner . nextInt ( ) , s ; s = n * n + ( n - 1 ) * ( n - 1 ) ; System . out . print ( s ) ; } }


import java . util . * ; public class Main { public static void main ( String args [ ] ) { Scanner cin = new Scanner ( System . in ) ; int n ; n = cin . nextInt ( ) ; int num ; if ( n % 2 == 0 ) num = n / 2 ; else num = n / 2 + 1 ; int a [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = cin . nextInt ( ) ; int num1 = 0 , num2 = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] > 0 ) num1 ++ ; else if ( a [ i ] < 0 ) num2 ++ ; } if ( num1 >= num2 && num1 >= num ) System . out . println ( 1 ) ; else if ( num1 < num2 && num2 >= num ) System . out . println ( - 1 ) ; else System . out . println ( 0 ) ; } }

from math import ceilnum = ( - ( - int ( input ( ) ) ) ) / 2 p , n , o = [ ] , [ ] , [ ] for v in map ( int , input ( ) . split ( ) ) : if v > 0 : p . append ( v ) if v < 0 : n . append ( v ) if len ( p ) >= num or len ( n ) >= num : ans = { 1 : len ( p ) , - 1 : len ( n ) } print ( max ( ans , key = lambda x : ans [ x ] ) ) else : print ( 0 ) NEW_LINE


import mathn = int ( input ( ) ) l = list ( map ( int , input ( ) . split ( ) ) )   least = math . ceil ( n / 2 )   newlist = [ i for i in l if i != 0 ] p = 0 n = 0   if len ( newlist ) >= least : for i in newlist : if i / 1 > 0 : p += 1 else : n += 1 if p >= n : if p >= least : print ( 1 ) else : print ( 0 ) else : if n >= least : print ( - 1 ) else : print ( 0 ) else : print ( 0 ) NEW_LINE


import math   n = int ( input ( ) ) L = list ( map ( int , input ( ) . split ( ) ) ) need = int ( math . ceil ( n / 2 ) ) neg = 0 pos = 0 for i in L : if i < 0 : neg += 1 elif i > 0 : pos += 1 if pos >= need : print ( 1 ) elif neg >= need : print ( - 1 ) else : print ( 0 ) NEW_LINE


import mathn = int ( input ( ) ) l = list ( map ( int , input ( ) . split ( ) ) ) c = 0 d = 0 for i in l : if i / 1 > 0 : c += 1 for i in l : if i / ( - 1 ) > 0 : d += 1 if c >= math . ceil ( n / 2 ) : print ( 1 ) elif d >= math . ceil ( n / 2 ) : print ( - 1 ) else : print ( 0 ) NEW_LINE


n = int ( input ( ) ) li = list ( map ( int , input ( ) . split ( ) ) ) count = 0 d = 0 for i in li : if i / 1 > 0 : count += 1 for j in li : if j / ( - 1 ) > 0 : d += 1 if count >= n / 2 : print ( 1 ) elif d >= n / 2 : print ( - 1 ) else : print ( 0 ) NEW_LINE


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


import java . util . * ;   public class Solve { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int n = scan . nextInt ( ) ; int [ ] a = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = scan . nextInt ( ) ; } int positive = 0 , negative = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] < 0 ) { negative ++ ; } if ( a [ i ] > 0 ) { positive ++ ; } } if ( n % 2 != 0 ) { n ++ ; } if ( positive >= n / 2 ) { System . out . println ( 1 ) ; } else if ( negative >= n / 2 ) { System . out . println ( - 1 ) ; } else { System . out . println ( 0 ) ; } } }


import java . util . * ; import java . util . Arrays ; public class Main { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int count = 0 , less = 0 , zero = 0 ; for ( int i = 0 ; i < n ; i ++ ) { int a = sc . nextInt ( ) ; if ( a > 0 ) { count ++ ; } else if ( a < 0 ) { less ++ ; } else { zero ++ ; } } int c = 0 ; if ( n % 2 == 0 ) { c = n / 2 ; } else { c = ( n / 2 ) + 1 ; } if ( count >= c ) { System . out . println ( "1" ) ; } else if ( less > count && less >= c ) { System . out . println ( " - 1" ) ; } else { System . out . println ( "0" ) ; } } }


import java . io . * ; import java . math . BigInteger ; import java . util . * ;     public class Main {   static int [ ] dx = { 0 , 1 , 0 , - 1 } ; static int [ ] dy = { - 1 , 0 , 1 , 0 } ;   static int [ ] ddx = { 0 , 1 , 0 , - 1 , - 1 , 1 , 1 , - 1 } ; static int [ ] ddy = { - 1 , 0 , 1 , 0 , - 1 , - 1 , 1 , 1 } ;   static int [ ] kx = { 2 , 1 , - 1 , - 2 , - 2 , - 1 , 1 , 2 } ; static int [ ] ky = { 1 , 2 , 2 , 1 , - 1 , - 2 , - 2 , - 1 } ;   static long MOD = Long . MAX_VALUE ;   static final int MAX = 50000 ; static long INF = Long . MAX_VALUE ;   static double PI = 3.1415926535 ;   public static void main ( String [ ] args ) {   InputReader in = new InputReader ( System . in ) ;   int n = in . nextInt ( ) ; long p = in . nextLong ( ) ; long k = in . nextLong ( ) ; Map < Long , Long > map = new HashMap < Long , Long > ( ) ; long ans = 0 ; for ( int i = 0 ; i < n ; i ++ ) { long a = in . nextLong ( ) ; long b = bigMod ( a , 4 , p ) - ( ( k * a ) % p ) ; if ( b < 0 ) { b += p ; } if ( map . containsKey ( b ) ) { long val = map . get ( b ) ; ans += val ; val ++ ; map . put ( b , val ) ; } else { map . put ( b , ( long ) 1 ) ; } } System . out . println ( ans ) ; System . exit ( 0 ) ; }

from collections import defaultdict   n , p , k = map ( int , input ( ) . split ( ) ) keys = list ( map ( int , input ( ) . split ( ) ) ) dictionary = defaultdict ( lambda : 0 ) answer = 0   for key in keys : answer += dictionary [ ( pow ( key , 4 , p ) - k * key ) % p ] dictionary [ ( key ** 4 - k * key ) % p ] += 1   print ( answer ) NEW_LINE


import java . io . * ; import java . util . * ;   public class Main { static final boolean _DEBUG = false ;   private static class MyScanner { BufferedReader br ; StringTokenizer st ;   public MyScanner ( BufferedReader _br ) { br = _br ; }   String next ( ) { while ( st == null || ! st . hasMoreElements ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; return " " ; } } 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 MyScanner scan ; static PrintWriter out ;   static int debugCount = 0 ; static void debug ( String msg ) { if ( _DEBUG && debugCount < 200 ) { out . println ( msg ) ; out . flush ( ) ; debugCount ++ ; } } public static void main ( String args [ ] ) throws IOException {

class Racer : def NEW_LINE __init__ ( self , name , points ) : self . name = name NEW_LINE self . points = points NEW_LINE def __str__ ( self ) : return ' % s ▁ % d ' % ( self . name , self . points ) NEW_LINE   n = int ( input ( ) ) NEW_LINE best = n * [ None ] NEW_LINE worst = n * [ None ] NEW_LINE for i in range ( n ) : name , points = input ( ) . split ( ) NEW_LINE points = int ( points ) NEW_LINE best [ i ] = Racer ( name , points ) NEW_LINE worst [ i ] = Racer ( name , points ) NEW_LINE m = int ( input ( ) ) NEW_LINE place_bonus = list ( reversed ( sorted ( map ( int , input ( ) . split ( ) ) ) ) ) NEW_LINE your_name = input ( ) . strip ( )   debugging = Falsedef NEW_LINE debug_print ( s ) : NEW_LINE if debugging : print ( s )   NEW_LINE def find ( racers , name ) : for NEW_LINE i in range ( n ) : NEW_LINE if racers [ i ] . name == name : return i   NEW_LINE def sort_racers ( racers ) : racers . sort ( key = lambda racer : ( - racer . points , racer . name ) ) NEW_LINE     NEW_LINE


import java . util . Scanner ;   public class I { public static void main ( String [ ] args ) {   int arr [ ] = new int [ 6 ] ; Scanner scan = new Scanner ( System . in ) ; for ( int i = 0 ; i < 6 ; i ++ ) arr [ i ] = scan . nextInt ( ) ;   boolean thereis = false ; for ( int i = 0 ; i < 4 ; i ++ ) { for ( int j = i + 1 ; j < 5 ; j ++ ) { for ( int k = j + 1 ; k < 6 ; k ++ ) { int op [ ] = new int [ 3 ] ; int t = 0 ; for ( int q = 0 ; q <= 5 ; q ++ ) { if ( q != i && q != j && q != k ) { op [ t ] = q ; t ++ ; } } if ( arr [ i ] + arr [ k ] + arr [ j ] == arr [ op [ 0 ] ] + arr [ op [ 1 ] ] + arr [ op [ 2 ] ] ) { thereis = true ; } } } } if ( thereis ) System . out . println ( " YES " ) ; else System . out . println ( " NO " ) ; } }

r = lambda : list ( map ( int , input ( ) . split ( ) ) ) arr = r ( ) arr . sort ( )     f = Falsefor i in range ( 0 , len ( arr ) ) : for j in range ( 0 , len ( arr ) ) : for k in range ( 0 , len ( arr ) ) : if i != j != k != i : if arr [ i ] + arr [ j ] + arr [ k ] == sum ( arr ) / 2 : NEW_LINE


from itertools import combinationsl = list ( map ( int , input ( ) . split ( ) ) ) s = sum ( l ) ; f = 0 if s % 2 != 0 : print ( " NO " ) f = 1 else : for i in combinations ( l , 3 ) : if sum ( i ) == s // 2 : print ( " YES " ) f = 1 breakif f == 0 : print ( " NO " ) NEW_LINE


from itertools import * a = [ int ( x ) for x in input ( ) . split ( ) ] s1 = 0 s2 = 0 flag = 0 for o in permutations ( a ) : s1 = o [ 0 ] + o [ 1 ] + o [ 2 ] s2 = o [ 3 ] + o [ 4 ] + o [ 5 ] if ( s1 == s2 ) : flag = 1 break if ( flag == 1 ) : print ( " YES " ) else : print ( " NO " ) NEW_LINE


numbers = [ ] numbers = [ int ( item ) for item in input ( ) . split ( ) ] numbers . sort ( ) if ( ( numbers [ 0 ] + numbers [ 5 ] + numbers [ 1 ] ) == ( numbers [ 2 ] + numbers [ 3 ] + numbers [ 4 ] ) ) : print ( " Yes " ) elif ( ( numbers [ 2 ] + numbers [ 5 ] + numbers [ 1 ] ) == ( numbers [ 0 ] + numbers [ 3 ] + numbers [ 4 ] ) ) : print ( " Yes " ) elif ( ( numbers [ 0 ] + numbers [ 5 ] + numbers [ 2 ] ) == ( numbers [ 1 ] + numbers [ 3 ] + numbers [ 4 ] ) ) : print ( " Yes " ) elif ( ( numbers [ 0 ] + numbers [ 5 ] + numbers [ 3 ] ) == ( numbers [ 2 ] + numbers [ 1 ] + numbers [ 4 ] ) ) : print ( " Yes " ) elif ( ( numbers [ 0 ] + numbers [ 5 ] + numbers [ 4 ] ) == ( numbers [ 2 ] + numbers [ 1 ] + numbers [ 3 ] ) ) : print ( " Yes " ) else : print ( " No " ) NEW_LINE


lst = [ int ( i ) for i in input ( ) . split ( ) ] if ( sum ( lst ) % 2 == 1 ) : print ( " NO " ) else : avr = sum ( lst ) / 2 hasPrint = False for a in range ( 6 ) : for b in range ( a + 1 , 6 ) : for c in range ( b + 1 , 6 ) : if lst [ a ] + lst [ b ] + lst [ c ] == avr and not hasPrint : print ( " YES " ) hasPrint = True if not hasPrint : print ( " No " ) NEW_LINE


import java . util . Scanner ;   public class Eieve {   public static void main ( String args [ ] ) {   Scanner input = new Scanner ( System . in ) ; int [ ] a = new int [ 6 ] ; int s = 0 , c = 0 ; for ( int i = 0 ; i < 6 ; i ++ ) { a [ i ] = input . nextInt ( ) ; s = s + a [ i ] ; } int s1 = s / 2 ; if ( s % 2 == 0 ) { for ( int i = 0 ; i < 6 ; i ++ ) { for ( int j = i + 1 ; j < 6 ; j ++ ) { for ( int k = j + 1 ; k < 6 ; k ++ ) { if ( a [ i ] + a [ j ] + a [ k ] == s1 ) { System . out . println ( " yes " ) ; c ++ ; break ; } } if ( c == 1 ) { break ; } } if ( c == 1 ) { break ; }   } if ( c == 0 ) { System . out . println ( " no " ) ; } } else { System . out . println ( " no " ) ; }   }   }


import java . util . * ; import java . lang . * ; import java . io . * ;   public class Ideone { public static void main ( String [ ] args ) throws java . lang . Exception { String [ ] name = { " Washington " , " Adams " , " Jefferson " , " Madison " , " Monroe " , " Adams " , " Jackson " , " Van ▁ Buren " , " Harrison " , " Tyler " , " Polk " , " Taylor " , " Fillmore " , " Pierce " , " Buchanan " , " Lincoln " , " Johnson " , " Grant " , " Hayes " , " Garfield " , " Arthur " , " Cleveland " , " Harrison " , " Cleveland " , " McKinley " , " Roosevelt " , " Taft " , " Wilson " , " Harding " , " Coolidge " , " Hoover " , " Roosevelt " , " Truman " , " Eisenhower " , " Kennedy " , " Johnson " , " Nixon " , " Ford " , " Carter " , " Reagan " , " Bush " , " Clinton " , " Bush " , " Obama " , " Trump " } ; Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) ; System . out . print ( name [ n - 1 ] ) ; } }

pres = [ " Washington " , " Adams " , " Jefferson " , " Madison " , " Monroe " , " Adams " , " Jackson " , " Van ▁ Buren " , " Harrison " , " Tyler " , " Polk " , " Taylor " , " Fillmore " , " Pierce " , " Buchanan " , " Lincoln " , " Johnson " , " Grant " , " Hayes " , " Garfield " , " Arthur " , " Cleveland " , " Harrison " , " Cleveland " , " McKinley " , " Roosevelt " , " Taft " , " Wilson " , " Harding " , " Coolidge " , " Hoover " , " Roosevelt " , " Truman " , " Eisenhower " , " Kennedy " , " Johnson " , " Nixon " , " Ford " , " Carter " , " Reagan " , " Bush " , " Clinton " , " Bush " , " Obama " , " Trump " , " Biden " ]   print ( pres [ int ( input ( ) ) - 1 ] ) NEW_LINE


a = ' Washington , Adams , Jefferson , Madison , Monroe , Adams , Jackson , Van ▁ Buren , Harrison , Tyler , Polk , Taylor , Fillmore , Pierce , Buchanan , Lincoln , Johnson , Grant , Hayes , Garfield , Arthur , Cleveland , Harrison , Cleveland , McKinley , Roosevelt , Taft , Wilson , Harding , Coolidge , Hoover , Roosevelt , Truman , Eisenhower , Kennedy , Johnson , Nixon , Ford , Carter , Reagan , Bush , Clinton ' . split ( ' , ' ) print ( a [ int ( input ( ) ) - 1 ] ) NEW_LINE


x = int ( input ( ) )   presidents = [ ' Washington ' , ' Adams ' , ' Jefferson ' , ' Madison ' , ' Monroe ' , ' Adams ' , ' Jackson ' , ' Van ▁ Buren ' , ' Harrison ' , ' Tyler ' , ' Polk ' , ' Taylor ' , ' Fillmore ' , ' Pierce ' , ' Buchanan ' , ' Lincoln ' , ' Johnson ' , ' Grant ' , ' Hayes ' , ' Garfield ' , ' Arthur ' , ' Cleveland ' , ' Harrison ' , ' Cleveland ' , ' McKinley ' , ' Roosevelt ' , ' Taft ' , ' Wilson ' , ' Harding ' , ' Coolidge ' , ' Hoover ' , ' Roosevelt ' , ' Truman ' , ' Eisenhower ' , ' Kennedy ' , ' Johnson ' , ' Nixon ' , ' Ford ' , ' Carter ' , ' Reagan ' ]   print ( presidents [ x - 1 ] ) NEW_LINE


a = int ( input ( ) ) l = [ ' Washington ' , ' Adams ' , ' Jefferson ' , ' Madison ' , ' Monroe ' , ' Adams ' , ' Jackson ' , ' Van ▁ Buren ' , ' Harrison ' , ' Tyler ' , ' Polk ' , ' Taylor ' , ' Fillmore ' , ' Pierce ' , ' Buchanan ' , ' Lincoln ' , ' Johnson ' , ' Grant ' , ' Hayes ' , ' Garfield ' , ' Arthur ' , ' Cleveland ' , ' Harrison ' , ' Cleveland ' , ' McKinley ' , ' Roosevelt ' , ' Taft ' , ' Wilson ' , ' Harding ' , ' Coolidge ' , ' Hoover ' , ' Roosevelt ' , ' Truman ' , ' Eisenhower ' , ' Kennedy ' , ' Johnson ' , ' Nixon ' , ' Ford ' , ' Carter ' , ' Reagan ' , ' Bush ' ] print ( l [ a - 1 ] ) NEW_LINE


a = [ " " , " Washington " , " Adams " , " Jefferson " , " Madison " , " Monroe " , " Adams " , " Jackson " , " Van ▁ Buren " , " Harrison " , " Tyler " , " Polk " , " Taylor " , " Fillmore " , " Pierce " , " Buchanan " , " Lincoln " , " Johnson " , " Grant " , " Hayes " , " Garfield " , " Arthur " , " Cleveland " , " Harrison " , " Cleveland " , " McKinley " , " Roosevelt " , " Taft " , " Wilson " , " Harding " , " Coolidge " , " Hoover " , " Roosevelt " , " Truman " , " Eisenhower " , " Kennedy " , " Johnson " , " Nixon " , " Ford " , " Carter " , " Reagan " ] print ( a [ int ( input ( ) ) ] ) NEW_LINE


import java . util . Scanner ;   public class A_MysteriousStrings {   public static void main ( String [ ] args ) { String [ ] s = { " Washington " , " Adams " , " Jefferson " , " Madison " , " Monroe " , " Adams " , " Jackson " , " Van ▁ Buren " , " Harrison " , " Tyler " , " Polk " , " Taylor " , " Fillmore " , " Pierce " , " Buchanan " , " Lincoln " , " Johnson " , " Grant " , " Hayes " , " Garfield " , " Arthur " , " Cleveland " , " Harrison " , " Cleveland " , " McKinley " , " Roosevelt " , " Taft " , " Wilson " , " Harding " , " Coolidge " , " Hoover " , " Roosevelt " , " Truman " , " Eisenhower " , " Kennedy " , " Johnson " , " Nixon " , " Ford " , " Carter " , " Reagan " } ; Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) ; System . out . println ( s [ n - 1 ] ) ;   }   }


import java . util . Scanner ;   public class _0842ShovelsandSwords {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; while ( t > 0 ) { int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ;

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


t = int ( input ( ) ) while t > 0 : t -= 1 s , d = [ int ( x ) for x in input ( ) . split ( ) ] print ( min ( s , d , ( s + d ) // 3 ) ) NEW_LINE


import matht = int ( input ( ) ) for i in range ( t ) : a , b = map ( int , input ( ) . split ( ) ) print ( min ( a , b , ( a + b ) // 3 ) )                                                                 NEW_LINE


for _ in range ( int ( input ( ) ) ) : a , b = map ( int , input ( ) . split ( ) ) r = 0 if a == b : t = a // 3 l = a % 3 if l == 2 : print ( 2 * t + 1 ) else : print ( 2 * t ) elif a > b : fark = a - b r += fark a -= 2 * fark b -= fark if a == 0 : print ( r ) elif a > 0 : t = a // 3 l = a % 3 if l == 2 : print ( 2 * t + 1 + r ) else : print ( 2 * t + r ) else : u = - b print ( r - u )             else : fark = b - a r += fark a -= fark b -= 2 * fark if a == 0 : print ( r ) elif a > 0 : t = a // 3 l = a % 3 if l == 2 : print ( 2 * t + 1 + r ) else : print ( 2 * t + r ) else : u = - a print ( r - u ) NEW_LINE


for _ in range ( int ( input ( ) ) ) : l , r = map ( int , input ( ) . split ( ) ) print ( min ( l , r , ( l + r ) // 3 ) ) NEW_LINE


import java . util . * ; import java . io . * ; public class Main { public static void main ( String [ ] args ) throws IOException { Scanner read = new Scanner ( System . in ) ; int t = read . nextInt ( ) ; for ( int x = 1 ; x <= t ; x ++ ) { int a = read . nextInt ( ) ; int b = read . nextInt ( ) ; System . out . println ( Math . min ( ( a + b ) / 3 , Math . min ( a , b ) ) ) ; } } }


import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; while ( t -- > 0 ) { int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int sum = ( a + b ) / 3 ; int nas = Math . min ( a , Math . min ( b , sum ) ) ; System . out . println ( nas ) ; } } }


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


import java . util . Scanner ; public class Switchs { public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int a ; int b ; a = input . nextInt ( ) ; b = input . nextInt ( ) ; int max = Math . max ( a , b ) ; if ( max == 1 ) { System . out . println ( "1/1" ) ; } else if ( max == 2 ) { System . out . println ( "5/6" ) ; } else if ( max == 3 ) { System . out . println ( "2/3" ) ; } else if ( max == 4 ) { System . out . println ( "1/2" ) ; } else if ( max == 5 ) { System . out . println ( "1/3" ) ; } else if ( max == 6 ) { System . out . println ( "1/6" ) ; } else { System . out . println ( "0/1" ) ; } } }

def main ( y , w ) : greater = max ( y , w ) rem = ( 6 - greater ) + 1 if rem % 6 == 0 : print ( f " { ( rem ▁ / / ▁ 6 ) } / { (6 ▁ / / ▁ 6 ) } " ) elif rem % 2 == 0 : print ( f " { ( rem ▁ / / ▁ 2 ) } / { (6 ▁ / / ▁ 2 ) } " ) elif rem % 3 == 0 : print ( f " { ( rem ▁ / / ▁ 3 ) } / { (6 ▁ / / ▁ 3 ) } " ) else : print ( f " { rem } / { 6 } " )     if __name__ == ' _ _ main _ _ ' : y , w = map ( int , input ( ) . split ( ) ) main ( y , w ) NEW_LINE


from math import * a , b = map ( int , input ( ) . split ( ) ) print ( ( 7 - max ( a , b ) ) // gcd ( 7 - max ( a , b ) , 6 ) , 6 // gcd ( 7 - max ( a , b ) , 6 ) , sep = ' / ' ) NEW_LINE


Y , W = map ( int , input ( ) . split ( ) ) m = max ( Y , W ) if m == 1 : print ( '1/1' ) elif m == 2 : print ( '5/6' ) elif m == 3 : print ( '2/3' ) elif m == 4 : print ( '1/2' ) elif m == 5 : print ( '1/3' ) else : print ( '1/6' )       NEW_LINE


a , b = map ( int , input ( ) . split ( ) ) lar = a if a > b else bif lar == 6 : print ( "1/6" ) elif lar == 5 : print ( "1/3" ) elif lar == 4 : print ( "1/2" ) elif lar == 3 : print ( "2/3" ) elif lar == 2 : print ( "5/6" ) else : print ( "1/1" ) NEW_LINE


import java . util . Scanner ;   public class Test { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int y = in . nextInt ( ) ; int w = in . nextInt ( ) ; y = 7 - Math . max ( y , w ) ; if ( y == 1 ) System . out . println ( "1/6" ) ; else if ( y == 2 ) System . out . println ( "1/3" ) ; else if ( y == 3 ) System . out . println ( "1/2" ) ; else if ( y == 4 ) System . out . println ( "2/3" ) ; else if ( y == 5 ) System . out . println ( "5/6" ) ; else if ( y == 6 ) System . out . println ( "1/1" ) ; } }


import java . util . Scanner ;   public class Test { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int y = in . nextInt ( ) ; int w = in . nextInt ( ) ; int favOutcomes = 7 - Math . max ( y , w ) ; if ( favOutcomes == 1 ) System . out . println ( "1/6" ) ; else if ( favOutcomes == 2 ) System . out . println ( "1/3" ) ; else if ( favOutcomes == 3 ) System . out . println ( "1/2" ) ; else if ( favOutcomes == 4 ) System . out . println ( "2/3" ) ; else if ( favOutcomes == 5 ) System . out . println ( "5/6" ) ; else if ( favOutcomes == 6 ) System . out . println ( "1/1" ) ; } }


import java . util . Scanner ;   public class Test { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int y = in . nextInt ( ) ; int w = in . nextInt ( ) ; int favOutcomes = 0 ; for ( int i = Math . max ( y , w ) ; i <= 6 ; i ++ ) ++ favOutcomes ; int gcd = 0 ; for ( int i = 1 ; i <= favOutcomes && i <= 6 ; i ++ ) { if ( favOutcomes % i == 0 && 6 % i == 0 ) gcd = i ; } System . out . println ( favOutcomes / gcd + " / " + 6 / gcd ) ; } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . StringTokenizer ;   public class Die_Roll { static class RealScanner { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( " " ) ;   String next ( ) { while ( ! st . hasMoreTokens ( ) ) try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return st . nextToken ( ) ; }   int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   int [ ] readArray ( int n ) { int [ ] a = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = nextInt ( ) ; return a ; }   long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } }   public static void main ( String [ ] args ) { RealScanner sc = new RealScanner ( ) ; int a , b ; a = sc . nextInt ( ) ; b = sc . nextInt ( ) ; int max = Math . max ( a , b ) ; max = ( 6 - max ) + 1 ; if ( max % 2 == 1 ) { if ( max == 3 ) { System . out . println ( "1/2" ) ; } else { System . out . println ( max + " / " + 6 ) ; } } else { if ( max == 4 ) { System . out . println ( "2/3" ) ; } else { System . out . println ( 1 + " / " + 6 / max ) ; } }   } }


import java . io . * ; import java . util . * ;   public class Main {   public static void main ( String [ ] args ) throws Exception { BufferedReader in = new BufferedReader ( new InputStreamReader ( System . in ) ) ; PrintWriter out = new PrintWriter ( System . out ) ; int n = Integer . parseInt ( in . readLine ( ) ) ; int [ ] [ ] a = new int [ 5 ] [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { StringTokenizer st = new StringTokenizer ( in . readLine ( ) ) ; for ( int j = 0 ; j < 5 ; j ++ ) { a [ j ] [ i ] = Integer . parseInt ( st . nextToken ( ) ) ; } } int good = 0 ; Queue < Integer > q = new LinkedList < > ( ) ; outer : for ( int p1 = 0 ; p1 < n ; p1 ++ ) { int [ ] [ ] b = new int [ 5 ] [ n ] ; for ( int p2 = 0 ; p2 < n ; p2 ++ ) { if ( p2 == p1 ) continue ; for ( int j = 0 ; j < 5 ; j ++ ) { b [ j ] [ p2 ] = a [ j ] [ p2 ] - a [ j ] [ p1 ] ; } } for ( int p2 = 0 ; p2 < n ; p2 ++ ) { for ( int p3 = 0 ; p3 < n ; p3 ++ ) { if ( p2 == p1 || p3 == p1 ) continue ; if ( p2 == p3 ) continue ;

n = int ( input ( ) ) points = [ [ - 1 , - 1 , - 1 , - 1 , - 1 ] ] for _ in range ( n ) : pts = list ( map ( int , input ( ) . split ( ) ) ) points . append ( pts )   def check ( i , j , k ) : res = 0 for t in range ( 5 ) : a = points [ j ] [ t ] - points [ i ] [ t ] b = points [ k ] [ t ] - points [ i ] [ t ] res += a * b return res > 0   res = [ ] for i in range ( 1 , n + 1 ) : valid = True for j in range ( 1 , n + 1 ) : if j != i and valid : for k in range ( 1 , n + 1 ) : if j != k : if check ( i , j , k ) : valid = False break if not valid : break if valid : res . append ( i ) print ( len ( res ) ) print ( * res ) NEW_LINE


import java . util . * ; public class foodbying { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; for ( int i = 1 ; i <= t ; i ++ ) { int s = sc . nextInt ( ) ; int spent ; int total = 0 ; while ( s != 0 ) { if ( s < 10 ) { total += s ; s = 0 ; } else { spent = s - s % 10 ; total += spent ; s = s % 10 + spent / 10 ; } } System . out . println ( total ) ; } } }

for t in range ( int ( input ( ) ) ) : n = int ( input ( ) ) ans = 0 while n >= 10 : ans += ( 10 * ( n // 10 ) ) n = n - ( 9 * ( n // 10 ) ) ans += n print ( ans ) NEW_LINE


cases = int ( input ( ) ) while cases : cases -= 1 num = int ( input ( ) ) ans = 0 ans += num // 10 * 10 rem = num % 10 + num // 10 while rem >= 10 : ans += rem // 10 * 10   rem = rem % 10 + rem // 10   print ( ans + rem ) NEW_LINE


for _ in range ( int ( input ( ) ) ) : n = int ( input ( ) ) i = n p = list ( ) while i >= 10 : l = i - ( i % 10 ) p . append ( l ) k = ( i // 10 ) + ( i % 10 ) i = k print ( sum ( p ) + i ) NEW_LINE


from sys import stdin , stdout   def main ( ) : for _ in range ( int ( stdin . readline ( ) ) ) : s = int ( stdin . readline ( ) ) x = 0 while s >= 10 : q = s // 10 r = s % 10 s = q + r x += q * 10 x += s stdout . write ( str ( x ) + ' \n ' )   if __name__ == " _ _ main _ _ " : main ( ) NEW_LINE


t = int ( input ( ) ) for _ in range ( t ) : n = int ( input ( ) ) res = n while n // 10 > 0 : res += n // 10 n = n % 10 + n // 10 print ( res ) NEW_LINE


import java . util . Scanner ; public class B { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; for ( int tc = 0 ; tc < t ; ++ tc ) { int n = sc . nextInt ( ) ; int r ; int ans = 0 ;   while ( n > 0 ) { if ( n < 10 ) { ans += n ; break ; } r = n / 10 ; n = n - r * 10 + r ; ans = ans + r * 10 ; }   System . out . println ( ans ) ;   } sc . close ( ) ; } }


import java . io . * ; import java . math . * ; import java . util . * ;   public class Main { public static void main ( String [ ] args ) throws IOException { FastReader scan = new FastReader ( ) ; PrintWriter out = new PrintWriter ( System . out ) ; Task solver = new Task ( ) ; ans = new StringBuilder ( ) ; int T = scan . nextInt ( ) ; for ( int tt = 0 ; tt < T ; tt ++ ) solver . solve ( tt , scan , out ) ; out . close ( ) ; }   static StringBuilder ans ;   static class Task { public void solve ( int testNumber , FastReader scan , PrintWriter out ) { int n = scan . nextInt ( ) ; int total = 0 ; while ( n >= 10 ) { int rem = n % 10 ; int spent = n - rem ; int cashback = spent / 10 ; total += spent ; n = n - spent + cashback ; } total += n ; out . println ( total ) ; } }   static class FastReader { BufferedReader br ; StringTokenizer st ;   public FastReader ( ) { br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; }   public FastReader ( String s ) throws FileNotFoundException { br = new BufferedReader ( new FileReader ( new File ( s ) ) ) ; }   String next ( ) { while ( st == null || ! st . hasMoreElements ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; }   int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   long nextLong ( ) { return Long . parseLong ( next ( ) ) ; }   double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; }   String nextLine ( ) { String str = " " ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return str ; } } }


import java . util . * ;   public class CodeForces { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; while ( t -- > 0 ) { int number = sc . nextInt ( ) ; int sum = number ; int cesh = 0 ; while ( number > 9 ) { int q = number % 10 ; cesh += number / 10 ; number /= 10 ; number += q ; } System . out . println ( sum + cesh ) ; } }   }


import java . io . FileNotFoundException ; import java . io . BufferedInputStream ; import java . io . FileInputStream ; import java . io . PrintStream ; import java . util . * ;     public class Main { public static String s [ ] = new String [ 100 ] ; public static void main ( String args [ ] ) { Scanner in ; PrintStream out ; in = new Scanner ( new BufferedInputStream ( System . in ) ) ; out = System . out ;

from collections import defaultdictfrom itertools import groupbyn , m = map ( int , input ( ) . split ( ) ) arr = [ ] cases = n   dic = defaultdict ( int )   while cases : cases -= 1   s = input ( ) dic [ s ] += 1 arr . append ( s ) if len ( dic ) == 3 == len ( list ( groupby ( arr ) ) ) and len ( set ( dic . values ( ) ) ) == 1 and [ set ( key ) for key in sorted ( dic . keys ( ) ) ] == [ { ' B ' } , { ' G ' } , { ' R ' } ] : print ( " YES " )   elif len ( dic ) == 1 and arr [ 0 ] . count ( " R " ) == arr [ 0 ] . count ( " G " ) == arr [ 0 ] . count ( " B " ) and len ( list ( groupby ( arr [ 0 ] ) ) ) == 3 : print ( " YES " )   else : print ( " NO " ) NEW_LINE


import sys   n , m = map ( int , input ( ) . split ( ) ) flag = [ list ( input ( ) ) for _ in range ( n ) ]   if len ( set ( flag [ 0 ] ) ) > 1 : _flag = [ [ ' ' ] * n for _ in range ( m ) ] for i in range ( n ) : for j in range ( m ) : _flag [ j ] [ i ] = flag [ i ] [ j ] flag = _flag n , m = m , n   if not all ( len ( set ( row ) ) == 1 for row in flag ) : print ( ' NO ' ) exit ( )   color = { flag [ 0 ] [ 0 ] } length = [ 1 ] prev = flag [ 0 ] [ 0 ]   for i in range ( 1 , n ) : if prev == flag [ i ] [ 0 ] : length [ - 1 ] += 1 else : prev = flag [ i ] [ 0 ] color . add ( flag [ i ] [ 0 ] ) length . append ( 1 )   if len ( color ) == 3 and len ( length ) == 3 and len ( set ( length ) ) == 1 : print ( ' YES ' ) else : print ( ' NO ' ) NEW_LINE


import sysn , m = map ( int , input ( ) . split ( ) ) li = [ ]   for _ in range ( n ) : li . append ( input ( ) )   if n % 3 == 0 : flag = True stripe = n // 3 s0 = li [ 0 ] [ 0 ] s1 = li [ stripe ] [ 0 ] s2 = li [ stripe * 2 ] [ 0 ]   for i in range ( stripe ) : for j in range ( m ) : if li [ i ] [ j ] != s0 : flag = False for i in range ( stripe , 2 * stripe ) : for j in range ( m ) : if li [ i ] [ j ] != s1 : flag = False   for i in range ( 2 * stripe , 3 * stripe ) : for j in range ( m ) : if li [ i ] [ j ] != s2 : flag = False if flag == True and s0 != s1 and s0 != s2 and s1 != s2 : print ( " YES " ) sys . exit ( )   if m % 3 == 0 : flag = True stripe = m // 3 s0 = li [ 0 ] [ 0 ] s1 = li [ 0 ] [ stripe ] s2 = li [ 0 ] [ stripe * 2 ]     for i in range ( n ) : for j in range ( stripe ) : if li [ i ] [ j ] != s0 : flag = False for i in range ( n ) : for j in range ( stripe , 2 * stripe ) : if li [ i ] [ j ] != s1 : flag = False   for i in range ( n ) : for j in range ( 2 * stripe , 3 * stripe ) : if li [ i ] [ j ] != s2 : flag = False     if flag == True and s0 != s1 and s0 != s2 and s1 != s2 : print ( " YES " ) sys . exit ( )   print ( " NO " ) NEW_LINE


def rotate_90_degree_anticlckwise ( matrix ) : new_matrix = [ ] for i in range ( len ( matrix [ 0 ] ) , 0 , - 1 ) : new_matrix . append ( list ( map ( lambda x : x [ i - 1 ] , matrix ) ) ) return new_matrixn , m = map ( int , input ( ) . split ( ) ) mat = [ ] for i in range ( n ) : temp = input ( ) mat . append ( [ i for i in temp ] ) horiz , verti = False , Falsecheck = TrueresH = [ ] for i in range ( n ) : if ( mat [ i ] . count ( mat [ i ] [ 0 ] ) == m ) : first = mat [ i ] [ 0 ] if ( resH ) : if ( resH [ - 1 ] [ 0 ] == first ) : resH [ - 1 ] [ 1 ] += 1 else : resH . append ( [ first , 1 ] ) else : resH . append ( [ first , 1 ] ) else : check = False break   if ( len ( resH ) == 3 and check ) : if ( len ( set ( [ i [ 1 ] for i in resH ] ) ) == 1 and len ( set ( [ i [ 0 ] for i in resH ] ) ) == 3 ) : horiz = True   newMat = rotate_90_degree_anticlckwise ( mat )     check = TrueresV = [ ] for i in range ( m ) : if ( newMat [ i ] . count ( newMat [ i ] [ 0 ] ) == n ) : first = newMat [ i ] [ 0 ] if ( resV ) : if ( resV [ - 1 ] [ 0 ] == first ) : resV [ - 1 ] [ 1 ] += 1 else : resV . append ( [ first , 1 ] ) else : resV . append ( [ first , 1 ] ) else : check = False break   if ( len ( resV ) == 3 and check ) : if ( len ( set ( [ i [ 1 ] for i in resV ] ) ) == 1 and len ( set ( [ i [ 0 ] for i in resV ] ) ) == 3 ) : verti = True     if ( horiz or verti ) : print ( " YES " ) else : print ( " NO " ) NEW_LINE


import java . util . * ; import java . io . * ;   public class Main { public static void main ( String [ ] args ) throws IOException { FastScanner in = new FastScanner ( System . in ) ; PrintWriter out = new PrintWriter ( System . out ) ; new Main ( ) . run ( in , out ) ; out . close ( ) ; }   public static long mod = 17352642619633L ;   void run ( FastScanner in , PrintWriter out ) { int N = in . nextInt ( ) ; int M = in . nextInt ( ) ;   char [ ] [ ] ca = new char [ N ] [ ] ; for ( int i = 0 ; i < N ; i ++ ) { ca [ i ] = in . next ( ) . toCharArray ( ) ; }


import java . util . * ; import java . lang . * ; import java . io . * ;   public class FastIO { BufferedReader br ; StringTokenizer st ; public FastIO ( ) {

n = int ( input ( ) ) a = [ 0 ] * nc = [ 0 ] * 100001 for i in range ( n ) : s , a [ i ] = map ( int , input ( ) . split ( ) ) c [ s ] += 1 for j in range ( n ) : print ( n - 1 + c [ a [ j ] ] , n - 1 - c [ a [ j ] ] ) NEW_LINE


n = int ( input ( ) ) a = [ 0 ] * nc = [ 0 ] * 100001 for i in range ( n ) : s , a [ i ] = map ( int , input ( ) . split ( ) ) c [ s ] += 1 for i in range ( n ) : print ( ( n - 1 ) + c [ a [ i ] ] , ( n - 1 ) - c [ a [ i ] ] ) NEW_LINE


import sysimport mathdef fn ( n , x , y ) : cnt = [ 0 ] * 100001 for i in range ( n ) : cnt [ x [ i ] ] = cnt [ x [ i ] ] + 1 for i in range ( n ) : print ( n - 1 + cnt [ y [ i ] ] , n - 1 - cnt [ y [ i ] ] )   if __name__ == ' _ _ main _ _ ' : input = sys . stdin . read ( ) data = list ( map ( int , input . split ( ) ) ) n = data [ 0 ] x = [ ] y = [ ] l = 1 for i in range ( 1 , 2 * n + 1 ) : if i % 2 == 0 : y . append ( data [ i ] ) else : x . append ( data [ i ] ) ( fn ( n , x , y ) ) NEW_LINE


import sysfrom collections import Counterdef fmax ( n , h , a ) : th = [ n - 1 ] * n ta = [ n - 1 ] * n ch = Counter ( h ) ca = Counter ( a ) for i in range ( n ) : t = a [ i ] ct = ch [ t ] ta [ i ] = ta [ i ] - ct th [ i ] = th [ i ] + ct return th , ta if __name__ == ' _ _ main _ _ ' : input = sys . stdin . read ( ) data = list ( map ( int , input . split ( ) ) ) t = int ( data [ 0 ] ) l = 0 n = t h = [ ] a = [ ] for i in range ( t ) : h . append ( data [ l + 1 ] ) a . append ( data [ l + 2 ] ) l = l + 2 th , ta = fmax ( n , h , a ) for i in range ( t ) : print ( th [ i ] , ta [ i ] ) NEW_LINE


n = int ( input ( ) ) a = [ 0 ] * nc = [ 0 ] * 100001 for i in range ( n ) : s , a [ i ] = map ( int , input ( ) . split ( ) ) c [ s ] += 1 for i in range ( n ) : print ( ( n - 1 ) + c [ a [ i ] ] , ( n - 1 ) - c [ a [ i ] ] )                 NEW_LINE


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


import java . util . * ; public class Practice { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) ; int home [ ] = new int [ 1000001 ] ; int away [ ] = new int [ 1000001 ] ; for ( int i = 0 ; i < n ; i ++ ) { int a = in . nextInt ( ) ; home [ a ] ++ ; away [ i ] = in . nextInt ( ) ; } for ( int i = 0 ; i < n ; i ++ ) { System . out . println ( ( n - 1 + home [ away [ i ] ] ) + " ▁ " + ( n - 1 - home [ away [ i ] ] ) ) ; } } }


import java . util . ArrayList ; import java . util . Arrays ; import java . util . Collections ; import java . util . Scanner ; import java . lang . Math ; public class Account { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int [ ] home = new int [ 100001 ] ; int [ ] away = new int [ n ] ; Arrays . fill ( home , 0 ) ; for ( int i = 0 ; i < n ; i ++ ) { home [ sc . nextInt ( ) ] ++ ; away [ i ] = sc . nextInt ( ) ; } int [ ] hc = new int [ n ] ; int [ ] ac = new int [ n ] ; Arrays . fill ( hc , n - 1 ) ; Arrays . fill ( ac , n - 1 ) ; for ( int i = 0 ; i < n ; i ++ ) { hc [ i ] += home [ away [ i ] ] ; ac [ i ] -= home [ away [ i ] ] ; }


import java . util . * ; public class FootballKit { public static void main ( String arg [ ] ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int [ ] x = new int [ n ] ; int [ ] y = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { x [ i ] = sc . nextInt ( ) ; y [ i ] = sc . nextInt ( ) ; }   int [ ] home = new int [ n ] ; int [ ] away = new int [ n ] ; int [ ] cnt = new int [ 100001 ] ; for ( int i = 0 ; i < n ; i ++ ) { cnt [ x [ i ] ] ++ ; }   for ( int i = 0 ; i < n ; i ++ ) { home [ i ] = n - 1 ; home [ i ] += cnt [ y [ i ] ] ; away [ i ] = 2 * ( n - 1 ) - home [ i ] ; }   for ( int i = 0 ; i < n ; i ++ ) { System . out . println ( home [ i ] + " ▁ " + away [ i ] ) ; } } }


import java . util . * ; import java . io . * ; public class MainClass { public static void main ( String args [ ] ) throws IOException { Reader in = new Reader ( ) ; int n = in . nextInt ( ) ; int n1 = in . nextInt ( ) ; int n2 = in . nextInt ( ) ; long [ ] A = new long [ n ] ; for ( int i = 0 ; i < n ; i ++ ) A [ i ] = in . nextLong ( ) ; new MergeSortLong ( ) . sort ( A , 0 , n - 1 ) ; long [ ] B = new long [ n ] ; for ( int i = 0 ; i < n ; i ++ ) B [ i ] = A [ n - 1 - i ] ; long [ ] sum = new long [ n ] ; sum [ 0 ] = B [ 0 ] ; for ( int i = 1 ; i < n ; i ++ ) sum [ i ] = sum [ i - 1 ] + B [ i ] ; double ans = 0.0d ; long nn1 = n1 * sum [ n2 - 1 ] + n2 * ( sum [ n1 + n2 - 1 ] - sum [ n2 - 1 ] ) ; long nn2 = n2 * sum [ n1 - 1 ] + n1 * ( sum [ n1 + n2 - 1 ] - sum [ n1 - 1 ] ) ; System . out . println ( Math . max ( nn1 , nn2 ) / ( ( double ) ( 1L * n1 * n2 ) ) ) ; } } class Reader { final private int BUFFER_SIZE = 1 << 16 ; private DataInputStream din ; private byte [ ] buffer ; private int bufferPointer , bytesRead ;   public Reader ( ) { din = new DataInputStream ( System . in ) ; buffer = new byte [ BUFFER_SIZE ] ; bufferPointer = bytesRead = 0 ; }   public Reader ( String file_name ) throws IOException { din = new DataInputStream ( new FileInputStream ( file_name ) ) ; buffer = new byte [ BUFFER_SIZE ] ; bufferPointer = bytesRead = 0 ; }   public String readLine ( ) throws IOException { byte [ ] buf = new byte [ 64 ] ;

n , n1 , n2 = map ( int , input ( ) . split ( ) )   people = [ int ( bruh ) for bruh in input ( ) . split ( ) ]   people . sort ( )   larger = max ( n1 , n2 ) smaller = min ( n1 , n2 )   small = people [ n - smaller : ] large = people [ n - larger - smaller : n - smaller ]   arithmean = sum ( small ) / smaller + sum ( large ) / larger   print ( ( f ' { arithmean : .9f } ' ) ) NEW_LINE


import sysLI = lambda : list ( map ( int , sys . stdin . readline ( ) . split ( ) ) ) MI = lambda : map ( int , sys . stdin . readline ( ) . split ( ) ) SI = lambda : sys . stdin . readline ( ) . strip ( ' \n ' ) II = lambda : int ( sys . stdin . readline ( ) )   n , a , b = MI ( ) a , b = max ( a , b ) , min ( a , b ) l = sorted ( LI ( ) , reverse = True ) ans = sum ( l [ : b ] ) / b + sum ( l [ b : b + a ] ) / aprint ( ans ) NEW_LINE


n , n1 , n2 = ( int ( x ) for x in input ( ) . split ( ) ) a = list ( int ( x ) for x in input ( ) . split ( ) ) a = sorted ( a , reverse = True ) if n1 < n2 : s = 0 for i in range ( n1 ) : s += a [ i ] d = 0 for j in range ( n1 , n1 + n2 ) : d += a [ j ] NEW_LINE


def solve ( n , t1 , t2 , seq ) : seq . sort ( reverse = True ) mini = min ( t1 , t2 ) maxi = max ( t1 , t2 ) mean1 = sum ( seq [ : mini ] ) / mini mean2 = sum ( seq [ mini : maxi + mini ] ) / maxi return mean1 + mean2 n , t1 , t2 = list ( map ( int , input ( ) . split ( ) ) ) seq = list ( map ( int , input ( ) . split ( ) ) )   print ( solve ( n , t1 , t2 , seq ) ) NEW_LINE


import java . util . Arrays ; import java . util . Scanner ;   public class B735 { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int length = scanner . nextInt ( ) ; int city1 = scanner . nextInt ( ) ; int city2 = scanner . nextInt ( ) ; int [ ] people = new int [ length ] ; for ( int i = 0 ; i < length ; i ++ ) people [ i ] = scanner . nextInt ( ) ; Arrays . sort ( people ) ; long sum1 = 0 ; long sum2 = 0 ; for ( int i = length - 1 ; i >= length - Math . min ( city1 , city2 ) ; i -- ) sum1 += people [ i ] ; for ( int i = length - Math . min ( city1 , city2 ) - 1 ; i >= length - city1 - city2 ; i -- ) sum2 += people [ i ] ; double answer = 1d * sum2 / Math . max ( city1 , city2 ) + 1d * sum1 / Math . min ( city1 , city2 ) ; System . out . print ( answer ) ; } }


import java . io . * ; import java . util . * ; import java . math . * ; import java . lang . * ;   public class Solution implements Runnable {    public void run ( ) { InputReader sc = new InputReader ( System . in ) ; PrintWriter out = new PrintWriter ( System . out ) ; int i = 0 , j = 0 , k = 0 ; int t = 0 ;


import java . io . * ; import java . lang . * ; import java . util . * ;   public class C735 { public static void main ( String [ ] args ) throws IOException { StringBuffer ans = new StringBuffer ( ) ; StringTokenizer st ; BufferedReader f = new BufferedReader ( new InputStreamReader ( System . in ) ) ; st = new StringTokenizer ( f . readLine ( ) ) ; int n = Integer . parseInt ( st . nextToken ( ) ) ; int n1 = Integer . parseInt ( st . nextToken ( ) ) ; int n2 = Integer . parseInt ( st . nextToken ( ) ) ; Queue < Integer > queue = new LinkedList < > ( ) ; st = new StringTokenizer ( f . readLine ( ) ) ; Integer [ ] arr = new Integer [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = Integer . parseInt ( st . nextToken ( ) ) ; } Arrays . sort ( arr ) ; for ( int x = n - 1 ; x > - 1 ; x -- ) queue . add ( arr [ x ] ) ; f . close ( ) ; int r = Math . min ( n1 , n2 ) ; int c = Math . max ( n1 , n2 ) ; double average = 0 ; double average1 = 0 ; for ( int x = 0 ; x < r ; x ++ ) { average += queue . poll ( ) ; }


import java . util . * ; import java . util . Arrays ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int w = sc . nextInt ( ) ; int h = sc . nextInt ( ) ; int u1 = sc . nextInt ( ) ; int d1 = sc . nextInt ( ) ; int u2 = sc . nextInt ( ) ; int d2 = sc . nextInt ( ) ; int total = w ; for ( int i = h ; i > 0 ; i -- ) { total = total + i ; if ( i == d1 ) { total = total - u1 ; } if ( i == d2 ) { total = total - u2 ; } if ( total < 0 ) { total = 0 ; } } System . out . println ( total ) ; } }

w , h = map ( int , input ( ) . split ( ) ) u1 , d1 = map ( int , input ( ) . split ( ) ) u2 , d2 = map ( int , input ( ) . split ( ) ) while h : w += h if ( h == d1 ) : w -= u1 if ( h == d2 ) : w -= u2 w = max ( w , 0 ) h -= 1 print ( w ) NEW_LINE


w , h = map ( int , input ( ) . split ( ) )   u1 , d1 = map ( int , input ( ) . split ( ) )   u2 , d2 = map ( int , input ( ) . split ( ) )   floor = hwhile floor > 0 : w += floor if d1 == floor : w -= u1 elif d2 == floor : w -= u2 if w < 0 : w = 0 floor -= 1   print ( w )     NEW_LINE


import sys   def main ( ) : w , h , u1 , d1 , u2 , d2 = map ( int , sys . stdin . read ( ) . strip ( ) . split ( ) ) for i in range ( h , 0 , - 1 ) : w += i if i == d1 : w = max ( w - u1 , 0 ) elif i == d2 : w = max ( w - u2 , 0 ) return w print ( main ( ) ) NEW_LINE


import sys   w , h = map ( int , input ( ) . split ( ) ) u1 , d1 = map ( int , input ( ) . split ( ) ) u2 , d2 = map ( int , input ( ) . split ( ) )   while h > 0 : w += h if d1 == h : w -= u1 if d2 == h : w -= u2 if w < 0 : w = 0 h -= 1 print ( w ) NEW_LINE


import java . util . Scanner ;    public class Snowball {   public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int w = scan . nextInt ( ) ; int h = scan . nextInt ( ) ; int u1 = scan . nextInt ( ) ; int d1 = scan . nextInt ( ) ; int u2 = scan . nextInt ( ) ; int d2 = scan . nextInt ( ) ; if ( d2 > d1 ) { d1 += d2 ; d2 = d1 - d2 ; d1 -= d2 ; u1 += u2 ; u2 = u1 - u2 ; u1 -= u2 ; } w += ( ( h * ( h + 1 ) / 2 ) ) - ( ( d1 - 1 ) * d1 / 2 ) ; w -= u1 ; if ( w < 0 ) w = 0 ; w += ( ( d1 * ( d1 - 1 ) ) / 2 ) - ( ( d2 - 1 ) * d2 / 2 ) ; w -= u2 ; if ( w < 0 ) w = 0 ; w += ( d2 * ( d2 - 1 ) ) / 2 ; System . out . println ( w ) ; }   }


import java . util . Scanner ;    public class Snowball {   public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int w = scan . nextInt ( ) ; int h = scan . nextInt ( ) ; int u1 = scan . nextInt ( ) ; int d1 = scan . nextInt ( ) ; int u2 = scan . nextInt ( ) ; int d2 = scan . nextInt ( ) ; if ( d2 > d1 ) { d1 += d2 ; d2 = d1 - d2 ; d1 -= d2 ; u1 += u2 ; u2 = u1 - u2 ; u1 -= u2 ; } w += ( ( h * ( h + 1 ) / 2 ) ) - ( ( d1 - 1 ) * d1 / 2 ) ; w = Math . max ( w - u1 , 0 ) ; w += ( ( d1 * ( d1 - 1 ) ) / 2 ) - ( ( d2 - 1 ) * d2 / 2 ) ; w = Math . max ( w - u2 , 0 ) ; w += ( d2 * ( d2 - 1 ) ) / 2 ; System . out . println ( w ) ; }   }


import java . util . * ; public class A { public static void main ( String ar [ ] ) { Scanner s = new Scanner ( System . in ) ; int w = s . nextInt ( ) ; int h = s . nextInt ( ) ; int w1 = s . nextInt ( ) ; int h1 = s . nextInt ( ) ; int w2 = s . nextInt ( ) ; int h2 = s . nextInt ( ) ; for ( int i = h ; i >= 0 ; i -- ) { w += i ; if ( h1 == i ) w = w - w1 ; else if ( h2 == i ) w = w - w2 ; if ( w < 0 ) w = 0 ; } System . out . println ( w ) ; } }


import java . util . * ;   public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; ArrayList < String > li = new ArrayList < > ( ) ; Set < String > s = new HashSet < > ( ) ; int t = sc . nextInt ( ) ; String [ ] str = new String [ t ] ; for ( int i = 0 ; i < t ; i ++ ) { str [ i ] = sc . next ( ) ; } for ( int i = str . length - 1 ; i >= 0 ; i -- ) { if ( ! ( s . contains ( str [ i ] ) ) ) { s . add ( str [ i ] ) ; li . add ( str [ i ] ) ; } } String [ ] ans = new String [ li . size ( ) ] ; int iterator = 0 ; for ( String i : li ) { ans [ iterator ++ ] = i ; } for ( String i : ans ) { System . out . println ( i ) ; } } }

import sys   n = int ( input ( ) ) a = [ input ( ) for i in range ( n ) ]   mp = { }   for i in range ( n - 1 , - 1 , - 1 ) :   try : mp [ a [ i ] ] += 1 except : print ( a [ i ] ) mp [ a [ i ] ] = 1   NEW_LINE


n = int ( input ( ) ) l = [ ] for i in range ( n ) : s = input ( ) l . append ( s ) l = l [ : : - 1 ] d = set ( ) for i in l : if i not in d : d . add ( i ) print ( i )   NEW_LINE


n = int ( input ( ) ) a = [ input ( ) for _ in range ( n ) ] s = set ( ) for i in reversed ( a ) : if i not in s : s . add ( i ) print ( i ) NEW_LINE


n = int ( input ( ) ) l1 = [ ] d = dict ( ) for i in range ( n ) : x = input ( ) l1 . append ( x ) d [ x ] = 0 for j in range ( n - 1 , - 1 , - 1 ) : v = l1 [ j ] if ( d [ v ] == 0 ) : print ( v ) d [ v ] = 1 NEW_LINE


import sys   n = int ( input ( ) ) a = [ input ( ) for i in range ( n ) ]   mp = { }   for i in range ( n - 1 , - 1 , - 1 ) :   try : mp [ a [ i ] ] += 1 except : print ( a [ i ] ) mp [ a [ i ] ] = 1 NEW_LINE


import java . io . OutputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . PrintWriter ; import java . util . Collection ; import java . io . InputStreamReader ; import java . util . HashSet ; import java . util . StringTokenizer ; import java . util . Queue ; import java . io . BufferedReader ; import java . util . LinkedList ; import java . io . InputStream ;   public class Main { public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; Scanner in = new Scanner ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; BChatOrder solver = new BChatOrder ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; }   static class BChatOrder { int n ; String [ ] arr ;   public void readInput ( Scanner sc ) { n = sc . nextInt ( ) ; arr = new String [ n ] ; for ( int i = 0 ; i < n ; i ++ ) arr [ i ] = sc . next ( ) ; }   public void solve ( int testNumber , Scanner sc , PrintWriter pw ) { readInput ( sc ) ; HashSet < String > set = new HashSet < > ( ) ; Queue < String > q = new LinkedList < > ( ) ; for ( int i = n - 1 ; i >= 0 ; i -- ) { if ( set . add ( arr [ i ] ) ) q . add ( arr [ i ] ) ; } while ( ! q . isEmpty ( ) ) pw . println ( q . poll ( ) ) ; }   }   static class Scanner { StringTokenizer st ; BufferedReader br ;   public Scanner ( InputStream s ) { br = new BufferedReader ( new InputStreamReader ( s ) ) ; }   public String next ( ) { try { while ( st == null || ! st . hasMoreTokens ( ) ) st = new StringTokenizer ( br . readLine ( ) ) ; return st . nextToken ( ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }   public int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   } }


import java . io . * ; import java . util . * ;   public class B {   static int n , idx ; static int memo [ ] [ ] , memo2 [ ] [ ] ; static int max ; static int a [ ] ;   static int dp ( int i , int l ) { if ( i == - 1 ) return 0 ; if ( memo [ i ] [ l ] != - 1 ) return memo [ i ] [ l ] ;   int t = 0 ; int e = dp ( i - 1 , l ) ; if ( a [ i ] <= l ) { t = dp ( i - 1 , a [ i ] ) + 1 ; } return memo [ i ] [ l ] = Math . max ( t , e ) ; }   public static void main ( String args [ ] ) throws Exception { Scanner sc = new Scanner ( System . in ) ; PrintWriter pw = new PrintWriter ( System . out ) ;   int n = sc . nextInt ( ) ; Stack < String > sta = new Stack < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { sta . push ( sc . next ( ) ) ; } HashSet < String > hs = new HashSet < > ( ) ; while ( ! sta . isEmpty ( ) ) { String s = sta . pop ( ) ; if ( ! hs . contains ( s ) ) { pw . println ( s ) ; hs . add ( s ) ; } } pw . flush ( ) ; }


import java . io . * ; import java . util . * ;    public class B {   static int n , idx ; static int memo [ ] [ ] , memo2 [ ] [ ] ; static int max ; static int a [ ] ;   static int dp ( int i , int l ) { if ( i == - 1 ) return 0 ; if ( memo [ i ] [ l ] != - 1 ) return memo [ i ] [ l ] ;   int t = 0 ; int e = dp ( i - 1 , l ) ; if ( a [ i ] <= l ) { t = dp ( i - 1 , a [ i ] ) + 1 ; } return memo [ i ] [ l ] = Math . max ( t , e ) ; }   public static void main ( String args [ ] ) throws Exception { Scanner sc = new Scanner ( System . in ) ; PrintWriter pw = new PrintWriter ( System . out ) ;   int n = sc . nextInt ( ) ; Stack < String > sta = new Stack < > ( ) ; HashSet < String > hs = new HashSet < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { sta . add ( sc . next ( ) ) ; } while ( ! sta . isEmpty ( ) ) { String s = sta . pop ( ) ; if ( ! hs . contains ( s ) ) pw . println ( s ) ; hs . add ( s ) ; } pw . flush ( ) ; }


import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; int n = s . nextInt ( ) ; String arr [ ] = new String [ n ] ; for ( int i = n - 1 ; i >= 0 ; i -- ) { arr [ i ] = s . next ( ) ; } Stack < String > st = new Stack < > ( ) ; HashSet < String > hs = new HashSet < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { String str = arr [ i ] ; if ( ! hs . contains ( str ) ) { hs . add ( str ) ; System . out . println ( str ) ; } } } }


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 void main ( String [ ] args ) {

k = int ( input ( ) ) n = - 1 m = - 1 for i in range ( 5 , k // 5 + 1 ) : if ( k % i == 0 ) : n = i m = k / i breakif ( n == - 1 or m == - 1 ) : print ( - 1 ) exit ( ) s = " " v = " aeiou " for i in range ( k ) : s += v [ int ( ( i // m + i % m ) % 5 ) ] print ( s ) NEW_LINE


k = int ( input ( ) ) i = 2 n = m = 0 while i * i <= k : if k % i == 0 : if i >= 5 and k // i >= 5 : n = i m = k // i break i += 1 if n == 0 and m == 0 : print ( " - 1" ) exit ( 0 ) s = " aeiou " ans = ' ' l = 0 NEW_LINE


a = int ( input ( ) ) if a >= 25 : text = " aeiouaeiou "   t = a - 25 flag = True for i in range ( 5 , int ( a / 5 ) + 1 ) :   y = i - 5   x = ( t - 5 * y ) / ( 5 + y ) if x . is_integer ( ) :   flag = False break   if flag : print ( - 1 ) else : x += 5 y += 5   x = int ( x ) y = int ( y ) n = 0 for _ in range ( y ) :   kk = text [ n : n + 5 ]   if x == 5 :   print ( kk , end = " " ) else : kalan = x - 5 son_index = n + 4 for a in range ( kalan ) :   if son_index + 1 + a < 10 : kk += text [ son_index + 1 + a ] else : son_index -= 10 kk += text [ son_index + 1 + a ] print ( kk , end = " " )     n += 1 if n > 5 : n -= 5     else : print ( - 1 ) NEW_LINE


vowels = [ ' a ' , ' e ' , ' i ' , ' o ' , ' u ' ]   def factors ( x ) : lst = [ ] for i in range ( 5 , x // 5 + 1 ) : if x % i == 0 : lst . append ( [ i , x // i ] )   return lst   vowelsjoined = ' ' . join ( vowels )   n = int ( input ( ) )   if n < 25 or len ( factors ( n ) ) == 0 : print ( - 1 ) exit ( )   cols = factors ( n ) [ 0 ] [ 0 ] rows = factors ( n ) [ 0 ] [ 1 ]   res = " "   for x in range ( cols ) : for y in range ( rows ) : res = res + vowels [ ( x + y ) % 5 ]   print ( res )   NEW_LINE


n = int ( input ( ) ) f = 0 if n / 2 < 5 : print ( - 1 ) else : for i in range ( 5 , n // 2 ) : if n % i == 0 and n // i >= 5 : s = ' aeiou ' + ' g ' * ( ( i ) - 5 ) ; j = 1 ans = s while j < n // i : s = s [ - 1 ] + s [ : - 1 ] ans = ans + s j += 1 print ( ans ) f = 1 break if f == 0 : print ( - 1 ) NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ;


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


import java . io . * ; import java . lang . * ; import java . util . * ;   public class B1166 { public static void main ( String [ ] args ) throws IOException { StringBuffer ans = new StringBuffer ( ) ; StringTokenizer st ; BufferedReader f = new BufferedReader ( new InputStreamReader ( System . in ) ) ; st = new StringTokenizer ( f . readLine ( ) ) ; int k = Integer . parseInt ( st . nextToken ( ) ) ; f . close ( ) ; int n = 0 ; int m = 0 ; for ( int i = 5 ; i < k ; i ++ ) { if ( k % i == 0 ) { if ( k / i >= 5 ) { n = i ; m = k / i ; } else break ; } } if ( n == 0 ) { System . out . println ( - 1 ) ; return ; } char [ ] a = { ' a ' , ' e ' , ' i ' , ' o ' , ' u ' } ; for ( int i = 0 ; i < n ; i ++ ) { for ( int x = 0 ; x < m ; x ++ ) { ans . append ( a [ ( i + x ) % 5 ] ) ; } }   System . out . println ( ans ) ; }   }


import java . util . * ; import java . io . * ; public class horses { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int v = sc . nextInt ( ) ; if ( n - 1 <= v ) { System . out . println ( n - 1 ) ; return ; } long cost = v - 1 ; for ( int i = 1 ; i <= n - v ; i ++ ) cost += i ; System . out . println ( cost ) ; } }

n , v = map ( int , input ( ) . split ( ) ) amt = 0 if n > v : amt = v for i in range ( 2 , n - v + 1 ) : amt += ielse : amt = n - 1 print ( amt ) NEW_LINE


import sysinput_ = lambda : sys . stdin . readline ( ) . strip ( " \n " ) from math import gcdsa = lambda : input_ ( ) sb = lambda : int ( input_ ( ) ) sc = lambda : input_ ( ) . split ( ) sd = lambda : list ( map ( int , input_ ( ) . split ( ) ) ) se = lambda : float ( input_ ( ) ) sf = lambda : list ( input_ ( ) ) flsh = lambda : sys . stdout . flush ( ) mod = 10 ** 9 + 7 def hnbhai ( ) : n , v = sd ( ) if v >= n - 1 : print ( n - 1 ) return tot = n - v ini = v for i in range ( 1 , tot ) : ini += ( i + 1 ) print ( ini ) for _ in range ( 1 ) : hnbhai ( ) NEW_LINE


from itertools import accumulate   n , v = map ( int , input ( ) . split ( ) ) cost = [ ] n -= 1 while v : cost . append ( 1 ) v -= 1 n -= 1 k = 2 while n > 0 : cost . append ( k ) k += 1 n -= 1   total_cost = list ( accumulate ( cost ) ) print ( total_cost [ n - 1 ] ) NEW_LINE


cities , tank = map ( int , input ( ) . split ( ) )   fuel_cost = 0   NEW_LINE


import java . util . * ; import java . io . * ; import java . math . BigInteger ;   public class cp { public static void main ( String [ ] args ) throws IOException {   BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( br . readLine ( ) ) ; int n = Integer . parseInt ( st . nextToken ( ) ) ; int v = Integer . parseInt ( st . nextToken ( ) ) ;   int req = ( n - 1 ) ;


import java . util . * ; public class A { public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; int n = s . nextInt ( ) ; int v = s . nextInt ( ) ; int rd = n - 1 ; int cp = Math . min ( v , n - 1 ) ; int ans = cp ; for ( int i = 2 ; i < n ; i ++ ) { if ( cp >= rd ) { break ; } ans += i ; cp ++ ; } System . out . println ( ans ) ;


import java . util . * ; public class HelloWorld {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int v = sc . nextInt ( ) ; int val = v ; if ( n <= v ) System . out . println ( n - 1 ) ; else { for ( int i = 2 ; i <= ( n - v ) ; i ++ ) { val += i ; } System . out . println ( val ) ; } } }


import java . util . * ;   public class Main { public static void main ( String [ ] args ) { Scanner scn = new Scanner ( System . in ) ; int t = scn . nextInt ( ) ; for ( int c = 1 ; c <= t ; c ++ ) { int n = scn . nextInt ( ) ;

import sysfrom NEW_LINE os NEW_LINE import pathif NEW_LINE ( path . exists ( ' input . txt ' ) and path . exists ( ' output . txt ' ) ) : sys . stdout = open ( ' output . txt ' , ' w ' ) NEW_LINE sys . stdin = open ( ' input . txt ' , ' r ' ) NEW_LINE


def constructTiles ( arr , n , m ) : if NEW_LINE m & 1 != 1 : NEW_LINE for i in range ( n ) : if NEW_LINE ( arr [ i ] [ 0 ] [ 1 ] == arr [ i ] [ 1 ] [ 0 ] ) : print ( " Yes " ) NEW_LINE return print ( " No " ) NEW_LINE return       tc = int ( input ( ) ) NEW_LINE for _ in range ( 0 , tc ) : n , m = input ( ) . split ( ) NEW_LINE n = int ( n ) NEW_LINE m = int ( m ) NEW_LINE arr = [ ] NEW_LINE for i in range ( n ) : childArr = [ ] NEW_LINE for i in range ( 0 , 2 ) : a , b = input ( ) . split ( ) NEW_LINE a = int ( a ) NEW_LINE b = int ( b ) NEW_LINE childArr . append ( [ a , b ] ) NEW_LINE arr . append ( childArr ) NEW_LINE constructTiles ( arr , n , m ) NEW_LINE


c = int ( input ( ) ) NEW_LINE while c : c -= 1 NEW_LINE n , m = map ( int , input ( ) . split ( ) ) NEW_LINE cases = n NEW_LINE pair_one = False NEW_LINE pair_two = False NEW_LINE while cases : cases -= 1 NEW_LINE a , b = map ( int , input ( ) . split ( ) ) NEW_LINE b2 , a2 = map ( int , input ( ) . split ( ) ) NEW_LINE if a == a2 : pair_one = True NEW_LINE if b2 == b : pair_two = True   if pair_two and m % 2 == 0 : NEW_LINE INDENT print ( " YES " ) else : NEW_LINE print ( " NO " ) NEW_LINE DEDENT


p = lambda : list ( map ( int , input ( ) . split ( ) ) )   T = int ( input ( ) ) NEW_LINE for _ in range ( T ) : N , M = p ( ) NEW_LINE tiles = [ [ p ( ) , p ( ) ] for _ in range ( N ) ] NEW_LINE if M & 1 : print ( " NO " ) ; continue   NEW_LINE


import sysfrom NEW_LINE os NEW_LINE import pathif NEW_LINE ( path . exists ( ' input . txt ' ) and path . exists ( ' output . txt ' ) ) : sys . stdout = open ( ' output . txt ' , ' w ' ) NEW_LINE sys . stdin = open ( ' input . txt ' , ' r ' )   NEW_LINE


import java . util . Scanner ;   public class B1426 {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int T = in . nextInt ( ) ; for ( int t = 0 ; t < T ; t ++ ) { int N = in . nextInt ( ) ; int M = in . nextInt ( ) ; int [ ] [ ] [ ] tiles = new int [ N ] [ 2 ] [ 2 ] ; for ( int n = 0 ; n < N ; n ++ ) { for ( int r = 0 ; r < 2 ; r ++ ) { for ( int c = 0 ; c < 2 ; c ++ ) { tiles [ n ] [ r ] [ c ] = in . nextInt ( ) ; } } } boolean diagTile = false ; for ( int [ ] [ ] tile : tiles ) { if ( tile [ 0 ] [ 1 ] == tile [ 1 ] [ 0 ] ) { diagTile = true ; break ; } } boolean nonDiagTile = false ; for ( int [ ] [ ] tile1 : tiles ) { for ( int [ ] [ ] tile2 : tiles ) { boolean ok = true ; for ( int r = 0 ; r < 2 ; r ++ ) { for ( int c = 0 ; c < 2 ; c ++ ) { if ( tile1 [ r ] [ c ] != tile2 [ c ] [ r ] ) { ok = false ; } } } if ( ok ) { nonDiagTile = true ; } } } boolean possible ; if ( M % 2 == 1 ) { possible = false ; } else if ( M == 2 ) { possible = diagTile ; } else { possible = diagTile && nonDiagTile ; } System . out . println ( possible ? " YES " : " NO " ) ; } }   }


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