There are **multiple options** for p and q, it's not just -6 and 1. p and q are **factors of** 6 and 1.

a₀=6 ⇒ p ∈ {1,2,3,6}

aₙ=1 ⇒ q ∈ {1}

p/q ∈ {1/1, 2/1, 3/1, 6/1}

And all of these can also be negative, so you actually have

p/q ∈ {+1/1, +2/1, +3/1, +6/1,

-1/1, -2/1, -3/1, -6/1}

Here's another example: f(x)=2x³-4x²+5x-9

a₀=9 ⇒ p ∈ {1,3,9}

aₙ=2 ⇒ q ∈ {1,2}

p/q ∈ {+1/1, +3/1, +9/1, +1/2, +3/2, +9/2,

-1/1, -3/1, -9/1, -1/2, -3/2, -9/2}