#include using namespace std; int main(){ int n; cin >> n; int v[6] = { 10007, 10009, 10037, 10061, 10067, 10069}; switch (n - 1) { case (0): cout << 1; break; case (1): cout << v[0] * v[0]; break; case (2): cout << v[0] * v[1]; break; case (3): cout << v[1] * v[1]; break; case (4): cout << v[0] * v[2]; break; case (5): cout << v[1] * v[2]; break; case (6): cout << v[0] * v[3]; break; case (7): cout << v[1] * v[3]; break; case (8): cout << v[4] * v[0]; break; case (9): cout << v[2] * v[2]; break; case (10): cout << v[0] * v[5]; break; } cout << endl; }