func_code_string: #include <bits/stdc++.h>   const int mod = 1e9 + 7;   const double eps = 1e-6;   const double pi = acos(-1);   const int inf = 0x7fffffff;   using namespace std;   int a[105];   int main() {     int n;     scanf( %d , &n);     for (int i = 1; i <= n; i++) scanf( %d , &a[i]);     if (a[1] == 3) return 0 * printf( NO n );     int x = 1, y = 2;     for (int i = 1; i <= n; i++) {       if (a[i] == x) {         if (x == 1) {           if (y == 2)             y = 3;           else             y = 2;         } else if (x == 2) {           if (y == 1)             y = 3;           else             y = 1;         } else if (x == 3) {           if (y == 1)             y = 2;           else             y = 1;         }       } else if (a[i] == y) {         if (y == 1) {           if (x == 2)             x = 3;           else             x = 2;         } else if (y == 2) {           if (x == 1)             x = 3;           else             x = 1;         } else if (y == 3) {           if (x == 1)             x = 2;           else             x = 1;         }       } else         return 0 * printf( NO n );     }     printf( YES n );     return 0;   }   