Solving Similarity And Congruence