The official editorial of the [Half Sequence ](https://www.codechef.com/COOK133A/problems/HFSEQ)↵
says↵
↵
<spoiler summary="This">↵
For N > 18 (practically, even 16), remove all odd numbers from the input. If we have atleast (N+1)/2 elements remaining and if their GCD is 1 then we have a solution.↵
</spoiler>↵
↵
<spoiler summary="Reason they give">↵
Observe that any single number (<=10^9) can be made up of atmost 9 distinct prime numbers. This means that if GCD([B_0, B_1,..., B_N]) = 1, then there must exist atleast one subset of length at most 9 whose elements have GCD=1.↵
</spoiler>↵
↵
But, what is the proof behind it? I mean what is the intution behind saying this? Can someone give a formal proof for it.
says↵
↵
<spoiler summary="This">↵
For N > 18 (practically, even 16), remove all odd numbers from the input. If we have atleast (N+1)/2 elements remaining and if their GCD is 1 then we have a solution.↵
</spoiler>↵
↵
<spoiler summary="Reason they give">↵
Observe that any single number (<=10^9) can be made up of atmost 9 distinct prime numbers. This means that if GCD([B_0, B_1,..., B_N]) = 1, then there must exist atleast one subset of length at most 9 whose elements have GCD=1.↵
</spoiler>↵
↵
But, what is the proof behind it? I mean what is the intution behind saying this? Can someone give a formal proof for it.