#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int n;
int main() {
ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
cin >> n;
for (int i = 1; i <= (2 * n) / (i + 1); i++)
if (i * (i + 1) / 2 == n) {
cout << "YES" << endl;
return 0;
}
cout << "NO" << endl;
return 0;
}
不知道为啥UKE了,大佬们能否帮忙看下