How important are CS courses for a pure mathematics PhD admission?
Other than lowering your GPA, I don't think these two grades will matter much in a pure math PhD application.  After all, many pure math applicants take no CS courses at all, so it is certainly not the case that admissions committees are systematically screening for CS skill.  Moreover, not everyone in pure math values programming ability, skill or experience (not as much as we should, probably) and those who do are probably math-centric enough to believe that an applicant who is mathematically strong could become a good programmer if they put their mind to it.  

Anyway, what's done is done.  I wouldn't worry much about it, and in particular I would not feel the need to try to spin / justify these grades in your personal statement.