For a positive integer $n$, denote $A_n=\{(x,y)\in\mathbb Z^2|x^2+xy+y^2=n\}$. (a) Prove that the set $A_n$ is always finite. (b) Prove that the number of elements of $A_n$ is divisible by $6$ for all $n$. (c) For which $n$ is the number of elements of $A_n$ divisible by $12$?