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.



Sample input:
7 2 5
3


Sample output:
Yes

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

i = 0
while i < K:
    if B <= A:
        B *= 2
        i += 1
    else:
        if C <= B:
            C *= 2
            i += 1

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

Submission status: Time Limit Exceeded

Solution code:
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

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
a, b, c = map(int, input().split())
k = int(input())
while k:
    if not a < b:
        b *= 2
        k -= 1
        continue
    elif not b < c:
        c *= 2
        k -= 1


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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding:UTF-8
import sys
from math import factorial

MOD = 10 ** 9 + 7
INF = float('inf')

A, B, C = list(map(int, input().split()))     # スペース区切り連続数字
K = int(input())    # 数字

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
a,b,c = map(int,input().split())
k = int(input())
for i in range(k+1):
    if b * 2**i > a:
        n = i
        break
for j in range(k-n+1):
    if c * 2**j > b * 2**n:
        print("Yes")
        sys.exit()
print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def dfs(i,r,g,b):
    global ans
    if i == k:
        if r < g and g < b:
            ans += 1
        return
    dfs(i+1,r*2,g,b)
    dfs(i+1,r,g*2,b)
    dfs(i+1,r,g,b*2)

a,b,c = map(int,input().split())
k = int(input())
ans = 0
dfs(0,a,b,c)
if ans > 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
x = [0,0,0]
K = int(input())
flag = False
for i in range(K+1):
    for j in range(K+1):
        for k in range(K+1):
            x = A*(2**i)
            y = B*(2**j)
            z = C*(2**k)
            if i+j+k<=K and x<y and y<z:
                flag = True
                break
if flag == True:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def check(r,g,b):
    if g > r and b > g:
        return True
    else:
        return False

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 i+j+k==0:
                continue

            r = A*(2**i)
            g = B*(2**j)
            b = C*(2**k)
            if check(r, g, b):
                print("Yes")
                exit()

print("No")

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
A = a[0]
B = a[1]
C = a[2]
aa = input()
K = int(aa)

flag = 0
r = 0

while r <= K:
    if A < B:
        if B < C:
            flag = 1
            break
        else:
            C = C*2
            r = r + 1
    else:
        B = B*2
        r = r + 1
if flag == 0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
k=int(input())
f=0
for i in range(1,k+1):
    d=c*(2**i)
    e=b*(2**(k-i))
    if a<e<d:
        f=1
print('Yes' if f else 'No')

Submission status: Accepted

Solution code:
def magic(a,b,c,k):
	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")
d,e,f = map(int,input().split())
j = int(input())
magic(d,e,f,j)

Submission status: Accepted

Solution code:
a,b,c= list(map(int,input().split()))
n = int(input())
ans = "No"

for i in range(n):
  if b <= a:
    b = 2*b
  elif c <= b:
    c = 2*c
    
if a<b<c:
  ans = "Yes"

print(ans)

Submission status: Accepted

Solution code:
N,M,K = map(int,input().split())
num = int(input())
while num>0:
  if K<=M or K<=N:
    K = K*2
    num -= 1
  elif M<=N:
    M = M*2
    num -= 1
  elif M>N:
    K = K*2
    num -= 1
    
if N<M and M<K:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(A,B,C,K):
    ans=False
    while K >= 0:
        if A < B:
            if B < C:
                ans=True
                return ans
            else:
                C = C * 2
        else:
            B = B * 2
        K=K-1
    return ans
A,B,C=map(int, input().split())
K=int(input())
ans=main(A,B,C,K)
print('Yes' if ans else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
d = int(input())
count = 0
while True:
    if a < b:
        if b < c:
            break
        else:
            c *= 2
            count += 1
    else:
        b *= 2
        count += 1
print("Yes" if count <= d else "No")

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#
# m_solutions2020 b
#
import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """7 2 5
3"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """7 4 2
3"""
        output = """No"""
        self.assertIO(input, output)


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


if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def magic2():
    # A < B < C
    A, B, C = map(int, input().split())
    K = int(input())
    
    if A < B < C:
        print("Yes")
        return
    for i in range(K):
        if B <= A:
            B *= 2
        elif C <= B:
            C *= 2
            
        if A < B < C:
            print("Yes")
            break
            
    else:
        print("No")
        
magic2()

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
#b = list(map(int,input().split()))
b=int(input())

for i in range(b):
    if a[2]<=a[1]:
        a[2]=2*a[2]
    elif a[1]<=a[0]:
        a[1]=2*a[1]
if a[0]<a[1]<a[2]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
r, g, b = [int(x) for x in input().split()]
times = int(input())

def check(r, g, b, times):
    while True:
        if b > g > r:
            return 'Yes'
        elif b <= g:
            times -= 1
            b *= 2
        elif g <= r:
            times -= 1
            g *= 2
        if times < 0:
            return 'No'

print(check(r, g, b, times))

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    a, b, c = map(int,input().split())
    k = int(input())
    cunt = 0
    while a >= b:
        b *= 2
        cunt += 1
    while b >= c:
        c *= 2
        cunt += 1
    if cunt > k:
        print("No")
    else:
        print("Yes")
    


if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
# M-SOLUTIONS プロコンオープン 2020: B – Magic 2
A, B, C = [int(i) for i in input().split()]
K = int(input())

is_success = 'No'

for i in range(K + 1):
    for j in range(K + 1):
        for k in range(K + 1):
            if i + j + k <= K and A * 2 ** i < B * 2 ** j < C * 2 ** k:
                is_success = 'Yes'

print(is_success)

Submission status: Accepted

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

Submission status: Accepted

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

f=False
for _ in range(k):
  if b<=a:
    b*=2
  elif c<=b:
    c*=2
  if c>b>a:
    f=True
    break

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

Submission status: Accepted

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

cnt = 0

while not(R < G):
    G *= 2
    cnt += 1
while not(G < B):
    B *= 2
    cnt += 1

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

Submission status: Accepted

Solution code:
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
check = k >= count
print("Yes" if check else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
k = int(input())
cnt = 0
cnt2 = 0
ans = "No"
for i in range(k):
    if a < b:
        break
    else:
        b = b * 2
        cnt +=1
for i in range(k-cnt):
    if b < c:
        break
    else:
        c = c * 2
        cnt2 +=1
        
if a < b and b < c and cnt + cnt2 <=k:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
clr = list(map(int, input().split()))
k = int(input())

for i in range(k):
    if clr[2] <= clr[1] :
        clr[2] *= 2
    
    elif clr[1] <= clr[0]:
        clr[1] *= 2
    
    else:
        break
    
if clr[2] > clr[1] > clr[0] :
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# 3
A,B,C=map(int,input().split())
K=int(input())

def f(a,b,c,k):
    if k==0:
        return a<b<c
    return f(a*2,b,c,k-1) or f(a,b*2,c,k-1) or f(a,b,c*2,k-1)

print('Yes' if f(A,B,C,K) else 'No')

Submission status: Accepted

Solution code:
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):
            x = a * 2**i
            y = b * 2**j
            z = c * 2**k
            if i+j+k<=K and y > x and z > y:
                print("Yes")
                exit()

print("No")

Submission status: Accepted

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

ans = 0

for i in range(K):
    if A < B * (2**i) < C * (2**(K-i)):
        ans += 1
    else:
        pass

if ans > 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# B>G>R
R,G,B = map(int,input().split())
K = int(input())

cnt = 0

while not G>R:
    G *= 2
    cnt += 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
k=int(input())
for n 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')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

while 1:
    if B < C:
        break
    else:
         C *= 2
         ans += 1

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

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
K=int(input())
i=0
while i<K:
    if A>=B:
        i+=1
        B*=2
    else:
        break
while i<K:
    if B>=C:
        i+=1
        C*=2
    else:
        break

print('YNeos'[(A>=B)or(B>=C)::2])

Submission status: Accepted

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

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

print('Yes' if i <= K else 'No')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
from math import log2
from math import ceil
a,b,c = map(int,input().split())
k = int(input())
s1 = max(ceil(log2((a+1)/b)),0)
s2 = max(ceil(log2((b*2**s1+1)/c)),0)
if s1+s2 <= k:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
x,y,z=map(int,input().split())
k=int(input())
while(x>=y):
    y*=2
    k-=1
while(y>=z):
    z*=2
    k-=1
if(k>=0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

while True:
  if B <= A:
    B *= 2
    res += 1
  else:
    break
    
while True:
  if C <= B:
    C *= 2
    res += 1
  else:
    break

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for _ in range(k):
  if int(a) >= int(b):
    b = int(b) * 2
  else:
    c = int(c) * 2
    
if int(a) < int(b) and int(b) < int(c):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
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
print("Yes" if a < b and b < c else "No")

Submission status: Accepted

Solution code:
from sys import stdin
input = stdin.buffer.readline

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
k=int(input())
while k>0:
  if not b>a:
    b*=2
    k-=1
  elif not c>b:
    c*=2
    k-=1
  else:
    break

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def judge(A, B, C):
  if A < B:
    if B < C:
      return True
  return False
  
A, B, C = map(int, input().split())
K = int(input())
ans = "No"
for _ in range(K):
  if B <= A:
    B = B * 2
  elif C <= B:
    C = C * 2
  
  if judge(A, B, C):
    ans = "Yes"
    break
print(ans)

Submission status: Accepted

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


def cal():
    global A, B, C, K
    count = 0
    while A >= B:
        B *= 2
        count += 1
        if K < count:
            return "No"
    while B >= C:
        C *= 2
        count += 1
        if K < count:
            return "No"
    return "Yes"


print(cal())

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
K=int(input())
D=[]
for i in range(K):
    for j in range(K-i):
        if A*(2**i)<B*(2**j) and B*(2**j)<C*(2**(K-i-j)):
            D.append('Yes')
        else:
            D.append('No')
if ('Yes' in D)==True:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

flag = False
cnt = 0

while(A>=B):
    if cnt > K :
        break
    B = 2*B
    cnt += 1

while(B>=C):
    if cnt >= K:
        break
    C = 2*C
    cnt += 1

#print(A,B,C)
if A < B and B < C:
    flag = True

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

for i in range(K):
  if B >= C or  A >= C:
    C *= 2
  else:
    if A >= B:
      B *= 2
if C > B and B > A:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
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 print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=list(map(int, input().split()))
K=int(input())
ct=0
while b<=a:
  b*=2
  ct+=1
while c<=b:
  c*=2
  ct+=1
if ct<=K:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
red, green, blue = map(int, input().split())
k = int(input())
success = 0
for cnt in range(k+1):
    if red >= green:
        green *= 2
    elif red >= blue:
        blue *= 2
    elif green >= blue:
        blue *= 2
    else:
        success = 1
        break
if success == 1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
ABC = list(map(int,input().split()))
red = ABC[0]
green = ABC[1]
blue = ABC[2]
K = int(input())

for i in range(K):
  if green <= red:
    green *= 2
    continue
  elif blue <= green:
    blue *= 2

if green > red and blue > green:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
n = int(input())

for i in range(n):
    if a[0] >= a[1]:
        a[1] *= 2
    elif a[1] >= a[2]:
        a[2] *= 2
    
if a[0] < a[1] < a[2]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
ans = False
k = int(input())

for i in range(k):
  if a < b * 2 ** i < c * 2 ** (k - i):
    ans = True

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

Submission status: Accepted

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

ans = 'No'
for i in range(k+1):
  if a < b*(2**i) < c*(2**(k-i)):
    ans = 'Yes'
    
print(ans)

Submission status: Accepted

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

ans = 'No'
for i in range(k+1):
  if a < b*(2**i) < c*(2**(k-i)):
    ans = 'Yes'
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

ans = False

for i in range(k + 1):
    for j in range(k-i+1):
        for l in range(k-i-j+1):
            aa = a * pow(2,i)
            bb = b * pow(2,j)
            cc = c * pow(2,l)
            # print("{0} {1} {2}".format(aa,bb,cc))
            if(aa  < bb  and bb < cc):
                ans = True            

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

Submission status: Accepted

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

ans = 'No'
while K >= 0:
    if A < B:
        break
    B *= 2
    K -= 1

while K >= 0:
    if B < C:
        ans = 'Yes'
        break
    C *= 2
    K -= 1

print(ans)

Submission status: Accepted

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

if a >= b:
    x = a // b
    x_ = len(bin(x)) - 2
else:
    x_ = 0

b *= 2 ** x_

if b >= c:
    y = b // c
    y_ = len(bin(y)) -2
else:
    y_ = 0

if (x_ + y_) <= k:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    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')
if __name__=='__main__':
    solve()

Submission status: Accepted

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

for i in range(K):
    if b<=a:
        b=b*2

    elif c<=b:
        c=c*2

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

Submission status: Accepted

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