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


count = 0
while (B <= A):
    B = B*2
    count = count + 1

while (C <= B):
    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())
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 = input().split(" ")
K = int(input())

A, B, C = int(A), int(B), int(C)

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

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

Solution (Python):
import sys
a, b, c = [int(x) for x in input().split()]
k = int(input())
i = 0
while b<=a:
  i += 1
  b *= 2
if(k<i):
  print('No')
  sys.exit()
else:
  k -= i
  j = 0
  while c<=b:
    j += 1
    c *= 2
  if(k<j):  
    print('No')
    sys.exit()
  else:
    print('Yes')

Solution (Python):
li = list(map(int, input().split()))
k = int(input())

for i in range(k):

    if li[0] >= li[1]:
        li[1]=li[1]*2
    elif li[2] <= li[1]:
        li[2]=li[2]*2
    if li[0] < li[1] and li[1] < li[2]:
        print("Yes")
        quit()
print("No")

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

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

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

if (a>=b):
    while (a>=b):
        b = b*2
        ans+=1
if (b>=c):
    while (b>=c):
        c = c*2
        ans+=1 

if ans <=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
    elif b >= c:
        c *= 2
    K -= 1

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

Solution (Python):
import itertools
A, B, C = map(int,input().split())
K = int(input())
ans = 'No'
ls = []
for i in range(K+1):
    for j in range(K+1-i):
        l = K-i-j
        ls.append([i,j,l])
for lis in ls:
    if A*2**lis[0] < B*2**lis[1] and B*2**lis[1] < C*2**lis[2]:
        ans = 'Yes'
        break
print(ans)

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

x,y = 0,0

if A > B:
    if math.modf(math.log2(A/B))[0] != 0:
        x = math.ceil(math.log2(A/B))
    else:
        x = math.ceil(math.log2(A/B))+1
elif A == B:
    x = 1
else:
    pass

if B*(2**x) > C:
    if math.modf(math.log2((B*(2**x))/C))[0] != 0:
        y = math.ceil(math.log2((B*(2**x))/C))
    else:
        y = math.ceil(math.log2((B*(2**x))/C))+1    
elif B*(2**x) == C:
    y = 1
else:
    pass


if x + y <= K:
    print("Yes")
else:
    print("No")

Solution (Python):

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

while b <= a:
    b = b * 2
    cnt_b += 1
    if b > a:
        break
while c <= b:
    c = c * 2
    cnt_c += 1
    if c > b:
        break
if cnt_b + cnt_c <= k:
    print("Yes")
else:
    print("No")

Solution (Python):


import math

numbers = input().split(" ")
a = int(numbers[0])
b = int(numbers[1])
c = int(numbers[2])

k = int(input())



for i in range(k):
    if a < b:
        break
    b *= 2
    k -= 1

c = c * (2 ** k)

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

Solution (Python):
[a, b, c] = list(map(int, input().split()))
k = int(input())
canhe = True
passOne = False
abk = 0
bck = 0
bc = b
cc = c
while True:
    if abk > k:
        canhe = False
        break
    if bc <= a:
        bc *= 2
        abk += 1
    else:
        passOne = True
        break
if passOne:
    while True:
        if bck > k-abk:
            canhe = False
            break
        if cc <= bc:
            cc *= 2
            bck += 1
        else:
            break
if canhe:
    print("Yes")
else:
    print("No")

Solution (Python):
import bisect
import copy
import heapq
import sys
import itertools
import math
from functools import lru_cache
from collections import deque
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
mod = 10 ** 9 + 7 

def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(): return list(read_values())
def read_lists(N): return [read_list() for n in range(N)]


def main():
    A, B, C = read_values()
    K = int(input())

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


if __name__ == "__main__":
    main()

Solution (Python):
import math
A,B,C = (int(i) for i in input().split())  
K = int(input())

res = False

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


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

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

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

Solution (Python):
import itertools
import copy
A, B, C = map(int,input().split())
K = int(input())
ckList = list(itertools.product([0,1,2], repeat=K))
for i in ckList:
    numList = [copy.copy(A),copy.copy(B),copy.copy(C)]
    for j in i:
        numList[j] *= 2
    if numList[1] > numList[0] and numList[2] > numList[1]:
        print("Yes")
        exit()
print("No")

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

ans = 'No'
d = 0

for i in range(1,k+1):
    if b <= a:
        d = d + 1
        b = b * 2
    else:
        d = d
        b = b

if d == k:
    if c > b:
        ans = 'Yes'

f = k - d
g = 1

for j in range(1,f+2):
    if c <= b:
        c = c * 2
    else:
        ans = 'Yes'

print(ans)

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

flag = False
while cnt < K:
    cnt += 1
    if A >= B:
        B *= 2
    elif B >= C:
        C *= 2
    
    if A < B and B < C:
        flag = True
        break
        
        
if flag:
    print('Yes')
else :
    print('No')

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

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

if a < b:
    flg = 1

while n > 0:
    if flg == 0:
        b = b * 2
        n = n - 1
        
        if a < b:
            flg = 1
            if b < c:
                print('Yes')
                exit()
    else:
        c = c * 2
        n = n - 1
        
        if b < c:
            print('Yes')
            exit()

print('No')

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

flag = False

for i in range(k+1):
    for j in range(k+1-i):
        a1 = a*(2**i)
        b1 = b*(2**j)
        c1 = c*(2**(k-i-j))
        if c1 > b1 and b1 > a1:
            flag = True
            print('Yes')
            break
    if flag:
        break

if flag == False:
    print('No')

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

cnt = 0

while b <= a:
    b += b
    cnt += 1

while c <= b:
    c += c
    cnt += 1

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

Solution (Python):



global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    A, B, C = list(map(int, lines[0].split()))
    
    K = int(lines[1])
    
    
    
    
    
    
    
    

    for i in range(8):
        if A >= B:
            B *= 2
            K -= 1
    for i in range(8):
        if B >= C:
            C *= 2
            K -= 1
    log(f'K=[{K}]')
    if K < 0:
        ret = 'No'
    else:
        ret = 'Yes'

    return [ret]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['7 2 5', '3']
        lines_export = ['Yes']
    if pattern == 2:
        lines_input = ['7 4 2', '3']
        lines_export = ['No']
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    if mode > 0:
        log(f'lines_input=[{lines_input}]')
        log(f'lines_export=[{lines_export}]')
        log(f'lines_result=[{lines_result}]')
        if lines_result == lines_export:
            log('OK')
        else:
            log('NG')
    finished = time.time()
    duration = finished - started
    log(f'duration=[{duration}]')



if __name__ == '__main__':
    main()

Solution (Python):
red_init, green_init, blue_init = map(int, input().split())
k = int(input())
mn = 10
flag = 0
for s in range(k+1) :
    for t in range(k+1-s) :
        for u in range(k+1-s-t) :
            red = red_init
            green = green_init
            blue = blue_init
            red = red_init * (2**s)
            green = green_init * (2**t)
            blue = blue_init * (2**u)
            if red < green < blue :
                flag = 1
                break
if flag == 1 :
    print("Yes")
else :
    print("No")

Solution (Python):
from math import log,floor
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("No")
else:
    print("Yes")

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

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

if __name__ == '__main__':
    main()

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

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

c = 0

while A >= B:
    B *= 2
    c += 1

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

if c <= K:
    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:
    print("Yes")
    exit()
  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())

for _ 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())

a_new = 0
b_new = 0
c_new = 0

flag = 0

def solve():
    flag = 0
    for i in range(k+1):
        for j in range(k-i+1):
            
            l = k - i - j
            a_new = a*2**i
            b_new = b*2**j
            c_new = c*2**l
            
            if(c_new > b_new and b_new > a_new):
                flag = 1
                
                return flag
                
    
            
    return flag

flag = solve()

if(flag == 1):
    print("Yes")
else:
    print("No")

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

ans_red = 0
ans_green = 0
ans_blue = 0
for red in range(k):
    for green in range(k-red):
        blue = k - red- green
        ans_red = a * 2 ** red
        ans_green = b * 2 ** green
        ans_blue = c * 2 ** blue
        if ans_red < ans_green < ans_blue:
            print('Yes')
            exit()
        ans_red = 0
        ans_green = 0
        ans_blue = 0
print('No')

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(A: int, B: int, C: int, K: int):
    r = A
    g = B
    b = C
    
    for i in range(K):
        if r >= g:
            g *= 2
        elif g >= b:
            b*=2
    if r<g<b: print(YES)
    else:print(NO)
   
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    C = int(next(tokens))  
    K = int(next(tokens))  
    solve(A, B, C, K)

if __name__ == '__main__':
    main()

Solution (Python):


import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        for line in sys.stdin:
            lines.append(line.strip())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (a, b, c) = [int(e) for e in lines[0].split(" ")]
    k = int(lines[1])

    return (a, b, c, k)


def solve(a, b, c, k):

    a2 = a
    b2 = b
    c2 = c
    tmp = k
    while tmp > 0 and b2 <= a2:
        tmp = tmp - 1
        b2 = 2 * b2

    while tmp > 0 and c2 <= b2:
        tmp = tmp - 1
        c2 = 2 * c2

    if c2 > b2 and b2 > a2:
        result = 'Yes'
    else:
        result = 'No'
    
    return result    


def main():
    
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

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 = b*2
        continue
    if b>a and c<=b:
        c = c*2
    if b>a and c>b:
        print("Yes")
        exit()
    

print("No")

Solution (Python):
A,B,C =map(int,input().split())
K = int(input())
num = 0
for i in range(K):
    if A>=B:
        B *= 2
        num += 1
    else:
        break
for j in range(K-num):
    C *= 2
if A<B<C:
    print("Yes")
else:
    print("No")

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

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

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

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

flg = False

for i in range(k+1):
  d = 2**i*b
  e = 2**(k-i)*c
  if a < d < e:
    flg = True
    break

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

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

while A >= B:
    B = 2 * B
    count += 1

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

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

Solution (Python):



A, B, C = [ int(v) for v in input().split(" ") ]
K = int(input())


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

for i in range(K):
  if B >= C:
    C *= 2
    K -= 1
  else:
    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+1):
  if( i == K+1 ):
    break
  for j in range(K+1):
    if( i + j == K+1 ):
      break
    for k in range(K+1):
      if( i + j + k == K+1 ):
        break
      if A*(2**i) < B*(2**j) < C*(2**k):
        print("Yes")
        exit()
     
print("No")

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

ans = 'No'

def solve(a, b, c, k):
    global ans
    if a < b < c:
        ans = 'Yes'
        return

    if k == 0:
        return

    solve(a*2, b, c, k-1)
    solve(a, b*2, c, k-1)
    solve(a, b, c*2, k-1)

solve(a, b, c, k)
print(ans)

Solution (Python):
import sys
import numpy as np
import math
import collections
import copy
from collections import deque 
from functools import reduce
from itertools import product

A, B, C = map(int, input().split())
K = int(input())
for p in product((1, 2, 3), repeat=K):
    R, G, BL = A, B, C
    for pi in p:
        if pi == 1:
            R *= 2
        if pi == 2:
            G *= 2
        if pi == 3:
            BL *= 2
    if R < G < BL:
        print("Yes")
        break
else:
    print("No")

Solution (Python):

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

num = 0

while (True):
    if  (num == K):
        break
        
    if (R >= G):
        G *= 2
        num += 1
        
    if (R < G):
        break
    
while (True):
    if  (num == K):
        break
        
    if (G >= B):
        B *= 2
        num += 1
        
    if (G < B):
        break

if (R < G and G < B):
    ans = 'Yes'
    
print(ans)

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

def main():
    A, B, C, K = map(int, read().split())
    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')
    return

if __name__ == '__main__':
    main()

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

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

  
  
for i in range(K):
  if(A_list[0]>=A_list[1]):
    A_list[1] = A_list[1]*2
  elif(A_list[1]>=A_list[2]):
    A_list[2] = A_list[2]*2
  
    
    
sort_ = sorted(A_list)
set_ = sorted(list(set(A_list)))

if(A_list != set_):
  print("No")
elif(A_list == sort_):
  print("Yes")
else:
  print("No")

Solution (Python):
a, b, c = list(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("No")
else:
  print("Yes")

Solution (Python):
def main():
    A, B, C = map(int, input().split())
    K = int(input())
    
    while K>0:
        if A < B: break
        else:
            B*=2
            K-=1

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


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



    return ans

if __name__ == '__main__':
    print(main())

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

count = 0
while count < k and not (a < b < c):
    if a >= b:
        count += 1
        b = 2*b
    if b >= c:
        count += 1
        c = 2*c

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

Solution (Python):
[a, b, c] = [int(x) for x in input().split(" ")]
k = int(input())
a_b_flg = False if a >= b else True
b_c_flg = False if b >= c else True

for kdx in range(0, k):
  if not a_b_flg:
    b = b*2
  elif not b_c_flg:
    c = c*2
  a_b_flg = False if a >= b else True
  b_c_flg = False if b >= c else True
  if a_b_flg and b_c_flg:
    print('Yes')
    break
if not (a_b_flg and b_c_flg):
  print('No')

Solution (Python):
import sys

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


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

Solution (Python):



import collections
import sys
import copy
import re
import math


def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    A, B, C = LI()
    K = I()
    for i in range(K):
        if A >= B:
            B *= 2
        else:
            if B >= C:
                C *= 2
            else:
                break

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


if __name__ == '__main__':
    main()

Solution (Python):
def solve():
    A, B, C = [int(x) for x in input().split()]
    K = int(input())
    ans = False
    for i in range(K):
        red = A * 2**i
        green = B * 2**(K - i)
        blue = C
        
        if green > red and blue > green:
            ans = True
            break

        red = A
        green = B * 2**i
        blue = C * 2**(K - i)
        
        if green > red and blue > green:
            ans = True
            break

        red = A * 2**i
        green = B
        blue = C * 2**(K - i)
        
        if green > red and blue > green:
            ans = True
            break

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


if __name__ == "__main__":
    solve()

Solution (Python):
import math

def a():
    x = int(input())
    
    if x < 600:
        print(8)
    elif x<800:
        print(7)
    elif x<1000:
        print(6)
    elif x<1200:
        print(5)
    elif x<1400:
        print(4)
    elif x<1600:
        print(3)
    elif x<1800:
        print(2)
    else:
        print(1)

def b():
    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')



def c():
    pass



def d():
    pass



b()

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

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

Solution (Python):
import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array





sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    R, G, B = il()
    K = ii()

    for k in range(K):
        if B <= G:
            B *= 2
        elif G <= R:
            G *= 2

        if B > G > R:
            print('Yes')
            exit()
    else:
        print('No')


if __name__ == '__main__':
    main()

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)&(B<C)):
  print("Yes")
else:
  print("No")

Solution (Python):
from sys import *
a,b,c = map(int,stdin.readline().split())
k = int(stdin.readline())
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):
r, g, b = map(int, input().split())
k = int(input())
for i in range(k):
    if b <= r or b <= g:
        b *= 2
    elif g <= r:
        g *= 2
    else:
        b *= 2
if r < g and g < b:
    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 A < B and B < C:
    print('Yes')
else:
    print('No')

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

f = 0

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

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

ans = 0
X = [0]*3 
for i in range(K + 1):
    for j in range(K + 1 - i):
        X[0] = A*2**i
        X[1] = B*2**j
        X[2] = C*2**(K - i - j)
        if X[1] > X[0] and X[2] > X[1]:
            ans = 1
print("Yes" if ans == 1 else "No")

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

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


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

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

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

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

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

Solution (Python):
from collections import defaultdict,deque
from sys import stdin,setrecursionlimit
import heapq,bisect,math,itertools,string,queue,copy
setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, stdin.readline().split()))



def main():
    count = 0
    A,B,C = inpl()
    K = int(input())
    for i in range(K+1):
        for j in range(K+1-i):
            k = K-i-j
            a = A*(2**i)
            b = B*(2**j)
            c = C*(2**k)
            if a < b < c:
                print('Yes')
                return

    print('No')
    """while True:
        if A < B < C:
            print('Yes')
            return
        if B < A:
            B *= 2
            count += 1
            if count == K and not(A < B < C):
                print('No')
                return
        if C < B:
            C *= 2
            count += 1
            if count == K and not(A < B < C):
                print('No')
                return"""
main()

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

a = int(A)
b = int(B)
c = int(C)
k = int(K)






out = 'No'

for i in range(k+1):


  if a >= b:
    b *=2
  elif b >= c:
    c *=2
  else:
    out = 'Yes'

  

print(out)

Solution (Python):
l = list(map(int,input().split()))
r, g, b = l[0], l[1], l[2]
k = int(input())
 
for _ in range(k):
  if r >= g:
    g *= 2
  elif g >= b:
    b *= 2
 
if b > g and g > r:
  print('Yes')
else:
  print('No')

Solution (Python):
import sys

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

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

def dfs(A, B, C, i):
    if i == k:
        return ((A < B) and (B < C))
    return (dfs(A * 2, B, C, i + 1) or dfs(A, B * 2, C, i + 1) or dfs(A, B, C * 2, i + 1))

if dfs(a, b, c, 0):
    ans = "Yes"
else:
    ans = "No"

print(ans)

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

for i in range(k):
    if a >= c:
        c = 2*c
        continue
    if b >= c:
        c = 2*c
        continue
    if a >= b:
        b = 2*b
        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+1):
    bb = b * (2 ** i)
    cc = c * (2 ** (k - i))

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

print(ans)

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

Solution (Python):

import sys

sysread = sys.stdin.buffer.readline
read = sys.stdin.buffer.read

from collections import defaultdict
sys.setrecursionlimit(10**7)
import math







def run():
    A, B, C, K = map(int, read().split())
    k1 = math.ceil(math.log2(A/B))
    if math.ceil(math.log2(A / B)) == math.log2(A / B):
        k1 += 1
    if k1 < 0:
        k1 = 0
    B *= 2 ** k1
    k2 = math.ceil(math.log2(B/C))
    if math.ceil(math.log2(B/C)) == math.log2(B/C):
        k2 += 1
    if k2 < 0:
        k2 = 0

    
    if K >= k1 + k2:
        print('Yes')
    else:
        print('No')



if __name__ == "__main__":
    run()

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


for i in range (K+1):
    if R < G < B:
        print ('Yes')
        exit()
    else:
        pass
    
    if G < B:
        pass
    else:
        B*=2
        continue

    if R < G:
        pass
    else:
        G*=2
        continue

print('No')

Solution (Python):

import sys

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

for i in range(k):
    if not(c > b) or not(c > a):
        c *= 2
    elif not(b > a):
        b *= 2
    else:
        print('Yes')
        sys.exit()

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

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

    n = int(input())
    count = 0
    while a >= b:
        count+=1
        b=b*2

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

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