
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
A rectangle is divided into seven non-overlapping squares. The width and the height of the rectangle are relatively prime positive integers. Given that:
1. The sides of two smallest squares and the next smallest square sum up to the side of the fourth smallest square.
2. The fourth and the fifth smallest squares line up exactly to match the length of the largest square.
3. The sum of the sides of the second and third smallest squares equals the side of the sixth smallest square. 
4. Finally, the largest square's side equals the sum of the sides of the third and the sixth smallest squares. 

Find the perimeter of the rectangle.

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