Find the sum of all primes q<1000 such that for some prime p<q , both q divides p^3-1 and p divides q^3-1

269