A new characterization of Ap where p and p−2 are primes