Electron and positron fluxes in primary cosmic rays measured with the alpha magnetic spectrometer on the international space station