Store only two diagonal elements

As requested by A.V.Popov