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):
def main(sample_file = ''):

    """ convenient functions
    
    
    
    
    
    """

    """convenient decorator
    
    
        
        
        
        
        
        
        
        
        
        
    """
    
    
    import sys
    sys.setrecursionlimit(10**7)
    from itertools import accumulate, combinations, permutations, product 
    
    from math import factorial, ceil, floor, sqrt
    def factorize(n):
        """return the factors of the Arg and count of each factor
        
        Args:
            n (long): number to be resolved into factors
        
        Returns:
            list of tuples: factorize(220) returns [(2, 2), (5, 1), (11, 1)]
        """
        fct = []  
        b, e = 2, 0  
        while b * b <= n:
            while n % b == 0:
                n = n // b
                e = e + 1
            if e > 0:
                fct.append((b, e))
            b, e = b + 1, 0
        if n > 1:
            fct.append((n, 1))
        return fct
    def combinations_count(n, r):   
        """Return the number of selecting r pieces of items from n kinds of items.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        
        if n < 0 or r < 0:
            raise Exception('combinations_count(n, r) not defined when n or r is negative')
        if n - r < r: r = n - r
        if r < 0: return 0
        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 combinations_with_replacement_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items allowing individual elements to be repeated more than once.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        if n < 0 or r < 0:
            raise Exception('combinations_with_replacement_count(n, r) not defined when n or r is negative')
        elif n == 0:
            return 1
        else:
            return combinations_count(n + r - 1, r)
    from bisect import bisect_left, bisect_right
    from collections import deque, Counter, defaultdict 
    from heapq import heapify, heappop, heappush, heappushpop, heapreplace,nlargest,nsmallest 
    from copy import deepcopy, copy 
    import operator
    from operator import itemgetter 
    
    
    from functools import reduce, lru_cache
    def chmin(x, y):
        """change minimum
        if x > y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current minimum value
            y (long): potential minimum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x > y:
            x = y
            return (x, True)
        else:
            return (x, False)
    def chmax(x, y):
        """change maximum
        if x < y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current maximum value
            y (long): potential maximum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x < y:
            x = y
            return (x, True)
        else:
            return (x, False)

    from fractions import gcd 
    def gcds(numbers):
        return reduce(gcd, numbers)
    def lcm(x, y):
        return (x * y) // gcd(x, y)
    def lcms(numbers):
        return reduce(lcm, numbers, 1)
    def make_divisors(n, reversed=False):
        """create list of divisors
        
        Args:
            number (int): number from which list of divisors is created
            reversed (bool, optional): ascending order if False. Defaults to False.
        
        Returns:
            list: list of divisors
        """
        divisors = set()
        for i in range(1, int(n**0.5)+1):
            if n % i == 0:
                divisors.add(i)
                divisors.add(n//i)
        return sorted(list(divisors),reverse=reversed)
    
    
    
    INF = 10 ** 18
    MOD = 10 ** 9 + 7
    AtoZ = list('abcdefghijklmnopqrsruvwxyz') 
    modpow = lambda a, n, p = MOD: pow(a, n, p) 
    def modinv(a, p = MOD):
        
        
        return modpow(a, p-2, p)
    def modinv_list(n, p = MOD):
        if n <= 1:
            return [0,1][:n+1]
        else:
            inv_t = [0,1]
            for i in range(2, n+1):
                inv_t += [inv_t[p % i] * (p - int(p / i)) % p]
            return inv_t
    def modfactorial_list(n, p = MOD):
        if n == 0:
            return [1]
        else:
            l = [0] * (n+1)
            tmp = 1
            for i in range(1, n+1):
                tmp = tmp * i % p
                l[i] = tmp
            return l
    def modcomb(n, k, fac_list = [], p = MOD):
        
        
        from math import factorial
        if n < 0 or k < 0 or n < k: return 0
        if n == 0 or k == 0: return 1
        if len(fac_list) <= n:
            a = factorial(n) % p
            b = factorial(k) % p
            c = factorial(n-k) % p
        else:
            a = fac_list[n]
            b = fac_list[k]
            c = fac_list[n-k]
        return (a * modpow(b, p-2, p) * modpow(c, p-2, p)) % p
    def modadd(a, b, p = MOD):
        return (a + b) % MOD
    def modsub(a, b, p = MOD):
        return (a - b) % p
    def modmul(a, b, p = MOD):
        return ((a % p) * (b % p)) % p
    def moddiv(a, b, p = MOD):
        return modmul(a, modpow(b, p-2, p))

    class UnionFindTree:
        """union find tree class
        TODO: fix this description...
        how to use (example):
        >>  uf = UnionFindTree(N) 
        >>  if uf.find_root(a) == uf.find_root(b):
        >>      do something
        >>  else:
        >>      do something
        >>      uf.unite(a, b)
        """
        def __init__(self, N):
            self.root = [-1] * (N+1)
            self.rank   = [0]  * (N+1)
            self.connected_num = [1] * (N+1)
    
        def find_root(self,x):
            root = self.root
            while root[x] != -1:
                x = root[x]
            return x
    
        def unite(self,x,y):
            root = self.root
            rank = self.rank
            connected_num = self.connected_num
            find_root = self.find_root
    
            rx = find_root(x)
            ry = find_root(y)
            if rx != ry:
                if rank[rx] < rank[ry]:
                    root[rx] = ry
                    rx,ry = ry,rx
                else:
                    if rank[rx] == rank[ry]:
                        rank[rx] += 1
                    root[ry] = rx       
                connected_num[rx] += connected_num[ry]

    class SegTree:
        """
        ref: https://qiita.com/takayg1/items/c811bd07c21923d7ec69
        init(init_val, ide_ele): 配列init_valで初期化 O(N)
        update(k, x): k番目の値をxに更新 O(logN)
        query(l, r): 区間[l, r)をsegfuncしたものを返す O(logN)
        """
        def __init__(self, init_val, segfunc, ide_ele):
            """
            init_val: 配列の初期値
            segfunc: 区間にしたい操作
            ide_ele: 単位元
            n: 要素数
            num: n以上の最小の2のべき乗
            tree: セグメント木(1-index)
            """
            n = len(init_val)
            self.segfunc = segfunc
            self.ide_ele = ide_ele
            self.num = 1 << (n - 1).bit_length()
            self.tree = [ide_ele] * 2 * self.num
            
            for i in range(n):
                self.tree[self.num + i] = init_val[i]
            
            for i in range(self.num - 1, 0, -1):
                self.tree[i] = self.segfunc(self.tree[2 * i], self.tree[2 * i + 1])

        def update(self, k, x):
            """
            k番目の値をxに更新
            k: index(0-index)
            x: update value
            """
            k += self.num
            self.tree[k] = x
            while k > 1:
                self.tree[k >> 1] = self.segfunc(self.tree[k], self.tree[k ^ 1])
                k >>= 1

        def query(self, l, r):
            """
            [l, r)のsegfuncしたものを得る
            l: index(0-index)
            r: index(0-index)
            """
            res = self.ide_ele
            l += self.num
            r += self.num
            while l < r:
                if l & 1:
                    res = self.segfunc(res, self.tree[l])
                    l += 1
                if r & 1:
                    res = self.segfunc(res, self.tree[r - 1])
                l >>= 1
                r >>= 1
            return res

    
    
    
    
    
    
    
    

    def BellmanFord(N, M, ABC, vertex_start, vertex_end, value_if_inf = -1, find_shortest = False):
        """to calculate furthest or shortest length between vertex_start and vertex_end using BellmanFord algorithm
        
        Args:
            N (int): number of vertices
            M (int): number of edges
            ABC (list): [(ai, bi, ci) for _ in range(N)] where i-th edge is directed from vertex ai to vertex bi and the length is ci 
            vertex_start (int): start vertex. usually use 0.
            vertex_end (int): end vertex. usually use N-1.
            value_if_inf (int or string as you like, optional): value you want when the furthest (or shortest) distance is infinite (or -infinite). Defaults to -1.
            find_shortest (bool, optional): choose False to find furthest path. Defaults to False.
        
        Returns:
            int or string: normally int (but can be str if you set value_if_inf to str)
            
        Example:
                N, M, P = R()
                ABC = [R() for _ in range(M)]
                ABC = [(a-1, b-1, c-P) for a, b, c in ABC]
                print(BellmanFord(N, M, ABC, 0, N-1, value_if_inf = 'inf'))

        """

        def make_reachable_list(N, M, ABC, vertex_start, vertex_end):
            reachable_to_direct = defaultdict(list)
            reachable_from_direct = defaultdict(list)
            reachable_from_start = [False] * N
            reachable_to_end = [False] * N
            reachable_from_start[vertex_start] = True
            reachable_to_end[vertex_end] = True
            reachable_from_both_sides = [False] * N
            dfs_from_start = []
            dfs_to_end = []
            for a, b, c in ABC:
                reachable_to_direct[a].append(b)
                reachable_from_direct[b].append(a)
                if a == vertex_start:
                    dfs_from_start.append(b)
                    reachable_from_start[b] = True
                if b == vertex_end:
                    dfs_to_end.append(a)
                    reachable_to_end[a] = True
            while dfs_from_start:
                v = dfs_from_start.pop()
                for i in reachable_to_direct[v]:
                    if not reachable_from_start[i]:
                        reachable_from_start[i] = True
                        dfs_from_start.append(i)
            while dfs_to_end:
                v = dfs_to_end.pop()
                for i in reachable_from_direct[v]:
                    if not reachable_to_end[i]:
                        reachable_to_end[i] = True
                        dfs_to_end.append(i)
            for i in range(N):
                reachable_from_both_sides[i] = reachable_from_start[i] and reachable_to_end[i]
            return reachable_from_both_sides
        
        reachable_from_both_sides = make_reachable_list(N, M, ABC, vertex_start, vertex_end)
        
        if find_shortest:
            dist = [INF for i in range(N)]
        else:
            dist = [-INF for i in range(N)]
        
        dist[vertex_start] = 0
        for i in range(N):
            updated = False
            for a, b, c in ABC:
                if not reachable_from_both_sides[a]:
                    continue
                elif find_shortest:
                    update_condition = dist[a] + c < dist[b]
                else:
                    update_condition = dist[a] + c > dist[b]
                if dist[a] != INF and update_condition:
                    dist[b] = dist[a] + c
                    updated = True
                    if i == N-1:
                        return value_if_inf
            if not updated:
                break
        return dist[vertex_end]

    
    def warshall_floyd(number_vertex, XYD, shift_one_for_vertex=False):
        
        
        
        
        
        d = [[float("inf")]*number_vertex for i in range(number_vertex)]
        for x, y, dist in XYD:
            if shift_one_for_vertex:
                x = x - 1
                y = y - 1
            d[x][y] = dist
            d[y][x] = dist
        for i in range(number_vertex):
            d[i][i] = 0 
        for k in range(number_vertex):
            for i in range(number_vertex):
                for j in range(number_vertex):
                    d[i][j] = min(d[i][j],d[i][k] + d[k][j])
        return d


    """ initialize variables and set inputs
    
        
        
            
            
    
        
        
        
        
        
        
        
    
        
        
        
        
    
        
        
    """

    
    r = lambda: sys.stdin.readline().strip()
    r_int = lambda: int(r())
    r_float = lambda: float(r())
    R = lambda: list(map(int, r().split()))
    R_str = lambda: r().split()
    R_map = lambda: map(int, r().split())
    R_float = lambda: list(map(float, r().split()))
    R_tuple = lambda: tuple(map(int, r().split()))

    """ how to treat input
    
    
    
    
    
    
    
    """

    
    if sample_file:
        sys.stdin = open(sample_file)
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    A, B, C = R()
    K = r_int()
    while K >= 0:
        if A >= B:
            B = B * 2
        elif B >= C:
            C = C * 2
        else:
            print('Yes')
            return
        K = K - 1
    print('No')
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    


    
    
    

    """memo: how to use defaultdict of list
    
    Dic = defaultdict(list)
    
    Dic[x].append(y)
    
    for k, v in Dic.items():
    """
    
    """memo: how to solve binary problems
    
    >>> a = 5
    >>> bin_str_a = format(a, '
    >>> print(bin_str_a)
    0b0101 
    """
    
    """memo: how to solve the problem
    creating simple test/answer
    greed
    simple dp
    graph
    """

if __name__ == '__main__':
    main()

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

while not (a < b < c):
    cnt += 1
    if a >= b:
        b *= 2
    elif b >= c:
        c *= 2
    if cnt > k:
        print("No")
        exit(0)

print("Yes")

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

for _ in range(k):
    if green <= red:
        green *= 2
    else:
        if blue <= green:
            blue *= 2
        else:
            break
if blue > green > red:
    ans = "Yes"
print(ans)

Solution (Python):
a,b,c=map(int,input().split())
k=int(input())
for _ in range(k):
    if a>=b:
        b*=2
        continue
    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())
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):
"""
b > g > r

"""

r, g, b = list(map(int, input().split()))
k = int(input())
flag = False
for i in range(k):
    if r >= b and b > 2 * g :
        g *= 2
    elif r >= g and b > 2 * g:
        g *= 2
    else:
        b *= 2

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

Solution (Python):
a_red,b_green,c_blue = list(map(int,input().split()))
kai = int(input())

for i in range(kai+1):
    if a_red >= b_green:
        b_green = b_green *2
    elif b_green >= c_blue:
        c_blue = c_blue *2
    else:
        print("Yes")
        exit()
print("No")

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

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

for i in range((K + 1)):
    for j in range((K + 1) - i):
        for k in range((K + 1) - i - j):
            if A * (2 ** i) < B * (2 ** j) < C * (2 ** k):
                print("Yes")
                exit()

print("No")

Solution (Python):

a,b,c = map(int, input().split())
k = int(input())
c1, c2 = 0, 0
while b<=a:
    b=b*2
    c1 = c1 + 1
while c <= b:
    c=c*2
    c2 = c2 +1
if c1 + c2 <= 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
  count += 1

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

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

Solution (Python):
a,b,c,k=map(int,open(0).read().split())
for i in' '*k:
 if a>=b:b*=2
 elif b>=c:c*=2
print('NYoe s'[a<b<c::2])

Solution (Python):
R,G,B=map(int,input().split())
K=int(input())
for _ in range (K) :
    if R < G :
        pass
    else:
        G*=2
        continue

    if G < B :
        pass
    else:
        B*=2
        continue
    
if R < G < B :
    print('Yes')
else :
    print('No')

Solution (Python):
a=[input() for i in range(2)]
a1=[int(i) for i in a[0].split()]
a2=int(a[1])

count=0

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

while a1[2]<=a1[1]:
	a1[2]=a1[2]*2
	count+=1

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

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
print("Yes" if cnt<=K else "No")

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

Solution (Python):
if __name__ == "__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
    print("Yes" if count <= K else "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 = map(int, input().split(' '))
k = int(input())
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):
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('Yes')
else:
    print('No')

Solution (Python):
r, g, b = map(int, input().split())
t = 0
while r >= g: g *= 2; t += 1
while g >= b: b *= 2; t += 1
print('No' if t > int(input()) else 'Yes')

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

    count = 0
    while A >= B:
        count += 1
        B *= 2
    while B >= C:
        count += 1
        C *= 2
    return 'Yes' if count <= K else 'No'

print(b_magic2())

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

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

    for j in range(K + 1):
        for k in range(K + 1):
            if j + k > K:
                break
            if A < B * (2**j) < C * (2**k):
                return 'Yes'
    return 'No'

print(b_magic2())

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

for i in range(n):

    if a >= b:
        b = b * 2
    elif b >= c:
        c = c * 2
    else:
        print('Yes')
        exit(0)

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
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 list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    a = LI()
    k = I()

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

    if t <= k:
        return 'Yes'

    return 'No'

print(main())

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

K = int(input())

ans = "No"

for i in range(K):
  if A < B*(2**i) and B*(2**i) < C*(2**(K-i)):
    ans = "Yes"
    break

print(ans)

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

M=0

while R>=G or G>=B:
    if R>=G:
        G*=2
        M+=1
    
    if G>=B:
        B*=2
        M+=1

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

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

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

Solution (Python):
A, B, C=map(int,input().split())
K=int(input())
ab=int(A/B)
if ab==0:
  x=0
else:
  x=int(len(bin(ab))-2)
B1=B*(2**x)
bc=int(B1/C)
if bc==0:
  y=0
else:
  y=int(len(bin(bc))-2)
if x+y<=K:
  print("Yes")
else:
  print("No")

Solution (Python):
A,B,C=[int(s) for s in input().split()]
X=int(input())
count=0
while A>=B:
  B*=2
  count+=1
while B>=C:
  C*=2
  count+=1
if count<=X:
  print('Yes')
else:
  print('No')

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

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

Solution (Python):
r,g,b = map(int,input().split())
k = int(input())
t=0
t+=k
for i in range(k):
    if(b<=r):
        b*=2
        t-=1
        
    elif(b>r and b<=g):
        b*=2
        t-=1
        
    elif(b>r and b>g and g<=r):
        g*=2
        t-=1
        
        
    if(t==0):
        break
    
if(g>r and b>g):print("Yes")
else:print("No")

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


for _ in range (K) :
    if R < G :
        pass
    else:
        G*=2
        continue

    if G < B :
        pass
    else:
        B*=2
        continue
    
if R < G < B :
    print('Yes')
else :
    print('No')

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


for i in range (K+1):
    if R < G < B:
        print ('Yes')
        exit()
    else:
        pass
    
    if G < B:
        pass
    else:
        B*=2
        continue

    if R < G:
        pass
    else:
        G*=2
        continue

print('No')

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

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

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


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

    cnt = 0

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

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

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

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

a,b,c = LI()
k = I()
cnt1 = 0
while b <= a:
    b *= 2
    cnt1 += 1
cnt2 = 0
while c <= b:
    c *= 2
    cnt2 += 1
if cnt1 + cnt2 <= k:
    print('Yes')
else:
    print('No')

Solution (Python):
import copy
def magic(arr,i,k):
  if(k==0):
    if(arr[0] < arr[1] and arr[1] < arr[2]):
      return True
    else:
      return False
  k-=1
  arr[i]*=2
  return magic(arr.copy(),0,k) or magic(arr.copy(),1,k) or magic(arr.copy(),2,k)
  
if __name__ == "__main__":
  arr = list(map(int,input().split()))
  k = int(input())
  if(magic(arr.copy(),0,k) or magic(arr.copy(),1,k) or magic(arr.copy(),2,k)):
    print("Yes")
    exit()
  else:
    print("No")

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

for _ in range(K):
    if abc[0]>=abc[1]:
        abc[1]=abc[1]*2
    elif abc[1]>=abc[2]:
        abc[2]=abc[2]*2
    else:
        print("Yes")
        exit()

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

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

l=list(range(K+1))

for c  in itertools.product(l, repeat=3):
    if sum(c) == K and A*2**c[0]<B*2**c[1] and B*2**c[1]<C*2**c[2]:
      print("Yes")
      exit(0)
print("No")

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

for i in range(k+1):
    if r<g<b:
        print("Yes")
        sys.exit()
    else:
        if r<=b<=g:
            b*=2
        elif b<=r<=g:
            b*=2
        elif b<=g<=r:
            b*=2
        elif g<=r<=b:
            g*=2
        elif g<=b<=r:
            b*=2
print("No")

Solution (Python):


A, B, C = map(int, input().split())
K = int(input())
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 * (2 ** i) < B * (2 ** j):
                    if B * (2 ** j) < C * (2 ** k):
                        print("Yes")
                        exit()
print("No")

Solution (Python):
import math
import collections
import fractions
import itertools
import functools
import operator

def solve():
    a, b, c = map(int, input().split())
    k = int(input())
    i = k+1
    for p in range(i):
        for q in range(i-p):
            for r in range(i-p-q):
                aa, bb, cc = a, b, c
                for k in range(p):
                    aa*=2
                for k in range(q):
                    bb*=2
                for k in range(r):
                    cc*=2
                if aa < bb < cc:
                    print("Yes")
                    exit()
    print("No")
    return 0

if __name__ == "__main__":
    solve()

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

Solution (Python):
import math as mt
import sys, string
from collections import Counter, defaultdict
input = sys.stdin.readline

MOD = 1000000007


I = lambda : int(input())
M = lambda : map(int, input().split())
Ms = lambda : map(str, input().split()) 
ARR = lambda: list(map(int, input().split()))

def main():
    a, b, c = M()
    k = I()
    ans = 0
    while b <= a:
        b *= 2
        ans += 1
    while c <= b:
        c *= 2
        ans += 1
    if ans <= k:
        print("Yes")
    else:
        print("No")


tc = 1
for _ in range(tc):
    main()

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

l=[0,1,2,3,4,5,6,7]

for c  in itertools.product(l, repeat=3):
    if sum(c) == K and A*2**c[0]<B*2**c[1] and B*2**c[1]<C*2**c[2]:
      print("Yes")
      exit(0)
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:
        pass
if a < b and b < c:
    print("Yes")
else:
    print("No")