func_code_string: #include <bits/stdc++.h>   using namespace std;   long long n, a[100005];   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cin >> n;     string s;     cin >> s;     if (n == 1 && s[0] ==  1 )       cout <<  Yes ;     else if (n == 1)       cout <<  No ;     else if (n == 2 && s[0] != s[1])       cout <<  Yes ;     else if (n == 2)       cout <<  No ;     else {       if (s[0] ==  0  && s[1] ==  0 )         cout <<  No ;       else if (s[n - 1] ==  0  && s[n - 2] ==  0 )         cout <<  No ;       else {         for (int i = 0; i < n - 2; ++i) {           if (s[i] ==  0  && s[i + 1] ==  0  && s[i + 2] ==  0 ) {             cout <<  No ;             return 0;           } else if (s[i] ==  1  && s[i + 1] ==  1 ) {             cout <<  No ;             return 0;           } else if (s[i + 1] ==  1  && s[i + 2] ==  1 ) {             cout <<  No ;             return 0;           }         }         cout <<  Yes ;       }     }     return 0;   }   