The given statement is

"A positive integer is prime only if it has no divisors other than 1 and itself."

This statement can be written as

If a positive integer has no divisors other than 1 and itself then it is prime.

Here $p$ : A positive integer has no divisors other than 1 and itself.

$q$ : The integer is prime.

~ $p$ : A positive integer has divisors other than 1 and itself.

~ $q$ : The integer is not prime.

The converse of the given statement is

If $q$ then $p$.

i.e., If a positive integer is prime then it has no divisors other than 1 and itself.

The contra positive of the given statement is

If a positive integer is not prime then it has divisors other than 1 and itself.