$_=<>;$y=1;($a[$_]^=1)?($y*=$_):($y/=$_)for`factor $_`=~/ \d+/g;print$y