An easier number puzzle is as follows. Two friends are chatting:

- Peter, how old are your children?

- Well Thomas, there are three of them and the product of their ages is 36.

- That is not enough ...

- The sum of their ages is exactly the number of beers we have drunk today.

- That is still not enough.

- OK, the last thing is that my oldest child wears a green cap.

**How old were each of Peter's children?**