move isPrime and factors to a Utils class.
resolve Problem7