  Symbol-pair codes introduced by Cassuto and Blaum in 2010 are designed to
protect against the pair errors in symbol-pair read channels. One of the
central themes in symbol-error correction is the construction of maximal
distance separable (MDS) symbol-pair codes that possess the largest possible
pair-error correcting performance. In this paper, we construct more general
generator polynomials for two classes of MDS symbol-pair codes with code length
$lp$. Based on repeated-root cyclic codes, we derive all MDS symbol-pair codes
of length $3p$, when the degree of the generator polynomials is no more than
10. We also give two new classes of (almost maximal distance separable) AMDS
symbol-pair codes with the length $lp$ or $4p$ by virtue of repeated-root
cyclic codes. For length $3p$, we derive all AMDS symbol-pair codes, when the
degree of the generator polynomials is less than 10.
  The main results are obtained by determining the solutions of certain
equations over finite fields.
