MULTHREE(DSA) help needed

#include <bits/stdc++.h>
using namespace std;

int main() {
// your code goes here
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin>>t;
while(t–){
int i=1,val,k,a,b,sum=0,res=0;
cin>>k>>a>>b;
res=(k-2)%4;
for(int j=1;j<=res;j++)
i*=2;
if(res==0&&k>2)
i=6;
val=i*(a+b);
//cout<<val;
if(val%3==0)
cout<<“YES\n”;
else
cout<<“NO\n”;}
}
What is wrong in this code for question MULTHREE?
Can someone help me please?
Thanks