{"raw_statement":[{"iden":"problem statement","content":"We have a sequence of length $N$: $A=(a_1,\\ldots,a_N)$. Additionally, you are given an integer $K$.\nYou can perform the following operation zero or more times.\n\n*   Choose an integer $i$ such that $1 \\leq i \\leq N-K$, then swap the values of $a_i$ and $a_{i+K}$.\n\nDetermine whether it is possible to sort $A$ in ascending order."},{"iden":"constraints","content":"*   $2 \\leq N \\leq 2 \\times 10^5$\n*   $1 \\leq K \\leq N-1$\n*   $1 \\leq a_i \\leq 10^9$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $K$\n$a_1$ $\\ldots$ $a_N$"},{"iden":"sample input 1","content":"5 2\n3 4 1 3 4"},{"iden":"sample output 1","content":"Yes\n\nThe following sequence of operations sorts $A$ in ascending order.\n\n*   Choose $i=1$ to swap the values of $a_1$ and $a_3$. $A$ is now $(1,4,3,3,4)$.\n*   Choose $i=2$ to swap the values of $a_2$ and $a_4$. $A$ is now $(1,3,3,4,4)$."},{"iden":"sample input 2","content":"5 3\n3 4 1 3 4"},{"iden":"sample output 2","content":"No"},{"iden":"sample input 3","content":"7 5\n1 2 3 4 5 5 10"},{"iden":"sample output 3","content":"Yes\n\nNo operations may be needed."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}