#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
ull n;
vector<ull> cifre;
inline ull elcif(ull n, int x){
return n/(ull)pow(10, x) * (ull)pow(10, x – 1) + n % (ull)pow(10, x – 1);
}
int main(){ ifstream fin(“numere16.in”); ofstream fout(“numere16.out”);
fin >> n; ull cn = n; for (int i = 1; cn; i++, cn /= 10) { ull x = elcif(n, i); if (x && __gcd(x, n) == 1) cifre.push_back(x); } if (cifre.empty()) fout << “NU EXISTA”; else { sort(cifre.begin(), cifre.end()); for (ull x : cifre) fout << x << ‘ ‘; } return 0; }