#include <iostream>
using namespace std;
int oglindit(int n)
{
int ogl = 0;
while (n != 0)
{
int c = n % 10;
ogl = ogl * 10 + c;
n /= 10;
}
return ogl;
}
int main()
{
int n, par = 0, div_7 = 0;
cin >> n;
for (int i = 1; i <= n; i++)
{
int x;
cin >> x;
int cx = x;
if (x % 2 == 0)
{
par++;
}
if (x % 7 == 0)
{
div_7++;
}
cout << "Oglinditul lui " << x << " este " << oglindit(x) << endl;
int par2 = 0;
while (x != 0)
{
int c = x % 10;
if (c % 2 == 0)
{
cout << c;
par2++;
}
x /= 10;
}
cout << endl;
if (par2 == 0)
{
cout << "Numarul " << cx << " nu are cifre pare" << endl;
}
}
cout << endl << "Sunt " << par << " numere pare" << endl;
cout << "Sunt " << div_7 << " numere divizibile cu 7" << endl;
return 0;
}