#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; //#include int main() { long long int n; cin >> n; long long int a = 0; setf; for(long long int i=1;i*i<=n;i++){ if (n%i == 0) { long long int x = n/i,y=i; int t = 1,r=1; while (x) { x /= 10; t*=10; } while (y) { y /= 10; r*=10; } stringstream ss; ss << (n / i)*r + i; string h = ss.str(); f.insert(h); ss << (n / i)*r + i; h = ss.str(); f.insert(h); /* if (!f[(n / i)*r + i])a++;f[(n / i)*r + i] = 1; if (!f[i*t + (n / i)])a++; f[i*t + (n / i)] = 1; */ //cout << (n / i)*r + i << " "<< i*t + (n / i)<