/**
 * This function takes a list of numbers as input and returns a map containing two lists: the first list contains
 * all the prime numbers in the input list, and the second list contains all the non-prime numbers.
 *
 * @param numbers A list of integers.
 * @return A map containing two lists of integers - 'primeNumbers' and 'nonPrimeNumbers'.
 */
fun findPrimeNumbers(numbers: List<Int>): Map<String, List<Int>> {

    val primeNumbers = mutableListOf<Int>()
    val nonPrimeNumbers = mutableListOf<Int>()

    for (num in numbers) {
        if (num < 2) {
            continue
        }
        var isPrime = true
        for (i in 2 until num) {
            if (num % i == 0) {
                nonPrimeNumbers.add(num)
                isPrime = false
                break
            }
        }
        if (isPrime) {
            primeNumbers.add(num)
        }
    }

    return mapOf("primeNumbers" to primeNumbers, "nonPrimeNumbers" to nonPrimeNumbers)
}
/**
 * This function takes a list of numbers as input and returns a map containing two lists: the first list contains
 * all the prime numbers in the input list, and the second list contains all the non-prime numbers.
 *
 * @param numbers A list of integers.
 * @return A map containing two lists of integers - 'primeNumbers' and 'nonPrimeNumbers'.
 */
fun findPrimeNumbers(numbers: List<Int>): Map<String, List<Int>> {
/**
 * This function takes a list of numbers as input and returns a map containing two lists: the first list contains
 * all the prime numbers in the input list, and the second list contains all the non-prime numbers.
 *
 * @param numbers A list of integers.
 * @return A map containing two lists of integers - 'primeNumbers' and 'nonPrimeNumbers'.
 */
fun findPrimeNumbers(numbers: List<Int>): Map<String, List<Int>> {

    val primeNumbers = mutableListOf<Int>()
    val nonPrimeNumbers = mutableListOf<Int>()

    for (num in numbers) {
        if (num < 2) {
            continue
        }
        var isPrime = true
        for (i in 2 until num) {
            if (num % i == 0) {
                nonPrimeNumbers.add(num)
                isPrime = false
                break
            }
        }
        if (isPrime) {
            primeNumbers.add(num)
        }
    }

    return mapOf("primeNumbers" to primeNumbers, "nonPrimeNumbers" to nonPrimeNumbers)
}