Prediction of solar and geomagnetic activity data using neural networks