Hi, I am having difficulty with an If formula.

If a student is a Resident, and they are taking less than or equal to 12 units, then their tuition is 1200.
If they are a Resident, and are taking greater than 12 units, then their tuition is 1200+200/additional unit

If they are a non-resident, and they are taking less than 9 units, then their tuition is 3000.
If they are a non-resident, and they are taking greater than 9 units, then their tuition is 3000+500/additional unit

Any help?

Thank!!!