/**
 * Given two lists of positive integers, a and b, this function finds and returns the common positive integers between them.
 *
 * @param a First list of positive integers
 * @param b Second list of positive integers
 * @return List of common positive integers
 *
 * Example:
 * findCommonPositiveIntegers(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) // [4, 5]
 */
fun findCommonPositiveIntegers(a: List<Int>, b: List<Int>): List<Int> {

    val commonIntegers = mutableListOf<Int>()

    // Find the common positive integers
    for (element in a) {
        if (element > 0 && element in b && element !in commonIntegers) {
            commonIntegers.add(element)
        }
    }

    return commonIntegers
}
/**
 * Given two lists of positive integers, a and b, this function finds and returns the common positive integers between them.
 *
 * @param a First list of positive integers
 * @param b Second list of positive integers
 * @return List of common positive integers
 *
 * Example:
 * findCommonPositiveIntegers(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) // [4, 5]
 */
fun findCommonPositiveIntegers(a: List<Int>, b: List<Int>): List<Int> {
/**
 * Given two lists of positive integers, a and b, this function finds and returns the common positive integers between them.
 *
 * @param a First list of positive integers
 * @param b Second list of positive integers
 * @return List of common positive integers
 *
 * Example:
 * findCommonPositiveIntegers(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) // [4, 5]
 */
fun findCommonPositiveIntegers(a: List<Int>, b: List<Int>): List<Int> {

    val commonIntegers = mutableListOf<Int>()

    // Find the common positive integers
    for (element in a) {
        if (element > 0 && element in b && element !in commonIntegers) {
            commonIntegers.add(element)
        }
    }

    return commonIntegers
}