If the equation $(x^2-4)^3(x^3+1)^n(x^2-5x+6)^m=0$ has 18 roots, find m+n. If the equation $(x^2-4)^3(x^3+1)^n(x^2-5x+6)^m=0$ has 18 roots, find $m+n$.
I did and I got 
$$(x+2)^3(x-2)^{3+m}(x+1)^n(x^2-x+1)^n(x-3)^m=0$$, so I find $3+3+m+n+2n+m=18\implies 2m+3n=12$, the answer is m+n=5. What I have to do now?

Note that $m$ and $n$ have to be non-negative integers, and perhaps it is implied in the question that $m$ and $n$ are positive as well. The only positive solution to $3n+2m=12$ is $n=2,m=3$, so $m+n=5$.
If zero powers are allowed, then we also have $n=4,m=0$ and $n=0,m=6$, for sums of $4$ and $6$ respectively.
