#include <iostream>
using namespace std;
int main()
{
int p, im, s = 0;
cin >> p >> im;
while (p != 0)
{
int c = p % 10;
if (c % 2 == 0)
{
s += c;
}
p /= 10;
}
cout << s;
int ogl = 0;
while (im != 0)
{
ogl = ogl * 10 + im % 10;
im /= 10;
}
cout << " " << ogl;
return 0;
}