
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
Petya and Vasya were playing with toy soldiers. Petya arranged his knights in a "rectangle" - some number of columns and some number of rows. When all the knights from the first and second rows went on reconnaissance, 24 knights remained. Then, Vasya's archers drove away all the knights that remained in the first and second columns. After that, 18 knights were left. How many knights did Petya have originally?

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