#include <iostream>

using namespace std;

int main()
{
    long long int t, n, m, k, min1;
    cin >> t;
    while(t--)
    {
        cin >> n;
        cin >> m;
        cin >> k;
        min1 = (n*n + k*n) / (2*k);
        if(m >= min1)
        {
            cout << "Tak" << endl;
        }
        else
        {
            cout << "Nie" << endl;
        }
    }
}