Given any polynomial $f\in \mathbb C[x]$ of degree $n>0$, $f$ can be written in the form$$f=c(x-a_1)^{r_1}\cdots(x-a_l)^{r_l},$$where $a_1,...,a_l$ are distinct. Also, $f'$ is the product$$f'=(x-a_1)^{r_1-1}\cdots(x-a_l)^{r_l-1}H,$$where $H\in \mathbb C[x]$ is a polynomial vanishing at none of $a_1,...,a_l$.
I need to prove$$\gcd (f,f')=(x-a_1)^{r_1-1}\cdots(x-a_l)^{r_l-1},$$and I intend to to show that they divides each other. By the definition of $\gcd$, that RHS divides LHS is easy to show. But I fail to show that LHS divides RHS. Any suggestions?