func_code_string: #include <bits/stdc++.h>   using namespace std;   char arr[1000007];   void sieve() {     arr[0] = 1;     arr[1] = 1;     for (int i = 4; i <= 1000007; i += 2) arr[i] = 1;     for (int i = 3; i * i <= 1000007; i += 2) {       if (arr[i] == 0) {         for (int j = i; i * j <= 1000007; j++) {           arr[i * j] = 1;         }       }     }   }   int main() {     sieve();     int n;     cin >> n;     int p = n + 1;     if (n < 3) {       if (n == 1) {         cout <<  1  << endl;         cout <<  1  << endl;         return 0;       } else {         cout <<  1  << endl;         cout <<  1 1  << endl;         return 0;       }     }     cout <<  2  << endl;     for (int i = 2; i <= p; i++) {       if (arr[i] == 0)         cout <<  1  ;       else         cout <<  2  ;     }     cout << endl;     return 0;   }   