{"raw_statement":[{"iden":"problem statement","content":"Let $x$ be a string of length at least $1$. We will call $x$ a _good_ string, if for any string $y$ and any integer $k (k \\geq 2)$, the string obtained by concatenating $k$ copies of $y$ is different from $x$. For example, `a`, `bbc` and `cdcdc` are good strings, while `aa`, `bbbb` and `cdcdcd` are not.\nLet $w$ be a string of length at least $1$. For a sequence $F=(\\,f_1,\\,f_2,\\,...,\\,f_m)$ consisting of $m$ elements, we will call $F$ a _good representation_ of $w$, if the following conditions are both satisfied:\n\n*   For any $i \\, (1 \\leq i \\leq m)$, $f_i$ is a good string.\n*   The string obtained by concatenating $f_1,\\,f_2,\\,...,\\,f_m$ in this order, is $w$.\n\nFor example, when $w=$`aabb`, there are five good representations of $w$:\n\n*   $($`aabb`$)$\n*   $($`a`$,$`abb`$)$\n*   $($`aab`$,$`b`$)$\n*   $($`a`$,$`ab`$,$`b`$)$\n*   $($`a`$,$`a`$,$`b`$,$`b`$)$\n\nAmong the good representations of $w$, the ones with the smallest number of elements are called the _best representations_ of $w$. For example, there are only one best representation of $w=$`aabb`: $($`aabb`$)$.\nYou are given a string $w$. Find the following:\n\n*   the number of elements of a best representation of $w$\n*   the number of the best representations of $w$, modulo $1000000007 \\, (=10^9+7)$\n\n(It is guaranteed that a good representation of $w$ always exists.)"},{"iden":"constraints","content":"*   $1 \\leq |w| \\leq 500000 \\, (=5 \\times 10^5)$\n*   $w$ consists of lowercase letters (`a`\\-`z`)."},{"iden":"partial score","content":"*   $400$ points will be awarded for passing the test set satisfying $1 \\leq |w| \\leq 4000$."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$w$"},{"iden":"sample input 1","content":"aab"},{"iden":"sample output 1","content":"1\n1"},{"iden":"sample input 2","content":"bcbc"},{"iden":"sample output 2","content":"2\n3\n\n*   In this case, there are $3$ best representations of $2$ elements:\n    *   $($`b`$,$`cbc`$)$\n    *   $($`bc`$,$`bc`$)$\n    *   $($`bcb`$,$`c`$)$"},{"iden":"sample input 3","content":"ddd"},{"iden":"sample output 3","content":"3\n1"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}