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 = lambda: sys.stdin.readline().rstrip("\r\n")

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

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

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

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

Solution (Python):

import sys
import numpy as np

YES = "Yes"  
NO = "No"  

def judge(A, B, C):
    return (B>A and C>B)

def solve(A: int, B: int, C: int, K: int):

    for i in range(K+1):
        for j in range(K-i+1):
            for k in range(K-i-j+1):
                aa = A*(2**i)
                bb = B*(2**j)
                cc = C*(2**k)
                if judge(aa,bb,cc):
                    print(YES)
                    return

    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

input = sys.stdin.readline

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


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

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

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

a,b,c = inpl()
K = inp()
for i in range(8):
    for j in range(8):
        for k in range(8):
            if i+j+k > K: 
                continue
            na = a*2**i
            nb = b*2**j
            nc = c*2**k
            if nb > na and nc > nb:
                print('Yes')
                quit()
print('No')

Solution (Python):
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def exit(*argv, **kwarg):
    print(*argv, **kwarg)
    sys.exit()


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))



def a_int(): return int(read())


def ints(): return list(map(int, read().split()))


def read_col(H):
    '''H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) 
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_tuple(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_matrix(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    


MOD = 10**9 + 7
INF = 2**31  

from collections import defaultdict, Counter, deque
from operator import itemgetter, xor, add
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  
from functools import reduce

A, B, C = ints()
K = a_int()


for a in range(K + 1):
    for b in range(a, K + 1):
        if a + b > K:
            break
        c = K - a - b
        if A * pow(2, a) < B * pow(2, b) < C * pow(2, c):
            exit('Yes')
print('No')

Solution (Python):
A,B,C = map(int,input().split())
K = int(input())
a,b,c = A,B,C
n = 0
while a >= b:
    b *= 2
    n += 1
    if n > K:
        print("No")
        exit()

while b >= c:
    c *= 2
    n += 1
    if n > K:
        print("No")
        exit()
print("Yes")

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

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

Solution (Python):
import sys
 
def main():
  a,b,c = map(lambda x: int(x), input().split())
  k = int(input())
 
  for _ in range(k):
      if b <= a:
          b = 2 * b
          continue
      if c <= b:
          c = 2 * c
          continue
      print('Yes')
      return
 
  if (a < b) & (b < c):
      print('Yes')
      return
  print('No')
 
if __name__ == '__main__':
    main()

Solution (Python):


import os
import sys
from collections import *
from queue import *
import math
def main():
	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 and b<c:
		print("Yes")
	else:
		print("No")

if __name__ == '__main__':
	
	
	main()

Solution (Python):

import sys, re
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log,floor
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a,b,c = MAP()

k = INT()

z = 0

for i in range(100):
    if(b>a):
        break
    b*=2
    z+=1

for i in range(1000):
    if(c>b):
        break
    c*=2
    z+=1

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

Solution (Python):
[r, g, b] = map(int,input().split(' '))
K = int(input())
loop = 1
flag = False

while loop <= K+1:
  if b <= r or b <= g:
    b*=2
    loop += 1
    continue
  if g <= r:
    g*=2
    loop += 1
    continue
  if r < g < b:
    flag = True
    break
  loop += 1
  
if flag:
  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 a < b:
    break
  b *= 2
  
  cnt += 1

for i in range(k - cnt):
  if b < c:
    break
  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 j in range(k-i):
        if a*2**i < b*2**j <c*2**(k - i - j):
            print("Yes")
            exit()
print("No")

Solution (Python):
def judge(red, green,blue):
    if blue > green:
        if green > red:
            return (True)
    else:
        return(False)


def main():
    red, green, blue  = map(int, input().split())
    K = int(input())

    while(K > 0):
        if green <= red:
            green *= 2
            K -= 1
            continue
        if blue <= green:
            blue *= 2
            K -= 1
            continue
        if judge(red, green, blue):
            break
        
    if judge(red, green, blue):
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

Solution (Python):


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

k = int(input())

for c_i in range(k+1):
    
    for b_i in range(k-c_i+1):
        t_c = c*(2**c_i)
        t_b = b*(2**b_i)
        t_a = a*(2**(k-b_i-c_i))
        
        
        
        if t_c > t_b > t_a:
            print("Yes")
            exit(0)

print("No")

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

rest = k
while True:
    if rest == 0 or (a < b and b < c):
        break

    if a >= b:
        b *= 2
        rest -= 1
        continue
    
    if a >= c or b >= c:
        c *= 2
        rest -= 1
        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 _ in range(k):
  if a<b<c:
    print('Yes')
    exit()
  elif a>=b:
    b=b*2
  else:
    c=c*2
if a<b<c:
  print('Yes')
else:
  print('No')

Solution (Python):
A, B, C = list(map(int, input().split()))
K = int(input())
flag = False
for i in range(K):
    b = (2 ** i) * B
    c = (2 ** (K - i)) * C
    if A < b < c:
        flag = True
if flag:
    print('Yes')
else:
    print('No')

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












def dfs(i ,r,g,b):
    if i>k:
        return False
    if r<g<b:
        return True
    if dfs(i+1,r*2,g,b): return True
    if dfs(i+1,r,g*2,b): return True
    if dfs(i+1,r,g,b*2): return True

    return False

if dfs(0,r,g,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
	b*=2
	cnt+=1
for i in range(k-cnt):
	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 = b*2
    elif c <= b:
        c = c*2
    if c > b > a:
        print("Yes")
        break
    if i+1 == k:
        print("No")

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


cnt = 0

while not(b > a):
    b *= 2
    cnt += 1

while not(c > b):
    c *= 2
    cnt += 1

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

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())
ans = "No"
for ia in range(k + 1):
    for ib in range(k + 1):
        for ic in range(k + 1):
            if ia + ib + ic > k:
                break
            if (b * 2 ** ib > a * 2 ** ia) and (c * 2 ** ic > b * 2 ** ib):
                ans = "Yes"
print(ans)

Solution (Python):


A, B, C = map(int, input().split())
K = int(input())
i = 0
while i < K:
  if A >= B:
    B *= 2
    i += 1
  else:
    break
while i < K:
  if B >= C:
    C *= 2
    i += 1
  else:
    break


if A < B and B < C:
  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
        if k < 0:
            print('No')
            exit()
    while c <= b:
        c *= 2
        k -= 1
        if k < 0:
            print('No')
            exit()
    if a < b < c:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Solution (Python):

import sys
red,green,blue=map(int,input().split())
k=int(input())
for i in range(k+1):
  if red<green<blue:
    print('Yes')
    sys.exit()
  elif green<=red:
    green*=2
  elif blue<=green:
    blue*=2
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
  if(a<=b and b<=c):
      c*=2
      continue


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

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

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

K2 = 0
if B>A:
    if C>B:
        pass
    else:
        while B>=C:
            C = C*2
            K2 = K2 +1
            if C>B:
                break
else:
    while A>=B:
        B = B*2
        K2 = K2 +1
        if B>A:
            break
    if C>B:
        pass
    else:
        while B>=C:
            C = C*2
            K2 = K2 +1
            if C>B:
                break

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

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

while k>0 and b <= a:
    b*=2
    k-=1
while k>0 and c <=b:
    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())
while B<=A:
  B=B*2
  K=K-1
while C<=B:
  C=C*2
  K=K-1
if K>=0: 
  print ('Yes')
else:
  print ('No')

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

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

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

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

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

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

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






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

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

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

def F(d):
    for i in range(K):
        for j in range(K - i):
            for k in range(K - i - j+1):
                a = A*2**i
                b = B*2**j
                c = C*2**k
                
                if a<b and b<c:
                    d = 1
                    return "Yes"
    if d ==0:
        return "No"

print(F(0))

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

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

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

    if a>=b:
        b*=2
    elif b>=c:
        c*=2
    elif b>a and c>b:
        break
    cnt+=1


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

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

for a in range(K+1):
    for b in range(K+1):
        c = K - (a + b)
        if (c >= 0) and (a + b + c <= K):
            if ((2**a)*A < (2**b)*B) and ((2**b)*B < (2**c)*C):
                print('Yes')
                exit()

print('No')

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

ans=0

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

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

Solution (Python):

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


L = list(itertools.product(range(3), repeat=K))

flag = 0
for l in L:
  if flag ==1:
    break
  a = copy.deepcopy(A)
  b = copy.deepcopy(B)
  c = copy.deepcopy(C)
  for k in range(K):
    
    if l[k] ==0:
      a *=2
    elif l[k] ==1:
      b *=2
    else:
      c *=2
    
    
    if a<b and b<c:
      
      print("Yes")
      flag = 1
      break
    
  
if flag ==0:
  print("No")

Solution (Python):
def resolve():
    A, B, C = list(map(int, input().split()))
    K = int(input())
    cnt = 0
    while cnt < K:
        if A >= B:
            B *= 2
            cnt += 1
            continue
        if B >= C:
            C *= 2
            cnt += 1
            continue
        cnt += 1
    if A < B < C:
        print('Yes')
    else:
        print('No')
    return

resolve()

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

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


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

Solution (Python):
a,b,c=(int(x) for x in input().split())
k=int(input())
flag=True
for i in range(k+1):
    if a<2**(k-i)*b and 2**(k-i)*b<2**i*c:
        print("Yes")
        exit()
        flag=False
        break
if flag:
    print("No")

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

while k > 0:
  if not b > a:
    b *= 2
    k -= 1
  elif not c > b:
    c *= 2
    k -= 1
  else:
    ans = "Yes"
    break

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

print(ans)

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

ans = 'No'

for _ in range(k):
    if b >= c:
        c *= 2
    elif a >= b:
        b *= 2
    if a < b < c:
        ans = 'Yes'
        break

print(ans)

Solution (Python):

import sys
input = sys.stdin.readline  
A,B,C = map(int, input().split())
K = int(input())

count =0
for i in range(20):
    if count >=K:
        break
    else:
        if A >=B:
            B *=2
            count +=1
            continue
        if B >=C:
            C *=2
            count +=1
        if A < B <C:
            print("Yes")
            sys.exit()
        
print("No")

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

def Base_to_3(X):
    if(int(X/3)):
        return Base_to_3(int(X/3))+str(X%3)
    return str(X%3)

for i in range(3**k):
    comb = Base_to_3(i)
    red = a*(2**comb.count('0'))
    green = b*(2**comb.count('1'))
    blue = c*(2**comb.count('2'))
    if red < green and green < blue:
        print('Yes')
        exit()

print('No')

Solution (Python):
def II(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
A,B,C=MI()
K=II()
i=0
while A>=B:
  B*=2
  i+=1
  if i>K:
    print('No')
    exit()
while B>=C:
  C*=2
  i+=1
  if i>K:
    print('No')
    exit()
print('Yes')

Solution (Python):
import sys

a, b, c = map(int, input().split())
k = int(input())
for x in range(k+1):
    for y in range(x, k+1):
        if a * (2**x) < b * (2**(y-x)) < c* (2**(k-x-y)):
            print("Yes")
            sys.exit()
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
        else:
            if B >= C:
                C *= 2
    if A < B and B < C:
        print('Yes')
    else:
        print('No')
main()

Solution (Python):
abc = list(map(int,input().split()))
a = abc[0]
b = abc[1]
c = abc[2]
k = int(input())

for i in range(4):
    if 2 ** i * b > a:
        n0 = i
        break

if 2 ** (k-n0) * c > 2 ** n0 * b:
    ans = "Yes"
else:
    ans = "No"
    
print(ans)

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

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

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

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

Solution (Python):
import sys

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

x=0
for i in range(K):
  if B > A:
    break
  B = B*2
  x += 1
  if i == K-1:
    ans = 'No'
    print(ans)
    sys.exit()

ans = 'Yes' if C*2**(K-x) > B else 'No'

print(ans)

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

Solution (Python):
input_ = input()
a = int(input_.split(' ')[0])
b = int(input_.split(' ')[1])
c = int(input_.split(' ')[2])
k = int(input())
count = 0
ans = "No"
while count < k:
  if a >= b:
    b *= 2
    count += 1
  elif b >= c:
    c *= 2
    count += 1
  if a < b and b < c:
    ans = "Yes"
    break

print(ans)

Solution (Python):
A, B, C=map(int, input().split())
K=int(input())
K1=K
ans="No"
if A >= B:
    for i in range(K1):
        K=K-1
        B=B*2
        if B > A:
            break

K2=K
if K2==0 and C > B:
    ans="Yes"

for j in range(K2):
    K=K-1
    C=C*2
    if C > B:
        ans="Yes"
        break

print(ans)

Solution (Python):
abc = input().split()
r = int(abc[0])
g = int(abc[1])
b = int(abc[2])
k = int(input())

while k > 0 and g <= r:
    k -= 1
    g *= 2
while k > 0 and b <= g:
    k -= 1
    b *= 2
if r < g < b:
    print("Yes")
else:
    print("No")

Solution (Python):


ta, tb, tc = map(int, input().split())
k = int(input())

def dfs(s):
    a = ta
    b = tb
    c = tc
    if len(s) == k:
        
        for i in range(k):
            if 'A' == s[i]:
                a *= 2
            elif 'B' == s[i]:
                b *= 2
            elif 'C' == s[i]:
                c *= 2
        if c > b > a:
            print('Yes')
            exit(0)
        return
    dfs(s+'A')
    dfs(s+'B')
    dfs(s+'C')

dfs('')

print('No')

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

tag=False
for i in range(K+1):
    for j in range(K-i+1):
        for k in range(K-i-j+1):
            if (b*(2**j)) > (a*(2**i)) and (c*(2**k)) > (b*(2**j)):
                tag=True
if tag:
    print("Yes")
else:
    print("No")

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

while r>=g:
  g*=2
  count=count-1

while g>=b:
  b*=2
  count=count-1

if count>=0:
  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 A >= B:
    B *= 2
    cnt += 1
  else:
    break
    
while cnt <= K:
  if B >= C:
    C *= 2
    cnt += 1
  else:
    Ans = "Yes"
    break

print(Ans)

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

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

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

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

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

Solution (Python):
import sys
import itertools
sys.setrecursionlimit(10000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy

a,b,c = map(int,input().split())
k = int(input())
cnt = 0
while True:
    if cnt == k:
        break
    if c<=b:
        c = 2*c
    elif b<=a:
        b = 2*b
    cnt+=1
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(0,k+1):
  if a<b*(2**i)<c*(2**(k-i)):
    print('Yes')
    exit()
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):
card = input().split(" ")
turn = int(input())

red = int(card[0])
green = int(card[1])
blue = int(card[2])

for i in range(turn):
  if green <= red:
    green = green*2
  elif blue <= green:
    blue = blue*2

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

Solution (Python):
red, green, blue = map(int, input().split())

magic = int(input())

for i in range(magic) :
    if red >= green :
        green = green * 2
    elif green >= blue :
        blue = blue * 2
    
    if blue > green and green > red :
        break

if blue > green and green >red :
    print("Yes")
else :
    print("No")

Solution (Python):
a,b,c = map(int, input().split())
x = int(input())
for _ in range(x):
    if a >= b:
        b *= 2
    elif b >= c:
        c *= 2

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

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

while k:
    if r < g:
        break

    g *= 2
    k -= 1

while k:
    if g < b:
        break

    b *= 2
    k -= 1

ans = 'No'
if r < g < b:
    ans = 'Yes'

print(ans)

Solution (Python):
A,B,C=map(int,input().split())
K=int(input())
a=K
while A>=B:
    B*=2
    a-=1

    
while B>=C:
    C*=2
    a-=1
    
if a>=0:
    print('Yes')
else:
    print('No')

Solution (Python):
from queue import deque

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

que = deque([(A, B, C, K)])
visited = set()

while que:
    a, b, c, k = que.pop()
    if (a, b, c, k) in visited or k < 0:
        continue
    visited.add((a, b, c, k))
    if k == 0 and a < b < c:
        print('Yes')
        exit()
    que.append((a*2, b, c, k-1))
    que.append((a, b*2, c, k-1))
    que.append((a, b, c*2, k-1))
print('No')

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

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

Solution (Python):


"""
Created on Sat Jul 25 20:54:45 2020

@author: naoki
"""

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

for i in range(0,8):
    for j in range(0,8):
        for k in range(0,8):
            Aa = A * 2**i
            Ba = B * 2**j
            Ca = C * 2**k
            
            if i+j+k <= K and Aa < Ba and Ba < Ca:
                print("Yes")
                sys.exit()
print("No")

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

for i in range(K+1):
  _B = B * (2 ** i)
  if A < _B:
    for j in range(K+1-i):
      _C = C * (2 ** j)
      if _B < _C:
        print('Yes')
        break
    else:
      continue
    break
else:
  print('No')

Solution (Python):
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math as M
MOD=10**9+7
import sys

a,b,c=INPUT()
x=int(input())
bool=True
if b<=a:
    while(b<=a and x>0):
        b*=2
        x-=1
    if b>a:
        if b>=c:
            while(b>=c and x>0):
                c*=2
                x-=1
            if x<0 or c<=b:
                bool=False
    else:
        bool=False
else:
    if b>=c:
        while(b>=c and x>0):
            c*=2
            x-=1
        if x<0 or c<=b:
            bool=False
    
if bool is True:
    print("Yes")
else:
    print("No")

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

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

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


for i in range(K):
  
  if(B<=G):
    B*=2
    continue
  if(G<=R):
    G*=2
    continue

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 b >= c:
    c *= 2
  elif a >= b:
    b *= 2
  else:
    c *= 2

if (b > a) and (c > b):
  result = "Yes"
else:
  result = "No"
    
print(result)