Help me in solving BALLBOX problem

My issue

My code

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int t;
	cin>>t;
	for(int i=0;i<t;i++){
	    int n,k;
	    cin>>n>>k;
	    int product=1;
	    for(int i=1;i<k+1;k++){
	        product=product*i;
	    }
	    if(n>=product){
	        cout<<"YES"<<endl;
	    }
	    else{
	        cout<<"NO"<<endl;
	    }
	}
	return 0;
}

Problem Link: BALLBOX Problem - CodeChef

@goyalsajal92
Your logic is not right.
The logic is quite simple just think what is the minimum number of balls req for n box to make answer yes .
its like :-
O
O O
O O O
O O O O
.
.
.
O O O O O …n balls.
so the minimum count turns outs to be count of (boxes * (count of boxes +1))/2;
and if min count <= total number of balls. then answer will be yes or else it will be no.