#include<bits/stdc++.h>
#define fastIO std::ios_base::sync_with_stdio(false);std::cin.tie(0);std::cout.tie(0);
#define vl vector<ll>
#define vi vector<int>
using namespace std;
typedef long long ll;
typedef long double ld;
long long int GCD(long long int a,long long int b){
if(a%b==0)return b;
else return GCD(b,a%b);
}
bool Validate(ll x,ll y, ll z,ll p,ll q){
ll out=GCD(p,q);
if(x==to_string(p).length() && y==to_string(q).length() && z==to_string(out).length()) return true;
return false;
}
void solve(ll x,ll y,ll z) {
ll a[10][2];
a[9][0] = 102345689;
a[9][1] = 102345697;
a[8][0] = 10000019;
a[8][1] = 10000169;
a[7][0] = 4301789;
a[7][1] = 4441939;
a[6][0] = 100019;
a[6][1] = 100049;
a[5][0] = 20707;
a[5][1] = 21011;
a[4][0] = 3907;
a[4][1] = 2579;
a[3][0] = 101;
a[3][1] = 103;
a[2][0] = 11;
a[2][1] = 13;
a[1][0] = 5;
a[1][1] = 7;
// cin >> x >> y >> z;
if(Validate(x,y,z,(a[x-z+1][0])*(ll)pow(10,z-1),(a[y-z+1][1])*(ll)pow(10,z-1))==false)cout<<x<<" "<<y<<" "<<z<<endl;
// cout<<Validate(x,y,z,(a[x-z+1][0])*(ll)pow(10,z-1),(a[y-z+1][1])*(ll)pow(10,z-1))<<endl;
// cout << (a[x-z+1][0])*(ll)pow(10,z-1) << " " << (a[y-z+1][1])*(ll)pow(10,z-1) << endl;
}
int main() {
fastIO
int t,count=0;
t=1;
for(int i=1;i<=9;i++){
for(int j=1;j<=9;j++){
for(int k=1;k<=min(i,j);k++){
solve(i,j,k);
count++;
}
}
}
// cout<<count<<endl;
// cin >> t;
// while(t--) {
// // cout << "Case #" << count << ": ";
// solve();
// count++;
// }
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KI2RlZmluZSBmYXN0SU8gc3RkOjppb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKGZhbHNlKTtzdGQ6OmNpbi50aWUoMCk7c3RkOjpjb3V0LnRpZSgwKTsKI2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xXVsxXSA9IDc7CiAgICAvLyBjaW4gPj4geCA+PiB5ID4+IHo7CiAgICBpZihWYWxpZGF0ZSh4LHkseiwoYVt4LXorMV1bMF0pKihsbClwb3coMTAsei0xKSwoYVt5LXorMV1bMV0pKihsbClwb3coMTAsei0xKSk9PWZhbHNlKWNvdXQ8PHg8PCIgIjw8eTw8IiAiPDx6PDxlbmRsOwogICAgLy8gY291dDw8VmFsaWRhdGUoeCx5LHosKGFbeC16KzFdWzBdKSoobGwpcG93KDEwLHotMSksKGFbeS16KzFdWzFdKSoobGwpcG93KDEwLHotMSkpPDxlbmRsOwogICAgLy8gY291dCA8PCAoYVt4LXorMV1bMF0pKihsbClwb3coMTAsei0xKSA8PCAiICIgPDwgKGFbeS16KzFdWzFdKSoobGwpcG93KDEwLHotMSkgPDwgZW5kbDsKfQppbnQgbWFpbigpIHsKICAgIGZhc3RJTwogICAgaW50IHQsY291bnQ9MDsKICAgIHQ9MTsKICAgIGZvcihpbnQgaT0xO2k8PTk7aSsrKXsKICAgICAgZm9yKGludCBqPTE7ajw9OTtqKyspewogICAgICAgIGZvcihpbnQgaz0xO2s8PW1pbihpLGopO2srKyl7CiAgICAgICAgICBzb2x2ZShpLGosayk7CiAgICAgICAgICBjb3VudCsrOwogICAgICAgIH0KICAgICAgfQogICAgfQogICAgLy8gY291dDw8Y291bnQ8PGVuZGw7CiAgICAvLyBjaW4gPj4gdDsKICAgIC8vIHdoaWxlKHQtLSkgewogICAgLy8gLy8gICAgY291dCA8PCAiQ2FzZSAjIiA8PCBjb3VudCA8PCAiOiAiOwogICAgLy8gICAgIHNvbHZlKCk7CiAgICAvLyAgICAgY291bnQrKzsKICAgIC8vIH0KICAgIHJldHVybiAwOwp9