#include<iostream>
#include<vector>
#include<string.h>
using namespace std;
int main()
{
int N;
int sum=0;
cin >> N;
vector<vector<int> > arr(N,vector<int>(2));
for (int i = 0; i < N; i++)
{
for (int j = 0; j < 2; j++)
{
cin >> arr[i][j];
}
}
for (int i = 0; i < N; i++)
{
sum = 0;
for (int k = 1; k <= arr[i][0]; k++)
{
sum = k + sum;
}
if (arr[i][1] == sum)
{
cout << "YES" << endl;
}
else cout << "NO" << endl;
}
}
19번 (0) |
2020.08.29 |
18번 (0) |
2020.08.29 |
16번 (0) |
2020.08.28 |
15번 (0) |
2020.08.28 |
14번 (0) |
2020.08.27 |