Răspuns:
#include <iostream>
using namespace std;
int m, n, p, q;
int main ()
{
cin >> n;
p = 1;
//in m se construieste numarul n fara cifre imp
//in q se construieate inversul lui m
while (n>0) {
if (n%2 == 0) {
m = m+n%10*p;
p = p*10;
q = q*10+n%10;
}
n = n/10;
}
cout << m << " ";
if(q == m) cout << 1;
else cout << 0;
return 0;
}