#include #include #include #include int compareStrUp(const void *a, const void *b) { return strcmp((const char *)a, (const char *)b); } int main() { long long n, i, j=0, cnt=0; scanf("%lld", &n); char arr[10000][16]; for (int i=1; i<=sqrt(n); i++) { if (n%i==0) { snprintf(arr[j++], 16, "%d%lld", i, n/i); snprintf(arr[j++], 16, "%lld%d", n/i, i); cnt+=2; } } qsort(arr, cnt, sizeof(arr[0]), compareStrUp); int dub=0; for (int i=0; i