During the oscillation of a pendulum at what stages the potential and kinetic energies are maximum?