Prime Anagrams

Can Someone help me to solve this problem
Here is the link TopCoder Statistics - Problem Statement