I think the point is that if the girl had consensual sex then she is also guilty and that is why she has been sentenced to two years also. If she proves that it was rape, then presumably only the boys will go to prison and she will be found not guilty.