Print all prime integers and index of prime integer