{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eLittle Q is very sleepy, and he really needs some coffee to make him awake. At this time, Little L brings a pot to Little Q, and he states the pot as follows.\u003c/p\u003e\n\u003cp\u003eFor a prime number $p$, if $p^m | n$ and $p^{m+1}\\not | n$, we say $\\text{pot}_p(n)\u003dm$.\u003c/p\u003e\n\u003cp\u003eThe pot is very special that it can make everyone awake immediately.\u003c/p\u003e\n\u003cp\u003eNow Little L provides $n~(1 \\le n \\le 10^5)$ integers $a_1, a_2, \\cdots, a_n$ to Little Q, each of which is $1$ initially. After that, Little L shows $2$ types of queries:\u003c/p\u003e\n\u003cul\u003e\n \u003cli\u003e\u003cp\u003e\u003cstrong\u003eMULTIPLY l r x\u003c/strong\u003e : For every $i \\in [l,r]$ ($1\\le l\\le r\\le n$), multiply $a_i$ by $x$ ($2 \\le x \\le 10$).\u003c/p\u003e\u003c/li\u003e\n \u003cli\u003e\u003cp\u003e\u003cstrong\u003eMAX l r\u003c/strong\u003e : Calculate the value of $$\\displaystyle \\max_{l\\le i\\le r} \\left\\{ \\max_{p|a_i} \\left\\{ \\text{pot}_p (a_i) \\right\\} \\right\\}~(1 \\le l \\le r \\le n),$$\u003c/p\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003ewhere $p$ is prime.\u003c/p\u003e\n\u003cp\u003eNow you need to perform $q~(1 \\le q \\le 10^5)$ queries of these two types of queries described above.\u003c/p\u003e\n\u003cp\u003eIf you perform a “\u003cstrong\u003eMULTIPLY\u003c/strong\u003e” query, you don\u0027t need to output anything.\u003c/p\u003e\n\u003cp\u003eIf you perform a “\u003cstrong\u003eMAX\u003c/strong\u003e” query, you need to output a line like \u003ccode\u003eANSWER y\u003c/code\u003e, where $y$ the value you\u0027ve calculated.\u003c/p\u003e\n\u003ch3\u003eInput\u003c/h3\u003e\n\u003cp\u003eThe first line contains two integers $n~(1 \\le n \\le 10^5)$ and $q~(1 \\le q \\le 10^5)$, the number of integers and the number of queries.\u003c/p\u003e\n\u003cp\u003eEach of the next $q$ lines contains one type of query described above.\u003c/p\u003e\n\u003ch3\u003eOutput\u003c/h3\u003e\n\u003cp\u003eFor each “\u003cstrong\u003eMAX\u003c/strong\u003e” query, output one line in the format of \u003ccode\u003eANSWER y\u003c/code\u003e, where $y$ the value you have calculated.\u003c/p\u003e"}},{"title":"Sample 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5 6\nMULTIPLY 3 5 2\nMULTIPLY 2 5 3\nMAX 1 5\nMULTIPLY 1 4 2 \nMULTIPLY 2 5 5 \nMAX 3 5\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eANSWER 1\nANSWER 2\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr /\u003e\u003cp\u003eIf $m$ and $n$ are non-zero integers, or more generally, non-zero elements of an integral domain, it is said that $m$ divides $n$ if there exists an integer $k$, or an element $k$ of the integral domain, such that $m \\times k\u003dn$, and this is written as $m \\mid n$.\u003c/p\u003e"}}]}