If there’s only one element in the set, the graph is obvious bipartite. If there’s more than two elements, the graph will contains some cycles due to each pair of elements.
Suppose we have a and b in the set and the cycle will look like this:
0→a→2⋅a→⋯→lcm(a,b)→⋯→2⋅b→b→0
It easy to see that the length of the cycle is alcm(a,b)+blcm(a,b)=gcd(a,b)b+gcd(a,b)a which we want to be even. The length is even iff both a and b contains the same power of 2 in their factorizations. Otherwise gcd(a,b)b and gcd(a,b)a will have different parity, which means their sum is odd.(Try to prove by yourself)
Finally we need to find the largest subset whose elements have the same power of two and remove the rest elements.