Matching factor structures using orthogonal rotation to congruence