What's wrong in my code Please Help Me

problem Link :
(MULTHREE Problem - CodeChef)
See below My code

#include<bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false);cin.tie(0);
#define lli long long int
#define vi vector<lli>
#define pb push_back
#include<string>
#define mp map<string,lli>
#define test lli t;cin>>t;while(t--)
using namespace std;
int main()
{
    test
    {
        lli n,x,y;
        cin>>n>>x>>y;
        lli z=x+y;
        n=n-3;
        lli lst;
        if(n%4==0)
            lst=6;
        else if(n%4==1)
            lst=2;
        else if(n%4==2)
           lst=4;
        else
         lst=8;
       if((lst*z)%3==0)
        cout<<"YES\n";
       else
        cout<<"NO\n";
    }
}

Consider the test input:

1
3 2 8

what is the correct output for this your testcase ??
my code showing output “YES”

NO

Please Help How to solve .
still wrong answer.

#include<bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false);cin.tie(0);
#define lli long long int
#define vi vector<lli>
#define pb push_back
#include<string>
#define mp map<string,lli>
#define test lli t;cin>>t;while(t--)
using namespace std;
int main()
{
    test
    {
        lli n,x,y;
        cin>>n>>x>>y;
        lli z=x+y;
        if(z%10==0)
            cout<<"NO\n";
        else
        {
            n=n-3;
          lli lst;
        if(n%4==0)
            lst=6;
        else if(n%4==1)
            lst=2;
        else if(n%4==2)
           lst=4;
        else
         lst=8;
       if((lst*(z%10))%3==0)
        cout<<"YES\n";
       else
        cout<<"NO\n";
        }
    }
}

It now fails for

1
4 4 5

The Editorial is here.