Problem

Source: Indonesia TST 2009 First Stage Test 4 Problem 4

Tags: modular arithmetic, combinatorics proposed, combinatorics



2008 boys and 2008 girls sit on 4016 chairs around a round table. Each boy brings a garland and each girl brings a chocolate. In an "activity", each person gives his/her goods to the nearest person on the left. After some activities, it turns out that all boys get chocolates and all girls get garlands. Find the number of possible arrangements.