Suppose $f(x) = a_nx^n + \dots + a_1x + a_0$ is a polynomial with integer coefficients, and suppose $m/l$ is a root of $f$, where $m$ and $l$ are relatively prime integers. Show that $m$ divides $a_0$ and $l$ divides $a_n$.
I know for an $m/l$ to be a root of a $f$ it must satisfy $f(m/l) = a_n(m/l)^n + \dots + a_1(m/l) + a_0 = 0$
I also know for $m$ and $l$ to be relatively prime their greatest common divisor must be $1$.
And $m$ divides $a_0$ and $l$ divides $a_n$ if there is some nonconstant $h$ such that $a_0 = mh$ and $a_n = lh$
However, I'm getting stuck on how to approach this problem. All help is appreciated!