Help me in solving OJUMPS problem

My issue

My code

#include<iostream>
using namespace std;
int main(int argc, char const *argv[])
{
    int a;
    cin>>a;
    
      
        if (a%3==0||a%6==1)
        {
            cout<<"yes";
        }
   
 
    else{
cout<<"no";
    }

        
        



    
    return 0;
}

Problem Link: OJUMPS Problem - CodeChef

@aryan_2703
include <bits/stdc++.h>
define ll long long int
using namespace std;

int main() {
// your code goes here
ll n;
cin>>n;
cout<<((n%6==0 || n%6==1 || n%6==3)?“yes”:“no”);
return 0;
}

EXPLANATION!!
according to the question the chef can jump on numbers 0 (start) 1%6=1 3%6=3 6%6=0 7%6=1 9%6=3 12%6=0 13%6=1 15%6=3 18%6=0 as we can see there is a pattern which gets repeated . so, i have framed an equation and solved it. Dont forget to take the datatype as long long int as the input constraint is big and a smaller datatype would result the test case in negative output.

hope this helps !!