The solution to the Waring problem for monomials and the sum of coprime monomials