On the set-theoretic complete intersection problem for monomial curves in An and Pn