using System;

namespace burh3
{
    class Program
    {
        static void Main(string[] args)
        {
            int T = int.Parse(Console.ReadLine());
            string[] s1 = Console.ReadLine().Split();
            int N = int.Parse(s1[0]);
            int M = int.Parse(s1[1]);
            int K = int.Parse(s1[2]);
            int len = N/K;
            int mod = N%K;
            int sum = (len*(len-1))/2;
            int all = K*sum + mod*len;
            if(all<=M)Console.WriteLine("Tak");
            else Console.WriteLine("Nie");
        }
    }
}