Controllable growth of multilayered XSe2 (X = W and Mo) for nonlinear optical and optoelectronic applications