Equation of state of hard and Weeks–Chandler–Anderson hyperspheres in four and five dimensions