Solution to the problem number 165 of AceptaelReto - 165.

Any questions do not hesitate to contact.

#include <bits/stdc++.h>
using namespace std;
int main()
{
    string a;
    bool comprobar =true;
    cin>>a;
    while(a[0]!='-')
    {
        int i=a.length();
               while (i--)
               {
                   if(!((a[i]-48)%2==0))
                   {
                       comprobar=false;
                       break;
                   }
               }
        if (comprobar)  cout<<"SI\n";
        else            cout<<"NO\n";
        comprobar=true;
        cin>>a;
    }
    return 0;
}

Don't miss anything.

Keep in touch with Isaac Lozano Osorio!