Below is the link of this problem:
https://app.codility.com/programmers/lessons/91-tasks_from_indeed_prime_2016_challenge/tree_product/
Well...I don\'t know ho