/**
 * The function takes a list of planet masses and calculates the average mass by excluding 
 * the masses that are too large and then converting them into a tuple.
 *
 * @param planetMasses A list of planet masses in kilograms.
 * @return A tuple containing the average mass of the planets, after excluding the large masses.
 */
fun calculateAverageMass(planetMasses: List<Int>): Pair<Int, Int> {

    var totalMass = 0
    var count = 0

    for (mass in planetMasses) {
        // Exclude large masses for accurate average calculation
        if (mass >= 1000000) {
            continue  // Skips the rest of the loop for large masses
        }

        totalMass += mass
        count++
    }

    val averageMass = totalMass / count

    return Pair(averageMass - count, averageMass + count)
}
/**
 * The function takes a list of planet masses and calculates the average mass by excluding 
 * the masses that are too large and then converting them into a tuple.
 *
 * @param planetMasses A list of planet masses in kilograms.
 * @return A tuple containing the average mass of the planets, after excluding the large masses.
 */
fun calculateAverageMass(planetMasses: List<Int>): Pair<Int, Int> {
/**
 * The function takes a list of planet masses and calculates the average mass by excluding 
 * the masses that are too large and then converting them into a tuple.
 *
 * @param planetMasses A list of planet masses in kilograms.
 * @return A tuple containing the average mass of the planets, after excluding the large masses.
 */
fun calculateAverageMass(planetMasses: List<Int>): Pair<Int, Int> {

    var totalMass = 0
    var count = 0

    for (mass in planetMasses) {
        // Exclude large masses for accurate average calculation
        if (mass >= 1000000) {
            continue  // Skips the rest of the loop for large masses
        }

        totalMass += mass
        count++
    }

    val averageMass = totalMass / count

    return Pair(averageMass - count, averageMass + count)
}