
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
For positive reals  $p$  and  $q$ , define the *remainder* when  $p$  and  $q$  as the smallest nonnegative real  $r$  such that  $\tfrac{p-r}{q}$  is an integer. For an ordered pair  $(a, b)$  of positive integers, let  $r_1$  and  $r_2$  be the remainder when  $a\sqrt{2} + b\sqrt{3}$  is divided by  $\sqrt{2}$  and  $\sqrt{3}$  respectively. Find the number of pairs  $(a, b)$  such that  $a, b \le 20$  and  $r_1 + r_2 = \sqrt{2}$ .

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