The extragradient algorithm with inertial effects for solving the variational inequality