To Check Whether a given number is boston number

my code is giving wrong answer.please check it.

here is link of my code

1. Find all prime factors ( and there powers) using prime sieve.
2. now for all of them, calculate sum
3. For given N, caluclate sum
4.Compare

Follow this appraoch
Have a look at its implementation here