
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
Masha has \( x \) rubles, Petya has \( y \) rubles, then:

\[ n(x-3) = y + 3 \]
\[ x + n = 3(y - n) \]

Express \( x \) from the second equation and substitute into the first:

\[ n(3y - 4n - 3) = y + 3, \]

\[ 3ny - y = 4n^2 + 3n + 3, \]

\[ y = \frac{4n^2 + 3n + 3}{3n - 1} \]

In order for \( y \) to be an integer, \( (4n^2 + 3n + 3) \) must be divisible by \( 3n - 1 \):

\[ \frac{4n^2 + 3n + 3}{3n - 1} \]

After performing the division:

\[ \frac{13n + 9}{3n - 1} \]

Hence:

\[ \frac{40}{3n - 1} \]

The divisors of 40 satisfying this equation are \( n = 1, 2, 3, 7 \).

We check if \( x \) and \( y \) remain natural numbers for these values of \( n \).

- For \( n = 1 \), \( y = 5 \), \( x = 11 \)
- For \( n = 2 \), \( y = 5 \), \( x = 7 \)
- For \( n = 3 \), \( y = 6 \), \( x = 6 \)
- For \( n = 7 \), \( y = 11 \), \( x = 5 \)

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