
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
Students are in classroom with  $n$  rows. In each row there are  $m$  tables. It's given that  $m,n \geq 3$ . At each table there is exactly one student. We call neighbours of the student students sitting one place right, left to him, in front of him and behind him. Each student shook hands with his neighbours. In the end there were  $252$  handshakes. How many students were in the classroom?

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