Number of inversions#2079

Number of inversions

4 seconds
64 megabytes
Easy

A permutation is a sequence of distinct integers from to . For example, (5, 3, 2, 1, 4) is a permutation. An inversion in a permutation is an ordered pair of indices such that i < j and p_i > p_j. In the example above, the pair of indices forms an inversion because 2 < 4 and 3 > 1.

You are given two integers and . Find the number of permutations of elements with exactly inversions. Output the lexicographically smallest permutation with exactly inversions.

Input

The first line contains two integers and (1 \leq n \leq 18; 0 \leq t \leq 200).

Output

Print the number of permutations of elements with exactly inversions on the first line. Print the lexicographically smallest permutation with inversions on the second line. If no such permutation exists, print on the first line and on the second line.

Examples

Example 1

Loading
Loading