{"raw_statement":[{"iden":"problem statement","content":"There are $N$ arrays. The length of each array is $M$ and initially each array contains integers $(1，2，...，M)$ in this order.\nMr. Takahashi has decided to perform $Q$ operations on those $N$ arrays. For the $i$\\-th ($1≤i≤Q$) time, he performs the following operation.\n\n*   Choose an arbitrary array from the $N$ arrays and move the integer $a_i$ ($1≤a_i≤M$) to the front of that array. For example, after performing the operation on $a_i=2$ and the array $(5，4，3，2，1)$, this array becomes $(2，5，4，3，1)$.\n\nMr. Takahashi wants to make $N$ arrays exactly the same after performing the $Q$ operations. Determine if it is possible or not."},{"iden":"constraints","content":"*   $2≤N≤10^5$\n*   $2≤M≤10^5$\n*   $1≤Q≤10^5$\n*   $1≤a_i≤M$"},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $M$\n$Q$\n$a_1$ $a_2$ $...$ $a_Q$"},{"iden":"sample input 1","content":"2 2\n3\n2 1 2"},{"iden":"sample output 1","content":"Yes\n\nYou can perform the operations as follows.\n![image](/img/other/code_festival_2016_quala/gbanjthabot/E_0.png)"},{"iden":"sample input 2","content":"3 2\n3\n2 1 2"},{"iden":"sample output 2","content":"No"},{"iden":"sample input 3","content":"2 3\n3\n3 2 1"},{"iden":"sample output 3","content":"Yes\n\nYou can perform the operations as follows.\n![image](/img/other/code_festival_2016_quala/gbanjthabot/E_2.png)"},{"iden":"sample input 4","content":"3 3\n6\n1 2 2 3 3 3"},{"iden":"sample output 4","content":"No"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}