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):
from sys import stdin, stdout
import math,sys,heapq
from itertools import permutations, combinations
from collections import defaultdict,deque,OrderedDict
from os import path
import bisect as bi
def yes():print('YES')
def no():print('NO')
if (path.exists('input.txt')): 
    
    sys.stdin=open('input.txt','r');sys.stdout=open('output.txt','w');
    def I():return (int(input()))
    def In():return(map(int,input().split()))
else:
    
    def I():return (int(stdin.readline()))
    def In():return(map(int,stdin.readline().split()))

def dict(a):
    d={}
    for x in a:
        if d.get(x,-1)!=-1:
            d[x]+=1
        else:
            d[x]=1
    return d

def find_gt(a, x):
    'Find leftmost value greater than x'
    i = bi.bisect_right(a, x)
    if i != len(a):
        return i
    else:            
        return -1

def main():
    try:
        a,b,c=In()
        k=I()
        t1,t2=0,0
        if a>=b:
            t1=0
            while b<=a:
                b*=2
                t1+=1
        if b>=c:
            t2=0
            while c<=b:
                c*=2
                t2+=1

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

    except:
        pass
        
M = 998244353
P = 1000000007
 
if __name__ == '__main__':
    
    for _ in range(1):main()

Solution (Python):
A, B, C = map(int, input().split())
K = int(input())
for _ 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())
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):
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:
    print("Yes")
else:
    print("No")

Solution (Python):
n , m , l = map(int , input().split())
k=int(input())
for a in range(k+1):
  for b in range(k+1):
    for c in range(k+1):
      a1 = (n*(2**a))
      b1 = (m*(2**b))
      c1 = (l*(2**c))
      if a+b+c <= k and a1 < b1 and b1 < c1:
        print("Yes")
        exit()
        
print('No')

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

if b > a:
  multiplier = 2 ** k
  if c * multiplier > b:
    ans = 'Yes'
  else:
    ans = 'No'
else:
  while b <= a:
    b *= 2
    k -= 1
  multiplier = 2 ** k
  if c * multiplier > b:
    ans = 'Yes'
  else:
    ans = 'No'

print(ans)

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

while G <= R and K > 0:
    G *= 2
    K -= 1
while B <= G and K > 0:
    B *= 2
    K -= 1
if B > G > R:
    print("Yes")
else:
    print("No")

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

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

if K>=0 and  C>B and B>A:
  result='Yes'

print(result)

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

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

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


if __name__ == '__main__':
    main()

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

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):
import copy
import math


def get_int():
    return int(input())


def get_string():
    return input()


def get_int_list():
    return [int(x) for x in input().split()]


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


def get_int_multi():  
    return map(int, input().split())


def get_string_char_list():
    return list(str(input()))





'''
while (idx < n) and ():

    idx += 1
'''

def main():

    a, b ,c = get_int_multi()
    k = get_int()

    n2 = a / b
    m2 = math.floor(math.log(n2,2) +1)
    if m2 < 0:
        m2 = 0

    n1 = (b * pow(2, m2)) / c
    m1 = math.floor(math.log(n1,2) +1)
    if m1 < 0:
        m1 = 0

    if k >= m1+m2:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Solution (Python):
from math import log2,ceil
def main():
    A,B,C=map(int,input().split())
    K=int(input())
    if A<B<C:
        print("Yes")
    else:
        op=0
        if B<=A:
            val=ceil(log2(A/B))
            op+=val
            B<<=val
            if B==A:
                B*=2
                op+=1
        if C<=B:
            val=ceil(log2(B/C))
            op+=val
            C<<=val
            if C==B:
                C*=2
                op+=1
        if op<=K:
            print("Yes")
        else:
            print("No")
if __name__=='__main__':
    main()

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

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    a,b,c=MI()
    K=I()
    cnt=0
    while b<=a:
        b*=2
        cnt+=1
        
    while c<=b:
        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())

isCheck = None
for i in range(K+1):
    for j in range(K+1):
        for k in range(K+1):
            x = a*2**(i)
            y = b*2**(j)
            z = c*2**(k)
            if i+j+k <= K and x < y and y < z:
                isCheck = True

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

Solution (Python):

import sys
sys.setrecursionlimit(10**6)
INF = 10 ** 9 + 1  
MOD = 10 ** 9 + 7


def debug(*x):
    print(*x, file=sys.stderr)


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


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



T1 = """
7 2 5
3
"""
TEST_T1 = """
>>> as_input(T1)
>>> main()
Yes
"""

T2 = """
7 4 2
3
"""
TEST_T2 = """
>>> as_input(T2)
>>> main()
No
"""


def _test():
    import doctest
    doctest.testmod()
    g = globals()
    for k in sorted(g):
        if k.startswith("TEST_"):
            doctest.run_docstring_examples(g[k], g)


def as_input(s):
    "use in test, use given string as input file"
    import io
    f = io.StringIO(s.strip())
    g = globals()
    g["input"] = lambda: bytes(f.readline(), "ascii")
    g["read"] = lambda: bytes(f.read(), "ascii")


input = sys.stdin.buffer.readline
read = sys.stdin.buffer.read

if sys.argv[-1] == "-t":
    print("testing")
    _test()
    sys.exit()

main()

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

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

flag = False
for i in range(K+1):
    TB = B * (2 ** i)
    TC = C * (2 ** (K-i))
    if TB > A and TC > TB:
        flag = True
        break

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

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

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

Solution (Python):
import itertools
A,B,C = list(map(int, input().split()))
K = int(input())
ans = False
for p in itertools.product(['a','b','c'], repeat=K):
    A0,B0,C0 = A,B,C
    for e in p:
        if e == 'a':
            A0 = 2*A0
        elif e == 'b':
            B0 = 2*B0
        else:
            C0 = 2*C0
    if A0 < B0 < C0 :
        ans = True
        break
print('Yes' if ans else 'No')

Solution (Python):
import sys
sys.setrecursionlimit(10**8)
input = sys.stdin.readline
X = list(map(int,input().split()))
K = int(input())
K += 1

for i in range(K):
    for j in range(K-i):
        for k in range(K-i-j):
            if X[0]*(2**i) < X[1]*(2**j) and X[1]*(2**j) < X[2]*(2**k):
                print('Yes')
                sys.exit()
print('No')

Solution (Python):



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


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


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


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

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

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

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

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

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

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

Solution (Python):
import itertools

lst = list(map(int, input().split()))
k = int(input())

ans = 'No'
for tup in itertools.combinations_with_replacement([0, 1, 2], k):
    temp = lst[:]
    for i in tup:
        temp[i] *= 2
    if temp[0] < temp[1] and temp[1] < temp[2]:
        ans = 'Yes'
print(ans)

Solution (Python):

printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split()) 
ins = lambda : input().strip()
DBG = True 
BIG = 10**18
R = 10**9 + 7


def ddprint(x):
  if DBG:
    print(x)

a,b,c = inm()
k = inn()
x = 0
while b<=a:
  b *= 2
  x += 1
while c<=b:
  c *= 2
  x += 1
print('Yes' if x<=k else 'No')

Solution (Python):
def main():
    A, B, C = list(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')


if __name__ == '__main__':
    main()

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

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

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

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

n = 0

while (A >= B):
  B = 2*B
  n +=1
  
while B>=C:
  C = 2*C
  n += 1
  


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

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

count = 0

for i in range(K+1):
    if C <= B:
        C *= 2
        count += 1
    elif B <= A:
        B *= 2
        count += 1



if count <= K:
    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+=1
while B>=C:
    C=C*2
    count+=1
if K>=count:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
input=sys.stdin.buffer.readline
import os
from math import*

r,g,b=map(int,input().split())
k=int(input())
while g<=r and k>0:
	g*=2
	k-=1
while b<=g and k>0:
	b*=2
	k-=1
if b>g and g>r:
	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 = list(map(int, input().split()))
K = int(input())
for i in range(K):    
    if B >= C:
        C *= 2
    elif A >= B:
        B *= 2

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

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

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

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

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

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

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

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

if __name__ == "__main__":
    main()

Solution (Python):
import sys
import  math
import fractions
from collections import defaultdict
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

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

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

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

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

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

if __name__ == '__main__':
    main()

Solution (Python):
import sys

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

for a in range(K):
    for b in range(K):
        if A * 2**a < B * 2**b < C * 2**(K-(a+b)):
            print('Yes')
            sys.exit()

print('No')

Solution (Python):
import sys
input=lambda: sys.stdin.readline().rstrip()
a,b,c=map(int,input().split())
k=int(input())
ct=0
while b<=a:
  ct+=1
  b*=2
while c<=b:
  ct+=1
  c*=2
if ct<=k:
  print("Yes")
else:
  print("No")

Solution (Python):
nums = list(map(int, input().split()))
cards = {'r':nums[0], 'g':nums[1], 'b':nums[2]}
tN = int(input())

def func_check():
    judge = 0
    if cards['g'] > cards['r']:
        judge += 1
    if cards['b'] > cards['g']:
        judge += 2
    if judge == 0:
        c = 'g'
    elif judge == 1:
        c = 'b'
    elif judge == 2:
        c = 'g'
    elif judge == 3:
        c = 'comp'
    return c

for i in range(tN):
    judge = func_check()
    if judge == 'comp':
        break
    else:
        cards[judge] *= 2
judge = func_check()
if judge == 'comp':
    output = 'Yes'
else:
    output = 'No'
print(output)

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

Solution (Python):




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

    for _ in range(K):
        if not A < B:
            B *= 2
        elif not B < C:
            C *= 2
    if A < B < C:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

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

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

while r >= g:
    try_cnt -= 1
    g *= 2        
    
while g >= b:
    try_cnt -= 1
    b *= 2

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

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

    while (B <= A):
        num += 1
        if num <= K:
            B *= 2
        else:
            return ("No")

    while (C <= B):
        num += 1
        if num <= K:
            C *= 2
        else:
            return ('No')

    return('Yes')

print(main())

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

Solution (Python):
def solve(a, b, c, k):
    for i_a in range(k+1):
        for i_b in range(k+1):
            for i_c in range(k+1):
                if i_a + i_b + i_c > k:
                    break
                x = a * (2**i_a)
                y = b * (2**i_b)
                z = c * (2**i_c)
                if x < y < z:
                    return "Yes"
    return "No"

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

Solution (Python):
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

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

while(True):
  if(b<=a):
    if(k<=0):
      print('No')
      exit()
    b*=2
    k-=1
  else:
    break

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

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

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

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

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

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

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

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

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

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

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):
a,b,c,k=map(int,open(0).read().split())

while k:k-=1;exec(f'{"bc"[a<b]}*=2')


print('NYoe s'[b<c::2])

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

while k:k-=1;vars()['bc'[a<b]]*=2
print('NYoe s'[b<c::2])

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

r, g, b = rm()
n = ri()
c = 0
while r >= g:
    g *= 2
    c += 1
d = 0
while g >= b:
    b *= 2
    d += 1
print('Yes' if c+d <= n else 'No')

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

while r >= g:
  g *= 2
  count += 1
  
while g >= b:
  b *= 2
  count += 1

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

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

while a[1] <= a[0]:
    a[1] = a[1]*2
    count += 1
while a[2] <= a[1]:
    a[2] = a[2]*2
    count += 1

if count > k:
    print('No')
else:
    print('Yes')

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

Solution (Python):



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

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

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


if __name__ == "__main__":
    main()

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

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

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]


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

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

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

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

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

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

Solution (Python):
import sys

a_b_c = list(map(int, input().split()))
r = a_b_c[0]
g = a_b_c[1]
b = a_b_c[2]
k = int(input())

while (g <= r and k >= 0):
    g *= 2
    k -= 1
while (b <= g and k >= 0):
    b *= 2
    k -= 1
if (k < 0):
    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

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):
  if A >= B:
    B = B*2
  else:
    C = C*2

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

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


def dfs(a, b, c, k):
    
    yield (a, b, c)
    if k+1 <= K:
        for x, y, z in dfs(a, b*2, c, k+1):
            yield (x, y, z)
        for x, y, z in dfs(a, b, c*2, k+1):
            yield (x, y, z)


for a, b, c in dfs(A, B, C, 0):
    if a < b < c:
        print('Yes')
        exit()
print('No')

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

for _ in range(K):
    if A >= B:
        B *= 2
    elif B >= C:
        C *= 2
    else:
        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())
while b <= a:
    b *= 2
    k -= 1
while c <= b:
    c *= 2
    k -= 1
print("Yes" if k >= 0 else "No")

Solution (Python):
A, B, C = map(int, input().split())
K = int(input())
flag = False
for i in range(K+1):
  for j in range(K+1):
    for k in range(K+1):
      x = A * (1 << i)
      y = B * (1 << j)
      z = C * (1 << k)
      if i + j + k <=K and x < y and y < z:
        flag = True

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

Solution (Python):

if __name__=="__main__":
  r, g, b = map(int, input().split())
  k = int(input())


  for _ in range(k):
      if not r < g:
        g = g*2
        continue
      if not g < b:
        b = b*2
        use = False
  if r < g and g < b:
    print("Yes")
  else:
    print("No")

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

Solution (Python):

import sys

def func(num_list):
    count = 0
    for i in range(2):
        while(True):
            
            if num_list[i] < num_list[i+1]:
                break
            else:
                num_list[i+1] = num_list[i+1] * 2 
                count = count + 1
    return count


if __name__ == "__main__":
    lines = []
    for l in sys.stdin:
        lines.append(l.rstrip('\r\n'))
    
    tmp = lines[0].split(' ')
    num_list = []
    for n in tmp:
        num_list.append(int(n))

    count = func(num_list)
    if count <= int(lines[1]):
        print("Yes")
    else:
        print("No")

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

Solution (Python):
def l_in(type_): return list(map(type_, input().split()))
def i_in(): return int(input())
def m_in(type_): return map(type_, input().split())
def r_in(n, type_): return [type_(input()) for _ in range(n)]
ans = False
a, b, c = m_in(int)
k = i_in()
for _ in range(k):
    if c <= b or c <= a: c *= 2
    elif b <= a: b *= 2
    if c > b > a:
        ans = True
        break
print('Yes' if ans else 'No')

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

K = int(input())

for x in range(K):
  if A<B*(2**x) and B*(2**x)<C*(2**(K-x)):
    print('Yes');exit()
      
print('No')

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


kB = 0
kC = 0

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

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

if kB + kC <= K:
    print("Yes")
else:
    print("No")

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

def dfs(k, a, b, c):
	if k == 0:
		if b > A and c > b:
			return True
		else:
			return False

	if dfs(k - 1, a * 2, b, c):
		return True

	if dfs(k - 1, a, b * 2, c):
		return True

	if dfs(k - 1, a, b, c * 2):
		return True

	return False

r = dfs(K, A, B, C)
if r:
	print('Yes')
else:
	print('No')

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


kB = 0
kC = 0

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

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

if kB + kC <= K:
    print("Yes")
else:
    print("No")

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



import sys
for i in range(K+1):
    A=a
    B=b*(2**i)
    C=c*(2**(K-i))
    
    if B>A and C>B:
        print('Yes')
        sys.exit()
else:
    print('No')

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
print('Yes' if r < g < b else 'No')

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

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

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

Solution (Python):
read = lambda: list(map(int, input().split()))
card = read()
k = int(input())
for _ in range(k):
    if card[0] >= card[1]:
        card[1] *= 2
    elif card[1] >= card[2]:
        card[2] *= 2

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

Solution (Python):
import random

nums = input().split()





a = int(nums[0])
b = int(nums[1])
c = int(nums[2])

K = input()
k = int(K)





cnt = 0



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

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


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

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