Phase transitions in benzene under dynamic and static compression