Given a graph $G=(V,E)$ with $V=\{1,2,...,k\}$, the $k$ positive integers $a_1,a_2, ...,a_k$ are $G$-wise relatively prime if $(a_i, a_j)=1$ for $\{i,j\} \in E$. In this note we consider the problem of finding the probability $A_G$ that k positive integers are $G$-wise relatively prime. As an application of our results, we solve the problems of finding probabilities that k positive integers have exact (or at least) r relatively prime pairs, which was proposed by P. Moree.