
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
On a planet, there are $2^{N}$ countries $(N \geqslant 5)$. Each country has a flag consisting of a row of $N$ squares of side 1, each being either yellow or blue. The flags are pairwise distinct. A set of $N$ flags is diverse if they can be arranged in a certain order to form an $N \times N$ square such that the $N$ squares on the main diagonal are of the same color. Determine the smallest integer $M$ such that every set of $M$ flags contains a diverse set of $N$ flags.

Present the answer in LaTex format: \boxed{Your answer}
user