/**
 * Given a list of tuples, find the index of the first tuple that meets the following criteria:
 * - The first element of the tuple is a positive integer divisible by 3.
 * - The second element of the tuple is a negative integer.
 *
 * @param tupleList A list of tuples
 * @return The index of the tuple meeting the given criteria, or -1 if no such tuple exists
 */
fun indexNestedTuple(tupleList: List<Pair<Int, Int>>): Int {

    for ((index, tuple) in tupleList.withIndex()) {
        if (tuple.first % 3 == 0 && tuple.second < 0) {
            return index
        }
    }
    return -1
}
/**
 * Given a list of tuples, find the index of the first tuple that meets the following criteria:
 * - The first element of the tuple is a positive integer divisible by 3.
 * - The second element of the tuple is a negative integer.
 *
 * @param tupleList A list of tuples
 * @return The index of the tuple meeting the given criteria, or -1 if no such tuple exists
 */
fun indexNestedTuple(tupleList: List<Pair<Int, Int>>): Int {
/**
 * Given a list of tuples, find the index of the first tuple that meets the following criteria:
 * - The first element of the tuple is a positive integer divisible by 3.
 * - The second element of the tuple is a negative integer.
 *
 * @param tupleList A list of tuples
 * @return The index of the tuple meeting the given criteria, or -1 if no such tuple exists
 */
fun indexNestedTuple(tupleList: List<Pair<Int, Int>>): Int {

    for ((index, tuple) in tupleList.withIndex()) {
        if (tuple.first % 3 == 0 && tuple.second < 0) {
            return index
        }
    }
    return -1
}