/*
欧拉计划第14题, 3n+1问题
answer: 837799
*/
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
int f(LL n)
{
// 返回 n -> 1的步骤
int ans = 0;
while (n > 1)
{
if (n & 1)
{
// odd
ans ++;
n = n * 3 + 1;
}else {
// even
ans ++;
n /= 2;
}
}
return ans;
}
int main(void)
{
int record = 0, ans = 0;
for (int i = 1; i <= 1000000; ++ i)
{
int t = f(i);
if (t > record)
{
record = t;
ans = i;
}
}
cout << ans << " " << record << endl;
return 0;
}