This problem is a programming version of Problem 44 from projecteuler.net
Pentagonal numbers are generated by the formula, . The first ten pentagonal numbers are:
It can be seen that . Also is also pentagonal.
Generalizing for a given find all such that is pentagonal or is pentagonal.
Input Format
Input contains two integers and separated by space.
Constraints
Output Format
Print the pentagonal numbers corresponding to the test case in sorted order, each in a new line.
Sample Input
10 2
Sample Output
70