Computing the inertias in symmetric matrix pencils