#pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC target("avx,avx2") #include #define INF 1000000001LL #define LNF 1000000000000000001LL #define MOD 1000000007LL #define MAX 300001 #define long long long #define all(x) x.begin(),x.end() using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; int cnt = 1; while(true) { cnt++; if(n == 1) break; cnt++; if(n%2) n = n*3+1; else n/=2; if(cnt > 100) break; } if(cnt <= 50) cout << "Yes\n" << cnt << endl; else cout << "No" << endl; return 0; }