#include using namespace std; void fast_io() { ios::sync_with_stdio(false); std::cin.tie(nullptr); } int main() { fast_io(); int n; cin >> n; int ans = 1; for (; ans <= 50;) { ans++; if (n == 1) { break; } if (n % 2 == 0) { n /= 2; } else { n = 3 * n + 1; } ans++; } if (ans > 50) { cout << "No\n"; } else { cout << "Yes\n"; cout << ans << "\n"; } }