Problem:
 Score: 200 points    Problem Statement  M-kun has the following three cards:   A red card with the integer A .  A green card with the integer B .  A blue card with the integer C .   He is a genius magician who can do the following operation at most K times:   Choose one of the three cards and multiply the written integer by 2 .   His magic is successful if both of the following conditions are satisfied after the operations:   The integer on the green card is strictly greater than the integer on the red card.  The integer on the blue card is strictly greater than the integer on the green card.   Determine whether the magic can be successful.      Constraints   1 \leq A, B, C \leq 7  1 \leq K \leq 7  All values in input are integers.         Input  Input is given from Standard Input in the following format:  A  B  C  K       Output  If the magic can be successful, print Yes ; otherwise, print No .        Sample Input 1 7 2 5
3      Sample Output 1 Yes  The magic will be successful if, for example, he does the following operations:   First, choose the blue card. The integers on the red, green, and blue cards are now 7 , 2 , and 10 , respectively.  Second, choose the green card. The integers on the red, green, and blue cards are now 7 , 4 , and 10 , respectively.  Third, choose the green card. The integers on the red, green, and blue cards are now 7 , 8 , and 10 , respectively.        Sample Input 2 7 4 2
3      Sample Output 2 No  He has no way to succeed in the magic with at most three operations.

Solution (Python):
A,B,C = map(int, input().split())
K = int(input())

AA = A
BB = B
CC = C

count = 0

for i in range(K):
    if AA < BB < CC:
        print("Yes")
        break
    elif CC <= AA or CC <= BB:
        CC *= 2
        count +=1
    elif BB <= AA:
        BB *= 2
        count +=1

if count == K:
    if AA < BB < CC:
        print("Yes")
    else:
        print("No")

Solution (Python):
A, B, C = map(int, input().split())
K = int(input())



for i in range(K):
    if C >= B and B > A:
        
        C = C * 2
    elif C >= A and A >= B:
        
        B = B * 2
    elif (
        (A >= B and B >= C)
        or (B >= A and A >= C)
        or (A >= C and C >= B)
        or (B >= C and C >= A)
    ):
        
        C = C * 2

if C > B and B > A:
    print("Yes")
else:
    print("No")

Solution (Python):
r,g,b = list(map(int, input().split()))
k = int(input())

for _ in range(k):
    if r >= g:
        g *= 2
    elif g >= b:
        b *= 2
    
    if r < g and g < b:
        print('Yes')
        exit()

print('No')

Solution (Python):
a,b,c = map(int, input().split())
k = int(input())

count = 0
while count < k:
  if a<b and b<c:
    print('Yes')
    exit()
  elif a >= b:
    b *= 2
    count += 1
  elif b >= c:
    c *= 2
    count += 1

if a<b and b<c:
  print('Yes')
else:
  print('No')

Solution (Python):
a,b,c=map(int,input().split())
k=int(input())
count=0
while a>=b:
    b=b*2
    count=count+1
while b>=c:
    c=c*2
    count=count+1
if count<=k:
    print('Yes')
else:
    print('No')

Solution (Python):
A,B,C=map(int,input().split())
K=int(input())
ans='No'
for i in range(K+1):
    if A<B:
        if B<C:
            ans='Yes'
            break
        else:
            C=C*2
    else:
        B=B*2
print(ans)

Solution (Python):
[r,g,b]=list(map(int,input().split()))

k=int(input())
m=k
n=0
while m>=0:
  tg=pow(2,m)*g
  tb=pow(2,n)*b
  if tg>r and tb>tg:
    print("Yes")
    exit(0)
  m-=1
  n+=1
print("No")

Solution (Python):
A, B, C = map(int, input().split())
K = int(input())

if A < B and B < C :
  print('Yes')
  exit()

for i in range(K):
  if A <= C and C <= B:
    C = C * 2
    if A < B and B < C:
      print('Yes')
      exit()
  elif B <= A and A <= C:
    B = B * 2
    if A < B and B < C:
      print('Yes')
      exit()
  elif B <= C and C <= A:
    C = C * 2
    if A < B and B < C:
      print('Yes')
      exit()
  elif C <= A and A <= B:
    C = C * 2
    if A < B and B < C:
      print('Yes')
      exit()
  elif C <= B and B <= A:
    C = C * 2
    if A < B and B < C:
      print('Yes')
      exit()
print('No')

Solution (Python):
"""
AtCoder :: M-Solutions Programming Contest 2020 :: Magic 2
https://atcoder.jp/contests/m-solutions2020/tasks/m_solutions2020_b
"""
import sys


def solve(red, green, blue, K):
    """Solve puzzle."""
    
    
    for _ in range(K):
        if green > red and blue > green:
            return True

        if red >= green:
            green *= 2
        else:
            blue *= 2

    return green > red and blue > green


def main():
    """Main program."""
    red, green, blue = (int(i) for i in sys.stdin.readline().split())
    K = int(sys.stdin.readline())
    if solve(red, green, blue, K):
        print('Yes')
    else:
        print('No')
    

if __name__ == '__main__':
    main()

Solution (Python):
import itertools

a,b,c=map(int, input().split())
k=int(input())
list()
for i,j in itertools.permutations(range(k+1), 2):
    if i+j != k:
        continue
    
        
    
    b_,c_ = b,c

    if i != 0:
        for l in range(i):
            b_ *= 2
    if j != 0:
        for l in range(j):
            c_ *= 2
    
    if a < b_ and b_ < c_:
        print('Yes')
        quit()
print('No')

Solution (Python):
from itertools import product

points = list(map(int,input().split()))
k = int(input())

tmp = product(range(3), repeat = k)

for ls in tmp:
    copy = points.copy()
    for chose in ls:
        copy[chose] *= 2
    if copy[1] > copy[0] and copy[2] > copy[1]:
        print('Yes')
        break
else:
    print('No')

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())
count = 0
while b <= a:
  b *= 2
  count += 1
while c <= b:
  c *= 2
  count += 1
if count <= k:
  print("Yes")
else:
  print("No")

Solution (Python):
a,b,c = map(int,input().split())
k = int(input())
count = 0
while a >= b:
  b *= 2
  count += 1
while b >= c:
  c *= 2
  count += 1
if a < b < c and k-count>= 0:
  print("Yes")
else:
  print("No")

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())
cnt = 0

while a >= b:
        b*=2
        cnt+=1
while b >= c:
        c*=2
        cnt+=1

print('Yes' if k >= cnt else 'No')

Solution (Python):
i = list(map(int, input().split()))
K = int(input())
red=i[0]
green=i[1]
blue=i[2]
success=0
for num in range(K):
  if green <= red:
    green = green*2
  elif blue <= green:
    blue = blue*2
if (blue > green and  green > red):
  print("Yes")
else:
  print("No")

Solution (Python):
A, B, C = list(map(int, input().split()))
K = int(input())


A_l  = [2**(i)*A for i in range(K+1)]
B_l  = [2**(i)*B for i in range(K+1)]
C_l  = [2**(i)*C for i in range(K+1)]

res = 0
for l, c in enumerate(C_l):
    for m, b in enumerate(B_l):
        for n, a in enumerate(A_l):
            if a < b and b < c and l + m + n <= K:
                print('Yes')
                res += 1
                break
        else:
            continue
        break
    else:
        continue
    break

if res == 0:
    print('No')

Solution (Python):
import math

A, B, C = 7, 2, 5
K = 3

A, B, C = 7, 4, 2
K = 3




A, B, C = map(int, input().split())
K = int(input())


def calculate(a, b, c, k):
    res1 = 0
    while b <= a:
        b = b * 2
        res1 += 1

    res2 = 0
    while c <= b:
        c = c * 2
        res2 += 1

    result = res1 + res2
    if result <= k:
        print("Yes")
    else:
        print("No")


calculate(A, B, C, K)

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())


def ok(ax, bx, cx):
    if ax + bx + cx > k:
        return False
    aa = a
    bb = b
    cc = c
    for _ in range(ax):
        aa *= 2
    for _ in range(bx):
        bb *= 2
    for _ in range(cx):
        cc *= 2
    if aa < bb < cc:
        print('Yes')
        exit()
    else:
        return False


for x in range(8):
    ok(x, 0, 0)
    for y in range(8 - x):
        ok(x, y, 0)
        for z in range(8 - x - y):
            ok(x, y, z)
print('No')

Solution (Python):
A,B,C=map(int,input().split())
K=int(input())
c=0
for k in range(K):
    if(B>=C):
        C*=2
    elif(A>=B):
        B*=2
    if(A<B and B<C):
        print('Yes')
        c=1
        break
if(c==0):
    print('No')

Solution (Python):
list=input().split()
num=int(input())
A,B,C=int(list[0]),int(list[1]),int(list[2])

pattern=[[i,num-i] for i in range(num+1)]
temB=B
temC=C
a=0
for pt in pattern:
  B=B*(2**pt[0])
  C=C*(2**pt[1])
  
  
  if A<B<C:
    print('Yes')
    a=1
    break
   
  B=temB
  C=temC

if a!=1:
  print('No')

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())

ans = "No"

for _ in range(k):
    if c <= b:
        c *= 2
    elif b <= a:
        b *= 2

    if c > b and b > a:
        ans = "Yes"
        break

print(ans)

Solution (Python):
A,B,C = map(int,input().split())
K = int(input())
for i in range(K):
    if C<=B:
        C*=2
    elif B<=A and C>B:
        B*=2
if B>A and C>B:
    print("Yes")
else:
    print("No")

Solution (Python):
A,B,C = map(int,input().split())
K = int(input())
for i in range(K):
    if C<=B:
        C*=2
    elif B<=A and C>B:
        B*=2
if B>A and C>B:
    print("Yes")
else:
    print("No")

Solution (Python):
A, B, C = map(int, input().split())
K = int(input())

count = 0

while True:
    if min(A, B, C) == C:
        C = C * 2
        count+=1
        if count==K:
            break
    if min(A, B, C) == B:
        B = B * 2
        count+=1
        if count==K:
            break
    if min(A, B, C) == A:
        C = C * 2
        count+=1
        if count==K:
            break
if C > B and B > A:
    print('Yes')
else:
    print('No')

Solution (Python):
a,b,c=map(int,input().split())
k=int(input())
for i in range(0,k+1):
    asw=False
    for j in range(0,k+1):
        if (i+j<=k and a<b*(2**(i)) and b*(2**(i))< c*(2**(j))):
            print("Yes")
            asw=True
            break
    if (asw):break
else : print("No")

Solution (Python):
import sys
from math import sqrt, gcd, ceil, log
from bisect import bisect, bisect_left
from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop
inp = sys.stdin.readline
read = lambda: list(map(int, inp().strip().split()))

def main():
	a, b, c = read(); k = int(input())
	
	while b <= a:
		b *= 2
		k -= 1
	while c <= b:
		c *= 2; k -= 1
	print("YNeos"[k < 0::2])






if __name__ == "__main__":
	main()

Solution (Python):
A,B,C=map(int,input().split())
K = int(input())

count = 0

for i in range(7):
    if A >= B:
        B = B*2
        count = count +1
    else:
        break

for j in range(7):
    if B >= C:
        C =C*2
        count = count+1
    else:
        break




if K >= count:
    print("Yes")
else:
    print("No")

Solution (Python):
A,B,C = input().split()
K = int(input())
first = "N"
second = "N"
f = 1
s = 1
nokori = K
for i in range(1,K):
    if int(A) < int(B)*f:
        first = "Y"
        break
    else:
        f *= 2
        nokori -= 1
if int(A) < int(B)*f:
        first = "Y"
if first == "Y":
    for o in range(1,nokori+1):
        if int(B)*f < int(C)*s:
            second = "Y"
            break
        else:
            s *= 2
    if int(B)*f < int(C)*s:
            second = "Y"
        
if first == "Y" and second == "Y":
    print("Yes")
else:
    print("No")

Solution (Python):
A, B, C = map(int, input().split())
K = int(input())

for i in range(1, K+1):
  if A >= B:
    B *= 2
  elif B >= C:
    C *= 2
if A < B < C:
  print("Yes")
else:
  print("No")

Solution (Python):
A, B, C = input().split()
A, B, C = [int(A), int(B), int(C)]
K = int(input())

for i in range(K):
    if(B >= C or A >= C):
        C = C * 2
    elif(A >= B):
        B = B * 2
    else:
        C = C * 2

if(C > B > A):
    print("Yes")
else:
    print("No")

Solution (Python):
R,G,B=map(int,input().split())
K = int(input())
    
while (B<=G or G<=R) and K>0:
    if R>=G:
        G = G*2
        K = K-1
    if G>=B:
        B = B*2
        K = K-1
if R<G and G<B and K>=0:
    print("Yes")
else:
    print('No')

Solution (Python):
a,b,c = map(int,input().split())
k = int(input())

for i in range(k):
    if(b>=c):
        c = c*2
    elif(a>=b):
        b = b*2
    else:
        break
if(a<b<c):
    print('Yes')
else:
    print('No')

Solution (Python):
A,B,C = map(int,input().split())
K = int(input())
for k in range(K):
    if A < B < C:
        break
    elif A >= B:
        B = B*2
    elif B >= C:
        C = C*2
if A < B < C:
    print('Yes')
else:
    print('No')

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())

for cnt in range(k):
    if a < b and b < c:
        break
    elif a >= b:
        b = int(b * 2)
        continue
    elif b >= c:
        c = int(c * 2)
        continue

if a < b < c:
    print('Yes')
else:
    print('No')

Solution (Python):
a,b,c=map(int,input().split())
k=int(input())
cnt=0
while a>=b:
    b*=2
    cnt+=1
while b>=c:
    c*=2
    cnt+=1
print("Yes" if cnt<=k else "No")

Solution (Python):
a,b,c = map(int,input().split())
k = int(input())
while(a >= b):
    k -= 1
    b *= 2
while(b >= c):
    k -= 1
    c *= 2
if(k >= 0):
    print('Yes')
else:
    print('No')

Solution (Python):
A, B, C = map(int, input().split())
K = int(input())
flag = False

l=[]
for i in range(K+1):
  for j in range(K+1):
    for k in range(K+1):
      if i+j+k == K:
        m=[i, j, k]
        l.append(m)

for i in range(len(l)):
  m = l[i]
  a=A*(2**m[0])
  b=B*(2**m[1])
  c=C*(2**m[2])

  if a<b and b<c:
    flag = False
    print("Yes")
    break
  else:
    flag = True
if flag:
  print("No")

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())
ans = "No"
for i in range(k):
  if (a<b)and(b<c):
    ans = "Yes"
    break
  elif b<=a:
    b=b*2
  elif c<=b:
    c=c*2
if (a<b)and(b<c):
    ans = "Yes"
print(ans)

Solution (Python):
a,b,c = map(int, input().split())
k=int(input())
if (a < b and b < c):
    print("Yes")
    exit()
else:
    for i in range(k):
        if (a >= b):
            b *= 2
        elif (b >= c):
            c *= 2
        elif (a >= c):
            c *= 2
if (a < b and b < c):
    print("Yes")
else: print("No")

Solution (Python):
A, B, C = map(int, input().split())
K = int(input())

for i in range(K):
  for ii in range(K - i):
    iii = K - i - ii
    a = A * (2 ** i)
    b = B * (2 ** ii)
    c = C * (2 ** iii)
    if a < b < c:
      print('Yes')
      exit(0)
print('No')

Solution (Python):
ABC = list(map(int, input().split()))
K = int(input())

A = ABC[0]
B = ABC[1]
C = ABC[2]

for i in range(0, K):
    if A >= B :
        B = 2*B
    elif B >= C:
        C = 2*C

if A < B < C:
    print("Yes")
else:
    print("No")

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())

ans = "No"
for bi in range(k+1):
    bb = b
    cc = c * (2 ** (k - bi))

    if a < bb and bb < cc:
        ans = "Yes"
        break

    for _ in range(bi):
        bb *= 2
        if a < bb and bb < cc:
            ans = "Yes"

    if ans == "Yes":
        break

print(ans)

Solution (Python):
r,g,b = list(map(int,input().split()))
k = int(input())
for i in range(k): 
  if b==0 or g==0: 
    break  
  elif b<=g: 
    b = b*2
  elif g<=r: 
    g = g*2   
if g>r and b>g:
  print("Yes")
else:
  print("No")

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())
c = c * 2 ** k

i = 1
if a < b:
  if b < c:
    print("Yes")
  else:
    print("No")
else:
  while i <= k:
    if a < b and b < c:
      print("Yes")
      break
    else:
      b = b * 2
      c = int(c / 2)
      i += 1
  if i > k:
    print("No")

Solution (Python):
def read():
    A, B, C = map(int, input().split(' '))
    K = int(input())
    return A, B, C, K


def fun(A, B, C, K):
    
    
    
    
    
    for i in range(K + 1):
        j = K - i
        if A < B * (2**i) and B * (2 ** i) < C * (2 ** j):
            return True
    return False


if __name__ == '__main__':
    A, B, C, K = read()
    print('Yes' if fun(A, B, C, K) else 'No')

Solution (Python):
R, G, B = list(map(int, input().split()))
K = int(input())

def f(R,G,B):
  if R<G and G<B:
    return 1
  elif R<G and G>=B:
    return 2
  else:
    return 3

c = 0
fl = 0

while c <= K:
  c +=1
  if f(R,G,B)==1:
    fl = 1
    c = K+1
  elif f(R,G,B)==2:
    B = B*2
  else:
    G = G*2
    
if fl == 0:
  print("No")  
else:
  print("Yes")

Solution (Python):
import itertools

NUM = list(map(int, input().split()))
A = NUM[0]
B = NUM[1]
C = NUM[2]

k = int(input())
flg = False
ref_list = []
nums = [0, 1, 2]
for ref in itertools.product(nums, repeat=k):
  ref_list.append(ref)

for i in range(len(ref_list)):
  cand = ref_list[i]
  num = [A, B, C]
  
  for j in cand:
    num[j] = num[j] * 2
    if num[0] < num[1] and num[1] < num[2]:
      print("Yes")
      exit()
  num = [A, B, C]
  
print("No")

Solution (Python):
A, B, C = list(map(int, input().split()))
K = int(input())
L=[]
L.append(A)
L.append(B)
L.append(C)


n = 0
while L[0] >= L[1]:
    L[1] = L[1]*2
    n = n+1



while L[1] >= L[2]:
    L[2] = L[2]*2
    n = n+1


if n <= K:
    print("Yes")
else:
    print("No")

Solution (Python):
A,B,C = map(int, input().split())
K = int(input())
bc = 0
cc = 0

if A < B:
    for i in range(7):
        C = C * 2
        cc += 1
        if B < C:
            break

    if bc + cc <= K:
        print("Yes")
    else:
        print("No")
    exit()
for i in range(7):

    B = B * 2
    bc += 1
    if A < B:
        break


if bc > K:
    print("No")
    exit()
elif bc == K:
    if B < C:
        print("Yes")
        exit()
    else:
        print("No")
        exit()
for j in range(7):
  
      
    C = C * 2
    cc += 1
    if B < C:
        break  




if bc + cc <= K:
    print("Yes")
else:
    print("No")

Solution (Python):

"""M-SOLUTIONS プロコンオープン 2020: B - Magic 2
https://atcoder.jp/contests/m-solutions2020/tasks/m_solutions2020_b
"""

import itertools


def is_success(cards):
    return cards[0] < cards[1] < cards[2]


def magic(A, B, C, K):
    for n in range(1, K + 1):
        for c in itertools.combinations([0, 1, 2] * n, n):
            cards = [A, B, C]
            for i in range(n):
                cards[c[i]] = cards[c[i]] * 2
            if is_success(cards):
                return True
    return False


def main():
    A, B, C = list(map(int, input().split()))
    K = int(input())

    if magic(A, B, C, K):
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Solution (Python):
i = list(map(int, input().split()))
limit = int(input())
k = 0
while not i[0] < i[1] < i[2]:
    if i[2] <= i[1]:
        i[2] *= 2
        k += 1
    if k == limit:
        break
    if i[1] <= i[0]:
        i[1] *= 2
        k += 1
    if k == limit:
        break
if k <= limit and i[0] < i[1] < i[2]:
    print("Yes")
else:
    print("No")

Solution (Python):
a,b,c = map(int,input().split())
k = int(input())

for i in range(k):
  if a >= b:
  	b = 2 * b
  elif b >= c:
  	c = 2 * c

if a < b < c:
  print("Yes")
else:
  print("No")

Solution (Python):

"""M-SOLUTIONS プロコンオープン 2020: B - Magic 2
https://atcoder.jp/contests/m-solutions2020/tasks/m_solutions2020_b
"""

import itertools


def is_success(cards):
    return cards[0] < cards[1] < cards[2]


def magic(A, B, C, K):
    for n in range(1, K + 1):
        
        for c in itertools.combinations([0, 1, 2] * n, n):
            cards = [A, B, C]
            for i in range(n):
                
                cards[c[i]] = cards[c[i]] * 2
            
            if is_success(cards):
                return True
    return False


def main():
    A, B, C = list(map(int, input().split()))
    K = int(input())
    
    

    if magic(A, B, C, K):
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline

a,b,c = map(int,input().split())
k = int(input())

while a >= b:
    b *= 2
    k -= 1

if k < 0:
    print("No")
else:
    for i in range(k):
        c *= 2
    if b < c:
        print("Yes")
    else:
        print("No")

Solution (Python):
a,b,c = list(map(int,input().split()))
k = int(input())
ans = 'No'

def iter_p_adic(p, n):
    from itertools import product
    tmp = [range(p)] * n
    return product(*tmp)

iterator = iter_p_adic(3, k)
for idxs in iterator:
    a_tmp = a
    b_tmp = b
    c_tmp = c
    for i in idxs:
      if i == 0:
        a_tmp = a_tmp*2
      elif i == 1:
        b_tmp = b_tmp*2
      elif i == 2:
        c_tmp = c_tmp*2
    if a_tmp<b_tmp<c_tmp:
      ans = 'Yes'

print(ans)

Solution (Python):
A,B,C=map(int, input().split())
K=int(input())

s=0

for i in range(100):
    if B <= A:
        B = B*2
        s = s + 1
    else:
        break

for i in range(100):
    if C <= B:
        C = C*2
        s = s + 1
    else:
        break

if s > K:
    print('No')
else:
    print('Yes')

Solution (Python):
import itertools

a, b, c = map(int, input().split())
k = int(input())

l = [0, 1, 2, 3]


ans = False
if a < b < c:
    ans = True
else:
    for v in itertools.combinations_with_replacement(l, k):
        ll = [0, a, b, c]
        for vv in v:
            if vv == 0:
                continue
            ll[vv] = ll[vv] * 2
            if ll[1] < ll[2] < ll[3]:
                ans = True

        


if ans:
    print("Yes")
else:
    print("No")

Solution (Python):
a,b,c=map(int,input().split())
k=int(input())
import itertools
l=[0,1,2]
A=a
B=b
C=c
for V in itertools.combinations_with_replacement(l, k):
    v=list(V)
    A=a
    B=b
    C=c
    for i in range(k):
        if v[i]==0:
            A*=2
        elif v[i]==1:
            B*=2
        else:
            C*=2
    if A<B<C:
        print("Yes")
        quit()
print("No")

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())

for i in range(k):
    if a >= c:
        c *= 2
    elif a >= b:
        b *= 2
    elif b >= c:
        c *= 2

if a < b and b < c:
    print('Yes')
else:
    print('No')

Solution (Python):
A, B, C = map(int, input().split())
K = int(input())
for i in range(K):
    if A >= C:
        C = C * 2
        K -= 1
if K > 0:
    for i in range(K):
        if A >= B:
            B = B * 2
            K -= 1
        if B >= C:
            if K > 0:
                C = C * 2
            exit

if A < B and C > B:
    print("Yes")
else:
    print("No")

Solution (Python):
A,B,C =map(int,input().split())
N = int(input())

for i in range(0,N+1):
  if A<B*2**i and B*2**i<C*2**(N-i):
    print("Yes")
    exit()
    
print("No")

Solution (Python):

import numpy as np
from functools import *
import sys
sys.setrecursionlimit(100000)
input = sys.stdin.readline


def array(size, init=0):
    return [[init for j in range(size[1])] for i in range(size[0])]


def acinput():
    return list(map(int, input().split(" ")))


def II():
    return int(input())


A, B, C = acinput()
K = II()




k = 0
while A >= B:
    B *= 2
    k += 1

while B >= C:
    C *= 2
    k += 1

if k <= K:
    print("Yes")

else:
    print("No")

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())

for _ in range(k):
    if not a < b:
        b = b * 2
    else:
        c = c * 2

if a < b and b < c:
    print("Yes")
else:
    print("No")

Solution (Python):
'''
    Red  Green  Blue
1 <= A  <  B  <  C  <= 7
'''
a, b, c = map(int, input().split())
k = int(input())

def main():
  for x in range(k+1):
    
    if (x == k) and ((a * (2 ** x)) < b) and (b < c):
      
      return('Yes')
    
    for y in range(k+1):
      if (x + y == k) and ((a * (2 ** x)) < (b * (2 ** y))) and ((b * (2 ** y)) < c):
        
        return('Yes')
      
      for z in range(k+1):
        if (x + y + z == k) and ((a * (2 ** x)) < (b * (2 ** y))) and ((b * (2 ** y)) < (c * (2 ** z))):
          
          return('Yes')

  return('No')

print(main())

Solution (Python):

A, B, C = list(map(int, input().split()))
K = int(input())

ans = 'No'
for i in range(K):
  if A < B < C:
    break
  
  if A >= B:
    B = 2 * B
  elif B >= C:
    C = 2 * C

if A < B < C: 
  ans = 'Yes'


  
print(ans)

Solution (Python):
A,B,C=list(map(int,input().split()))
K=int(input())


for i in range(K):
    if A>=B:
        B=2*B
    elif B>=C:
        C=2*C
    
if A<B and B<C:
    print('Yes')
else:
    print('No')

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())

cnt = 0
while b <= a:
    cnt += 1
    b *= 2
while c <= b:
    cnt += 1
    c *= 2
if cnt <= k:
    print('Yes')
else:
    print('No')

Solution (Python):
cards = input()
times = int(input())
card = cards.split(" ")
result = "No"
wktimes = 0
idx = 0
div = int(card[0]) / int(card[1])
while ( 2 ** idx ) <= div:
  idx = idx + 1
wktimes = idx
card[1] = int(card[1]) * ( 2 ** idx)

idx = 0
div = int(card[1]) / int(card[2])
while ( 2 ** idx ) <= div:
  idx = idx + 1
wktimes = wktimes + idx
card[2] = int(card[2]) * ( 2 ** idx)
if wktimes <= times:
  result = "Yes"
print (result)

Solution (Python):
a, b, c = list(map(int, input().split()))
k = int(input())


for i in range(k):
    if a >= b:
        b *= 2
    elif b >= c:
        c *= 2
        
if a < b < c:
    print("Yes")
else:    
    print("No")

Solution (Python):
import sys

a, b, c = map(int,input().split())
k = int(input())

for i in reversed(range(1,k+1)):
    ck = c * (2 ** i)
    bk = b * (2 ** (k-i))
    ak = a * ((2 ** (k - i - (k - i))))
    if ck > bk > ak:
        print('Yes')
        sys.exit()
print('No')

Solution (Python):
def main():
    import sys

    def input(): return sys.stdin.readline().rstrip()

    a, b, c = map(int, input().split())
    k = int(input())
    i = 0
    while a >= b:
        b *= 2
        i+= 1
    while b >= c:
        c *= 2
        i+=1
    if i <= k:
        print('Yes')
    else:
        print('No')
    
    
if __name__ == '__main__':
    main()

Solution (Python):
a,b,c = map(int,input().split())
k = int(input())

is_Ok = False
for i in range(k) :
    
    if (a >= b) :
        b *= 2
        continue

    if (b >= c) :
        c *= 2
        continue

    if (a<b and b<c) :
        is_Ok = True
        break

if (a<b and b<c) :
    is_Ok = True

if (is_Ok) :
    print("Yes")
else :
    print("No")

Solution (Python):
A, B, C = map(int, input().split())
K = int(input())
for i in range(K):
    if A >= B:
        B *= 2
    elif B >= C:
        C *= 2
if A < B < C:
    print('Yes')
else:
    print('No')

Solution (Python):

A,B,C= map(int,input().split())
K = int(input())

for _ in range(K):
    if A < B:
        if B >= C:
            C = C*2
        else:
            pass
    else:
        B = B*2

if A < B <C :
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
input = sys.stdin.readline

ABC = list(map(int, input().split()))
K = int(input())

for i in range(K+1):
    if ABC[0] < ABC[1] and ABC[1] < ABC[2]:
        print("Yes")
        break
    elif ABC[0] >= ABC[2]:
        ABC[2] = 2 * ABC[2]
    elif ABC[1] >= ABC[2]:
        ABC[2] = 2 * ABC[2]
    elif ABC[0] >= ABC[1]:
        ABC[1] = 2 * ABC[1]
        
else:
  print("No")

Solution (Python):
a,b,c = map(int,input().split())
k = int(input())
while(b <= a):
    b = b*2
    k -= 1
while(c <= b):
    c = c*2
    k -= 1

if k < 0:
    print("No")
    
else:
    print("Yes")

Solution (Python):
import itertools

nums = list(map(int, input().split()))
k = int(input())

indexes = [0,1,2]
flg = False

for com in itertools.combinations_with_replacement(indexes, k):

    nums_calc = nums.copy()

    for val in list(com):
        nums_calc[val] *= 2
    
    if nums_calc[0] < nums_calc[1] and nums_calc[1] < nums_calc[2]:
        flg = True
        break

if flg:
    print('Yes')
else:
    print('No')

Solution (Python):
a,b,c = list(map(int, input().split()))
k = int(input())

c1=0
while(1):
    if a<b:
        break
    else:
        c1+=1
        b=b*2

c2=0
while(1):
    if b<c:
        break
    else:
        c2+=1
        c=c*2

if c1+c2<=k:
    print("Yes")
else:
    print("No")

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())

for i in range(k):
  if b <= a:
    b = b * 2
  elif c <= b:
    c = c * 2
  else:
    pass

if (a < b) & (b < c):
    print('Yes')
else:
    print('No')

Solution (Python):
R,G,B = map(int,input().split())
K = int(input())
ans = 'No'

while (K > 0):
  if R >= G:
    G *= 2
    K -= 1
  elif G >= B:
    B *= 2
    K -= 1
  else:
    K -= 1
      
if R < G < B:
  ans = 'Yes'
  
print(ans)

Solution (Python):
A, B, C = map(int, input().split())
K = int(input())

cnt = 0
if A >= B:
    while A >= B:
        B *= 2
        cnt += 1

if B >= C:
    while B >= C:
        C *= 2
        cnt += 1

if cnt <= K:
    print('Yes')
else:
    print('No')

Solution (Python):
line1 = input()
line2 = input()

a, b, c = tuple([int(val) for val in line1.split()])
k = int(line2)

for i in range(k):
    if b <= a:
        b = b*2
    elif c <= b:
        c = c*2
    else:
        continue

done = False
if b > a and c > b:
    done = True

if done:
    print("Yes")
else:
    print("No")

Solution (Python):
a,b,c = map(int,input().split())
k = int(input())
while((not b>a) and k):
	b*=2
	k-=1
while((not c>b) and k):
	c*=2
	k-=1
if(a<b and b<c):
	print('Yes')
else:
	print('No')

Solution (Python):
import sys
import math
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
a,b,c=get_ints()
k=int(input())
flag=0
for i in range(k+1):
    if b>a and c>b:
        flag=1
        break
    else:
        if b<=a:
            b=b*2
        else:
            c=c*2
if flag==1:
    print("Yes")
else:
    print("No")

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())

for i in range(k):
    if a >= b:
        b = b*2
    elif b >= c:
        c = c*2

if a < b < c:
    print("Yes")
else:
    print("No")

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
import random
from collections import deque
from decimal import *
import queue

input = sys.stdin.readline

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007




def main():
	A,B,C = inputMap()
	K = inputInt()

	if A < B and B < C:
		print("Yes")
		sys.exit()

	for i in range(K):
		if A >= B:
			B *= 2
			continue

		if B >= C:
			C *= 2
			continue

	if A < B and B < C:
		print("Yes")
	else:
		print("No")



if __name__ == "__main__":
	main()

Solution (Python):
def resolve():
    a, b, c = map(int, input().split())
    k = int(input())
    for _ in range(k):
        if b <= a:
            b *= 2
        elif b > a and c <= b:
            c *= 2
    if a < b < c:
        print("Yes")
    else:
        print("No")
resolve()

Solution (Python):
A, B, C = map(int, input().split())
K = int(input())
counter = 0

while C <= B or C <= A:
    C = 2*C
    counter += 1

while B <= A:
    B = 2*B
    counter += 1

while C <= B:
    C = 2*C
    counter += 1

if counter > K:
    print("No")
else:
    print("Yes")

Solution (Python):
a,b,c=map(int, input().split())
k=int(input())

from itertools import product
lis=['0','1','2']
P=product(lis,repeat=k)

for p in P:
    tmp=[a,b,c]
    for j in range(k):
        tmp[int(p[j])]*=2
    if tmp[1]>tmp[0] and tmp[2]>tmp[1]:
        print('Yes')
        exit()

print('No')

Solution (Python):
a,b,c=map(int,input().split())
k=int(input())
if c>a/(2**k):
	for x in range(k+1):
		if b>a/(2**x):
			break
	else:
		print("No")
	y=k-x

	if c*(2**(y-x))>b:
		print("Yes")
		
	else: print("No")
else:
		print("No")