2019 USAJMO Problems/Problem 6
Two rational numbers $\(\tfrac{m}{n}\)$ (Error compiling LaTeX. Unknown error_msg) and $\(\tfrac{n}{m}\)$ (Error compiling LaTeX. Unknown error_msg) are written on a blackboard, where $\(m\)$ (Error compiling LaTeX. Unknown error_msg) and $\(n\)$ (Error compiling LaTeX. Unknown error_msg) are relatively prime positive integers. At any point, Evan may pick two of the numbers $\(x\)$ (Error compiling LaTeX. Unknown error_msg) and $\(y\)$ (Error compiling LaTeX. Unknown error_msg) written on the board and write either their arithmetic mean $\(\tfrac{x+y}{2}\)$ (Error compiling LaTeX. Unknown error_msg) or their harmonic mean $\(\tfrac{2xy}{x+y}\)$ (Error compiling LaTeX. Unknown error_msg) on the board as well. Find all pairs $\((m,n)\)$ (Error compiling LaTeX. Unknown error_msg) such that Evan can write on the board in finitely many steps.
Proposed by Yannick Yao