import java.util.*;
class Codechef {
public static void main(String[] args) throws java.lang.Exception {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
while (T-- > 0) {
int N = sc.nextInt();
int K = sc.nextInt();
int sum = (K * (K + 1)) / 2;
if (N >= sum) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
}