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 contains two integers and separated by space.
Print the pentagonal numbers corresponding to the test case in sorted order, each in a new line.