Primary electron and positron fluxes measured by the PAMELA experiment