High-precision determination of the electric and magnetic radius of the proton