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

print('Yes' if dfs(0, r, g, b) else 'No')

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

    op = 0
    while not (a < b and b < c):
        if not a < b:
            b *= 2
            op += 1
        elif not b < c:
            c *= 2
            op += 1

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

if __name__ == '__main__':
    main()

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

Solution (Python):
a,b,c = map(int,input().split())
k = int(input())
for i in range(k):
  if b<=a:
    b = b*2
    continue
  elif c<=b:
    c = c*2
    continue
  else:
    break

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

Solution (Python):
a, b, c= map(int, input().split())
num= int(input())
for x in range(num):
    if a >= b and c >= a:
        b=b*2
    else:
        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())

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

Solution (Python):
a,b,c,k=map(int,open(0).read().split())
while k>0:
	if b<=a:b*=2
	else:c*=2
	k-=1
print('YNeos'[a>=b or b>=c::2])

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**8)
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 li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]





A, B, C = mi()
N = ii()

cnt = 0

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

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

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

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

Solution (Python):
a = list(map(int, input().split()))
num = int(input())
k = 0
for i in range(num):    
  if a[0] == max(a) or a[1] == max(a):   
    a[2] = a[2] * 2
    k += 1
  elif a[1] == min(a) and k < num:
    a[1] = a[1] * 2
    k += 1 
  else:
    pass

if a[0] < a[1] and a[1] < a[2]:
  print("Yes")
else:
  print("No")

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



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

if C > B and B > A:
    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'
cnt = 0
while A >= B:
    B = B * 2
    cnt += 1
while B >= C:
    C = C * 2
    cnt += 1

if cnt <= K and A < B and B < C:
    print('Yes')
else:
    print('No')

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

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


def combinations(k):
    result = []
    for b in range(k + 1):
        for c in range(k + 1 - b):
            result.append([b, c])

    return result


def magic(A, B, C, K):
    if A < B < C:
        return True

    for b_count, c_count in combinations(K):
        a, b, c = A, B, C
        if b_count > 0:
            b *= 2 ** b_count
        if c_count > 0:
            c *= 2 ** c_count

        if a < b < c:
            return True

    return False


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

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

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

if a < b and b < c:
    flag = True

print("Yes") if flag else print("No")

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


def combinations(k):
    result = []
    for b in range(k + 1):
        for c in range(k + 1 - b):
            result.append([b, c])

    return result


def magic(A, B, C, K):
    if A < B < C:
        return True

    for l in combinations(K):
        a, b, c = A, B, C
        b_count, c_count = l
        if b_count > 0:
            b *= 2 ** b_count
        if c_count > 0:
            c *= 2 ** c_count

        if a < b < c:
            return True

    return False


if (magic(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):
A, B, C = map(int, input().split())
K = int(input())
i = 0
while A >= B:
  B *= 2
  i += 1
while B >= C:
  C *= 2
  i += 1
if i > K:
  print("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
    

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

Solution (Python):



A, B, C = map(int, input().split())
K = int(input())
ret = 0
while B<=A:
    B *= 2
    ret += 1
while C<=B:
    C *= 2
    ret += 1
if ret <=K:
    print('Yes')
else:
    print('No')

Solution (Python):

def main():
    R, G, B = map(int, input().split())
    K = int(input())

    for i in range(K):
        if R >= G:
            G = G * 2
        else:
            if G >= B:
                B = B * 2
        if B > G > R:
            print("Yes")
            exit()
    print("No")
if __name__  == '__main__':
    main()

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

K = int(input())

flag = False

for i in range(0, K+1):
    for j in range(0, K+1):
        for k in range(0, K+1):
            x = A * 2**i
            y = B * 2**j
            z = C * 2**k
            

            if x < y < z and i + j + k <= K:
                flag = True


if flag == True:
    print('Yes')
else:
    print('No')

Solution (Python):

a = list(map(int, input().split()))
k = int(input())
ans = 0
for it in range(3 ** k):
    i = it
    
    a_i = [a[0], a[1], a[2]]
    cnt = 0
    while cnt < k:
        j = i % 3
        i //= 3
        
        a_i[j] *= 2
        cnt += 1
        if cnt == k:
            
            if a_i[0] < a_i[1] and a_i[1] < a_i[2]:
                ans += 1
if ans > 0:
    print("Yes")
else:
    print("No")

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

K = int(input())

flag = False

for i in range(0, K+1):
    for j in range(0, K+1):
        for k in range(0, K+1):
            x = A * 2**i
            y = B * 2**j
            z = C * 2**k
            

            if x < y < z and i + j + k <= K:
                flag = True


if flag == True:
    print('Yes')
else:
    print('No')

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

K = int(input())

count = 0
while count < K:
   if not A < B:
      B = B * 2
      count = count + 1
   elif not B < C:
      C = C * 2
      count = count + 1
   else:
      count = K

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

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

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

while A >= B:
    B = B*2
    count = count + 1
    
for i in range(K - count):
    C = C * 2

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

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())
for new_k in range(k + 1):
    for t in range(3 ** new_k):
        na = a
        nb = b
        nc = c
        nt = t
        for x in range(new_k):
            if nt % 3 == 0:
                na *= 2
            elif nt % 3 == 1:
                nb *= 2
            else:
                nc *= 2

            if na < nb < nc:
                print("Yes")
                quit(0)
            nt //= 3
print("No")

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

c = 0
while A >= B:
    B *= 2
    c += 1
    if c > K:
        print('No')
        quit()

while B >= C:
    C *= 2
    c += 1
    if c > K:
        print('No')
        quit()

print('Yes')

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

for i in range(0,k):
        if a >= b:
                b *= 2
        elif b >= c:
                c *= 2
        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())

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


print(ans)

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

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

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

Solution (Python):
cards = list(map(int,input().split()))
K = int(input())
for i in range(K):
    if cards[1]<=cards[0]:
        cards[1]*=2
        
    elif cards[2]<=cards[1]:
        cards[2]*=2
        
    else:
        break

if cards[0]<cards[1]<cards[2]:
    print('Yes')
else:
    print('No')

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

Solution (Python):
n = [int(i) for i in input().split()]
K = int(input())

for _ in range(K):
    if n[0] >= n[1]:
        n[1] = n[1] * 2
    else:
        n[2] = 2*n[2]
        

if n[2] > n[1] > n[0]:
    print('Yes')
else:
    print('No')

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n):
    res = [None] * n
    for i in range(n):
        res[i] = II()
    return res
def LIR(n):
    res = [None] * n
    for i in range(n):
        res[i] = LI()
    return res
def FR(n):
    res = [None] * n
    for i in range(n):
        res[i] = IF()
    return res
def LIR(n):
    res = [None] * n
    for i in range(n):
        res[i] = IF()
    return res
def LIR_(n):
    res = [None] * n
    for i in range(n):
        res[i] = LI_()
    return res
def SR(n):
    res = [None] * n
    for i in range(n):
        res[i] = S()
    return res
def LSR(n):
    res = [None] * n
    for i in range(n):
        res[i] = LS()
    return res
mod = 1000000007
inf = float('INF')


def solve():
    a, b, c = LI()
    k = II()
    tmp = 0
    while a >= b:
        b *= 2
        tmp += 1
    while b >= c:
        c *= 2
        tmp += 1
    print("Yes" if tmp <= k else "No")
    return



if __name__ == '__main__':
    solve()

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

for i in range(0,K+1):
    for j in range(0,K+1-i):
        for k in range(0,K+1-i-j):
            
            if(A*(2**i) < B*(2**j) and B*(2**j) < C*(2**k)):
                if(i==j==k==0):
                    pass
                else:
                    print('Yes')
                    exit()

print('No')

Solution (Python):
import sys
INF = 1 << 60
MOD = 10**9 + 7 
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    a, b, c = map(int, input().split())
    k = int(input())
    n = 0
    while a >= b:
        b <<= 1
        n += 1
    while b >= c:
        c <<= 1
        n += 1
    print("Yes" if n <= k else "No")
resolve()

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

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

print("Yes" if n>=0 else "No")

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

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

    if a < b < c:
        result = True
        break

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

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

ans = 'No'
i = 0
for i in range(K+1):
    for j in range(K+1-i):
        h = K-i-j 
        if i > 0 :
            R = A*(2**i)
        else:
            R = A
        if j > 0 :
            G = B*(2**j)
        else :
            G = B
        if h > 0 :           
            Bl = C*(2**h)
        else:
            Bl = C
        if G > R and Bl > G:
            ans = 'Yes'


print(ans)

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

for _ 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(0,K+1):
    for j in range(0,K+1):
        for h in range(0,K+1):
            if A*(2**i)<B*(2**j)<C*(2**h) and (i+j+h)<=K:
                print("Yes")
                exit()
print("No")

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

for i in range(0,k+1):
    if i == 0:
        cc = c
    else:
        cc = c*(2**i)
    
    if k-i == 0:
        bb = b
    else:
        bb = b*(2**(k-i))
    
    if cc > bb and bb > a:
        key = 1
        break

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

Solution (Python):
a,b,c,k=map(int,open(0).read().split())
while a>=b:b+=b;k-=1
while b>=c:c+=c;k-=1
print('YNeos'[k<0::2])

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

count = 0
if g*(2**k)>r:
    while g<=r:
        g*=2
        count += 1
else:
    print("No")
    sys.exit(0)

if b*(2**(k-count))>g:
    print("Yes")
else:
    print("No")

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

Solution (Python):
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())

A,B,C = MI()
K = I()

a = 0  
while B <= A:
    B *= 2
    a += 1
while C <= B:
    C *= 2
    a += 1

print('Yes' if a <= K else 'No')

Solution (Python):
import sys


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

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

    for i in range(K + 1):
        len_j = K - i
        if len_j > 0:
            for j in range(len_j + 1):
                len_k = len_j - j
                if len_k > 0:
                    for k in range(len_k + 1):
                        a = A * 2 ** i
                        b = B * 2 ** j
                        c = C * 2 ** k
                        if a < b < c:
                            print('Yes')
                            exit()
    print('No')


resolve()

Solution (Python):
a,b,c,k=map(int,open(0).read().split())
while a>=b:b*=2;k-=1
while b>=c:c*=2;k-=1
print('YNeos'[k<0::2])

Solution (Python):
a,b,c=map(int,input().split())
k=int(input())
if a<b:
    if b<c:
        print('Yes')
    else:
        count=0
        while b>=c:
            c*=2
            count+=1
        if count<=k:
            print('Yes')
        else:
            print('No')
else:
    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):
import math
A, B, C = map(int, input().split())
K = int(input())
x = 0
if A < B < C:
  print("Yes")
if A >= B:
  x = math.ceil(math.log(A/B, 2))
  B =B*(2**x)
  if A != B:
    if x > K:
      print("No")
    elif B < C:
      print("Yes")
  else:
    x += 1
    B = B*2
if B >= C:
  y = math.ceil(math.log(B/C, 2))
  C = C*(2**y)
  if B != C:
    if x+y > K:
      print("No")
    else:
      print("Yes")
  else:
    y += 1
    if x+y > K:
      print("No")
    else:
      print("Yes")

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

Solution (Python):
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))



A,B,C = LI()
K = I()

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    A, B, C = map(int, rl().split())
    K = int(rl())
    
    while K:
        if A < B:
            break
        B *= 2
        K -= 1
    while K:
        if B < C:
            break
        C *= 2
        K -= 1
    
    print('Yes' if A < B < C else 'No')


if __name__ == '__main__':
    solve()

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

for i in range(0,K+1):
    for j in range(0,K+1-i):
        for k in range(0,K+1-i-j):
            
            if(A*(2**i) < B*(2**j) and B*(2**j) < C*(2**k)):

                print('Yes')
                exit()

print('No')

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

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

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

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

Solution (Python):
x = input()
k = int(input())
x = x.split()
y = [int(s) for s in x]
dict = {"red":0, "green":0}
dict["red"] = y[0]
dict["green"] = y[1]
count = 0
if dict["red"] < dict["green"]:
      pass
else:
  for N in range(k):
    count += 1
    dict["green"] = dict["green"] * 2
    if dict["red"] < dict["green"]:
        break
    else:
        continue
dict["blue"] = y[2]
if k - count == 0:
  if dict["green"] > dict["blue"]:
    pass
  else:
    print("Yes")
    exit()
else:
  pass
i = k - count
if dict["green"] < dict["blue"]:
  print("Yes")
  exit()
else:
  for N in range(i):
    dict["blue"] = dict["blue"] * 2
    if dict["green"] < dict["blue"]:
      print("Yes")
      exit()
    else:
        continue
print("No")

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

k = int(input())

ans = 0

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

Solution (Python):
a,b,c=map(int, input().split())
d=int(input())
ans="No"
k=0
for i in range(d+1):
    b2=b*(2**(d-k))
    c2=c*(2**(k))
    if(a<b2<c2):
        ans="Yes"
    k+=1
print(ans)

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

Solution (Python):
a, b, c = map(int, input().split())
aa, bb, cc = a, b, c
p = 0
q = 1
k = int(input())

for i in range(1,k + 2):
    a, b, c = aa, bb, cc
    b = b * (2 ** (k - i + 1))
    c = c * (2 ** (i - 1))
    if c <= 0:
        c = cc
    if b <= 0:
        b = bb
    if a < b and b < c:
        p += 1

if p != 0:
    print("Yes")
else:
    print("No")

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

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

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

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

    
  
for i in range(K+1):
  num = K-i
  for j in range(num+1):
    num2 = num-j
    if A*2**i<B*2**j:
      if B*2**j<C*2**num2:
        print("Yes")
        flag = False
        break
  if flag ==False:
    break
        
if flag == True:
  print('No')

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

a,b,c = map(int,readline().split())
k = int(readline())
ct = 0
while a >= b:
    b*= 2
    ct += 1

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

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

Solution (Python):
def solve():
    A,B,C=map(int,input().split())
    K=int(input())
    flag=False
    for i in range(0,K+1):
        for j in range(0,K-i+1):
            for k in range(0,K-i-j+1):
                if 2**i*A<2**j*B<2**k*C:
                    flag=True
                    break
    if flag:
        print("Yes")
    else:
        print("No")
if __name__=="__main__":
    solve()

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

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

if a<b and b<c and i<=k:
    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 a < b and b < c:
    print("Yes")
else:
    print("No")

Solution (Python):

import sys,io,os,time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"

input = sys.stdin.readline


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


def f(a,b,c,k):
	if k < 0:
		return False
	if a < b < c:
		return True
	ll = False
	ll |= f(a*2,b,c,k-1)
	ll |= f(a,b*2,c,k-1)
	ll |= f(a,b,c*2,k-1)
	return ll
if f(a,b,c,k):
	print("Yes")
else:
	print("No")

Solution (Python):
import sys
A, B, C = map(int,input().split())
k = int(input())
count=0
for i in range(k):
    if A>=B:
        count+=1
        B=B*2
    if B>=C:
        count+=1
        C=C*2

if count>k or not(B<C and A<B):
    print('No')
else:
    print('Yes')

Solution (Python):
A, B, C = [int(n) for n in input().split()]
K = int(input())
ans = 'No'
for i in range(K+1):
    for j in range(K+1):
        if A < B<<i < C<<j and i+j<=K:
            ans = 'Yes'
            break
print(ans)

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

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

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

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

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

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

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

Solution (Python):

def Msol_B_():
    a,b,c = list(map(int,input().split()))
    K = int(input())

    for i in range(8):
        if K==0:
            print('No')
            return 
        if a >= b:
            b *= 2
            K -= 1
        if a < b:
            break
    for i in range(8):
        if  K ==0:
            print('No')
            return
        if b >= c:
            c *= 2
            K -= 1
        if b < c:
            print('Yes')
            return
    print('No')



Msol_B_()

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

for k in range(K):
    b = K - k
    g = k

    if A < B * 2 ** g < C * 2 ** b:
        print("Yes")
        exit()
else:
    print("No")

Solution (Python):
X = list(map(int,input().split()))
A = X[0]
B = X[1]
C = X[2]
K = int(input())
cnt = 0
if A >= B:
  for i in range(7):
   B = B*2
   cnt = cnt + 1
   if A < B:
    break
if B >= C:
  for j in range(7):
   C = C*2
   cnt = cnt + 1
   if B < C:
    break
if cnt <= K:
  print('Yes')
else:
  print('No')

Solution (Python):
import math
r, g, b = [int(k) for k in input().split()]
k = int(input())
i = 0
while True:
    if b <= g or b <= r:
        b *= 2
    elif g <= r:
        g *= 2
    i += 1
    if i <= k:
        if b > g > r:
            print('Yes')
            break
    else:
        print('No')
        break

Solution (Python):
import itertools
import sys
input1 = list(map(int, input().split()))
input_A = input1[0]
input_B = input1[1]
input_C = input1[2]
K = int(input())

def check(r, g, b):
    if g > r and b > g:
        return True
    else:
        return False

def magic(card):
    return card * 2

mylist = [0, 1, 2]
for cards in itertools.product(mylist, repeat=K):
    A = input_A
    B = input_B
    C = input_C
    for itr in cards:
        if itr == 0:
            A = magic(A)
        elif itr == 1:
            B = magic(B)
        elif itr == 2:
            C = magic(C)
        if(check(A, B, C)):
            print('Yes')
            sys.exit()
        
print('No')

Solution (Python):
def main():
    a, b, c = map(int, input().split())
    k = int(input())
    for i in range(1, k+2):
        if a < b and b < c:
            print("Yes")
            return 0
        
        elif i == k+1:
            print("No")
            return 0

        elif c <= a or c <= b:
            c = c * 2

        elif b <= a:
            b = b * 2

main()

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



i = max(math.ceil(math.log2((A+1)/B)),0)
K -= i
B = B * (2 ** i)
j = max(math.ceil(math.log2((B+1)/C)),0)
K -= j
C = C * (2 ** j)
if K >= 0:
    print("Yes")
else:
    print("No")

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

ans_list = []
def doble_calc(value, num):
    if num == 1:
        return value
    elif num == 2:
        return value*2
    elif num == 3:
        return value*2*2
    elif num == 4:
        return value*2*2*2
    elif num == 5:
        return value*2*2*2*2
    elif num == 6:
        return value*2*2*2*2*2
    elif num == 7:
        return value*2*2*2*2*2*2
    
for i in range(1, k+2):
    for j in range(1, k+2):
        for l in range(1, k+2):
            if i + j + l == k+3:
                red_calc = doble_calc(red, i)
                green_calc = doble_calc(green, j)
                blue_calc = doble_calc(blue, l)
                ans_list.append([red_calc, green_calc, blue_calc])
            
for i in ans_list:
    if i[0] < i[1] < i[2]:
        print('Yes')
        break
else:
    print('No')

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

n=0

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

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

    if (A < B * 2 ** K) and (B * 2 ** K < C * 2 ** a):
        count +=1
    K -=1
    a +=1

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

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

m = 0
n = 0

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

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

if k >= m + n:
  print("Yes")
else:
  print("No")

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

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

for i in range(K):
    if list[0]<list[1]<list[2]:
        break
    if list[1]>=list[2]:
        list[2]=2*list[2]
        continue
    elif list[0]>=list[1]:
        list[1]=2*list[1]

if list[0]<list[1]<list[2]:
    print("Yes")
else:
    print("No")