Two old friends, Ernie and Bernie, bump into each other in the street.  It was more than twenty years since they last saw each other, so they decide to spend some time together in a nearby coffee shop, catching up.  At some point, Bernie asks the inevitable: "So, you got married?"

"Well, yes!"—claims enthusiastically Ernie. "And I have three beautiful children!"

"That's great, Ernie! And how old are your kids?"—enquired Bernie.

"I know you are a sucker for puzzles, Bernie, so I will let you figure it out through a few clues.  You should not have any trouble getting it.  First clue: If you add the ages of my kids, the result is thirteen"

"Whoa!  That doesn't help me much, does it?"—complains Bernie. "Couldn't you give me another clue?"

"Sure, a second clue: If you multiply their ages together, the result is the same as how much we payed for coffee."

Bernie scratches his head for a minute, and cannot figure it out yet… Before he complains again, Ernie realizes the mistake, apologizes, and offers Bernie the last clue: "My oldest plays the piano!"

Bernie had no trouble finding the ages of the children this time.

These are all the possible combinations of positive integers $$x$$, $$y$$, $$z$$ that add up to thirteen, together with their product:

$$\begin{array}{|c|c|c||r|} \hline x&y&z& x\cdot y \cdot z \\ \hline 1&1&11&11 \\ \hline 1&2&10&20 \\ \hline 1&3&9&27 \\ \hline 1&4&8&32 \\ \hline 1&5&7&35 \\ \hline 1&6&6&\mathbf{36} \\ \hline 2&2&9&\mathbf{36} \\ \hline \end{array}$$
$$\begin{array}{|c|c|c||r|} \hline x&y&z& x\cdot y \cdot z \\ \hline 2&3&8&48 \\ \hline 2&4&7&56 \\ \hline 2&5&6&60 \\ \hline 3&3&7&63 \\ \hline 3&4&6&72 \\ \hline 3&5&5&75 \\ \hline 4&4&5&80 \\ \hline \end{array}$$

Notice that there are only two combinations that offer the same product: $$(x,y,z) = (1,6,6)$$ and $$(x,y,z) = (2,2,9)$$.  The fact that Bernie did not know the answer to the riddle after the second clue, indicates that none of the other possibilities is right.  He thus needs a third clue to decide between the two choices above.

I would not think of stealing the pleasure to solve the puzzle to my reader.  What are the ages of Ernie’s children?