/**
 * This function takes two lists of numbers as input and returns a new list
 * containing only the numbers that are common in both input lists.
 *
 * @param numbers1 list of numbers
 * @param numbers2 list of numbers
 * @return A list of common numbers from numbers1 and numbers2
 */
fun findCommonNumbers(numbers1: List<Int>, numbers2: List<Int>): List<Int> {

    val commonNumbers = mutableListOf<Int>()

    // Iterate over numbers1
    for (num1 in numbers1) {
        // Iterate over numbers2
        for (num2 in numbers2) {
            // Check if num1 is divisible by num2
            if (num1 % num2 == 0) {
                // Check if num1 is not already present in the commonNumbers list
                if (num1 !in commonNumbers) {
                    // Add num1 to the commonNumbers list
                    commonNumbers.add(num1)
                }
            }
        }
    }

    return commonNumbers
}
/**
 * This function takes two lists of numbers as input and returns a new list
 * containing only the numbers that are common in both input lists.
 *
 * @param numbers1 list of numbers
 * @param numbers2 list of numbers
 * @return A list of common numbers from numbers1 and numbers2
 */
fun findCommonNumbers(numbers1: List<Int>, numbers2: List<Int>): List<Int> {
/**
 * This function takes two lists of numbers as input and returns a new list
 * containing only the numbers that are common in both input lists.
 *
 * @param numbers1 list of numbers
 * @param numbers2 list of numbers
 * @return A list of common numbers from numbers1 and numbers2
 */
fun findCommonNumbers(numbers1: List<Int>, numbers2: List<Int>): List<Int> {

    val commonNumbers = mutableListOf<Int>()

    // Iterate over numbers1
    for (num1 in numbers1) {
        // Iterate over numbers2
        for (num2 in numbers2) {
            // Check if num1 is divisible by num2
            if (num1 % num2 == 0) {
                // Check if num1 is not already present in the commonNumbers list
                if (num1 !in commonNumbers) {
                    // Add num1 to the commonNumbers list
                    commonNumbers.add(num1)
                }
            }
        }
    }

    return commonNumbers
}