#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include "bits/stdc++.h" #define REP(i,a,b) for(i=a;i= N) continue; if (s.substr(i, j - i + 1) == s.substr(j + 1, j - i + 1)) { puts("YES"); return 0; } } puts("NO"); return 0; }