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):
import sys
input = sys.stdin.readline

A,B,C = (int(x) for x in input().rstrip('\n').split())
K = int(input().rstrip('\n'))
les = K
for i in range(K):
  if A>=B:
    B = B*2
    les -= 1
  else:
    break
les2 = les
for _ in range(les):
  if B>=C:
    C = C*2
    les2 -= 1
  else:
    break
if B>A and C>B:
  print('Yes')
else:
  print('No')

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

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

while k > 0 and b >= c:
    c *= 2
    k -= 1

if k >= 0 and a<b<c:
    print("Yes")
else:
    print("No")

Solution (Python):
a,b,c=map(int,input().split())
k=int(input())
abc=[a,b,c]
for i in range(k):
    if a>=b:
        b*=2
    elif a<b:
        if b>=c:
            c*=2
        else:
            c*=2
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:
        B *= 2
        continue
    elif B >= C:
        C *= 2
        continue 

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 >= b:
    b *= 2
  elif b >= c:
    c *= 2
if a < b and b < c:
  print('Yes')
else:
  print('No')

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

r = 0

while not b>a:
    b *= 2
    r += 1

while not c>b:
    c *= 2
    r += 1

if r<=k:
    print('Yes')
else:
    print('No')

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

i=0

while a >= b:
    b *= 2
    if i == k:
        print('No')
        sys.exit()
    else:
        i += 1

while b >= c:
    c *= 2
    if i == k:
        print('No')
        sys.exit()
    else:
        i += 1

print('Yes')

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

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

for i in range(k):
    if g<=r:
        g*=2
    elif b<=g:
        b*=2

    if r<g<b:
        print("Yes")
        exit()

print("No")

Solution (Python):
import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 19
MOD = 10 ** 9 + 7
EPS = 10 ** -10

r, g, b = MAP()
K = INT()

cnt = 0
while r >= g:
    g *= 2
    cnt += 1
while g >= b:
    b *= 2
    cnt += 1
if cnt <= K:
    Yes()
else:
    No()

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

Solution (Python):


def main():
    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 and B < C:
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    main()

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

count = 0

while R >= G:
    count += 1
    G *= 2
    
while G >= B:
    count += 1
    B *= 2
    
if count <= K:
    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')
        exit()
print('No')

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

if k>=0:
    print("Yes")
else:
    print("No")

Solution (Python):
A,B,C = (int(X) for X in input().split())
K = int(input())
Count = 0
while True:
    if B>A:
        break
    else:
        B *= 2
        Count += 1
while True:
    if C>B:
        break
    else:
        C *= 2
        Count += 1
if Count<=K:
    print('Yes')
else:
    print('No')

Solution (Python):

import sys
sys.setrecursionlimit(10**8)
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return [LIST() for _ in range(n)]
def NSTR(n): return [input() for _ in range(n)]


INF = float("inf")
MOD = 10**9 + 7


def main():
    A, B, C = MAP()
    K = INT()
    while A >= B:
        B *= 2
        K -= 1
    if K < 0:
        print("No")
        return
    while B >= C:
        C *= 2
        K -= 1
    if K < 0:
        print("No")
        return

    print("Yes")

    return


if __name__ == '__main__':
    main()

Solution (Python):
[A,B,C]=list(map(int,input().split()))
K = int(input())
x = 0
while A >= B:
    B *= 2
    x += 1
while B >= C:
    C *= 2
    x += 1
if x <= K:
    print("Yes")
else:
    print("No")

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

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

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

if count <= K:
    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 and B < C:
    print("Yes")
else:
    print("No")

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

def solve( a, b, c, k ):
    if a < b and b < c:
        print( "Yes" )
        exit()
    elif k == 0:
        return
    else:
        solve( 2 * a, b, c, k - 1 )
        solve( a, 2 * b, c, k - 1 )
        solve( a, b, 2 * c, k - 1 )

solve( a, b, c, k )
print( "No" )

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

check = False
while K > 0:
  if A >= B:
    B = B*2
  else:
    if B >= C:
      C = C*2
  
  if A < B and B < C:
    check = True
    break
  K -= 1
  
if check:
  print("Yes")
else:
  print("No")

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from sys import exit
from decimal import *
import heapq
from math import sqrt, pi
from fractions import gcd
import random
import string
import copy
from itertools import combinations, permutations, product
from operator import mul, itemgetter
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7







A, B, C = getNM()
K = getN()

cnt = K
while cnt > 0:
    if A >= B:
        B *= 2
        cnt -= 1
    else:
        C *= 2
        cnt -= 1
if A < B and B < C:
    print('Yes')
else:
    print('No')

Solution (Python):




import numpy as np

def int_mtx(N):
    x = []
    for _ in range(N):
        x.append(list(input()))
    return np.array(x)

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

for i in range(0,K):
    if A >= B:
        B = 2*B
    else:
        if B >= C:
            C = 2*C
    if C > B and B > A:
        print('Yes')
        exit()

print('No')

Solution (Python):

"""
Created on Sat Jul 25 21:02:29 2020

@author: NEC-PCuser
"""

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


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

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

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

def predicate_green():
    return b > a

def predicate_blue():
    return c > b

while k != 0:
    if not predicate_green():
        b *= 2
        k -= 1

    elif not predicate_blue():
        c *= 2
        k -= 1

    else:
        break

if c > b > a:
    print('Yes')

else:
    print('No')

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

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

Solution (Python):


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




while K > 0:
    if C <= B:
        C = C*2
        K -= 1
        if K == 0:
            break
    elif B <= A:
        B = B*2
        K -= 1
        if K == 0:
            break
    else:
        C = C*2
        K -= 1
        if K == 0:
            break

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+=1
  
while b>=c:
  c=c*2
  count+=1
  
if count<=k:
  print('Yes')
else:
  print("No")

Solution (Python):
a, b, c = [int(n) for n in input().split()]
k = int(input())

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

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

Solution (Python):
A , B , C = map(int,input().split())
K = int(input())
k = 0
j = 0
while k < K and j == 0:
  j = 1
  if A >= B :
    B *= 2
    k += 1
    j = 0
  if B >= C :
    C *= 2
    k += 1
    j = 0
if k <= K and 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 >= b:
        b *= 2
        continue
    if b >= c:
        c *= 2
        continue
    break
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 < B:
        if B<C:
            break
        else:
            C = 2*C
    else:
        B = 2*B
if A<B<C :
    print('Yes')
else:
    print('No')

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

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

while 0 <= k:
    if a < b < c:
        print ("Yes")
        exit ()
    elif a >= b:
        b *= 2
    elif b >= c:
        c *= 2
    else:
        pass
    k -= 1
print ("No")

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

for i in range(N):
  for j in range(N):
    k = N-(i+j)
    P = A*pow(2,i)
    Q = B*pow(2,j)
    R = C*pow(2,k)
    
    if R > Q and Q > P:
      print("Yes")
      exit()
print("No")

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

cntgb = 0
x = g / r
while True:
	if x > 1:
		break
	else:
		x *= 2
		cntgb += 1
cntbg = 0
x = b / g / (2 ** cntgb )
while True:
	if x > 1:
		break
	else:
		x *= 2
		cntbg += 1
if cntbg + cntgb > k:
	print('No')
else:
	print('Yes')

Solution (Python):
A, B, C = [int(x) for x in input().split()]
K = int(input())
i = 0
while 1:
    if (A >= B):
        B *= 2
        i += 1
    elif (B >= C):
        C *= 2
        i += 1
    else:
        break
print('Yes' if i <= K else 'No')

Solution (Python):
import itertools
from copy import deepcopy

abc = input().split()
a = int(abc[0])
b = int(abc[1])
c = int(abc[2])
k = int(input())

perms = itertools.product([0, 1, 2], repeat=k)
bool_ = False

for perm in perms:
  tmp = [deepcopy(a), deepcopy(b), deepcopy(c)]
  
  for idx in perm:
    tmp[idx] *= 2
    
  if tmp[0] < tmp[1] and tmp[1] < tmp[2]:
    print('Yes')
    bool_ = True
    break
    
if not bool_:
  print('No')

Solution (Python):



def solve(*args: str) -> str:
    a, b, c = map(int, args[0].split())
    k = int(args[1])

    ret = False
    for i in range(k+1):
        for j in range(k+1-i):
            ret |= a*pow(2, i) < b*pow(2, j) < c*pow(2, k-i-j)

    return 'Yes' if ret else 'No'


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Solution (Python):

import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())

a,b,c = MI()
K = I()

while K >= 0:
    if a >= b:
        b *= 2
        K -= 1
    elif b >= c:
        c *= 2
        K -= 1
    else:
        print("Yes")
        sys.exit()
print("No")

Solution (Python):
A,B,C = map(int,input().split())
k = int(input())
ans = 'No'
for m in [(i,j,k-i-j) for i in range(k+1) for j in range(k-i+1)]:
    if A*2**m[0]<B*2**m[1]<C*2**m[2]:
        ans = 'Yes'
        break
print(ans)

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

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

Solution (Python):


import math
import re
import numpy as np
import copy


S = input().split(' ')
A = int(S[0])
B = int(S[1])
C = int(S[2])

K = int(input())

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

ans = "No"



if A < B and B < C:
    ans = "Yes"

print(ans)

Solution (Python):
def LI():
  return list(map(int,input().split()))
  
red,green,blue=LI()
k=int(input())

for i in range(0,k+1):
    r=red
    g=green*pow(2,i)
    b=blue*pow(2,k-i)
    
    if r<g<b:
        print("Yes")
        
        exit()
        
print("No")

Solution (Python):

import math
import bisect
import copy
import time
from collections import Counter


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 b>a and c>b:
	print('Yes')
else:
	print('No')

Solution (Python):
a,b,c = map(int,input().split())
k = int(input())
while k>0 and a>=b:
    b *= 2
    k-=1
while k>0 and b >= c:
    c *= 2
    k-= 1
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 A>=B:
    if cnt<K:
        B *=2
        cnt += 1
    if cnt>=K:
        break
if A>=B:
    print("No")
else:
    while B>=C:
        if cnt<K:
            C *= 2
            cnt += 1
        if cnt>=K:
            break
    if B>=C:
        print("No")
    else:
        print("Yes")

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

bk, ck = 0, 0

while a >= b:
    b *= 2
    bk += 1

while b >= c:
    c *= 2
    ck += 1

if bk + ck <= k:
    print("Yes")
else:
    print("No")

Solution (Python):




import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline

    a,b,c=map(int, readline().rstrip().split())
    k=int(readline())
    bk=0
    ck=0
    while b <= a:
        b*=2
        bk+=1
    while c <= b:
        c*=2
        ck+=1
    if (bk+ck)<=k:
        print("Yes")
    else:
        print("No")

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

Solution (Python):
A,B,C = map(int,input().split())
K = int(input())
count = 0
while A >= B:
    B = B*2
    count += 1
while B >= C:
    C = C*2
    count +=1
if count <= K:
    print("Yes")
else:
    print("No")

Solution (Python):
import math


a, b, c = [int(w) for w in input().split()]
k = int(input())
t = 0
while not b > a:
    b *= 2
    t += 1
while not c > b:
    c *= 2
    t += 1
cond = t <= k
print("Yes" if cond else "No")

Solution (Python):
from itertools import product
A, B, C = map(int, input().split())
K = int(input())
ans = 'No'
for k in range(0, K+1):
    for x in product([1,2,3], repeat=k):
        a, b, c = A, B, C
        for i in range(k):
            if x[i] == 1:
                a = 2*a
            elif x[i] == 2:
                b = 2*b
            else:
                c = 2*c
        if b > a and c > b:
            ans = 'Yes'
print(ans)

Solution (Python):
import sys

def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))

def main():
    a, b, c = MII()
    k = II()
    while a >= b and k > 0:
        b *= 2
        k -= 1
    while b >= c and k > 0:
        c *= 2
        k -= 1

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

if __name__ == '__main__':
    main()

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

a,b,c=MI()
k=II()

while b<=a:
    b*=2
    k-=1
    if k<0:
        print("No")
        exit()

while c<=b:
    c*=2
    k-=1
    if k<0:
        print("No")
        exit()

print("Yes")

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

ans=False
for i in range(0,k+1):
    for j in range(0,k+1):
        if(i+j>k):
            continue
        if(a*2**i<b*2**j and b*2**j < c*2**(k-i-j)):
            
            ans=True

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

Solution (Python):

import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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

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

Solution (Python):
A, B, C = map(int, input().split())
K = int(input())
cnt = 0
if A>=B:
    for i in range(K):
        B = 2*B
        cnt += 1
        if A<B:
            break
if B>=C:
     for j in range(K-cnt):
        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())

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

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

Solution (Python):

import collections as cl
import sys


def II():
    return int(sys.stdin.readline())


def MI():
    return map(int, sys.stdin.readline().split())


def LI():
    return list(map(int, sys.stdin.readline().split()))


def main():
    a, b, c = MI()
    k = II()

    while k > 0:
        if a >= b:
            b *= 2
        elif b >= c:
            c *= 2

        k -= 1

    print("Yes" if c > b > a else "No")


main()

Solution (Python):
a,b,c = map(int,input().split())
k = int(input())
p = 0
for i in range(k+1):
	if c*(2**i) > b*(2**(k-i)) and b*(2**(k-i)) > a:
		p += 1
		break
if p == 1:
	print('Yes')
else:
	print('No')

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

while A >= B or B >= C:
  while A >= B:
    B *= 2
    K -= 1
  while B >= C:
    C *= 2
    K -= 1
if K >= 0:
  print("Yes")
else:
  print("No")

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())
while k:
    if a >= b:
        b *= 2
    else:
        break
    k -= 1
while k:
    if b >= c:
        c *= 2
    else:
        break
    k -= 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 B <= A:
    B *= 2
    count += 1

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

print("Yes" if count <= K else "No")

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B, C = MAP()
K = INT()

cnt = 0
while B <= A:
    B *= 2
    cnt += 1

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

print("Yes" if cnt <= K else "No")

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

ans=0
for x in range(k+1):
  bb=b*(2**x)
  for y in range(k-x+1):
    cc=c*(2**y)
    if a<bb<cc:
      ans+=1
      
if ans>0:
  print('Yes')
else:
  print('No')

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

a, b, c = map(int, readline().split())
k= int(readline())
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:
	b *= 2
	k -= 1
while b >= c:
	c *= 2
	k -= 1
if k >= 0:
	print("Yes")
else:
	print("No")

Solution (Python):
import sys, io, os, re
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from pprint import pprint
from math import sin, cos, pi, radians, sqrt, floor, ceil
from copy import copy, deepcopy
from collections import deque
from fractions import gcd
from functools import reduce
from itertools import groupby
from heapq import heapify, heappush, heappop



n1 = lambda: int(sys.stdin.readline().strip())
nn = lambda: list(map(int, sys.stdin.readline().strip().split()))
f1 = lambda: float(sys.stdin.readline().strip())
fn = lambda: list(map(float, sys.stdin.readline().strip().split()))
s1 = lambda: sys.stdin.readline().strip()
sn = lambda: list(sys.stdin.readline().strip().split())
nl = lambda n: [n1() for _ in range(n)]
fl = lambda n: [f1() for _ in range(n)]
sl = lambda n: [s1() for _ in range(n)]
nm = lambda n: [nn() for _ in range(n)]
fm = lambda n: [fn() for _ in range(n)]
sm = lambda n: [sn() for _ in range(n)]

def array1(n, d=0): return [d] * n
def array2(n, m, d=0): return [[d] * m for x in range(n)]
def array3(n, m, l, d=0): return [[[d] * l for y in xrange(m)] for x in xrange(n)]
def linc(A, d=1): return map(lambda x: x + d, A)
def ldec(A, d=1): return map(lambda x: x - d, A)

A, B, C = nn()
K = n1()

i = 0
while i < K and A >= B:
    i += 1
    B *= 2

while i < K and B >= C:
    i += 1
    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 _ in range(k):
  if b<=a:
    b*=2
    continue
  if c<=b:
    c*=2
    continue
if a<b<c:
  print('Yes')
else:
  print('No')

Solution (Python):




from sys import stdin,stdout
from math import gcd, ceil, sqrt
from collections import Counter
from bisect import bisect_left, bisect_right
ii1 = lambda: int(stdin.readline().strip())
is1 = lambda: stdin.readline().strip()
iia = lambda: list(map(int, stdin.readline().strip().split()))
isa = lambda: stdin.readline().strip().split()
mod = 1000000007

a, b, c = iia()
k = ii1()
if b > a and c > b:
    print('Yes')
else:
    while b <= a and k > 0:
        b *= 2
        k -= 1
    while c <= b and k > 0:
        c *= 2
        k -= 1
    if b > a and c > b:
        print('Yes')
    else:
        print('No')

Solution (Python):
a,b,c=map(int,input().split())
k=int(input())
cnt=0
for i in range(k):
    if b>a:
        break
    else:
        b*=2
        cnt+=1
for i in range(k):
    if c>b:
        break
    else:
        c*=2
        cnt+=1



if cnt>k or c<=b or a>=b:
    print('No')
else:
    print('Yes')

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

count = 0

while b <= a:
    count += 1
    b = 2 * b

while c <= b:
    count += 1
    c = c * 2

if count <= k:
    print("Yes")
else:
    print("No")

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

while k > 0:
    if a >= b:
        b *= 2
        k -= 1
    else:
        c *= 2
        k -= 1

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 A<B:
        break
    else:
        B = B*2
        count += 1

while True:
    if B<C:
        break
    else:
        C = C*2
        count += 1

if count<=K:
    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
    else:
        C *= 2
if C > B and B > A:
    print("Yes")
else:
    print("No")

Solution (Python):
def main():
    a, b, c = [int(x) for x in input().split()]
    count = int(input())

    while not a < b:
        if count == 0:
            break
        b *= 2
        count -= 1
    while not b < c:
        if count == 0:
            break
        c *= 2
        count -= 1

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


if __name__ == '__main__':
    main()

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

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

while b<=a:
  b*=2
  k-=1
while c<=b:
  c*=2
  k-=1

if k>=0:
  print("Yes")
else:
  print("No")

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())
counter = 0
while a >= b:
    b *= 2
    counter += 1
while b >= c:
    c *= 2
    counter += 1


if counter <= k:
    print("Yes")
else:
    print("No")

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

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

while b >= c and k > 0:
    c *= 2
    k -= 1

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

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

cnt = 0
ans = "No"
while cnt <= K:
    if not A < B:
        B *= 2
        cnt += 1
        continue
    if not B < C:
        C *= 2
        cnt += 1
        continue
    if A < B < C:
        ans = "Yes"
        break


print(ans)

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

for ai in range(k+1):
    for bi in range(k+1):
        for ci in range(k+1):
            if not (ai + bi + ci == k):
                continue
            newA = a * (2 ** ai)
            newB = b * (2 ** bi)
            newC = c * (2 ** ci)

            if newB > newA and newC > newB:
                print('Yes')
                exit()

print('No')

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

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

r, g, b = map(int, input().split(" "))
k = int(input())

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

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

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

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

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

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

if a < 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 b <= a:
        b *= 2
    else:
        c *= 2
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(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 i in range(k):
  if a >= b:
    b = b*2
  elif b >= c:
    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 >= 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 bit in range(3**K):
  (a,b,c) = (A,B,C)
  r_bit = bit
  for k in range(K):
    amari = r_bit%3
    r_bit = int(r_bit/3)
    if amari == 0:
      a *= 2
    elif amari == 1:
      b *= 2
    else:
      c *= 2
  
  if a < b < c:
    print('Yes')
    exit(0)

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):

import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A, B, C = map(int, readline().split())
N = int(readline())
cnt = 0
while B <= A:
    B*=2
    cnt += 1
while C <= B:
    C*=2
    cnt +=1
if cnt <= N:
    print('Yes')
else:
    print('No')