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 itertools as it

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

allcase = list(it.product([0,1,2,3],repeat=k))

for case in allcase:
  nums = [a,b,c]
  for step in case:
    if step == 3:
      continue
    nums[step] *= 2
  if nums[0] < nums[1] and nums[1] < nums[2]:
    print('Yes')
    exit()
print('No')

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

Solution (Python):
a,b,c=map(int,input('').split())
k=int(input())
for i in range(k):
    if a<b and b<c:
        print("Yes")
        exit()
    if b<=a:
        b*=2
        continue
    if c<=b:
        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())

k = 0
while True:
    if A < B < C:
        print("Yes")
        break
    else:
        if k == K:
            print("No")
            break

        if B <= A:
            B *= 2
        elif C <= B:
            C *= 2
        k += 1

Solution (Python):
A, B, C, K = [int(_) for _ in open(0).read().split()]
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):



def main():
    import sys
    input = sys.stdin.readline

    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 count <= k:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Solution (Python):



def main():
    import sys
    input = sys.stdin.readline

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

    while True:
        if a >= b:
            b *= 2
            count += 1
        else:
            break

    while True:
        if b >= c:
            c *= 2
            count += 1
        else:
            break

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


if __name__ == '__main__':
    main()

Solution (Python):

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

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

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

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

Solution (Python):
a,b,c = [int(x) for x in input().split(' ')]
k = int(input())
z=0
while(a>=b):
    b*=2
    z+=1
while (b>=c):
    c*=2
    z+=1
if(z<=k):
    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

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

Solution (Python):
def main():
    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")


if __name__ == "__main__":
    main()

Solution (Python):
(r1,g1,b1)=input().split()
(r,g,b)=(int(r1),int(g1),int(b1))
k=int(input())
flg=0
for i in range(k):
  if not g > r :
    g *= 2
  elif not 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())

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

a = A
b = B
c = C
ans = 0
if a < b < c:
    ans = 1

for i in range(3**k):
    a = A
    b = B
    c = C
    i3 = Base_10_to_n(i, 3).zfill(k)
    mem = 0
    Pick = []
    for j in range(k):
        if i3[j] == '0':
            a *= 2
        elif i3[j] == '1':
            b *= 2
        elif i3[j] == '2':
            c *= 2

    if a < b < c:
        ans = 1

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

Solution (Python):
import math


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

count = 0

ab = int(math.log2(A/B)+1)
bc = int(math.log2((B*(2**ab))/C)+1)

if ab + bc <= K:
    print('Yes')
else:
    print('No')

Solution (Python):
from sys import stdin
A, B, C = [int(_) for _ in stdin.readline().rstrip().split()]
K = int(stdin.readline().rstrip())
for i in range(K):
    if not B > A:
        B *= 2
    elif not C > B:
        C *= 2
if A < B < C:
    print("Yes")
else:
    print("No")

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

ans = 0
for i in range(10**5):
    if a < b*(2**i):
        b = b*(2**i)
        break
    ans += 1
for i in range(10**5):
    if b < c*(2**i):
        break
    ans += 1
if ans <= k:
    print('Yes')
else:
    print('No')

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

Solution (Python):
a,b,c=map(int,input().split())
k=int(input())
for _ in range(k):
    if a>=b:
        b*=2
    else:
        if 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 *= 2
        continue
    elif B >= C:
        C *= 2
        continue
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 *= 2
    elif(b >= c): c *= 2
 
if(a < b < c): print("Yes")
else: print("No")

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


def main():
    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")


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    r,g,b=map(int,input().split())
    k=int(input())
    while(k>0):
        if(g<=r):
            g=g<<1
            k-=1
        elif(b<=g):
            b=b<<1
            k-=1
        else:
            break;
    if(r<g and g<b):
        print('Yes')
    else:
        print('No')
    
main()

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

while B <= A and K:
	B *= 2
	K -= 1

while C <= B and K:
	C *= 2
	K -= 1

print('Yes' if A < B < C else 'No')

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

Solution (Python):



def magic(a, b, c, k):
    for i in range(k):
        if a >= b:
            b = b * 2
        elif b >= c:
            c = c * 2
        i += 1
    if a < b and b < c:
        return "Yes"
    else:
        return "No"


if __name__ == "__main__":
    param_a, param_b, param_c = map(int, input().split(' '))
    param_k = int(input())
    print(magic(param_a, param_b, param_c, param_k))

Solution (Python):


import copy
import random
import bisect 
import fractions 
import math
import sys
import collections
from decimal import Decimal 

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

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))














A, B, C = LI()
K = int(input())

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

if A < B < C:
    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):
import sys
import itertools

import time
import math
import heapq
from collections import defaultdict
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 18
MOD = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines



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

while K > 0 and r >= g:
    g *= 2
    K -= 1
while K > 0 and g >= b:
    b *= 2
    K -= 1

if g > r and b > g:
    print("Yes")
else:
    print("No")

Solution (Python):
import itertools

a, b, c = map(int, input().split(" "))
k = int(input())
f = False
for conb in list(itertools.combinations_with_replacement([0, 1, 2], k)):
    a_i = conb.count(0)
    b_i = conb.count(1)
    c_i = conb.count(2)
    
    if (a * (2 ** a_i) < b * (2 **b_i)) and (b * (2 ** b_i) < c * (2 ** c_i)):
        f = True

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

Solution (Python):
r, g, b = map(int, input().split())
k = int(input())
count = 0
while g<=r: g*=2; count+=1
while b<=g: b*=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 < 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
    else:
        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 a >= b and k >= 0:
    k -= 1
    b *= 2

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

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

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())
ans = 'Yes'
for _ in range(k):
  if a >= b:
    b = 2*b
    k -= 1
    if b > a:
      break
k_2 = k
for _ in range(k_2):
  if b >= c:
    c = 2*c
if not a < b < c:
  ans = 'No'
print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(10**7)

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



def dfs(i,a,b,c):
  if i==K:
    if b>a and c>b:
      return True
    else:
      return False

  for j in range(3):
    if j==0:
      if dfs(i+1,2*a,b,c):
        return True
    elif j==1:
      if dfs(i+1,a,2*b,c):
        return True
    else:
      if dfs(i+1,a,b,2*c):
        return True

  return False

if dfs(0,A,B,C):
  print("Yes")
else:
  print("No")

Solution (Python):
A,B,C=map(int,input().split())
K=int(input())
a=0
while B<=A:
    B*=2
    a+=1
while C<=B:
    C*=2
    a+=1
if a<=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 < c:
    break
  elif b <= a:
    b = b*2
  elif c <= 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())
flg = False
c = (2**k) * c
for i in range(k):
  if a < b < c:
    flg = True
    break
  b *= 2
  c //= 2

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

Solution (Python):

import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import lru_cache
import bisect
import re
import queue
import copy
import decimal


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [Scanner.string() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [Scanner.int() for i in range(n)]


def solve():
    A, B, C = Scanner.map_int()
    K = Scanner.int()
    for i in range(K):
        if A >= B:
            B *= 2
        else:
            C *= 2
    return A < B < C


def main():
    
    
    print('YNeos'[not solve()::2])


if __name__ == "__main__":
    main()

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

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

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

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

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

cnt = 0

while not a < b:
  b*=2
  cnt+=1

while not 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())

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

Solution (Python):
def main():
    A, B, C = input_ints()
    K = input_ints()

    while K > 0:
        if A >= B:
            B *= 2
        elif B >= C:
            C *= 2

        K -= 1

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


def input_ints():
    line_list = input().split()

    if len(line_list) == 1:
        return int(line_list[0])
    else:
        return map(int, line_list)


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


def input_int_tuple_list(n: int):
    return [tuple(map(int, input().split())) for _ in range(n)]


main()

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

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

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

i = 0
while not a < b:
    b *= 2
    i += 1
while not b < c:
    c *= 2
    i += 1

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

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

def main():
    r,g,b = map(int, input().split())
    k = int(input())
    
    for i in range(k):
        for j in range(k):
            if i+j > k:
                continue
            if r*2**i < g*2**j < b*2**(k-i-j):
                print('Yes')
                return
    print('No')
    
main()

Solution (Python):
def find(A,B,C,K):

    for i in range(K+1):
        v1 = i
        v2 = K - i
        B0 = B*(2**v1)
        C0 = C*(2**v2)
        if A < B0 and B0 < C0:
            return True
    return False

A,B,C = list(map(int,input().strip().split()))
K = int(input())
if find(A,B,C,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
    else:
        break

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

Solution (Python):
abc=list(map(int,input().split()))
a,b,c=abc[0],abc[1],abc[2]
k=int(input())
for i in range(k+1):
    if a < b < c:
        print("Yes")
        break
    elif b <= a < c:
        b *= 2
    else:
        c *= 2
else:
    print("No")

Solution (Python):
A, B, C = map(int, input().split())
K = int(input())
i_ans = 0
j_ans = 0
for i in range(0,8):
    B_after = B * (2 ** i)
    if B_after > A:
        i_ans = i
        break
B_after = B * (2 ** i_ans)
for j in range(0,8):
    C_after = C * (2 ** j)
    if C_after > B_after:
        j_ans = j
        break
if i_ans + j_ans <=K:
    print('Yes')
else:
    print('No')

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

cnt = 0

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

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


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

Solution (Python):
from math import log2, ceil

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

bi = ceil(log2((a+1) / b))
bi = max(bi, 0)
b *= pow(2, bi)
ci = ceil(log2((b+1) / c))
ci = max(ci, 0)
if bi + ci <= k:
    print("Yes")
else:
    print("No")

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

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

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())
N = int(input())
stack = [(A,B,C,N)]
flag = False
while stack:
  a,b,c,n = stack.pop()
  if a<b and b<c:
    flag = True
    break
  if n>0:
    stack.append((a*2,b,c,n-1))
    stack.append((a,b*2,c,n-1))
    stack.append((a,b,c*2,n-1))
print('Yes') if flag else print('No')

Solution (Python):
A,B,C = list(map(int,input().split()))
K = int(input())
for i in range(K):
    for j in range(K-i):
        k = K-i-j
        if 2**i*A<2**j*B<2**k*C:
            print('Yes')
            exit()
print('No')

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

t = 0
while a >= b:
    b *= 2
    t += 1

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

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

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


while(A>=B):
    if(count<K):
        B *= 2
        count += 1
    else:
        j = 0
        break
while(C<=B):
    if(count<K):
        C *= 2
        count += 1
    else:
        j=0
        break
    
if(j == 1):
    print('Yes')
else:
    print('No')

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline  
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 count <=K:
    print("Yes")
else:
    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 = map(int,input().split())
k = int(input())

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

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

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

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())
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())

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

Solution (Python):
tmp = input().split()
map_tmp = map(int, tmp)
values = list(map_tmp)
moves = int(input())

while(moves):
  if (values[1] <= values[0]):
  	values[1] *= 2
  	moves -=1
  elif(values[2] <= values[1]):
    values[2] *=2
    moves -=1
  else:
    break
    
if (values[1] > values[0]) and (values[2] > values[1]):
  print('Yes')
else:
  print('No')

Solution (Python):
a,b,c=[int(i) for i in input().split()]
n=int(input())
flag=0
e=0
while(a>=b):
    b=b*2
    e=e+1
while(e<n and c<=b):
    c=c*2
    e=e+1
if(b>a and c>b and e<=n):
    print('Yes')
else:
    print('No')

Solution (Python):
import sys, bisect, math, itertools, string, queue, copy
import numpy as np
import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
from fractions import gcd
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

a,b,c = inpm()
k = inp()

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

if a < b < c:
    ans = 'Yes'
else:
    ans = 'No'

print(ans)

Solution (Python):

a, b, c = [int(x) for x in input().strip().split()]
k = int(input())

while (b<=a or c<=b) and k:
    
    if b<=a:
        b = b*2
    else:
        c = c*2
    
    k-=1

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

Solution (Python):
'''
自宅用PCでの解答
'''
import math

import itertools
import queue
import bisect
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit


ipt = stdin.readline
setrecursionlimit(10**7)
mod = 10**9+7

def main():
    a,b,c = map(int,ipt().split())
    k = int(ipt())
    t = 0
    while a >= b:
        t += 1
        b *= 2
    while b >= c:
        t += 1
        c *= 2
    if k >= t:
        print("Yes")
    else:
        print("No")

    return None

if __name__ == '__main__':
    main()

Solution (Python):

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

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

def count(v1, v2, k):
    while v1 <= v2 and k >= 0:
        v1 *= 2
        k -= 1
    b = v1
    return v1, v2, k

b, _, k = count(b, a, k)
_, _, k = count(c, b, k)
        
if k < 0:
    print('No')
else:
    print('Yes')

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
    
if cnt <= k:
    print("Yes")
else:
    print("No")

Solution (Python):

a, b, c = map(int, input().split())
k = int(input())
for _ in range(k):
    if a >= b:
        b *= 2
    elif b >= c:
        c *= 2
print(["No", "Yes"][a < b < c])

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

cnt = 0
while True:
    if a < b:
        break
    cnt += 1
    b *= 2

while True:
    if b < c:
        break
    cnt += 1
    c *= 2

if cnt > k:
    print("No")
else:
    print("Yes")

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

while k > 0:
    if c <= b:
        c *= 2
    elif b <= a:
        b *= 2
    k -= 1
    
    if a < b and b < c:
        print('Yes')
        break
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
print("Yes" if K >= 0 else "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
    else:
        continue

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

Solution (Python):

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

Solution (Python):
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

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

if __name__ == '__main__':
    main()