Stores the frequencies of prime divisors
var prime = new Map ( ) ; for ( var i = 0 ; i < n ; i ++ ) { if ( prime . has ( p [ i ] ) ) prime . set ( p [ i ] , prime . get ( p [ i ] ) + 1 ) else prime . set ( p [ i ] , 1 ) } var product = 1 , d = 1 ;