CINDES: Classification induced neural density estimator and simulator