CMIMC 2020 Algebra and Number Theory Problem 9

Let p=10009 be a prime number. Determine the number of ordered pairs of integers (x, y) such that 1 \leq x, y \leq p and x^{3}-3 x y+y^{3}+1 is divisible by p.