The factor command factors polynomials with coefficients in ℤ/pℤ. (See also Section 6.12.10.)
Example. Input:
Output: