Function to check wheather num can be added to the subset
def check ( pos , subset , unique ) : NEW_LINE INDENT for num in subset : NEW_LINE INDENT if gcd ( num , unique [ pos ] ) != 1 : NEW_LINE INDENT return False NEW_LINE DEDENT DEDENT return True NEW_LINE DEDENT