25 2 s 128 MB

A partition of a positive integer *N* *N*

A partition is palindromic if it reads the same forward and backward. The first partition in the example is not palindromic while the second is. If a partition containing *m* *m*/2) *m*/2) *x*) *x*

A partition is recursively palindromic if it is palindromic and its left half is recursively palindromic or empty. Note that every integer has at least two recursively palindromic partitions one consisting of all ones and a second consisting of the integer itself. The second example above is also recursively palindromic.

For example, the recursively palindromic partitions of 7 are:

Write a program which takes as input an integer *N* *N*

The first line of input contains a single integer *N* *N*1000)

For each data set, you should generate one line of output with the following values: The data set number as a decimal integer (start counting at one), a space and the number of recursively palindromic partitions of the input value.

## Sample Input | ## Sample Output |
---|---|

3 4 7 20 | 1 4 2 6 3 60 |