#include <iostream>
#include <cstring>
using namespace std;
bool Judge(int a, int b)
{
int used[10];
memset(used, 0, sizeof(used));
if(a < 10000)
++used[0];
if(b < 10000)
++used[0];
while(a != 0)
{
++used[a%10];
a /= 10;
}
while(b != 0)
{
++used[b%10];
b /= 10;
}
for(int i = 0; i < 10; ++ i)
{
if(used[i] > 1 || used[i] == 0)
return false;
}
return true;
}
int main()
{
int n;
cin >> n;
for(int num = 1234; num < 100000; ++ num)
{
if(Judge(num*n, num))
{
if(num*n < 10000)
cout << "0";
cout << num*n;
cout << "/";
if(num < 10000)
cout << "0";
cout << num;
cout << "=" << n << endl;
}
}
return 0;
}
#include <cstring>
using namespace std;
bool Judge(int a, int b)
{
int used[10];
memset(used, 0, sizeof(used));
if(a < 10000)
++used[0];
if(b < 10000)
++used[0];
while(a != 0)
{
++used[a%10];
a /= 10;
}
while(b != 0)
{
++used[b%10];
b /= 10;
}
for(int i = 0; i < 10; ++ i)
{
if(used[i] > 1 || used[i] == 0)
return false;
}
return true;
}
int main()
{
int n;
cin >> n;
for(int num = 1234; num < 100000; ++ num)
{
if(Judge(num*n, num))
{
if(num*n < 10000)
cout << "0";
cout << num*n;
cout << "/";
if(num < 10000)
cout << "0";
cout << num;
cout << "=" << n << endl;
}
}
return 0;
}