Optimum first and second order extrapolations of Successive Overrelaxation type methods for certain classes of matrices