408733: GYM103274 K Kids at the Party
Description
Jaime's birthday will be shortly, and their parents are planning a nice party. They know Jaime loves biscuits, so they will bake some. When they talked to Jaime about their plan, he asked them to tell him how many biscuits there will be in order to decide how many friends he would invite.
First, Jaime's parents found strange their son's petition. They know Jaime has exactly 5 friends, and they assumed he would invite all of them. However, Jaime explained he would love to invite as many friends as possible, but he also wishes all of the children receive the same number of biscuits. When Mother and Father listened to so righteous explanation, they realized there were several other things to consider, such as the amount of cake, the sandwiches, and hundreds of things more.
The family came up with an idea to deal with the situation: They will start by knowing the number of biscuits and, based on that information, they will evaluate how many children –Jaime inclusive– there could be at the party. They will analyze the restrictions that other things state later.
Although Jaime is willing to dispense with many of their friends, he cannot imagine his birthday without his bestie Churro (they are guinea pigs, do not make questions), so, at least, there should be one guest.
Given the number of biscuits Jaime wants in the party, help his parents know the number of children that can be at the party.
InputThe first line of input contains a single integer $$$T$$$ ($$$1 \leq T \leq 100$$$) representing the number of cases. Each of the next $$$T$$$ lines contains a single integer $$$n$$$ $$$(2 < n \leq 10^{500})$$$
OutputFor each test case, print in a distinct line the number of children that can be at the party. If there is more than one answer, separate them with a space, and print them in ascending order. In case there is no solution, print -1.
ExampleInput3 19000000 123123123123123123123123123123123123 37Output
2 4 5 3 -1