#include <iostream>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
int n = s.length();
s += s;
int len = s.length();
vector <int> d (len);
int l = 0, r = -1;
if (n % 2) {
for (int i = 0; i < len; ++i) {
d[i] = (i > r)? 1 : min(d[l + r - i], r - i + 1);
while (i - d[i] >= 0 and i + d[i] < len and s[i - d[i]] == s[i + d[i]])
d[i]++;
if (i + d[i] - 1 > r) {
r = i + d[i] - 1;
l = i - d[i] + 1;
}
if (r - l + 1 >= n) {
cout << "yes";
return 0;
}
}
}
else {
for (int i = 0; i < len; ++i) {
d[i] = (i > r)? 0 : min(d[l + r - i + 1], r - i + 1);
while (i - d[i] - 1 >= 0 and i + d[i] < len and s[i - d[i] - 1] == s[i + d[i]])
d[i]++;
if (i + d[i] - 1 > r) {
r = i + d[i] - 1;
l = i - d[i];
}
if (r - l >= n) {
cout << "yes";
return 0;
}
}
}
cout << "no";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbigpIHsKICAgIHN0cmluZyBzOwogICAgY2luID4+IHM7CiAgICBpbnQgbiA9IHMubGVuZ3RoKCk7CiAgICBzICs9IHM7CiAgICBpbnQgbGVuID0gcy5sZW5ndGgoKTsKICAgIHZlY3RvciA8aW50PiBkIChsZW4pOwogICAgaW50IGwgPSAwLCByID0gLTE7CiAgICBpZiAobiAlIDIpIHsKICAgICAgICBmb3IgKGludCBpID0gMDsgaSA8IGxlbjsgKytpKSB7CiAgICAgICAgICAgIGRbaV0gPSAoaSA+IHIpPyAxIDogbWluKGRbbCArIHIgLSBpXSwgciAtIGkgKyAxKTsKICAgICAgICAgICAgd2hpbGUgKGkgLSBkW2ldID49IDAgYW5kIGkgKyBkW2ldIDwgbGVuIGFuZCBzW2kgLSBkW2ldXSA9PSBzW2kgKyBkW2ldXSkKICAgICAgICAgICAgICAgIGRbaV0rKzsKICAgICAgICAgICAgaWYgKGkgKyBkW2ldIC0gMSA+IHIpIHsKICAgICAgICAgICAgICAgIHIgPSBpICsgZFtpXSAtIDE7CiAgICAgICAgICAgICAgICBsID0gaSAtIGRbaV0gKyAxOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChyIC0gbCArIDEgPj0gbikgewogICAgICAgICAgICAgICAgY291dCA8PCAieWVzIjsKICAgICAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgZWxzZSB7CiAgICAgICAgZm9yIChpbnQgaSA9IDA7IGkgPCBsZW47ICsraSkgewogICAgICAgICAgICBkW2ldID0gKGkgPiByKT8gMCA6IG1pbihkW2wgKyByIC0gaSArIDFdLCByIC0gaSArIDEpOwogICAgICAgICAgICB3aGlsZSAoaSAtIGRbaV0gLSAxID49IDAgYW5kIGkgKyBkW2ldIDwgbGVuIGFuZCBzW2kgLSBkW2ldIC0gMV0gPT0gc1tpICsgZFtpXV0pCiAgICAgICAgICAgICAgICBkW2ldKys7CiAgICAgICAgICAgICAgICBpZiAoaSArIGRbaV0gLSAxID4gcikgewogICAgICAgICAgICAgICAgICAgIHIgPSBpICsgZFtpXSAtIDE7CiAgICAgICAgICAgICAgICAgICAgbCA9IGkgLSBkW2ldOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAociAtIGwgPj0gbikgewogICAgICAgICAgICAgICAgY291dCA8PCAieWVzIjsKICAgICAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgY291dCA8PCAibm8iOwogICAgcmV0dXJuIDA7Cn0K