-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeadline
More file actions
22 lines (21 loc) · 659 Bytes
/
Deadline
File metadata and controls
22 lines (21 loc) · 659 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
static int mod=(int)1e9+7;
static int[] arr;
public static void main(String[] args) throws Exception {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
StringBuilder sb=new StringBuilder();
while(t-->0) {
long n = sc.nextInt(), d = sc.nextInt();
long x = (n - 1) / 2, b = n - d;
long a = x * x + x * (1 - n);
if (a <= b) sb.append("YES\n");
else sb.append("NO\n");
}
System.out.println(sb);
}
}