
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
In a $100 \times 100$ grid, the numbers $1, 2, \ldots, 10000$ are placed, each appearing exactly once, such that numbers differing by 1 are located in adjacent cells. After this, the distances between the centers of all pairs of cells whose numbers differ by exactly 5000 are calculated. Let $S$ be the minimum of these distances. What is the maximum possible value of $S$?

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