Can someone help me with this

what is wrong with my solution for Racing problem

https://www.codechef.com/viewsolution/44228170

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

void solve(){

long long int x,r,m;
cin>>x>>r>>m;
r=r*60;
m=m*60;
long long int reSec = r-x;
long long int avSec = m-x;
long long int maxSec = (avSec/2);
//cout<<reSec<<" "<<avSec<<" "<<maxSec<<"\n";
if(maxSec >= reSec){
	cout<<"YES"<<"\n";
	return;
}
cout<<"NO"<<"\n";

}

int main(){

int t;
cin>>t;
while(t>0){
	solve();
	t--;
}

}