시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 512 MB 0 0 0 0.000%

문제

A permutation $p$ on $n$ elements is an involution if $p(p(i)) = i$ for each $i$ from $1$ to $n$ inclusive. Your task is to compute the number of involutions on $n$ elements with $k$ inversions. To make your life easier, we ask you to print only the parity of this number.

입력

In the only line of the input, two space-separated integers are given: $n$ ($1 \le n \le 500$), the length of the involution, and $k$ ($0 \le k \le \frac{n(n-1)}{2}$), the number of inversions.

출력

Print a single number ($0$ or $1$): the number of involutions on $n$ elements with exactly $k$ inversions, when taken modulo $2$.

예제 입력 1

4 1

예제 출력 1

1

예제 입력 2

10 21

예제 출력 2

0

힌트

In the first sample, there are $3$ such involutions.