  Let A,A' be elliptic curves or abelian varieties fully of type GSp defined
over a number field K. This includes principally polarized abelian varieties
with geometric endomorphism ring Z and dimension 2 or odd. We compare the
number of points on the reductions of the two varieties. We prove that A and A'
are K-isogenous if the following condition holds for a density-one set of
primes p of K: the prime numbers dividing #A(k_p) also divide #A'(k_p). We
generalize this statement to some extent for products of such varieties. This
refines results of Hall and Perucca (2011) and of Ratazzi (2012).
