#include <bits/stdc++.h>   using namespace std;   int n, p;   bool prime(int num) {     for (int i = 2; i <= sqrt(num); i++) {       if (num % i == 0) return 0;     }     return 1;   }   int main() {     cin >> n;     if (prime(n)) {       return cout << 1 << endl << n, 0;     }     p = (n - 3) / 2;     cout << 3 <<   n  << 3 <<    ;     for (int i = 0; i < p; i++) {       if (prime(p - i) && prime(p + i)) {         cout << p - i <<     << p + i;         return 0;       }     }     return 0;   }   