Pari Programming Exercise