Before you say a word to your own girls, talk to their school counselor. The counselor may have handled this exact issue before and could advise you on how to approach it. Be sure the counselor understands that in your family, you are teaching your girls that the normal order of things is for a woman to have a baby after she is married, and you need some ideas on how to explain to your children that what you want them to think of as the normal order is sometimes circumvented. Ask the counselor for some specific dialogue to use and ask her or him to help you think of every possible question.
You have a little time here, I assume, unless the niece is so pregnant that it is already very clearly showing and she sees your children regularly--? I would not rush to tell them unless they absolutely will see her very soon and she's showing. I would want to time the discussion a bit, so it's not happening when your girls are rushing out the door, or upset about something at school that day, etc. Again, ask the counselor about what to do. Also, should you tellt he two girls separately and in different ways, or together? You know them best; would the 9-year-old know more already or take it differently or have different questions, whereas the younger girl would possibly shrug and say "Oh, OK" and have no questions? I would really consider talking to them separately so if the older one has more mature questions, the younger one doesn't have to be involved in that talk.
Please take care that whatever you say does not tell the girls -- either directly or through your tone of voice or word choices -- that their cousin is "bad." Yes, it's disappointing, and I'm sure you and her parents are worried about her entire future right now, and with reason. But you don't want to telegraph to the younger girls that their cousin is a bad person; that would only confuse and upset them. You don't want them to think it's acceptable to you for a girl her age to be pregnant, but you also don't want them to think they need to shun her -- right?
A lot will depend on how close they feel to this cousin and how much they already interact with her. If they are not that close and don't see her frequently, they may surprise you with a lack of much interest; or they may be very interested indeed. Talk with the counselor about how to handle either situation. It's possible they will give you a cool "Oh--OK" and not say anything else, but come back at you later, even in weeks or months, with a lot of questions and feelings about it. Be prepared for that.