#include #include int main(int argc, char *argv[]){ int n; int b = 0; scanf("%d", &n); double x = sqrt( 1 + 8 * n ); if (ceil(x) == floor(x)) { int y = ceil(x); y = y - 1; if (y % 2 == 0) { int i = y / 2; printf("YES\n%d", &i); b = 1; } } if (b == 0) { printf("NO"); } return 0; }