Lines $l_1$ and $l_2$ both pass through the origin and make first-quadrant angles of $\frac{\pi}{66}$ and $\frac{\pi}{50}$ radians, respectively, with the positive x-axis. For any line $l$, the transformation $R(l)$ produces another line as follows: $l$ is reflected in $l_1$, and the resulting line is reflected in $l_2$. Let $R^{(1)}(l)=R(l)$ and $R^{(n)}(l)=R\left(R^{(n-1)}(l)\right)$. Given that $l$ is the line $y=\frac{17}{85}x$, find the smallest positive integer $m$ for which $R^{(m)}(l)=l$.
← Back to Problem 1,025