
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
You can arrange 15 balls in the shape of a triangle, but you cannot arrange 96 balls in the shape of a square (missing one ball). Out of how many balls, not exceeding 50, can you arrange them both in the shape of a triangle and a square?

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