On the party every boy gave $1$ candy to every girl and every girl gave $1$ candy to every boy. Then every boy ate $2$ candies and every girl ate $3$ candies. It is known that $\frac 14$ of all candies was eaten. Find the greatest possible number of children on the party.