The Two Types of Society: Computationally Revealing Recurrent Social Formations and Their Evolutionary Trajectories