$ n $ is correctly represented by $ x ^ 2 + xy + y ^ 2 $ if and only if $ n $ is not divisible by 9 or any premium 3k + 2 $

How can I show a positive integer $ n $ is correctly represented by the quadratic binary form $ x ^ 2 + xy + y ^ 2 $ if and only if $ n $ is not divisible by 9 or any prime number of the form $ 3k + $ 2?

I'm going through Niven chapters 3.6 to 3.7, Introduction to Number Theory.