Reversibly Cyclic Strings

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

A string tt is a Cyclic Substring of a string ss if there is some rotation of ss such that tt is a substring of that rotation of ss.

For example, if ss is fatcat, then atc and atf are both Cyclic Substrings of ss. However, act is not a Cyclic Substring of ss.

A string ss is Internally Reversibly Cyclic if, for every proper substring tt of ss, the reverse of tt is a Cyclic Substring of ss.

Given a string, determine if it is Internally Reversibly Cyclic.

입력

The single line of input contains a string ss (1s1,0001 \le |s| \le 1{,}000, saz\*s \in \\{\texttt{a}-\texttt{z}\\}^\*)

출력

Output a single integer, which is 11 if ss is Internally Reversibly Cyclic, 00 otherwise.