/**
 * Given two lists, find the common elements and subtract them from the original lists.
 *
 * @param list1 first list
 * @param list2 second list
 * @return a pair containing the result of subtracting the common elements from the original lists
 */
fun subtractCommonElements(list1: List<Any>, list2: List<Any>): Pair<List<Any>, List<Any>> {

    // Find the common elements between the two lists
    val commonElements = list1.intersect(list2)

    // Subtract the common elements from the original lists
    val result1 = list1.filterNot { commonElements.contains(it) }
    val result2 = list2.filterNot { commonElements.contains(it) }

    return Pair(result1, result2)
}
/**
 * Given two lists, find the common elements and subtract them from the original lists.
 *
 * @param list1 first list
 * @param list2 second list
 * @return a pair containing the result of subtracting the common elements from the original lists
 */
fun subtractCommonElements(list1: List<Any>, list2: List<Any>): Pair<List<Any>, List<Any>> {
/**
 * Given two lists, find the common elements and subtract them from the original lists.
 *
 * @param list1 first list
 * @param list2 second list
 * @return a pair containing the result of subtracting the common elements from the original lists
 */
fun subtractCommonElements(list1: List<Any>, list2: List<Any>): Pair<List<Any>, List<Any>> {

    // Find the common elements between the two lists
    val commonElements = list1.intersect(list2)

    // Subtract the common elements from the original lists
    val result1 = list1.filterNot { commonElements.contains(it) }
    val result2 = list2.filterNot { commonElements.contains(it) }

    return Pair(result1, result2)
}