2. Variant 1.

Given the set $A=\{1,2,3, \ldots, 1002\}$. Petya and Vasya are playing a game. Petya names a number $n$, and Vasya selects a subset from $A$ consisting of $n$ elements. Vasya wins if there are no two coprime numbers in the chosen subset; otherwise, Petya wins. What is the smallest $n$ that Petya should name to guarantee a win?
# Solution.

1) Estimation. Note that the set $A$ contains 501 even numbers. If Petya names $n \leq 502$, then Vasya can choose $n$ even numbers from this set and win.
2) Now we will show that for $n=502$, Vasya will lose. For this, it is sufficient to show that in the chosen subset, there will necessarily be two consecutive natural numbers. These numbers will be coprime.

We will divide all the numbers in the set $A$ into 501 pairs: 1 and 2, 3 and 4, 5 and 6, ..., 1001 and 1002. Then, by the pigeonhole principle, there will be at least two numbers that fall into the same pair. They are coprime, so Vasya loses.