/* -*- coding: utf-8 -*- * * 290.cc: No.290 1010 - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ /* typedef */ /* global variables */ /* subroutines */ /* main */ int main() { int n; string s; cin >> n >> s; for (int i = 0; i < n - 1; i++) if (s[i] == s[i + 1]) { puts("YES"); return 0; } puts("NO"); return 0; }