Areum has a pile of apples and a pile of bananas, but she does not like fruit, so she gives all of it to her friends and keeps nothing for herself. She always shares fairly and never cuts a piece of fruit. If there are n friends, all n get the same number of apples and the same number of bananas, and no fruit is left over.
For example, with 8 apples and 4 bananas there are only three fair ways to share.
- 1 friend gets all 8 apples and all 4 bananas.
- 2 friends each get 4 apples and 2 bananas.
- 4 friends each get 2 apples and 1 banana.
Write a program that prints every way Areum can share the fruit.