A bracelet is a closed ring of $s$ beads, where each bead has one of $c$ distinct colors. Because the ring is closed it has no beginning or end (rotating it gives the same bracelet), and it has no direction (flipping it over gives the same bracelet). Assume an unlimited supply of beads of every color.
Two bracelets are considered the same if one can be turned into the other by rotation and/or reflection (flipping it over). Given the number of colors $c$ and the number of beads $s$, count how many distinct bracelets can be made.
The input consists of several test cases. Each line contains two integers: the number of colors $c$ followed by the bracelet length (number of beads) $s$. The input is terminated by a line with $c = s = 0$, which must not be processed. On every other line $c$ and $s$ are positive integers, and because of limitations of the bracelet-making machine their product satisfies $c \cdot s \le 32$.
For each test case, output the number of distinct bracelets on its own line. For example, with $2$ colors and $5$ beads there are $8$ distinct bracelets.