Given a graph of $$$N$$$ nodes . Each node $$$i$$$ has value $$$A[i]$$$ . There is a directed edge from node $$$i$$$ to node $$$j$$$ if $$$A[i]\ >\ A[j]$$$ and $$$|i-j|\ \le\ K$$$ .
For every element , $$$B[i]$$$ is shortest distance to a node with prime value , if there is no path to such node $$$B[i]\ =\ 0$$$ . Find the sum of all elements of $$$B$$$ modulo $$$10^9\ +\ 7$$$ .
Constraints :
$$$1\ \le\ K\ \le N\ \le\ 10^5\ $$$ $$$\ B[i]\ \le\ 10^6\ \tab\forall\ 1\ \le\ i\ \le\ N$$$