At a certain festivity a rich man decided to distribute free rice to deserving people. He had altogether 100 kilos of rice and he wanted to distribute the grain to 100 people in such a manner that each old person received three kilos, each young person two and each child half a kilo. How many old persons, young persons and children were there?