{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eFor every prefix of some given string, determine whether it is possible to split it into 1, 2, 3, 4, 5, …, \u003ci\u003en\u003c/i\u003e non-empty palindromes. Note that if we can split a string into \u003ci\u003ek\u003c/i\u003e palindromes then we can split it into \u003ci\u003ek\u003c/i\u003e\u0026nbsp;+\u0026nbsp;2 palindromes. \u003c/div\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe input contains a string of \u003ci\u003en\u003c/i\u003e lowercase Latin letters (1 ≤ \u003ci\u003en\u003c/i\u003e ≤ 3 · 10\u003csup\u003e5\u003c/sup\u003e).\r\n \u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eOutput 2\u003ci\u003en\u003c/i\u003e integers.\r\nThe \u003ci\u003ei\u003c/i\u003e-th line should contain minimal odd \u003ci\u003ek\u003c/i\u003e (or −1 if it doesn’t exist) and minimal even \u003ci\u003ek\u003c/i\u003e (or −2 if it doesn’t exist) such that we can split string \u003ci\u003es\u003c/i\u003e[1..\u003ci\u003ei\u003c/i\u003e] into \u003ci\u003ek\u003c/i\u003e palindromes.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Sample","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\u003eabaa\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1 -2 \r\n-1 2 \r\n1 -2 \r\n3 2 \r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Notes","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003e\u003ci\u003eabaa\u003c/i\u003e \u003d \u003ci\u003eaba\u003c/i\u003e|\u003ci\u003ea\u003c/i\u003e \u003d \u003ci\u003ea\u003c/i\u003e|\u003ci\u003eb\u003c/i\u003e|\u003ci\u003eaa\u003c/i\u003e \u003d \u003ci\u003ea\u003c/i\u003e|\u003ci\u003eb\u003c/i\u003e|\u003ci\u003ea\u003c/i\u003e|\u003ci\u003ea\u003c/i\u003e.\u003c/div\u003e\u003c/div\u003e"}}]}