Here is the link of the problem: Problem
Basically the Problem statement is;
find out how many pair (x,y) can be possible in range N, which gcd is greater than 1. Here pair (x,y) and (y,x) consider as same pair. 1<=x,y<=N.
Looking at the constraints it is obvious that Brutforce approach would not work here, I 'm trying to solve this problem using Euler’s Totient Function but I don’t know how can I use ETF in this problem. Any help would be appriciated.