```
class Solution {
public:
int smallestFactorization(int a) {
if (a < 10) return a;
int j=0;
int res[40];
for (int i=9; i>1; i--) {
while (a%i == 0) {
a = a/i;
res[j] = i;
j++;
}
}
if (a > 10) { // prime factors > 10
return 0;
}
unsigned long long ans = 0;
for (int i=j-1; i>=0; i--) {
ans = ans*10 + res[i];
if (ans > 2147483647) return 0;
}
return ans;
}
};
```