title: Counting coprime pairs in array
body: <p><strong>Size of array&lt;=10^5</strong> and each element in array is <strong>2&lt;=Ai&lt;=10^5</strong>. Is there any way to calculate all the coprime pairs (Ai,Aj) where 1&lt;=<strong>i,j</strong>&lt;=100000 in O(nlogn) ?</p>
  
  <p>Any idea how to use mobious function to solve this?</p>