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


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

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

Solution (Python):


from pprint import pprint
from collections import deque, defaultdict
import itertools
import math
import sys

sys.setrecursionlimit(10 ** 6)
INF = float('inf')



r, g, b = map(int, input().split())
k = int(input())


def is_valid(r, g, b, comb):
    for c in comb:
        if c == 'r':
            r *= 2
        elif c == 'g':
            g *= 2
        else:
            b *= 2
    if r < g < b:
        return True
    return False


l = ['r', 'g', 'b']
flag = False
for i in range(k+1):
    if i == 0:
        if is_valid(r, g, b, []):
            flag = True

    combs = list(itertools.combinations_with_replacement(l, i))
    for comb in combs:
        if flag:
            break
        if is_valid(r, g, b, comb):
            flag = True

if flag:
    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 t<=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 count <= K:
    print("Yes")
else:
    print("No")

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

if A<B<C:
    print("Yes")
    exit()
else:
    for k in range(1,K+1):
        for i in range(3**k):
            a,b,c=A,B,C
            for _ in range(k):
                if i%3==0:
                    a*=2
                elif i%3==1:
                    b*=2
                else:
                    c*=2
                i//=3
            if a<b<c:
                print("Yes")
                exit()
print("No")

Solution (Python):
A, B, C  = map(int, input().split())
K = int(input())
flg = 0
for i in range(K):
  if B > A:
    if C > B or 2*C > B:
      flg = 1
    else:
        C = 2*C
  else:
    B = 2*B
    continue
if flg:
    print('Yes')
else:
    print('No')

Solution (Python):
a,b,c=map(int,input().split())
d={"a":a,"b":b,"c":c}
for i in range(int(input())+1):
    if d["a"]<d["b"]<d["c"]:
        print("Yes")
        exit()
    elif d["a"]>=d["c"]: d["c"]*=2
    elif d["a"]>=d["b"]: d["b"]*=2
    elif d["b"]>=d["c"]: d["c"]*=2
print("No")

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

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

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

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

Solution (Python):
r, g, b = [int(x) for x in input().split()]
ops = int(input())
m = 0
while g <= r:
        g *= 2
        m += 1
while b <= g:
        b *= 2
        m += 1
print("Yes" if m <= ops  else "No")

Solution (Python):
A, B, C = map(int, input().split())
K = int(input())
yes = False
for i in range(0, 8):
    for j in range(0, 8):
        for k in range(0, 8):
            if i + j + k == K:
                new_A = A * (2 ** i)
                new_B = B * (2 ** j)
                new_C = C * (2 ** k)
                if new_C > new_B and new_B > new_A:
                    yes = True
                    break
        if yes:
            break
    if yes:
        break
                
if yes:
    print("Yes")
else:
    print("No")

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

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

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

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

Solution (Python):
import itertools

def check(targets):
    if targets[1] > targets[0] and targets[2] > targets[1]:
        return True
    else:
        return False


if __name__ == "__main__":
    A, B, C = map(int, input().split())
    K = int(input())
    targets = [A, B, C]
    answer = 'No'

    cases = itertools.product([0, 1, 2], repeat=K)
    for case in cases:
        copy_targets = targets.copy()
        for i in case:
            copy_targets[i] = copy_targets[i] * 2
        if check(copy_targets):
            answer = 'Yes'
            break

    print(answer)

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

if a >= b:
    while a >= b:
        if k == 0:
            print("No")
            exit()
        b *= 2
        k -= 1

if b >= c:
    while b >= c:
        if k == 0:
            print("No")
            exit()
        c *= 2
        k -= 1

print("Yes")

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())
for x in range(k + 1):
	for y in range(k + 1):
		for z in range(k + 1):
			if a * 2**x < b * 2**y and b * 2**y < c * 2**z and x + y + z <= k:
				print("Yes")
				exit()
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
print('Yes' if a < b < c else '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):


def get_input() -> tuple:
    """
    標準入力を取得する.

    Returns:\n
        tuple: 標準入力
    """
    A, B, C = list(map(int, input().split()))
    K = int(input())

    return A, B, C, K

def main(A: int, B: int, C: int, K: int) -> None:
    """
    メイン処理.

    Args:\n
        A (int): 整数（1 <= A <= 7）
        B (int): 整数（1 <= B <= 7）
        C (int): 整数（1 <= C <= 7）
        K (int): 操作回数（1 <= K <= 7）
    """
    
    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__":
    
    A, B, C, K = get_input()

    
    main(A, B, C, K)

Solution (Python):
def main():
    a, b, c = [int(x) for x in input().split()]
    count = int(input())

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

    print('Yes' if count >= 0 else 'No')


if __name__ == '__main__':
    main()

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

from collections import defaultdict

import sys, math
f = None
try:
	f = open('q1.input', 'r')
except IOError:
	f = sys.stdin
if 'xrange' in dir(__builtins__):
	range = xrange



	
def print_case_iterable(case_num, iterable):
	print("Case 

def print_case_number(case_num, iterable):
	print("Case 

def print_iterable(A):
	print (' '.join(A))

def read_int():
	return int(f.readline().strip())
def read_int_array():
	return [int(x) for x in f.readline().strip().split(" ")]
def rns():
	a =  [x for x in f.readline().split(" ")]
	return int(a[0]), a[1].strip()
def read_string():
	return list(f.readline().strip())
def ri():
	return int(f.readline().strip())
def ria():
	return [int(x) for x in f.readline().strip().split(" ")]
def rns():
	a =  [x for x in f.readline().split(" ")]
	return int(a[0]), a[1].strip()
def rs():
	return list(f.readline().strip())
def bi(x):
	return bin(x)[2:]





from collections import deque
import math
NUMBER = 10**9 + 7

def factorial(n) : 
	M = NUMBER
	f = 1
  
	for i in range(1, n + 1):  
		f = (f * i) % M 
						
	return f
def mult(a,b):
	return (a * b) % NUMBER

def minus(a , b):
	return (a - b) % NUMBER

def plus(a , b):
	return (a + b) % NUMBER

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		g, y, x = egcd(b % a, a)
		return (g, x - (b // a) * y, y)

def modinv(a):
	m = NUMBER
	g, x, y = egcd(a, m)
	if g != 1:
		raise Exception('modular inverse does not exist')
	else:
		return x % m
def choose(n,k):
	if n < k:
		assert false
	return  mult(factorial(n), modinv(mult(factorial(k),factorial(n-k)))) % NUMBER
from collections import deque, defaultdict 
import heapq


from types import GeneratorType
def bootstrap(f, stack=[]):
	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to

	return wrappedfunc


def dfs(g, timeIn, timeOut,depths,parents): 
	
	cnt = 0
	
	stack = [[1,0,0,0]]
	while stack:
		v,neig_i,parent,depth = stack[-1]
		parents[v] = parent
		depths[v] = depth
		
		if neig_i == 0:
			timeIn[v] = cnt    
			cnt+=1
		while neig_i < len(g[v]):
			u = g[v][neig_i]
			if u == parent:
				neig_i+=1
				continue
			stack[-1][1] = neig_i + 1
			stack.append([u,0,v,depth+1])
			break
		if neig_i == len(g[v]):
			stack.pop()
			timeOut[v] = cnt
			cnt += 1
  



cnt = 0
@bootstrap
def dfs(v,adj,timeIn, timeOut,depths,parents,parent=0,depth=0):
	global cnt
	parents[v] = parent
	depths[v] = depth
	timeIn[v] = cnt
	cnt+=1
	for u in adj[v]:
		if u == parent:
			continue
		yield dfs(u,adj,timeIn,timeOut,depths,parents,v,depth+1)
	timeOut[v] = cnt
	cnt+=1
	yield 

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

def lcm(a,b): 
	return (a*b) / gcd(a,b) 
def get_num_2_5(n):
	twos = 0
	fives = 0
	while n>0 and n%2 == 0:
		n//=2
		twos+=1
	while n>0 and n%5 == 0:
		n//=5
		fives+=1
	return (twos,fives)
def shift(a,i,num):
	for _ in range(num):
		a[i],a[i+1],a[i+2] = a[i+2],a[i],a[i+1]

def equal(x,y):
	return abs(x-y) <= 1e-9


def getAngle(a, b, c):
	ang = math.degrees(math.atan2(c[1]-b[1], c[0]-b[0]) - math.atan2(a[1]-b[1], a[0]-b[0]))
	return ang + 360 if ang < 0 else ang
def getLength(a,b):
	return math.sqrt((a[0]-b[0])**2 + (a[1]-b[1])**2)


from heapq import heapify, heappush, heappop

def bfs(adj):
	s = set()
	d = defaultdict(set)
	
	q = deque([])
	s.add(0)
	d[0].add(0)
	q.append((0,0))
	while len(q) > 0:
		v,depth = q.popleft()
		for u in adj[v]:
			if u not in s:
				s.add(u)
				d[depth+1].add(u)
				q.append((u,depth+1))
		
	return d



def isSubsetSum(arr, n, summ): 
	  
	
	
	
	subarr =([[False for i in range(summ + 1)]  
			for i in range(n + 1)]) 
	  
	
	for i in range(n + 1): 
		subarr[i][0] = True
		  
	
	
	for i in range(1, summ + 1): 
		 subarr[0][i]= False
			  
	
	for i in range(1, n + 1): 
		for j in range(1, summ + 1): 
			if j<arr[i-1]: 
				subarr[i][j] = subarr[i-1][j] 
			if j>= arr[i-1]: 
				subarr[i][j] = (subarr[i-1][j] or 
								subarr[i - 1][j-arr[i-1]]) 
	  
	
	
	
	
	
	return subarr[n][summ] 

@bootstrap
def dfs(v,adj,vis,black):
	vis[v] = 1
	for u in adj[v]:
		if vis[u]==2:
			continue
		if vis[u] == 1:
			black.add((v,u)) 
			continue
		yield dfs(u,adj,vis,black)
	vis[v] = 2
	yield


def solution(a,b,c,k):
	cnt= 0
	while b <= a:
		b*=2
		cnt+=1
	while c <= b:
		c*=2
		cnt+=1
	return "Yes" if cnt <= k else "No"


def main():
	T = 1
	
	for i in range(T):
		
		
		
		a,b,c = ria()
		k = ri()
		
		
		
		
		
		
		
		
		

		x = solution(a,b,c,k)

		
		if 'xrange' not in dir(__builtins__):
			print(x) 
		else:
			print >>output,str(x)
	if 'xrange' in dir(__builtins__):
		print(output.getvalue())
		output.close()

if 'xrange' in dir(__builtins__):
	import cStringIO
	output = cStringIO.StringIO()




if __name__ == '__main__':
	main()

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):
main=list(map(int,input().split()))
k=int(input())
for i in range(k):
    if(main[0]>=main[1]):
        main[1]=main[1]*2
    elif(main[1]>=main[2]):
        main[2]=main[2]*2
if(main[1]>main[0] and main[2]>main[1]): print('Yes')
else: print('No')

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

Solution (Python):
def main():
    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
    print("Yes" if i <= k else "No")

if __name__ == '__main__':
    main()

Solution (Python):
"""
    Satwik_Tiwari ;) .
    24th july , 2020  - Friday
"""



from __future__ import division, print_function

from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase

from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter  
from itertools import combinations as comb 
from itertools import permutations as permutate
from bisect import bisect_left as bl


from bisect import bisect_right as br
from bisect import bisect





BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)






mod = 1000000007
def inp(): return sys.stdin.readline().rstrip("\r\n") 
def out(var): sys.stdout.write(str(var))  
def lis(): return list(map(int, inp().split()))
def stringlis(): return list(map(str, inp().split()))
def sep(): return map(int, inp().split())
def strsep(): return map(str, inp().split())

def zerolist(n): return [0]*n
def nextline(): out("\n")  
def testcase(t):
    for p in range(t):
        solve()
def printlist(a) :
    for p in range(0,len(a)):
        out(str(a[p]) + ' ')
def lcm(a,b): return (a*b)//gcd(a,b)
def power(a,b):
    ans = 1
    while(b>0):
        if(b%2==1):
            ans*=a
        a*=a
        b//=2
    return ans
def ncr(n,r): return factorial(n)//(factorial(r)*factorial(max(n-r,1)))
def isPrime(n) :
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) :
        if (n % i == 0 or n % (i + 2) == 0) :
            return False
        i = i + 6
    return True




def rec(a,b,c,k):
    if(a<b<c):
        
        return True


    if(k>0):
        a1 = rec(a*2,b,c,k-1)
        a2 = rec(a,b,c*2,k-1)
        a3 = rec(a,b*2,c,k-1)
        return a1 or a2 or a3
    else:
        return False


def solve():
    a,b,c = sep()
    k = int(inp())
    if(rec(a,b,c,k)):
        print('Yes')
    else:
        print('No')



testcase(1)

Solution (Python):
"""
    Satwik_Tiwari ;) .
    24th july , 2020  - Friday
"""



from __future__ import division, print_function

from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase

from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter  
from itertools import combinations as comb 
from itertools import permutations as permutate
from bisect import bisect_left as bl


from bisect import bisect_right as br
from bisect import bisect





BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)






mod = 1000000007
def inp(): return sys.stdin.readline().rstrip("\r\n") 
def out(var): sys.stdout.write(str(var))  
def lis(): return list(map(int, inp().split()))
def stringlis(): return list(map(str, inp().split()))
def sep(): return map(int, inp().split())
def strsep(): return map(str, inp().split())

def zerolist(n): return [0]*n
def nextline(): out("\n")  
def testcase(t):
    for p in range(t):
        solve()
def printlist(a) :
    for p in range(0,len(a)):
        out(str(a[p]) + ' ')
def lcm(a,b): return (a*b)//gcd(a,b)
def power(a,b):
    ans = 1
    while(b>0):
        if(b%2==1):
            ans*=a
        a*=a
        b//=2
    return ans
def ncr(n,r): return factorial(n)//(factorial(r)*factorial(max(n-r,1)))
def isPrime(n) :
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) :
        if (n % i == 0 or n % (i + 2) == 0) :
            return False
        i = i + 6
    return True




def rec(a,b,c,k):
    if(a<b<c):
        
        return True


    if(k>0):
        a1 = rec(a*2,b,c,k-1)
        a2 = rec(a,b,c*2,k-1)
        a3 = rec(a,b*2,c,k-1)

        return a1 or a2 or a3


def solve():
    a,b,c = sep()
    k = int(inp())
    if(rec(a,b,c,k)):
        print('Yes')
    else:
        print('No')



testcase(1)

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

ptrn = ["A","B","C"]
for k in range(1,K):
  plen = len(ptrn)
  for i in range(plen) :
    wptrn = ptrn.pop(0)
    ptrn.append( wptrn + "A") 
    ptrn.append( wptrn + "B")
    ptrn.append( wptrn + "C")
    
flg = False    
for p in ptrn :
  plist = list(p)
  a = A
  b = B
  c = C
  for q in plist:
    if q == 'A':
      a *= 2
    elif q == 'B':
      b *= 2
    else:
      c *= 2
  if a < b and b < c:
    flg = True
    
print("Yes" if flg else "No")

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

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

flag = "No"
for x in range(K+1):
    for y in range(K+1):
        for z in range(K+1):
            if x + y + z <= K and A*(2**x) < B*(2**y) and B*(2**y) < C*(2**z):
                flag = "Yes"
print(flag)

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

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

i = 0
while(1):
    if b>a: break
    b*=2
    i+=1
    if i>k: break

while(1):
    if c>b: break
    c*=2
    i+=1
    if i>k: break

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

Solution (Python):
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

read = sys.stdin.buffer.read

a, b, c, k = map(int, read().split())
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):
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

read = sys.stdin.buffer.read

a, b, c, k = map(int, read().split())
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 *= 2
    elif b >=c:
        c *= 2
if a < b and b < c:
    print("Yes")
else:
    print("No")

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


"""
Aは小さいほうが嬉しいので、操作をする必要はありません。
BはAAより大きくないといけないので、A≥Bである限り操作をする必要があります。
Cも同様にB≥Cである限り操作をする必要があります。
最低何回の操作で目的を達成できるか、実際に操作をシミュレートしてカウントします。
その後、KK回以内であるか判定すればいいです。
"""
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,k=map(int,open(0).read().split())
while k:k-=1;t=a<b;b*=2-t;c*=1+t
print('NYoe s'[b<c::2])

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

Solution (Python):
a,b,c = map(int,input().split())
s = int(input())
f = 0
for i in range(s+1):
  for j in range(0,s-i+1):
    for k in range(0,s-i-j+1):
      if i+j+k != s:
        continue
      else:
        A = a*(2**i)
        B = b*(2**j)
        C = c*(2**k)
        if A < B and B < C:
          f += 1
if f == 0:
  print("No")
else:
  print("Yes")

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

Solution (Python):

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 = [int(x) for x in input().split()]
K=int(input())
 
while(A>=B and K>0):
  B=B*2
  K-=1
 
while(B>=C and K>0):
  C=C*2
  K-=1

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

Solution (Python):
import math  
from collections import deque  
from typing import Deque, Dict, List, Optional, Tuple, Union  


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

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


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

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

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

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

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):
def calc():
    abc = list(map(int, input().split()))
    k = int(input())
    for i in range(0, 7):
        for j in range(0, 7):
            for l in range(0, 7):
                sum = i+j+l
                con1 = sum <= k
                con2 = abc[0]*(1 << i) < abc[1]*(1 << j)
                con3 = abc[1]*(1 << j) < abc[2]*(1 << l)
                if(con1 & con2 & con3):
                    print('Yes')
                    return
    print('No')
    return


calc()

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):
from math import log2,ceil
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):

def main():
    A, B, C, K = map(int, open(0).read().split())
    for _ in range(K):
        if A >= B:
            B *= 2
        else:
            C *= 2
    print("Yes" if A < B < C else "No")


if __name__ == "__main__":
    main()

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

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

if __name__ == "__main__":
    resolve()

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

while R >= G:
    G *= 2
    K -= 1

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

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

Solution (Python):
r, g, b = 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):
            rr, gg, bb = r * (1<<i), g * (1<<j), b * (1<<k)
            if rr < gg < bb:
                print('Yes')
                exit()
print('No')

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

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 = list(map(int, input().split()))
num = int(input())
k = 0
for i in range(num):    
  if a[0] == max(a) or a[1] == max(a):   
    a[2] = a[2] * 2
    k += 1
  elif a[1] == min(a) and k < num:
    a[1] = a[1] * 2
    k += 1 
  else:
    pass

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

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

k=int(input())

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"
d=0
for i in range(k+1):
    b2=b*(2**(k-d))
    c2=c*(2**(d))
    if(a<b2<c2):
        ans="Yes"
    d+=1
print(ans)

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

cnt = 0

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

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

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

Solution (Python):
r,g,b=map(int,input().split())
k=int(input())
while(g<=r):
    g*=2
    k-=1
while(b<=g):
    b*=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 p in range(8):
    for q in range(8):
        for r in range(8):
            if A * 2 ** p < B * 2 ** q < C * 2 ** r and p + q + r <= K:
                flag = True

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

Solution (Python):
import math  
from collections import deque  
from typing import Deque, Dict, List, Optional, Tuple, Union  


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

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


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

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