// yukicoder: No.648 おやすみ // 2019.4.30 bal4u #include #include int main() { unsigned long long n, s; scanf("%llu", &n); n <<= 3, n++; s = (unsigned long long)sqrt((double)n); if (s*s != n || (s & 1) == 0) puts("NO"); else { puts("YES"); printf("%llu\n", (s-1)>>1); } return 0; }