
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 an opaque bag, there are $10$ red balls, $2$ yellow balls, and $8$ blue balls, all of which are identical except for their colors.  
$(1)$ Find the probability of drawing a red ball from the bag;  
$(2)$ Now, some red balls are taken out from the bag and the same number of yellow balls are put in. After thorough mixing, the probability of drawing a yellow ball from the bag is $\frac{2}{5}$. How many red balls were taken out?

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