A friend of mine has calmly taught her children that no one should touch them in places their underwear covers. You could sort of modify that and teach them that they shouldn't touch others in places that cover their underwear.
I also agree with staying very calm and matter of fact about it. Ask them each why they did this, and keep the conversation simple. Answer questions openly and honestly, in child appropriate language (ie: they don't need all the details).
Could your 6 year old have seen something sexual either on tv or walking in on you and your partner?? I would also forbid it to be honest. I have two boys and I'm really good at laying out the expectations such as DO NOT pull your pants down with any other children or lay on your sister again!! They don't have to know that it made you think he was being sexual with her or whatever, just that it's a no no and that mom says that is not happening again.
good luck
This was probably nothing more than exploratory behavior between children of the opposite sex, which is pretty common. There are A LOT of posts about it in this forum if you scroll through and take a look.
Try not to be as upset and emotional with them about it, but rather, just keep calm and explain to them what is appropriate physical interaction/touching and what is not appropriate.
Telling them what they've done is "wrong" may scare and shame them, which you don't want them upset because they just don't understand the depth of what they've done. If you are absolutely confident there is no molestation going on with either of them with other family members, school, daycare, neighbors, etc. and you are confident they are not re-enacting or mimicking the behavior because you monitor what they see on TV and you know they haven't walked in on your partner and you, then I can assure you, they were just exploring inappropriately and had no idea it was inappropriate because no one has ever told them.
I do encourage you to scroll through this forum to see how common this is and how many other parents experience this with their children. There are a lot of good solutions and advice given throughout the years on this subject on this forum.