Nets beat Pacers, assured of at least No. 4 seed