Chess on Planet X

Chess on Planet X is very different from chess on Earth. It has a piece called the Super Queen, which can move and attack as a knight, a rook, and a bishop at the same time. Howevever its powerful attack can be blocked with a Pawn, just like chess on Earth. Given an (n − k) × (n − k) chessboard, count the number of ways of placing n Super Queens and k pawns on it, such that none of the Super Queens are attacking each other. Input Thereisanumberofinputs. Eachinputisn(n<19)andk(k<6)onasingleline. Output For each input, output the number of ways on a single line. Sample Input 13 1 18 4 Sample Output 72 16