Test for nonnegativity of polynomials with literal coefficients by quantifier elimination