Prominent short-, mid-, and long-term periodicities in solar and geomagnetic activity: Wavelet analysis