Answer. For 4 rubles. Solution. We will show how to manage with four rubles. First, we find the products $a b$ and $b c$. Since the numbers $a$ and $c$ have no common prime divisors, the greatest common divisor of these products is $b$. Thus, we find the number $b$, and with it the numbers $a=a b / b$ and $c=b c / b$. Similarly, we find the numbers $d$, $e$, and $f$ for two rubles.

We will show that three rubles are not enough. Suppose we know only three products. Then they must include all six numbers, otherwise we would not know anything about one of them. But in this case, each number appears in exactly one product, and if, for example, one of the products is 6, we would not be able to distinguish a pair of 2 and 3 from a pair of 1 and 6.
4. Vasya thought of six natural numbers: $a, b, c, d, e, f$. For one ruble, you can indicate any two of them and find out their product. Petya knows that any two of the thought-of numbers are coprime (that is, they do not have common divisors greater than 1). What is the smallest amount he can spend to find out all the thought-of numbers?