If no pair satisfy the conditions , print - 1
if ( ans . Count == 0 ) { Console . Write ( - 1 ) ; } else { foreach ( List < int > subList in ans ) { foreach ( int item in subList ) { Console . Write ( item + " ▁ " ) ; } Console . WriteLine ( ) ; }