#include using lint=long long; int main(){ std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false); std::cout.setf(std::ios_base::fixed);std::cout.precision(15); lint n;std::cin>>n; lint x=n==1?1:std::sqrt(n)+1; std::cout<<(x*(x+1)/2==n?"Yes":"No")<<'\n'; }