My code is giving wrong answer , can someone suggest where I am missing?

My code is giving wrong answer , can someone suggest where I am missing?
problem link: https://www.codechef.com/OCT20B/problems/CVDRUN
My sol:
#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
ll t;
cin>>t;
while(t–)
{
ll n,k,x,y,steps;
cin>>n>>k>>x>>y;
bool reached =false;

           if(k==0 && x==y)
           reached=true;
          else if(k==0 && x!=y)
           reached=false;
          else
          { 
            if(k!=0)
           steps=n/k;
           
        for(ll i=0;i<steps;i++)
       {
        
         if((x+(i*k))%n==y)
         {
          reached=true;
           break;
         }
        else
        reached=false;
         
       }
          }
       
    cout<<(reached ? "YES" : "NO")<<endl;
    
}
return 0;

}

Hey you are missing these cases .assume n=7(0-6) and k=3,x=2.Cities which covid visits are

5(2+3),1((5+3)%7),4,0,3,6,2,5,1,…

you took steps as n/k 7/3=2.

so according to your approach covid reaches only 5,1.but actually it reaches 4,0,3,6 tooo…
Hope this helps
and your implementation also seems to have a problem .acc to ur implementation it only works if y=2.

I got it.
Thanks a lot!!