Let pi and pi' be automorphic irreducible unitary cuspidal representations of GL(m)(Q(A)) and GL(m)'(Q(A)), respectively. Assume that either pi or pi' is self contragredient. Under the Ramanujan conjecture on pi and pi', we deduce a prime number theorem for L(s, pi x (pi) over tilde'), which can be used to asymptotically describe whether pi' congruent to pi, or pi' congruent to pi x \det (.)(i tau 0) for some nonzero tau(o) is an element of R, or pi' not congruent to pi x\ det (center dot)(it) for any t is an element of R. As a consequence, we prove the Selberg orthogonality conjecture, in a more precise form, for automorphic L-functions L(s, pi) and L(s, pi'), under the Ramanujan conjecture. When m = m' = 2 and pi and pi' are representations corresponding to holomorphic cusp forms, our results are unconditional.