Magnetism in graphite induced by irradiation of hydrogen or helium ions – A comparative study