/**
 * Given two sets of geographical coordinates, write a function to find the common elements.
 * The geographical coordinates are represented as tuples.
 *
 * @param set1 The first set of geographical coordinates.
 * @param set2 The second set of geographical coordinates.
 * @return A set containing the common elements (geographical coordinates) between set1 and set2.
 */
fun findCommonElements(set1: Set<Pair<Int, Int>>, set2: Set<Pair<Int, Int>>): Set<Pair<Int, Int>> {

    // Initialize an empty set to store the common elements
    val commonElements = mutableSetOf<Pair<Int, Int>>()

    // Iterate over each element in set1
    for (element in set1) {
        // Check if the element is present in set2
        if (element in set2) {
            // If it is, add it to the commonElements set
            commonElements.add(element)
        }
    }

    return commonElements
}
/**
 * Given two sets of geographical coordinates, write a function to find the common elements.
 * The geographical coordinates are represented as tuples.
 *
 * @param set1 The first set of geographical coordinates.
 * @param set2 The second set of geographical coordinates.
 * @return A set containing the common elements (geographical coordinates) between set1 and set2.
 */
fun findCommonElements(set1: Set<Pair<Int, Int>>, set2: Set<Pair<Int, Int>>): Set<Pair<Int, Int>> {
/**
 * Given two sets of geographical coordinates, write a function to find the common elements.
 * The geographical coordinates are represented as tuples.
 *
 * @param set1 The first set of geographical coordinates.
 * @param set2 The second set of geographical coordinates.
 * @return A set containing the common elements (geographical coordinates) between set1 and set2.
 */
fun findCommonElements(set1: Set<Pair<Int, Int>>, set2: Set<Pair<Int, Int>>): Set<Pair<Int, Int>> {

    // Initialize an empty set to store the common elements
    val commonElements = mutableSetOf<Pair<Int, Int>>()

    // Iterate over each element in set1
    for (element in set1) {
        // Check if the element is present in set2
        if (element in set2) {
            // If it is, add it to the commonElements set
            commonElements.add(element)
        }
    }

    return commonElements
}