Problem:
 Score: 200 points    Problem Statement  M-kun has the following three cards:   A red card with the integer A .  A green card with the integer B .  A blue card with the integer C .   He is a genius magician who can do the following operation at most K times:   Choose one of the three cards and multiply the written integer by 2 .   His magic is successful if both of the following conditions are satisfied after the operations:   The integer on the green card is strictly greater than the integer on the red card.  The integer on the blue card is strictly greater than the integer on the green card.   Determine whether the magic can be successful.      Constraints   1 \leq A, B, C \leq 7  1 \leq K \leq 7  All values in input are integers.         Input  Input is given from Standard Input in the following format:  A  B  C  K       Output  If the magic can be successful, print Yes ; otherwise, print No .        Sample Input 1 7 2 5
3      Sample Output 1 Yes  The magic will be successful if, for example, he does the following operations:   First, choose the blue card. The integers on the red, green, and blue cards are now 7 , 2 , and 10 , respectively.  Second, choose the green card. The integers on the red, green, and blue cards are now 7 , 4 , and 10 , respectively.  Third, choose the green card. The integers on the red, green, and blue cards are now 7 , 8 , and 10 , respectively.        Sample Input 2 7 4 2
3      Sample Output 2 No  He has no way to succeed in the magic with at most three operations.

Solution (Python):

import sys
input = sys.stdin.readline


def ceil(x):
    if x != int(x):
        x = int(x) + 1;
    return x;
    

def swaparr(arr, a,b):
    temp = arr[a];
    arr[a] = arr[b];
    arr[b] = temp


def gcd(a,b):
    if b == 0:
        return a
    return gcd(b, a % b);


def nCr(n, k): 
    if(k > n - k): 
        k = n - k 
    res = 1
    for i in range(k): 
        res = res * (n - i) 
        res = res / (i + 1) 
    return int(res) 


def upper_bound(a, x, lo=0, hi = None):
    if hi == None:
        hi = len(a);
    while lo < hi:
        mid = (lo+hi)//2
        if a[mid] < x:
            lo = mid+1
        else:
            hi = mid
    return lo


def primefs(n):
    
    primes = {}
    while(n%2 == 0 and n > 0):
        primes[2] = primes.get(2, 0) + 1
        n = n//2
    for i in range(3, int(n**0.5)+2, 2):
        while(n%i == 0 and n > 0):
            primes[i] = primes.get(i, 0) + 1
            n = n//i
    if n > 2:
        primes[n] = primes.get(n, 0) + 1
    
    
    return primes


def power(x, y, p): 
    res = 1
    x = x % p  
    if (x == 0) : 
        return 0
    while (y > 0) : 
        if ((y & 1) == 1) : 
            res = (res * x) % p 
        y = y >> 1      
        x = (x * x) % p 
    return res 


def swap(a,b):
    temp = a
    a = b
    b = temp
    return a,b









def find(x, link):
    p = x;
    while( p != link[p]):
        p = link[p];
    
    while( x != p):
        nex = link[x];
        link[x] = p;
        x = nex;
    return p;




def union(x, y, link, size):
    x = find(x, link)
    y = find(y, link)
    if size[x] < size[y]:
        x,y = swap(x,y)
    if x != y:
        size[x] += size[y]
        link[y] = x


def sieve(n): 
    prime = [True for i in range(n+1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p * p, n+1, p):
                prime[i] = False
        p += 1
    return prime


MAXN = int(1e5 + 5)
def spf_sieve():
    spf[1] = 1;
    for i in range(2, MAXN):
        spf[i] = i;
    for i in range(4, MAXN, 2):
        spf[i] = 2;
    for i in range(3, ceil(MAXN ** 0.5), 2):
        if spf[i] == i:
            for j in range(i*i, MAXN, i):
                if spf[j] == j:
                    spf[j] = i;
    




def factoriazation(x):
    ret = {};
    while x != 1:
        ret[spf[x]] = ret.get(spf[x], 0) + 1;
        x = x//spf[x]
    return ret
    
    


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

def str_array():
    return input().strip().split();


MOD = int(1e9)+7;
CMOD = 998244353;
INF = float('inf'); NINF = -float('inf');



r, g, b = int_array();
k = int(input());

cnt = 0;
while(g <= r):
    cnt += 1;
    g *= 2;
cnt2 = 0;
while(b <= g):
    cnt2 += 1;
    b *= 2;
if cnt + cnt2 <= k:
    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
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 b <= a:
        b *= 2
    else:
        c *= 2

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

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


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

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

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 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):
if __name__ == '__main__':
    a, b, c = map(int, input().split())
    k = int(input())

    count = 0
    while count < k:
        if a < b and b < c:
            break
        if not a < b:
            b *= 2
        elif not b < c:
            c *= 2
        count += 1

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

Solution (Python):
A,B,C=list(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("No")
else:
   print("Yes")

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

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

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

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

if b > g and g > r:
    print('Yes')
else:
    print('No')

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

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

n = 0

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

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

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

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

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

Solution (Python):
from itertools import product
A = [int(a) for a in input().split()]
K = int(input())
X = list(product([0, 1, 2], repeat = K))
for x in X:
    B = A[:]
    for xx in x:
        B[xx] *= 2
    if B[0] < B[1] < B[2]:
        print("Yes")
        break
else:
    print("No")

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

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

Solution (Python):


a,b,c = map(int, raw_input().split())
k = int(raw_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())

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

ans = False
for i in range(K+1):
    if C*2**i > B*2**(K-i) > A:
        ans = True
        break
if ans:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
import sys

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

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):
import math
a, b, c = map(int, input().split())
k = int(input())
ans = 0
if a >= b:
    ans += math.floor(math.log2(a / b)) + 1
    b *= pow(2, math.floor(math.log2(a / b)) + 1)
if b >= c:
    ans += math.floor(math.log2(b / c)) + 1
print("Yes" if ans <= k else "No")

Solution (Python):
import sys

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')
        sys.exit()
print('No')

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

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

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

for i in range(K):
    if A >= B:
        B *= 2
    elif B >= C:
        C *= 2
print('Yes' if A<B<C else 'No')

Solution (Python):
def check():
  A, B, C = map(int, input().split())
  K = int(input())
  while B<=A:
    if K==0:
      return 'No'
    B *= 2
    K -= 1
  while C<=B:
    if K==0:
      return 'No'
    C *= 2
    K -= 1
  return 'Yes'
print(check())

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

count = 0

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

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

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

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

print("NYoe s"[k>=green+blue::2])

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

Solution (Python):
import sys
import re
import math
import collections
import decimal
import bisect
import itertools
import fractions
import functools
import copy
import heapq
import decimal
import statistics
import queue



sys.setrecursionlimit(10 ** 9)
INF = 10 ** 16
MOD = 10 ** 9 + 7


ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))




def main():
    r, g, b = ns()
    k = ni()

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

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


if __name__ == '__main__':
    main()

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

Solution (Python):

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

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

c_cnt = 0
while B >= C:
    C *= 2
    c_cnt += 1




if b_cnt + c_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 A >= B:
        B *= 2

    else:
        C *= 2

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

else:
    print("No")

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

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

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

Solution (Python):
import sys
from operator import itemgetter

sys.setrecursionlimit(10**9)
input = sys.stdin.readline

def ii(): return int(input())
def mi(): return map(int, input().split())
def lmi(): return list(map(int, input().split()))
def iif(n): return [int(input()) for _ in range(n)]
def lmif(n): return [list(map(int, input().split())) for _ in range(n)]
def ss(): return input().split()

def main():
    mod = 1000000007
    
    a, b, c = mi()
    k = ii()

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

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


    return

main()

Solution (Python):
import sys
a, b, c=map(int, input().split())
k=int(input())
while(k>=1 and a>=b):
    b=b*2
    k=k-1
if a>=b:
    print("No")
    sys.exit()
while(k>=1 and b>=c):
    c=c*2
    k=k-1
if b>=c:
    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 = B*2
  elif B >= C:
    C = C*2
  else:
    break

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

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

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

Solution (Python):
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

a,b,c=nii()
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):
def main():
    abc = [int(_x) for _x in input().split()]
    RED = abc[0]
    GREEN = abc[1]
    BLUE = abc[2]
    K = int(input())

    for i in range(K):
        if GREEN <= RED:
            GREEN *= 2
        elif BLUE <=GREEN:
            BLUE *= 2
        else:
            pass
    if RED < GREEN and GREEN < BLUE:
        print("Yes")
    else:
        print("No")
main()

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

c=0
while not (A[0]<A[1]<A[2]) and c<K:
    if A[0]>=A[1]:
        A[1]=A[1]*2
        c+=1
    elif A[1]>=A[2]:
        A[2]=A[2]*2
        c+=1
    

print(['No','Yes'][A[0]<A[1]<A[2]])

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

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

while c <= b:
    counta += 1
    c *= 2
    if counta>k:
        print('No')
        exit()
print('Yes')

Solution (Python):
a = [*map(int, input().split())]
k = int(input())

opct = 0
for i in range(2):
    while a[i] >= a[i+1]:
        a[i+1] *= 2
        opct += 1

print(["No", "Yes"][opct <= k])

Solution (Python):

MOD = 10 ** 9 + 7
INFI = 10**10

import math
from collections import deque
import itertools
import heapq

from fractions import Fraction
import copy
from functools import lru_cache
from collections import defaultdict
import pprint




def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default




def ret(a):
    c=[None]*(len(a)-1)
    if len(a)==1:
        return a[0]
    elif len(a)==0:
        return 0
    for i in range(1,len(a)):
        c[i-1]=abs(a[i]-a[i-1])
    return ret(c)

def soinsubunkai(n):
    a = []
    i = 1
    while i*i <= n:
        if n % i == 0 and i!=1:
            a.append(i)
            n=n//i

        if n% i !=0 or i==1:
            i += 1
    nokori=[n]
    return a + nokori

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

def main():
    
    a,b,c = map(int, input().split())
    k=int(input())
    ans="Yes"
    if b<=a:
        while True:
            if k<=0:
                ans="No"
                break
            k-=1
            b=b*2
            if b>a:
                break
    if c<=b:
        while True:
            if k<=0:
                ans="No"
                break
            k-=1
            c=c*2
            if c>b:
                break
    print(ans)














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
    else:
        c*=2
if c>b>a:
    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())
binary = [1, 2, 4, 8, 16, 32, 64, 128, 256]
K = int(input())
flg = False
for i in range(K+1):
  for j in range(K+1):
    for k in range(K+1):
      if i + j + k == K:
        if A*binary[i] < B*binary[j] and B*binary[j] < C*binary[k]:
          flg = True
if flg:
  print("Yes")
else:
  print("No")

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

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

if count <= 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
print(["No","Yes"][k>=0])

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
print('YNeos'[a>=b or b>=c::2])

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

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



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


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

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

Solution (Python):

a, b, c = map(int, input().split())
k = int(input())
greenok = False
if a < b:
    greenok = True
for _ in range(k):
    if greenok:
        c *= 2
    else:
        b *= 2
    if a < b:
        greenok = True
if a < b < c:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys

sys.setrecursionlimit(1000000)

import bisect
import math
import collections
import heapq


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

    if C > B > A:
        return "Yes"
    return "No"


if __name__ == "__main__":
    A, B, C = tuple(map(int, input().split(" ")))
    K = int(input())
    print(solve(A, B, C, K))

Solution (Python):
ma = lambda :map(int,input().split())
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq
a,b,c = ma()
k = ni()
f = False
for i in range(k+1):
    if a < b*2**i and b*2**i <c*2**(k-i):
        f =True
yn(f)

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

Solution (Python):
red, green, blue = [int(i) for i in input().split()]
k = int(input())
ans = 0
while green <= red:
    green *= 2
    ans += 1
while blue <= green:
    blue *= 2
    ans += 1
if ans <= k:
    print("Yes")
else:
    print("No")

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

    cnt = 0
    while cnt < K and A[0] >= A[1]:
        A[1] *= 2
        cnt += 1

    while cnt < K and A[1] >= A[2]:
        A[2] *= 2
        cnt += 1

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


if __name__ == '__main__':
    main()

Solution (Python):
import sys
def sosa(x):
    return x*2
A,B,C=map(int,input().split())
K=int(input())
for i in range(K+1):
    if A>=B:
        B=sosa(B)
    elif B>=C:
        C=sosa(C)
    else:
        break
else:
    print("No")
    sys.exit()
print("Yes")

Solution (Python):
A, B, C = map(int, input().split())
K = int(input())
f = False
for bit in range(2**K):
    b = B
    c = C
    for j in range(K):
        if (bit >> j) & 1:
            c *= 2
        else:
            b *= 2
    if A < b and b < c:
        f = True
if f:
    print('Yes')
else:
    print('No')

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

Solution (Python):


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

while not(A < B):
    B *= 2
    K -= 1

while not(B < C):
    C *= 2
    K -= 1

if K < 0:
    print("No")
else:
    print("Yes")

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def TUPLE(): return tuple(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7 

from decimal import *



A, B, C = MAP()
K = INT()

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

ans = "No"
for a in range(K+1):
  for b in range(K+1):
    for c in range(K+1):
      if a+b+c<=K and (A<<a)<(B<<b)<(C<<c):
        ans = "Yes"
print(ans)

Solution (Python):
a,b,c=map(int,input().split())
flag=False
k=int(input())
for i in range(k+1) :
  if c*2**i>b*2**(k-i) and b*2**(k-i)>a :
    flag=True
    break

if flag :
  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):
def rec(a, b, c, k, n=0):
    if n == k:
        if c > b > a:
            return 1
        else:
            return 0
    return rec(2*a, b, c, k, n+1) + rec(a, 2*b, c, k, n+1) + rec(a, b, 2*c, k, n+1)


def main():
    A, B, C = map(int, input().split())
    K = int(input())
    if rec(A, B, C, K) > 0:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

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

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

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

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


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

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

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

Solution (Python):





import sys
import heapq

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

    return

if __name__ == "__main__":
    main()

Solution (Python):
from sys import stdin
A,B,C = [int(x) for x in stdin.readline().rstrip().split()]
K = int(stdin.readline().rstrip())
while True:
    if B > A:
        break
    if K == 0:
        break
    B*=2
    K-=1

while True:
    if C > B:
        break
    if K == 0:
        break
    C*=2
    K-=1
    
if C > B:
    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
    
print('Yes') if n <= k else print('No')

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

K = int(input())

cnt = 0

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

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

    if (A < B) & (B < C):
        break

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

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

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

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

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

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

Solution (Python):


import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())

def resolve():
    a, b, c = iim()
    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")

if __name__ == "__main__":
    resolve()

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

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

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

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

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

Solution (Python):
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
A,B,C = LI()
K = I()
count = 0
while 1:
    if A<B:
        break
    B *= 2
    count += 1
while 1:
    if B<C:
        break
    C *= 2
    count += 1
print('Yes' if count<=K else 'No')

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

cnt = 0

while True:
    if a < b:
        break
    
    b = b * 2
    cnt += 1
    
while True:
    if b < c:
        break
    
    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(B<=A):
        B=B*2
    elif(C<=B):
        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())
count=0
while B<=A:
  B=2*B
  count+=1
while C<=B:
  C=2*C
  count+=1
if count<=K:
  print('Yes')
else:
  print('No')

Solution (Python):

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

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

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

main()

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

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

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

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

cnt=0
while red>=green:
    green*=2
    cnt+=1


while green>=blue:
    blue*=2
    cnt+=1

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

Solution (Python):
l=list(map(int,input().split()))
K=int(input())
from itertools import product
for i in range(K+1):
    for j in product([0,1,2], repeat=i):
        c=l.copy()
        for k in j:
            c[k]*=2
        if c[1]>c[0] and c[2]>c[1]:
            print("Yes")
            exit()
print("No")

Solution (Python):
A, B, C = map(lambda x: int(x), 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())

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

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

Solution (Python):
A, B, C = [int(i) for i in input().split()]
K = int(input())
count = 0
while not A < B:
  B *= 2
  count += 1
while not 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())


cnt = 0

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


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

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