#include <iostream>
using namespace std;
bool is_good(int x)
{
int a,b;
b = -1;
while (x>0)
{
a = x % 10;
if (a == b)
{
return true;
}
x/=10;
b = a;
}
return false;
}
int main()
{
for (int i=0;i<=9999;i++)
{
bool e = true;
for (int j=11;j<=i/2;j++)
{
if (is_good(j) && is_good(i-j))
{
e = false;
break;
}
}
if (e) cout<<i<<endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwpib29sIGlzX2dvb2QoaW50IHgpCnsKICAgIGludCBhLGI7CgliID0gLTE7Cgl3aGlsZSAoeD4wKQoJewoJCWEgPSB4ICUgMTA7CgkJaWYgKGEgPT0gYikKCQl7CgkJCXJldHVybiB0cnVlOwoJCX0KCQl4Lz0xMDsKCQliID0gYTsKCX0KCXJldHVybiBmYWxzZTsKfQppbnQgbWFpbigpCnsKCWZvciAoaW50IGk9MDtpPD05OTk5O2krKykKCXsKCQlib29sIGUgPSB0cnVlOwoJCWZvciAoaW50IGo9MTE7ajw9aS8yO2orKykKCQl7CgkJCWlmIChpc19nb29kKGopICYmIGlzX2dvb2QoaS1qKSkKCQkJewoJCQkJZSA9IGZhbHNlOwoJCQkJYnJlYWs7CgkJCX0KCQl9CgkJaWYgKGUpIGNvdXQ8PGk8PGVuZGw7Cgl9CglyZXR1cm4gMDsKfQ==