#include <iostream>
#include <algorithm>
using namespace std;
int arr[10] = {0,1,2,3,4,5,6,7,8,9};
int main()
{
int a, b, c;
cin >> a >> b >> c;
int cnt;
do {
int x = arr[1] * 100 + arr[2] * 10 + arr[3];
int y = arr[4] * 100 + arr[5] * 10 + arr[6];
int z = arr[7] * 100 + arr[8] * 10 + arr[9];
if ((x * b == y && x * c == z) || (x == a && y == b && z == c))
{
printf("%d %d %d\n", x, y, z);
cnt ++;
}
} while(next_permutation(a+1, a+10));
if (cnt == 0)
{
cout << "No!!!";
}
return 0;
}