L, W = map(int, input().split())
m=1
K=0
if W<L:
H=L
F=W
else:
H=W
F=L
for i in range(1,1001):
if H>2*m:
K=K+1
m=m*2
H=H/2
else:
T=K
for i in range(1,1001):
if F>2*m:
K=K+1
m=m*2
F=F/2
else:
T=K
print(T)
L, W = map(int, input().split())
h=1
k=0
while L>=2*h or W>=2*h:
if L>=W:
L=L/2
k+=1
else:
W=W/2
k+=1
h=2*h
print(k)