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 examA():
    X = I()
    X -= 400
    ans = 8 - X//200
    print(ans)
    return

def examB():
    A, B, C = LI()
    K = I()
    cnt = 0
    while(A>=B):
        B *= 2
        cnt += 1
    while(B>=C):
        C *= 2
        cnt += 1

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

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

from decimal import getcontext,Decimal as dec
import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def DI(): return dec(input())
def LDI(): return list(map(dec,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = dec("0.000000000001")
alphabet = [chr(ord('a') + i) for i in range(26)]
alphabet_convert = {chr(ord('a') + i): i for i in range(26)}

getcontext().prec = 28

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examB()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

Solution (Python):
a,b,c = map(int,input().split())
k = int(input())
while k:
    if a >= b:
        b*=2
    elif b >= c:
        c*=2
    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())

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

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

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

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

Solution (Python):

import sys
from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right
from itertools import accumulate

sys.setrecursionlimit(10**6)
INF = 10**12
m = 10**9 + 7

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

if __name__ == "__main__":
    main()

Solution (Python):


import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial,sin
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

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

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

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

Solution (Python):
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

a,b,c=mp()
k=int(input())
i=0
while b<=a:
    b*=2
    i+=1
while c<=b:
    c*=2
    i+=1
if i<=k:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys

def solve():
      input = sys.stdin.readline
      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")

      return 0

if __name__ == "__main__":
      solve()

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

K = int(input())

for i in range(K):

    if B <= A:
        B *= 2
    elif C <= B:
        C *= 2

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

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

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

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

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

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

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

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

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

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

while a >= b and k >= 1:
    b *= 2
    k -= 1
c *= pow(2, k)

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

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

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

Solution (Python):


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

count = 0

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

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

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

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

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

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

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

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

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

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

Solution (Python):


import sys
input=sys.stdin.readline

def main():
    A,B,C=map(int,input().split())
    K=int(input())
    for i in range(K):
        if A>=B:
            B*=2
        elif B>=C:
            C*=2
    if A<B<C:
        print("Yes")
    else:
        print("No")
    
    
    
if __name__=="__main__":
    main()

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

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

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

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

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

Solution (Python):


import sys
read = sys.stdin.read
readline = sys.stdin.readline

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


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

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

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

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

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

a,b,c=map(int,input().split())
k=int(input())
for _ in range(k):
    if a>=b:
        b*=2
    else:
        if b>=c:
            c*=2

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

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

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):


'''
Author: andyli
Time: 2020-07-25 19:57:00
'''

import os
from io import BytesIO, IOBase
import sys


def main():
    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 c>b>a else 'No')
    return



BUFSIZE = 1048576


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


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
def input(): return sys.stdin.readline().rstrip('\r\n')




if __name__ == '__main__':
    main()

Solution (Python):
from collections import deque
import math

def Next(): return input()
def NextInt(): return int(Next())
def NextInts(): return map(int,input().split())
def Nexts(): return map(str,input().split())
def NextIntList(): return list(map(int,input().split()))
def RowInts(n): return [input() for i in range(n)]

a,b,c = NextInts()
k = NextInt()

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

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

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



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):
def main():
    A, B, C = list(map(int, input().split()))
    K = int(input())
    k = 0
    while B <= A:
        k += 1
        B *= 2
    while C <= B:
        k += 1
        C *= 2
    return k <= K

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

Solution (Python):
A,B,C=map(int,input().split())
K=int(input())
x=0
while B<=A:
    B*=2
    x+=1
while C<=B:
    C*=2
    x+=1
print(['No','Yes'][x<=K])

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

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

F=0
for x in range(K+1):
    for y in range(K+1):
        for z in range(K+1):
            p=A*2**x
            q=B*2**y
            r=C*2**z
            if p<q<r and x+y+z<=K:
                F=1

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

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

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

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

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    a,b,c = LI()
    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")
    return


if __name__ == "__main__":
    solve()

Solution (Python):
from collections import deque, Counter, defaultdict
from itertools import chain, combinations
import json

import bisect
import sys
import math
import bisect
from functools import lru_cache
import itertools

sys.setrecursionlimit(10 ** 8)

M = 10 ** 9 + 7
INF = 10 ** 17


def main():
    A, B, C = [int(a) for a in input().split()]
    
    K = int(input())
    
    
    c = 0
    while A >= B:
        B *= 2
        c += 1
    while B >= C:
        C *= 2
        c += 1
    if c <= K:
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    main()

Solution (Python):
a, b, c = map(int, input().split())
k = int(input())
for _ 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
    else:
        C *= 2

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

else:
    print('No')

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

Solution (Python):
a,b,c = map(int,input().split())
n = int(input())
for i in range(3 ** n):
    l = [a,b,c]
    for j in range(n):
        l[i % 3] *= 2
        i //= 3
    if l[0] < l[1] and l[1] < l[2]:
        print('Yes')
        exit(0)
print('No')

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

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

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

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

Solution (Python):



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