Check for a subsequence of size 2
if ( flag == False ) : NEW_LINE INDENT for j in range ( len ( S ) ) : NEW_LINE INDENT for j1 in range ( j + 1 , len ( S ) , 1 ) : NEW_LINE INDENT dummy = S [ j ] + S [ j1 ] NEW_LINE if ( dummy != "23" and dummy != "37" and dummy != "53" and dummy != "73" ) : NEW_LINE INDENT print ( 2 ) NEW_LINE DEDENT if ( flag == True ) : NEW_LINE INDENT break NEW_LINE DEDENT else : NEW_LINE INDENT flag = True NEW_LINE DEDENT DEDENT if ( flag == True ) : NEW_LINE INDENT break NEW_LINE DEDENT DEDENT DEDENT