/**
 * Compute the product of tuples within nested while loops
 */
fun multiplyTuples(tuples1: List<List<Int>>, tuples2: List<List<Int>>): List<List<Int>> {

    val result = mutableListOf<List<Int>>()
    var i = 0
    while (i < tuples1.size) {
        var j = 0
        while (j < tuples2.size) {
            val temp = mutableListOf<Int>()
            for (k in tuples1[i].indices) {
                temp.add(tuples1[i][k] * tuples2[j][k])
            }
            result.add(temp.toList())
            j++
        }
        i++
    }
    return result
}
/**
 * Compute the product of tuples within nested while loops
 */
fun multiplyTuples(tuples1: List<List<Int>>, tuples2: List<List<Int>>): List<List<Int>> {
/**
 * Compute the product of tuples within nested while loops
 */
fun multiplyTuples(tuples1: List<List<Int>>, tuples2: List<List<Int>>): List<List<Int>> {

    val result = mutableListOf<List<Int>>()
    var i = 0
    while (i < tuples1.size) {
        var j = 0
        while (j < tuples2.size) {
            val temp = mutableListOf<Int>()
            for (k in tuples1[i].indices) {
                temp.add(tuples1[i][k] * tuples2[j][k])
            }
            result.add(temp.toList())
            j++
        }
        i++
    }
    return result
}