#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(int i=0;i> N; int n=N; int ans=1; while(1){ if(n==1){ ans++; break; } else if(n%2==0){ n/=2; ans+=2; } else{ n=3*n+1; ans+=2; } if(ans>50) break; } if(ans<=50){ cout << "Yes" << endl; cout << ans << endl; }else{ cout << "No" << endl; } return 0; }