Pruning step
if ( not primes [ y ] ) : NEW_LINE INDENT flag = 1 NEW_LINE break NEW_LINE DEDENT sp = " " NEW_LINE j += 1 NEW_LINE tp += sp NEW_LINE if ( sp != " " ) : NEW_LINE y = int ( sp ) NEW_LINE if ( not primes [ y ] ) : NEW_LINE flag = 1 NEW_LINE if ( not flag ) : NEW_LINE ans . append ( tp ) NEW_LINE if ( len ( ans ) == 0 ) : NEW_LINE print ( - 1 ) NEW_LINE for i in ans : NEW_LINE print ( i ) NEW_LINE