#include #define int long long using namespace std; using ll = long long; void solve(); template void println(Args... args) { apply([](auto &&... args) { ((cout << args << ' '), ...); }, tuple(args...)); cout << '\n'; } int32_t main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); int t = 1; // cin >> t; for (int tc = 0; tc < t; ++tc) { solve(); } return 0; } void solve() { int n; cin >> n; if (n == 0) { cout << "No\n"; return; } __int128 a = n; int cnt = 0; while (cnt < 25 && a != 1) { if (a % 2 == 0) a /= 2; else a = 3 * a + 1; cnt++; } if (2 * cnt + 2 <= 50) cout << "Yes\n" << 2 * cnt + 2 << '\n'; else cout << "No\n"; }