/**
 * This function takes two sets as input and returns the intersection of the two sets using the ternary operator with multiple conditions.
 */
fun setIntersection(set1: Set<Int>, set2: Set<Int>): Set<Int> {

    val intersection = if (set1 is Set && set2 is Set && set1.all { it is Int } && set2.all { it is Int }) {
        set1.filter { it in set2 }.toSet()
    } else {
        emptySet()
    }
    return intersection
}
/**
 * This function takes two sets as input and returns the intersection of the two sets using the ternary operator with multiple conditions.
 */
fun setIntersection(set1: Set<Int>, set2: Set<Int>): Set<Int> {
/**
 * This function takes two sets as input and returns the intersection of the two sets using the ternary operator with multiple conditions.
 */
fun setIntersection(set1: Set<Int>, set2: Set<Int>): Set<Int> {

    val intersection = if (set1 is Set && set2 is Set && set1.all { it is Int } && set2.all { it is Int }) {
        set1.filter { it in set2 }.toSet()
    } else {
        emptySet()
    }
    return intersection
}