
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
In a bag, there are several red and white balls. If 2 red balls and 3 white balls are taken out at a time, when there are no white balls left, there are 18 red balls remaining. If 5 red balls and 3 white balls are taken out at a time, when there are no red balls left, 18 white balls remain. How many red balls are in the bag initially?

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