Sparse-Input Neural Networks for High-dimensional Nonparametric Regression and Classification