How to calculate the oxidation number of Fe and S in compound FeS2?

How to calculate the oxidation number of Fe and S in compound FeS2? please explain briefly. I am in great trouble

The iron and sulfur atoms in FeS2 are arranged as Fe–S–S rather than S–Fe–S. S2-2 is the persulfide. In FeS2, iron is assigned an oxidation number of 2+, since persulfide has an oxidation number of −2, where each sulfur atom is assigned an oxidation number of -1.