Anagram congruence