Dear ihavvaquestion,
Since the total possible choices (6!) contains repeated arrangements,
Take the number of different arrangements as N.
Therefore, since there are three yellow flags and three blue flags interchanging them will will give you the total possible choices.
Hence,
Hope this will clarify.