Investigating Large Language Models in Diagnosing Students' Cognitive Skills in Math Problem-solving