Project Euler 632 - Square Prime Factors

Official link: https://projecteuler.net/problem=632

Note: I am currently not happy with my understanding of this problem