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: Wrong Answer

Solution code:
A,B,C=map(int,input().split())
K=int(input())
flag = 0
for k in range(K):
    if B*(k+1)*2>A:
        Bnew=B*(k+1)*2
        newK = K - k - 1
        for newk in range(newK):
            if C * (newk + 1) * 2 > Bnew:
                print('Yes')
                flag=1
                break
        break

if flag == 0:
    print('No')

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
K = int(input())
for k in range(K):
    if A < B < C:
        break
    elif A >= B:
        B = B*2
    elif B >= C:
        C = C*2
if A < B < C:
    print('Yes')
else:
    print('No')
print(A,B,C)

Submission status: Wrong Answer

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

for i in range(K):
    if B > G > R:
        ans = 'Yes'
        break
    elif max(R,G,B) != B:
        B=B*2
    elif min(R,G,B) != R:
        G=G*2
    else:
        R=R*2
#print(R,G,B)
if B > G > R:
        ans = 'Yes'
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

m = 0
while m <= ops:
    if max(r, g, b ) != b:
        b *= 2
        m += 1
    else:break
while m < ops:
    if max(r, g) != g :
        g *= 2
        m += 1
    else:
        break
print(r,g,b)
print("Yes" if r < g < b else "No")

Submission status: Wrong Answer

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 a < b < c and k-count<= 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
r,g,b=input().split()
k=int(input())
r=int(r)
g=int(g)
b=int(b)
while k>0:
    while (g<r):
        g=g*2
        k-=1

    while(b<g or b<r):
        b=b*2
        k-=1
    

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

for cnt in range(k):
    if a < b and b < c:
        print(bool(b < c))
        break
    elif a >= b:
        b = int(b * 2)
        print(a, b, c)
        continue
    elif b >= c:
        c = int(c * 2)
        print(a, b, c)
        continue

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

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())
K=int(input())
flag = 0
for k in range(K):
    if B*(k+1)*2>A:
        Bnew=B*(k+1)*2
        newK = K - k - 1
        for newk in range(newK):
            if C * (newk + 1) * 2 > Bnew:
                print('Yes')
                flag=1
                break
        break

Submission status: Wrong Answer

Solution code:
mylist = []
x = 0
while x <= 1:
  val = input()
  x = x + 1
  if val:
    mylist.append(val)
  else:
    break
 


a = mylist[0].split( )
A = int(a[0])
B = int(a[1])
C = int(a[2])
K = int(mylist[1])
r = A
g = B 
b = C



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


if b > g and g > r:
    print("yes")
else:
    print("no")    

        


# B > G > R

Submission status: Wrong Answer

Solution code:
a,b,c= list(map(int, input().strip().split()))
N = int(input().strip())
x=0
y=N
for i in range(100):
    b*=2
    x=x+1
    y=y-1
    if b>a:
        break

if y<0:
    if c<=b:
        print("No")
    else:
        print("Yes")
else:
    for i in range(y):
        c*=2
    if c<=b:
        print("No")
    else:
        print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
i = list(map(int, input().split()))
K = int(input())
red=i[0]
red_double=i[0]*2
green=i[1]
green_double=i[1]*2
blue=i[2]
blue_double=i[2]*2
success=0

for num in range(K):
  if blue < green:
    blue = blue_double
    blue_double = blue_double*2
  elif green < red:
    green = green_double
    green_double = green_double*2
  else:
    blue = blue_double
    blue_double = blue_double*2

    
if (blue > green and  green > red):
  success=1

if success == 1:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import itertools
abc = list(map(int, input().split()))
K = int(input())
tmp = [0, 1, 2, 3]
ans = 'No'

for i in itertools.permutations(tmp, 3):
    if sum(i) == K:
        tmpabc = []
        for j in range(3):
            tmpabc.append(abc[j] * (2 ** i[j]))
        if tmpabc[0] < tmpabc[1] and tmpabc[1] < tmpabc[2]:
            ans = 'Yes'
            break

print(ans)

Submission status: Wrong Answer

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

for i in range(K):
    if G <= R:
        G *= 2
    elif B <= G:
        B *= 2
    print('Green: ' + str(G) + ' blue:' + str(B))


if R <= G and G <= B:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys

A,B,C=map(int,input().split())
K=int(input())
for i in range(4):
  if( A < B and B < C):
    print('Yes')
    sys.exit()
  else:
    if(i >= 3):
      print('No')
      sys.exit()
    else:
      #print(K,A,B,C,i)
      if(A >= B):
        B *= 2
      elif(B >= C):
        C *= 2
      else:
        pass

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
r, g, b = [int(k) for k in input().split()]
k = int(input())
u = 0
# print(b,g,r)
if not b > g > r:
    if g <= r:
        t = math.ceil(((r + 1) / g) ** 0.5)
        # print(t)
        g *= 2 ** t
        u += t
    # print(b,g,r)
    if b <= r:
        # print(t)
        t = math.ceil(((r + 1) / g) ** 0.5)
        b *= 2 ** t
        u += t
    # print(b,g,r)
    if b <= g:
        t = math.ceil(((g + 1) / b) ** 0.5)
        # print(t)
        b *= 2 ** t
        u += t
    # print(b,g,r)
# print(u)
if u <= k:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import itertools
abc = list(map(int, input().split()))
K = int(input())
tmp = [0, 1, 2, 3]
ans = 'No'

for i in itertools.permutations(tmp, 3):
    if sum(i) == K:
        tmpabc = []
        for j in range(3):
            if i[j] == 0:
                tmpabc.append(abc[j])
            elif i[j] == 1:
                tmpabc.append(abc[j] * 2)
            elif i[j] == 2:
                tmpabc.append(abc[j] * 4)
            else:
                tmpabc.append(abc[j] * 8)
        if tmpabc[0] < tmpabc[1] and tmpabc[1] < tmpabc[2]:
            ans = 'Yes'
            break

print(ans)

Submission status: Wrong Answer

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


# C > B > A
for i in range(K):
    if C >= B and B >= A:
        # C > B > A
        C = C * 2
    elif C >= A and A >= B:
        # C > A > B
        B = B * 2
    elif (
        (A >= B and B >= C)
        or (B >= A and A >= C)
        or (A >= C and C >= B)
        or (B >= C and C >= A)
    ):
        # A > B > C, B > A > C, A > C > B, B > C > A
        C = C * 2

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

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

Submission status: Wrong Answer

Solution code:

R,G,B=map(int,input().split())
K = int(input())
while (B<=G or G<=R) and K>0:
    if R>=G:
        G = G*2
        K = K-1
    if G>=B:
        B = B*2
        K = K-1
if R<G and G<B:
    print("Yes")
else:
    print('No')

Submission status: Wrong Answer

Solution code:
X = list(map(int,input().split()))
A = X[0]
B = X[1]
C = X[2]
K = int(input())
cnt = 0
if A > B:
  for i in range(K):
   B = B*2
   cnt = cnt + 1
   if A < B:
    break
if B > C:
  for j in range(K):
   C = C*2
   cnt = cnt + 1
   if B < C:
    break 
      
if cnt <= K:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

for i in range(K):
    if G < R:
        G *= 2
    elif B < G:
        B *= 2
    print('Green: ' + str(G) + ' blue:' + str(B))


if R < G and G < B:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
K= int(input()) 
 
 
if (B**K>A)&(C>B**K):
  print("Yes")
elif (B**(K-1)>A)&(C>B**1) :
  print("Yes")
elif (B**(K-2)>A)&(C>B**2) :
  print("Yes")
elif (B**(K-3)>A)&(C>B**3) :
  print("Yes")
elif (B**(K-4)>A)&(C>B**4) :
  print("Yes")
elif (B**(K-5)>A)&(C>B**5) :
  print("Yes")
elif (B**(K-6)>A)&(C>B**6) :
  print("Yes")
elif (B**(K-7)>A)&(C>B**7) :
  print("Yes")
else :
  print("No")

Submission status: Wrong Answer

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

i = 0
for i in range(k):
    if(b>c):
        c = c*2
    elif(a>b):
        b = b*2
    else:
        break
if(a<b<c):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import math

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

K = int(input())

N = math.log2(A / B)
N = math.ceil(N)

# print('B: ', B)
B = B * 2 ** N
# print('-> B: ', B)
# print('N = ', N)

M = math.log2(B / C)
M = math.ceil(M)

# print('----------')

# print('C: ', C)
C = C * 2 ** M
# print('-> C: ', C)
# print('M = ', M)


# print(' ')
if (N + M) <= K:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
K = int(input())
for k in range(K):
    if A < B < C:
        break
    elif A > B:
        B = B*2
    elif B > C:
        C = C*2
if A < B < C:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

def f(R,G,B):
  if R<G and G<B:
    return 1
  elif R<G and G>B:
    return 2
  else:
    return 3

c = 0
fl = 0

while c <= K:
  c +=1
  if f(R,G,B)==1:
    fl = 1
    c = K+1
  elif f(R,G,B)==2:
    B = B*2
  else:
    G = G*2
    
if fl == 0:
  print("No")  
else:
  print("Yes")

Submission status: Wrong Answer

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

count = 0
while count < k:
  if a >= b:
    b *= 2
    count += 1
  if b >= c:
    c *= 2
    count += 1

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

Submission status: Wrong Answer

Solution code:
import sys

A,B,C=map(int,input().split())
K=int(input())
for i in range(4):
  if( A < B and B < C):
    print('Yes')
    sys.exit()
  else:
    if(i >= 3):
      print('No')
      sys.exit()
    else:
      print(K,A,B,C,i)
      if(A >= B):
        B *= 2
      elif(B >= C):
        C *= 2
      else:
        pass

Submission status: Wrong Answer

Solution code:
A = input().split()
K = int(input())
for i in range(len(A)):
  A[i] = int(A[i])

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

Submission status: Wrong Answer

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

ans = "No"
for bi in range(k+1):
    bb = b
    cc = c * (2 ** (k - bi))

    for _ in range(bi):
        bb *= 2
        if a < bb and bb < cc:
            ans = "Yes"

    if ans == "Yes":
        break

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
for i in range(k):
    if a>b:
        b=b*2
        print(a,b,c)
        if b>c:
            c=c*2
            print(a,b,c)


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

Submission status: Wrong Answer

Solution code:
r,g,b=input().split()
k=int(input())
r=int(r)
g=int(g)
b=int(b)
while k>0:
    while(b<g):
        b=b*2
        k-=1
    while (g<r):
        g=g*2
        k-=1


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

Submission status: Wrong Answer

Solution code:
import numpy as np
A = [int(x) for x in input().split()]
src = np.array(A)
K = int(input())
flag = 0

for i in range(K):
  if(src[0] < src[1]):
    if(src[1] < src[2]):
      flag = 1
      break
    else:
      src[2] *= 2
  else:
    src[1] *= 2
   
if(src[0] < src[1]):
	if(src[1] < src[2]):
		print("yes")
	else:
		print("no")
else:
  print("no")

Submission status: Wrong Answer

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


n = 0
while L[0] >= L[1]:
    L[1] = L[1]*2
    n = n+1



while L[1] >= L[2]:
    L[2] = L[2]*2
    n = n+1


if n <= K:
    print("yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
A,B,C = input().split()
K = int(input())
first = "N"
second = "N"
f = 1
s = 1
nokori = K
for i in range(1,K):
    if int(A) < int(B)*f:
        first = "Y"
        nokori = i
        break
    else:
        f *= 2
        
        print(f)
if int(A) < int(B)*f:
        first = "Y"
        nokori -= K
if first == "Y":
    for o in range(1,nokori):
        if int(B) < int(C)*(s**2):
            second = "Y"
            break
        else:
            s *= 2
    if int(B)*f < int(C)*(s**2):
            second = "Y"
        
if first == "Y" and second == "Y":
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# A 赤 B 緑 C 青
# 青 > 緑 > 赤

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

    cnt = 1
    while cnt <= k:
        if a < b and b < c:
            print("Yes")
            return 0

        elif c < a or c < b:
            c = c * 2
            cnt = cnt + 1

        elif b < a:
            b = b * 2
            cnt = cnt + 1

    print("No")
    return 0

main()

Submission status: Wrong Answer

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

for i in range(K):
    if(B > C or A > C):
        C = C * 2
    elif(A > B):
        B = B * 2
    else:
        C = C * 2

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import itertools
abc = list(map(int, input().split()))
K = int(input())
tmp = [0, 1, 2, 3]
ans = 'No'

for i in itertools.permutations(tmp, 3):
    if sum(i) == 3:
        tmpabc = []
        for j in range(3):
            if i[j] == 0:
                tmpabc.append(abc[j])
            elif i[j] == 1:
                tmpabc.append(abc[j] * 2)
            elif i[j] == 2:
                tmpabc.append(abc[j] * 4)
            else:
                tmpabc.append(abc[j] * 8)
        if tmpabc[0] <= tmpabc[1] and tmpabc[1] <= tmpabc[2]:
            ans = 'Yes'
            break

print(ans)

Submission status: Wrong Answer

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


A_l  = [2**(i)*A for i in range(K+1)]
B_l  = [2**(i)*B for i in range(K+1)]
C_l  = [2**(i)*C for i in range(K+1)]

res = 0
for l, c in enumerate(C_l):
    for m, b in enumerate(B_l):
        for n, a in enumerate(A_l):
            if a < b and b < c and l + m + n <= K:
                print('Yes')
                res += 1
                break

if res == 0:
    print('No')

Submission status: Wrong Answer

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

for i in range(k):
    if a >= c:
        c *= 2
    elif a >= b:
        b *= 2

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

Submission status: Wrong Answer

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

while K > 0:
    if C < B:
        C *= 2
    if B < A:
        B *= 2
    K -= 1
if A < B and B < C and A < C:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
import itertools
abc = list(map(int, input().split()))
K = int(input())
tmp = [0, 1, 2, 3]
ans = 'No'

for i in itertools.permutations(tmp, 3):
    if sum(i) == 3:
        tmpabc = []
        for j in range(3):
            if i[j] == 0:
                tmpabc.append(abc[j])
            elif i[j] == 1:
                tmpabc.append(abc[j] * 2)
            elif i[j] == 2:
                tmpabc.append(abc[j] * 4)
            else:
                tmpabc.append(abc[j] * 8)
        if tmpabc[0] < tmpabc[1] and tmpabc[1] < tmpabc[2]:
            ans = 'Yes'
            break

print(ans)

Submission status: Wrong Answer

Solution code:
import itertools
abc = list(map(int, input().split()))
K = int(input())
tmp = [0, 1, 2, 3]
ans = 'No'

for i in itertools.permutations(tmp, 3):
    if sum(i) == 3:
        tmpabc = []
        for j in range(3):
            if i[j] == 0:
                tmpabc.append(abc[j])
            elif i[j] == 1:
                tmpabc.append(abc[j] * 2)
            elif i[j] == 2:
                tmpabc.append(abc[j] * 4)
            else:
                tmpabc.append(abc[j] * 6)
        if tmpabc[0] < tmpabc[1] and tmpabc[1] < tmpabc[2]:
            ans = 'Yes'
            break

print(ans)

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())
K=int(input())
flag = 0
for k in range(K):
    if B*(k+1)*2>A:
        newK = K - k - 1
        for newk in range(newK):
            if C * (newk + 1) * 2 > B:
                print('Yes')
                flag=1
                break
        break

if flag == 0:
    print('No')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
for i in range(0,k+1):
    asw=False
    for j in range(0,k+1):
        if i+j<=k and a<b*(2**(i+1)) and b*(2**(i+1))< c*(2**(j+1)):
            print("Yes")
            asw=True
            # print(i,j,k)
            break
    if (asw):break
else : print("No")

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
A_temp = A
B_temp = B
C_temp = C
K = int(input())
index = 0

if B > A and C > B:
    index = 1

for i in range(1, K + 1):
    B = B * 2
    if B > A and C > B:
        index = 1
        break
B = B_temp

for i in range(1, K + 1):
    C = C * 2
    if B > A and C > B:
        index = 1
        break
C = C_temp

for i in range(1, K):
    B = B * 2 * i
    C = C * 2 * (K - i)
    if B > A and C > B:
        index = 1
        break
    B = B_temp
    C = C_temp
B = B_temp
C = C_temp

for i in range(1, K):
    B = B * 2 * (K - i)
    C = C * 2 * i
    if B > A and C > B:
        index = 1
        break
    B = B_temp
    C = C_temp


if index == 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

for i in range(k):
    if a>c:
        c=c*2
    elif a<c and b>c:
        c=c*2
    elif a<c and b<a:
        b=b*2
    
if c>b and b>a:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import numpy as np
A = [int(x) for x in input().split()]
src = np.array(A)
K = int(input())
flag = 0

for i in range(K):
  if(src[0] < src[1]):
    if(src[1] < src[2]):
      flag = 1
      break
    else:
      src[2] *= 2
  else:
    src[1] *= 2
   
if(src[0] < src[1]):
	if(src[1] < src[2]):
		print("yes")
else:
	print("no")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

for i in range(1, K):
  for ii in range(1, K - i):
    iii = K - i - ii
    A = A * (2 ** i)
    B = B * (2 ** ii)
    C = C * (2 ** iii)
    if A < B < C:
      print('Yes')
      exit(0)
print('No')

Submission status: Wrong Answer

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


A_l  = [2**(i)*A for i in range(K+1)]
B_l  = [2**(i)*B for i in range(K+1)]
C_l  = [2**(i)*C for i in range(K+1)]

res = 0
for l, c in enumerate(C_l):
    for m, b in enumerate(B_l):
        for n, a in enumerate(A_l):
            if a < b and b < c:
                if l + m + n <= K:
                    print('Yes')
                    res += 1
                    break


if res == 0:
    print('No')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
for i in range(0,k+1):
    asw=False
    for j in range(0,k+1):
        if i+j<=k and a<b*2**(i+1) and b*2**(i+1)< c*2**(j+1):
            print("Yes")
            asw=True
            # print(i,j,k)
            break
    if (asw):break
else : print("No")

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
K = int(input())
N = K
STOP1 = False
STOP2 = False
for i in range(K):
    if B < A and N>0:
        N-=1
        B*=2
    if B >=A:
        break
for i in range(N):
    if C < B:
        C*=2
if B>=A and C>=B:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())
K=int(input())
flag = 0
for k in range(K):
    if B*(k+1)*2>A:
        newK = K - k - 1
        for newk in range(newK):
            if C * (k + 1) * 2 > B:
                print('Yes')
                flag=1
                break
        break

if flag == 0:
    print('No')

Submission status: Wrong Answer

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


# C > B > A
for i in range(K):
    if C >= B and C >= A and B >= A:
        C = C * 2
    elif C >= B and C >= A and A >= B:
        # C > A > B
        B = B * 2
    elif (
        (A >= B and A >= C and B >= C)
        or (B >= A and B >= C and A >= C)
        or (A >= C and A >= B and C >= B)
        or (B >= C and B >= A and C >= A)
    ):
        # A > B > C, B > A > C, A > C > B, B > C > A
        C = C * 2

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k = int(input())
flag = False
for i in range(k):
    for j in range(k-i):
        for d in range(k-i-j):
            if a*(2*i)<b*(2*j)<c*(2*d):
                flag = True
                
if flag == True:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:

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

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

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

Submission status: Wrong Answer

Solution code:
nums=[int(e) for e in input().split()]
K=int(input())

for i in range(K):
    if nums[0]>=nums[1] and nums[1]>=nums[2] or nums[0]>=nums[2] and nums[2]>=nums[1] or nums[1]>=nums[0] and nums[0]>=nums[2] or nums[1]>=nums[2] and nums[2]>=nums[0] or nums[2]>=nums[1] and nums[1]>=nums[0]:
        nums[2]=2*nums[2]
    elif nums[2]>=nums[0] and nums[0]>=nums[1]:
        nums[1]=2*nums[1]
    
if nums[2]>nums[1] and nums[1]>nums[0]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

for i in range(k):
    if a >= b:
        b = b*2
    elif b > c:
        c = c*2

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

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

flag = False
for i in range(K):
    if A>B:
        B *= 2
        continue
    else:
        C *= 2
        continue

    if A<B and B<C:
        print("Yes")
        flag=True
        break

#基からA<B<Cのとき
if A<B and B<C:
    print("Yes")
    flag=True

if flag == False:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
for i in range(0,k+1):
    asw=False
    for j in range(0,k+1):
        if i+j<=k and a<b*2**(i+1) and b**(i+1)< c*2**(j+1):
            print("Yes")
            asw=True
            # print(i,j,k)
            break
    if (asw):break
else : print("No")

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
mylist = []
x = 0
while x <= 1:
  val = input()
  x = x + 1
  if val:
    mylist.append(val)
  else:
    break
 


a = mylist[0].split( )
A = int(a[0])
B = int(a[1])
C = int(a[2])
K = int(mylist[1])
r = A
g = B 
b = C



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

if b > g and g > r:
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

Solution code:
import numpy as np
import math
a,b,c = np.array(list(map(int,input().split())))
K = int(input())

if a > b :
    b_a = abs(np.log2(b/a))
    b *= np.power(2,math.ceil(b_a))
    if b > c:
        c_b = abs(np.log2(c/b))
        if math.floor(b_a) + math.floor(c_b) <= K-2:
            print('Yes')
        else:
            print("No")
    else:
        print('Yes')
else:
    print('Yes')