Under construction

Still being built. Things may change

Disjoint LIS

Time limit2sMemory limit512 MB

Summary
Count the permutations of n elements that contain two disjoint increasing subsequences, each as long as the LIS, modulo 998244353.
Level

Hard8 of 10

Topics
Dynamic programming, Combinatorics
Solved
No attempts yet

Problem

The LIS of a permutation is the length of its longest increasing subsequence.

A permutation is good if two increasing subsequences of length equal to its LIS can be found that share no elements.

Given nn, count the good permutations of nn elements. The answer may be large, so output it modulo 998244353998244353.

Input

The first line contains one integer nn (1≤n≤751 \le n \le 75): the number of elements.

Output

Output one integer: the number of good permutations of nn elements, modulo 998244353998244353.

Examples1

  1. Example 1

    Input
    6
    
    Expected output
    132