
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) Determine all pairs  $(x, y)$  of (real) numbers with  $0 < x < 1$  and  $0 <y < 1$  for which  $x + 3y$  and  $3x + y$  are both integer. An example is  $(x,y) =( \frac{8}{3}, \frac{7}{8}) $ , because  $  x+3y =\frac38 +\frac{21}{8} =\frac{24}{8} =  3$  and  $ 3x+y = \frac98 + \frac78 =\frac{16}{8} = 2$ .

(b) Determine the integer  $m > 2$  for which there are exactly  $119$  pairs  $(x,y)$  with  $0 < x < 1$  and  $0 < y < 1$  such that  $x + my$  and   $mx + y$  are integers.

Remark: if  $u \ne v,$  the pairs  $(u, v)$  and  $(v, u)$  are different.

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