AMC 12A 2022 (Problem 21)

Let P(x)=x2022+x1011+1P(x)=x^{2022}+x^{1011}+1. Which of the following polynomials is a factor of P(x)P(x)?
(A)  x2x+1\text{(A)}\;x^2-x+1(B)  x2+x+1\text{(B)}\;x^2+x+1(C)  x4+1\text{(C)}\;x^4+1(D)  x6x3+1\text{(D)}\;x^6-x^3+1(E)  x6+x3+1\text{(E)}\;x^6+x^3+1