Yup, ranks DO MATTER.
Ranks determine what mark you get, IIRC the highest and lowest exam marks are used as the limits of a cohort and everyone gets fit in between based on their RANK.
And, depending on your school ranks will differ, like 50 ranks in a competitive school may differ by less...