Delhi odd even case

when a given example is run it gives correct answer but test case gives wrong answer.
#include
using namespace std;
int main()
{
int N,i,no,sum=0,rem;
cin>>N;
i=1;
while(i<=N)
{
cin>>no;
while(no>0)
{
rem=no%10;
sum=sum+rem;
no=no/10;
}
if(sum%2==0 && sum%4==0)
{
cout<<“yes”<<endl;
}
else if(sum%2!=0 && sum%3==0)
{
cout<<“yes”<<endl;
}
else {
cout<<“no”<<endl;
}
i++;

}


return 0;

}

@himanshug04 hey himanshu your are confusing with the question statement
the logic of this problem
For ex if you are given a no.:

982452

then maintain 2 variables evesum=0, oddsum = 0 ;
and they will be:

        9   +   8   +   2   +   4   +   5   +   2

evesum = 8 + 2 + 4 + 2 = 16
oddsum = 9 + 5 = 14
if((evesum%4==0)||(oddsum%3==0)){
cout<<“Yes”<<endl;
}else{
cout<<“No”<<endl;
}

thanks i use this logic but it still not working.
#include
using namespace std;
int main()
{
int n;
cin>>n;
int no,i=1,evensum=0,oddsum=0,rem;
while(i<=n)
{
cin>>no;
while(no>0)
{
rem=no%10;
//no=no/10;

	if(rem%2==0)
	{
		evensum=evensum+rem;
	}
	else if(rem%2!=0)
	{
		oddsum=oddsum+rem;
	}
	else
	{
	}
	no=no/10;
}
	if((evensum%4==0)||(oddsum%3==0))
	{
		cout<<"Yes"<<endl;
	}
	else if(evensum%4!=0)
	{
		cout<<"No"<<endl;
	}
	else if(oddsum%3!=0)
	{
		cout<<"No"<<endl;
	}
	else{
	}
	i++;

}
return 0;
}

@himanshug04
hey himanshu
see this
#include< iostream >
using namespace std;
int main(){
int t;cin>>t;
for(int i=1;i<=t;i++){
int n;cin>>n;
int sume=0;int sumo=0;
for(;n>0;n=n/10)
{
int rem=n%10;
if(rem%2==0){
sume=sume+rem;
}
else{
sumo=sumo+rem;
}
}
if((sume%4==0)||(sumo%3==0)){
cout<<“Yes”<<endl;
}else{
cout<<“No”<<endl;
}
}
return 0;
}

this is taking much time