49*. The hostess baked a pie for the guests. At the table, there can be either $p$ people or $q$, where $p$ and $q$ are coprime. Into what minimum number of pieces (not necessarily equal) should the pie be cut in advance so that in any case it can be distributed equally?
90.49. Answer: $p+q-1$. Constructing an example is left to the reader, while we will prove that it is impossible to cut the cake into fewer pieces. Suppose all $p+q$ guests have gathered in the room (we will assume that among the guests who were supposed to come in the number of $p$ people, there are no guests who were supposed to come in the $q$-variant). Place an arbitrary piece of cake on the table and invite to the table those two guests who were supposed to receive it either when dividing into $p$ parts or when dividing into $q$ parts. Then place on the table all the pieces that these two guests were supposed to receive, and invite to the table those guests who were supposed to receive at least one of these pieces in one of the division variants, and so on. It is not hard to see that if $k$ people are standing at the table, then there are no more than $k+1$ pieces of cake on the table. From this, we conclude that in the end, not all guests will be at the table. This means that at the end of this process, a portion of the cake (but not the whole cake!) will be on the table, representing both the union of several $p$-th parts and several $q$-th parts, which is impossible due to the mutual simplicity of $p$ and $q$.