#include #include #include #include #include using namespace std; int main() { long long n; int i = 0; int sum = 0; cin >> n; do { i++; sum += i; if (sum > 24 * 3600) { cout << "NO" << endl; return 0; } } while (n > sum); if (n == sum) { cout << "YES" << endl; cout << i << endl; } else cout << "NO" << endl; return 0; }