#include <iostream>

using namespace std;

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