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 bisect
import sys
import math
from collections import deque
from heapq import heappush, heappop

def sRaw():
    return input().rstrip("\r")


def iRaw():
    return int(input())


def ssRaw():
    return input().split()


def isRaw():
    return list(map(int, ssRaw()))


INF = 1 << 29

DIV = (10**9) + 7


def mod_inv_prime(a, mod=DIV):
    return pow(a, mod-2, mod)


def mod_inv(a, b):
    r = a
    w = b
    u = 1
    v = 0
    while w != 0:
        t = r//w
        r -= t*w
        r, w = w, r
        u -= t*v
        u, v = v, u
    return (u % b+b) % b


def CONV_TBL(max, mod=DIV):
    fac, finv, inv = [0]*max, [0]*max, [0]*max
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2, max):
        fac[i] = fac[i-1]*i % mod
        inv[i] = mod - inv[mod % i] * (mod//i) % mod
        finv[i] = finv[i-1]*inv[i] % mod

    class CONV:
        def __init__(self):
            self.fac = fac
            self.finv = finv
            pass

        def ncr(self, n, k):
            if(n < k):
                return 0
            if(n < 0 or k < 0):
                return 0
            return fac[n]*(finv[k]*finv[n-k] % DIV) % DIV

    return CONV()


def cumsum(As):
    s = 0
    for a in As:
        s += a
        yield s


sys.setrecursionlimit(200005)


def dijkstra(G,start=0):
    heap = []
    cost = [INF]*len(G)
    heappush(heap,(0,start))
    while len(heap)!=0:
        c,n = heappop(heap)
        if cost[n] !=INF:
            continue
        cost[n]=c
        for e in G[n]:
            ec,v = e
            if cost[v]!=INF:
                continue
            heappush(heap,(ec+c,v))
    return cost


def main():
    A,B,C = isRaw()
    K = iRaw()
    for k in range(K):
        if B<=A:
            B*=2
        else:
            C*=2
    if B>A and C>B:
        print("Yes")
    else:
        print("No")
main()

Solution (Python):
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext

def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    a, b, c = i_map()
    k = i_input()

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

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

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

if __name__ == '__main__':
    main()

Solution (Python):
import sys
import math
import bisect

def main():
    a, b, c = map(int, input().split())
    k = int(input())
    while b <= a and k > 0:
        b <<= 1
        k -= 1
    while c <= b and k > 0:
        c <<= 1
        k -= 1
    if a < b and b < c:
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()

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

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

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

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

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

Solution (Python):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

in_n = lambda: int(readline())
in_nn = lambda: map(int, readline().split())
in_s = lambda: readline().rstrip().decode('utf-8')
in_nl = lambda: list(map(int, readline().split()))
in_nl2 = lambda H: [in_nl() for _ in range(H)]
in_map = lambda: [s == ord('.') for s in readline() if s != ord('\n')]
in_map2 = lambda H: [in_map() for _ in range(H)]
in_all = lambda: map(int, read().split())


def main():

    A, B, C = in_nn()
    K = in_n()

    cnt = 0

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

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

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


if __name__ == '__main__':
    main()

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

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

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

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

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

if __name__ == "__main__":
    main()

Solution (Python):

from collections import defaultdict, deque, Counter, OrderedDict
from bisect import bisect_left, bisect_right
from functools import reduce, lru_cache
from heapq import heappush, heappop, heapify

import itertools, bisect
import math, fractions
import sys, copy

def L(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline().rstrip())
def S(): return list(sys.stdin.readline().rstrip())
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return [list(x) for x in sys.stdin.readline().split()]
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def LIR1(n): return [LI1() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
def LR(n): return [L() for _ in range(n)]

alphabets = "abcdefghijklmnopqrstuvwxyz"

sys.setrecursionlimit(1000000)
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
MOD = 1000000007

def main():
    A, B, C = LI()
    K = I()

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

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
import math
import collections
import decimal
import itertools
from collections import deque
from functools import reduce
import heapq
import copy

a, b, c = map(int, sys.stdin.readline().split())



k = int(input())

d = 0
while (True):
    if b > a:
        break
    else:
        b *= 2
        d += 1

while (True):
    if c > b:
        break
    else:
        c *= 2
        d += 1

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

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

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

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

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)
A, B, C = map(int, input().split())
K = int(input())
def dfs(x, y, z, k):
  if k == 0:
    return x < y < z
  res = False
  res |= dfs(x * 2, y, z, k - 1)
  res |= dfs(x, y * 2, z, k - 1)
  res |= dfs(x, y, z * 2, k - 1)
  return res
if dfs(A, B, C, K): print("Yes")
else: print("No")

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

    ans = 0
    while a >= b:
        b *= 2
        ans += 1
    while b >= c:
        c *= 2
        ans += 1
    if k>=ans:
        print("Yes")
    else:
        print("No")
resolve()

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


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

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

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

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


if __name__ == '__main__':
    resolve()

Solution (Python):
import itertools

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

flag = False

for arr in list(itertools.product([0,1,2], repeat=k)):
    temp = [a,b,c]
    for i in range(k):
        temp[arr[i]] = temp[arr[i]]*2

        if temp[0] < temp[1] and temp[2] > temp[1]:
            flag = True

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

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

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

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

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

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

        else:
            b *= 2

    ans += 1

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

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

for k in range(K+1):
    if A>=B:
        B *= 2
        continue
    if B>=C:
        C *= 2
        continue
    print('Yes')
    break
else:
    print('No')

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

i_b = 0
while b <= a:
    i_b += 1
    b *= 2

i_c = 0
while c <= b:
    i_c += 1
    c *= 2

if i_b + i_c <= k:
    print ('Yes')
else:
    print('No')

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

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

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

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

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

cnt = 0

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

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

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

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

a,b,c = na()
k = ni()

for i in range(k+1):
    if a >= b:
        b*=2
    elif b >= c:
        c*=2
    else:
        print('Yes')
        exit()

print('No')

Solution (Python):






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

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

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

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

K = int(input())

rest = K
while A >= B and rest > 0:
    B *= 2
    rest -= 1
while B >= C and rest > 0:
    C *= 2
    rest -= 1

if rest >= 0 and A < B and B < C:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
from math import gcd

from math import factorial as f

from math import ceil, floor, sqrt
import math

import bisect
import re
import heapq

from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

yes = "Yes"
no = "No"


def main():
    a, b, c = mi()
    k = ii()
    cnt = 0
    while b <= a:
        cnt += 1
        b *= 2
    while c <= b:
        cnt += 1
        c *= 2
    if k < cnt:
        print(no)
    else:
        print(yes)


main()

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

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

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

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

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

Solution (Python):
import sys
import math


def input():
    return sys.stdin.readline().rstrip()


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






if __name__ == "__main__":
    main()

Solution (Python):
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
count = 0
ans = "No"

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

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

Solution (Python):
import io
import os

from collections import Counter, defaultdict, deque


def solve(A, B, C, K):
    k = 0
    while A >= B:
        B *= 2
        k += 1
    while B >= C:
        C *= 2
        k += 1
    assert A < B < C
    if k <= K:
        return "Yes"
    return "No"


if __name__ == "__main__":
    input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
    A, B, C = [int(x) for x in input().split()]
    K, = [int(x) for x in input().split()]  

    ans = solve(A, B, C, K)
    
    print(ans)

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

Solution (Python):
import os
import sys
import math
import heapq
from decimal import *
from io import BytesIO, IOBase
from collections import defaultdict, deque

def r():
    return int(input())
def rm():
    return map(int,input().split())
def rl():
    return list(map(int,input().split()))

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

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

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]

def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  a,b,c=LI()
  k=I()
  for _ in range(k):
    if a<b<c:
      return 'Yes'
    if a>=b:
      b*=2
    elif b>=c:
      c*=2

  if a<b<c:
    return 'Yes'
  return 'No'


print(main())

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

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

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

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

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

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

Solution (Python):
import sys


def _i(): return int(sys.stdin.readline().strip())


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


def main():
    a, b, c = _ia()
    k = _i()

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

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

    return "Yes" if cnt <= k else "No"


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

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

Solution (Python):
if __name__ == "__main__":
    a , b , c = map(int,input().split())
    k = int(input())
    cnt = 0
    while b<=a:
        cnt += 1
        b *= 2
    while c<=b:
        cnt += 1
        c *= 2

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

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

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

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

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

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

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

Solution (Python):
import sys
range = xrange
input = raw_input

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

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

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

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

Solution (Python):

import math 






    






mod = int(1e9+7)

INF = 1<<50

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

def main():
    a,b,c = readInt()
    k = int(input())
    res = 0
    while b<=a:
        b *= 2
        res += 1
    while c<=b:
        c *= 2
        res += 1
    if res<=k:
        print("Yes")
    else:
        print("No")
    return

if __name__=='__main__':
    main()

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

Solution (Python):
a,b,c=map(int,input().split())
k=int(input())
ans=0
while a>=b:
    b*=2
    ans+=1
while b>=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 B <= A and K > 0:
    B = 2 * B
    K = K - 1

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

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

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

Solution (Python):
import sys
from collections import defaultdict, Counter, namedtuple, deque
import itertools
import functools
import bisect
import heapq
import math
import copy


MOD = 10 ** 9 + 7



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

if A < B < C:
    print('Yes')
    exit()

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):
A,B,C = map(int,input().split())
K=int(input())


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

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

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

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

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

if __name__ == '__main__':
    main()

Solution (Python):


import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

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

for _ in range(K):
    if A >= B:
        B *= 2
        continue
    if B >= C:
        C *= 2
        continue

if (A < B) & (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:
    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())
t = 0

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

Solution (Python):
















production = True

import sys, math, collections

def input(f = 0, m = 0):

    if m > 0: return [input(f) for i in range(m)]
    else:
        l = sys.stdin.readline()[:-1]

        if f >= 10:
            u = False
            f = int(str(f)[-1])
        else: u = True

        if f == 0: p = [l]
        elif f == 1: p = list(map(int, l.split()))
        elif f == 2: p = list(map(float, l.split()))
        elif f == 3: p = list(l)
        elif f == 4: p = list(map(int, list(l)))
        elif f == 5: p = l.split()

        return p if u else p[0]

def out(l, f = 0, n = True):

    if f == 0: p = str(l)
    elif f == 1: p = " ".join(map(str, l))
    elif f == 2: p = "\n".join(map(str, l))
    elif f == 3: p = "".join(map(str, l))

    print(p, end = "\n" if n else "")

def log(*args):
    if not production:
        print("$$$", end = "")
        print(*args)

enu = enumerate
ter = lambda a, b, c: b if a else c
ceil = lambda a, b: -(-a // b)
flip = lambda a: (a + 1) & 1

def mapl(i, f = 0):

    if f == 0: return list(map(int, i))
    elif f == 1: return list(map(str, i))
    elif f == 2: return list(map(list, i))






def solve():

    a, b, c = input(1)
    k = input(11)

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

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

    log(k)
    out(ter(k >= 0, "Yes", "No"))

    return


solve()

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

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

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

Solution (Python):
from itertools import product


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

for D in product([0, 1, 2], repeat=K):
    ans = [A, B, C]
    for d in D:
        ans[d] *= 2
    if ans[0] < ans[1] < ans[2]:
        print("Yes")
        break
else:
    print("No")

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

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

k = int(input())

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

Solution (Python):
p = list(map(int,input().split()))
K = int(input())
a = p[0]
b = p[1]
c = p[2]
i = 0
while b <= a:
  b = b*2
  i += 1
while c <= b:
  c = c*2
  i += 1
if i <= 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 *= 2
        continue
    if B <= A:
        B *= 2
        continue

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

Solution (Python):
import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(500000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

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

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

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

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

k = int(input())

res = 0

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

if res <= k:
    print("Yes")

else:
    print("No")

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

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

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

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

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

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

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

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

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

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

Solution (Python):
a,b,c= map(int,input().split())
n=int(input())
for i in range(n):
  if b<=a:
    b=2*b
  elif c<=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())
cnt = 0
while b <= a:
    b *= 2
    cnt += 1
while c <= b:
    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 ctA in range(K+1):
    for ctB in range(K-ctA+1):
        for ctC in range(K-ctA-ctB+1):
            if A*(2**ctA) < B*(2**ctB) < C*(2**ctC):
                print('Yes')
                exit()
print('No')

Solution (Python):


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

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

while B >= C:
  C *= 2
  ans += 1
  
K = int(input())

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

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

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

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

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

    count = 0

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

solve()

Solution (Python):
import sys
read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    A, B, C = map(int, readline().split())
    K = int(readline())
    count = 0
    while A>=B:
        B*=2
        count += 1
    while B>=C:
        C*=2
        count += 1
    if count<=K:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

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

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

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