#include using namespace std; using ll = long long; int main() { ll N; cin >> N; constexpr const int bound_c = 50; int c = 0; int line = 2; while( c++ < bound_c ){ if( line == 2 ){ line = ( N == 1 ? 4 : line + 1 ); } else if( line == 4 ){ break; } else if( line == 3 ){ N = ( N % 2 == 0 ? N / 2 : 3 * N + 1 ); line = 2; } } if( c <= bound_c ){ cout << "Yes\n"; cout << c; return 0; } cout << "No\n"; return 0; }