//**Simple Solution**//</>


#1
string divideby2(string num)
{
	string zero = "0";
	if(num[0]=='0') return zero;
    string ans = "";
    int n = num.size();
    int tbd = num[0]-'0';
    int i=0;
    while(i<n)
    {
        if(tbd<2)
        {
            ans += '0';
            tbd = 10*(tbd) + (num[i+1]-'0');
        }
        else
        {
            if(tbd%2==0) 
            {
                ans+= ((tbd/2)+'0');
                tbd = (num[i+1]-'0');
            }
            else 
            {
                ans+= (tbd/2+'0');
                tbd = 10 + (num[i+1]-'0');
            }
        }
        i++;
    }
    if(ans[0]=='0') ans = ans.substr(1,ans.size()-1); 
    return ans;
}
int Solution::power(string A) {
    string ans = A;
    while(true)
    {
        if(ans.size()==1)
        {
            if(ans[0]=='2') return true;
            if(ans[0]=='1') return false;
            if(ans[0]=='0') return true;
        }
        if((ans[ans.size()-1]-'0')%2!=0) return false;
        else ans = divideby2(ans);
    }
}
    `indent preformatted text by 4 spaces`