A total of 10 students, 5 girls and 5 boys, went to the Old Summer Palace to play together. When the teacher took pictures of them, he asked them to stand in a row. Boys and boys were not next to each other, and girls were not next to each other. How many ways did the students line up?
有5女5男共10个同学一起到圆明园游玩，老师给他们照相时，要求他们站成一排，男生和男生不相邻，女生和女生不相邻，那么同学们共有多少种排队方式？
<gadget id="calculator">5 * 4 * 3 * 2 * 1 * 6 * 5 * 4 * 3 * 2 * 1</gadget>
<output>86_400</output>

<result>86_400</result>