check whether all the frequencies are prime or not
for ( char ch = ' a ' ; ch <= ' z ' ; ch ++ ) { if ( m . ContainsKey ( ch ) && m [ ch ] > 0 && ! isPrime ( m [ ch ] ) ) { return false ; } } return true ; }