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: Runtime Error

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

for i in range(n-k):
    if a[i+k] > a[i]:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

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



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

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

Submission status: Runtime Error

Solution code:
cnt = 0
while red >= green:
    green *= 2
    cnt += 1
while green >= blue:
    blue *= 2
    cnt += 1

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python

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

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

Submission status: Runtime Error

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

while(A>B):
  K-=1
  if K==0:
    print("No")
    exit()
  B=B*2

while(B>C):
  C=C*2
  if K==1:
    break
  K-=1
  if K==0:
    print("No")
    exit()

Submission status: Runtime Error

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

while(A>B):
  K-=1
  if K==0:
    print("No")
    exit()
  B=B*2

while(B>C):
  C=C*2
  if K==1:
    break
  K-=1
  if K==0:
    print("No")
    exit()

print("Yes")

Submission status: Runtime Error

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: Runtime Error

Solution code:
a,b,c = map(int,input().split())
k = int(input())
count = 0
while a >= b:
  count += 1
  b *= 2
while b >= c:
  count += 1
  c *= 2
return(['No','Yes'][count<=k])

Submission status: Runtime Error

Solution code:
    s=int(input())
    lst=s.split("")
    a=lst[0]
    b=lst[1]
    c=lst[2]
    n= int(input())
    for x in range(n):
        if a >= b and c >= a:
            b=b*2
        else:
            c=c*2
    if b > a and c > b:
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
k = int(input())
count = 0
while A >= B:
  count += 1
  B *= 2
while B >= C:
  count += 1
  C *= 2
return(['No','Yes'][count<=k])

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
k = int(input())
count = 0
while A >= B:
  count += 1
  B *= 2
while B >= C:
  count += 1
  C *= 2
return(['Yes', 'No'][count<=k])

Submission status: Runtime Error

Solution code:
a, b, c= map(input().split())
num= int(input())
cot=0
for x in range(num):
    if a >= b and c >= a:
        b=b*2
    else:
        c=c*2
if b > a and c > b:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
try:
    import math
    A,B,C = map(int,input().split())
    k = int(input())
    if A<B and B<C:
        print("YES")
    else:
        if A<B:
            p = math.log(2,(B/C))
            if(k>p):
                print("Yes")
            else:
                print("No")
        elif B<C:
            p = math.log(2,(A/B))
            if(k>p):
                B = B*(2**math.ceil(p))
                if C>B:
                    print("Yes")
                else:
                    if C*(2**(k-math.ceil(p)))>B:
                        print("Yes")
                    else:
                        print("No")
            else:
                print("No")
        else:
            # p = math.log(2,(B/C))
            q = math.log(2,(A/B))
            if(k>(q)):
                B = B*(2**math.ceil(q))
                if(C*(2**(k-math.ceil(q)))>B):
                    print("Yes")
                else:
                    print("No")
            else:
                print("No")
                
except EOFError:
    print(" ")

Submission status: Runtime Error

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

K = int(input())


for i in range(0, K):
    for j in range(0, K):
        for k in range(0, K):
            x = A * 2**i
            y = B * 2**j
            z = C * 2**k

            if x < y < z:
                flag = True
                

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

Submission status: Runtime Error

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


k=int(input())

ans="no"
for i in range(k+1):
  if a<b<c:
    ans="yes"
  else:
    if a>=b:
      b*=2
    elif b>=c:
      c*=2
    else:
      c*=2

print(ans)
print(a)

Submission status: Runtime Error

Solution code:
A,B,C=map(int,input().split())
K=int(input())
if()
for i in range(0,K+1):
    for j in range(0,K+1-i):
        for k in range(0,K+1-i-j):
            #print('{},{},{}'.format(i,j,k))
            if(A*(2**i) < B*(2**j) and B*(2**j) < C*(2**k)):
                if(i==j==k==0):
                    pass
                else:
                    print('Yes')
                    exit()

print('No')

Submission status: Runtime Error

Solution code:
A,B,C=map(int,input().split())
K=int(input())
if()
for i in range(0,K+1):
    for j in range(0,K+1-i):
        for k in range(0,K+1-i-j):
            #print('{},{},{}'.format(i,j,k))
            if(A*(2**i) < B*(2**j) and B*(2**j) < C*(2**k)):
                if(i==j==k==0):
                    pass
                else
                    print('Yes')
                    exit()

print('No')

Submission status: Runtime Error

Solution code:
A,B,C=map(int,input().split())
K=int(input())
if()
for i in range(0,K+1):
    for j in range(0,K+1-i):
        for k in range(0,K+1-i-j):
            #print('{},{},{}'.format(i,j,k))
            if(A*(2**i) < B*(2**j) and B*(2**j) < C*(2**k)):
                if(i==j==k==0):
                    break
                else
                    print('Yes')
                    exit()

print('No')

Submission status: Runtime Error

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

ans="no"
for i in range(k+1):
  if a<b<c:
    ans="yes"
  else:
    if a>=b:
      b*=2
    elif b>=c:
      c*=2
    else:
      c*=2

print(ans)

Submission status: Runtime Error

Solution code:
A,B,C = int(input()),int(input()),int(input())
K = int(input())
for _ in range(K):
    if A >= B:
        B = 2*B
    else:
        C = 2*C
        

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

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
K = int(input())

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

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().slit())
k=int(input())
if a<b:
    if b<c:
        print('Yes')
    else:
        count=0
        while b>=c:
            b*=2
            count+=1
        if count<=k:
            print('Yes')
        else:
            print('No')
else:
    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: Runtime Error

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

for i in range(1,K+1):
    if int(A) < int(B) < int(C):
        print("Yes")
        break
    elif int(A) < int(B) > int(C):
        c = int(C) * (2 ** i) 
        if int(B) < c:
            print("Yes")
            break
        else:
            print("No")
            break
    elif int(A) > int(B) >= int(C):
        b = int(B) * (2 ** i) 
        c = int(C) * 2 * (K-len(b)) 
        if int(A) > b:
            print("No")
            break
        elif int(A) > b:
            print("No")
            break
    elif int(A) > int(B) < int(C):
        b = int(B) * (2 ** i) 
        c = int(C) * 2 * (K-len(b)) 
        if int(A) > b:
            print("No")
            break
        elif int(A) > b:
            print("No")
            break

Submission status: Runtime Error

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

for i in range(1,K+1):
    if int(A) < int(B) < int(C):
        print("Yes")
        break
    elif int(A) < int(B) > int(C):
        c = int(C) * (2 ** i) 
        if int(B) < c:
            print("Yes")
            break
        else:
            print("No")
            break
    elif int(A) > int(B) >= int(C):
        b = int(B) * (2 ** i) 
        c = int(C) * 2 * (K-len(b)) 
        if int(A) > b:
            print("No")
            break
        int(A) > b:
            print("No")
            break
    elif int(A) > int(B) < int(C):
        b = int(B) * (2 ** i) 
        c = int(C) * 2 * (K-len(b)) 
        if int(A) > b:
            print("No")
            break
        elif int(A) > b:
            print("No")
            break

Submission status: Runtime Error

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

if A < B:
 if B < C:
    print('Yes')
 else :
    if C > (B/(2*K)):
        print('Yes')
    else :
        print('No')
else :
    if B > (A/(2*K)):
        if

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B,C = (int(x) for x in input().split())
k = int(input())

if A >= (2**k)*B:
  if A = (2**k)*B:
    if C > (2**k)*B:
      print('Yes')
    else:
      print('No')
  elif A > (2**(k-1))*B:
    if C > (2**k)*B:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('Yes')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = input()
k = int(input())
x = x.split()
y = [int(s) for s in x]
dict = {"red":0, "green":0}
dict["red"] = y[0]
dict["green"] = y[1]
count = 0
if dict["red"] < dict["green"]:
      pass
else:
  for N in range(k):
    count += 1
    dict["green"] = dict["green"] * 2
    if dict["red"] < dict["green"]:
        break
    else:
        continue
if k - count == 0:
  if dict["green"] < dict["blue"]:
    print("No")
  else:
    print("Yes")
else:
  pass
i = k - count
dict["blue"] = y[2]
if dict["green"] < dict["blue"]:
  print("Yes")
  exit()
else:
  for N in range(i):
    dict["blue"] = dict["blue"] * 2
    if dict["green"] < dict["blue"]:
      print("Yes")
      exit()
    else:
        continue
print("No")

Submission status: Runtime Error

Solution code:
x = input().split()
x = [int(s) for s in x]
y = int(input())
z = 0
w = 0
if x[1] > x[0]:
    if x[2] > x[1]:
        w = 1
    else:
        for i in range(y):
            if x[2] > x[1]:
                w = 1
                break
            else:
                x[2] = x[2] * 2
elif x[2] > x[1]:
    for i in range(y):
        if x[1] > x[0]:
            w = 1
            break
        else:
            x[1] = x[1] * 2
else:
    for i in range(y):
        if x[1] > x[0]:
            z = int(i)
            for i in range(y - z):
                if x[2] > x[1]:
                    w = 1
                    break
                else:
                    x[2] = x[2] * 2
        else:
            x[1] = x[1] * 2
if w == 1:
	if x[2] > x[1] > x[0]:
        print("Yes")
    else:
    	print("No")
else:
    print("No")

Submission status: Runtime Error

Solution code:
x = input().split()
x = [int(s) for s in x]
y = int(input())
z = 0
w = 0
if x[1] > x[0]:
    if x[2] > x[1]:
        w = 1
    else:
        for i in range(y):
            if x[2] > x[1]:
                w = 1
                break
            else:
                x[2] = x[2] * 2
elif x[2] > x[1]:
    for i in range(y):
        if x[1] > x[0]:
            w = 1
            break
        else:
            x[1] = x[1] * 2
else:
    for i in range(y):
        if x[1] > x[0]:
            z = int(i)
            for i in range(y - z):
                if x[2] > x[1]:
                    w = 1
                    break
                else:
                    x[2] = x[2] * 2
        else:
            x[1] = x[1] * 2
if w == 1:
	if x[2] > x[1] > x[0]:
        print("Yes")
    else:
    	print("No")
else:
    print("No")

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
K = int(input())

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

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

Submission status: Runtime Error

Solution code:
import math
A,B,C=(int(x) for x in input().split())
k=int(input())
e=math.ceil(A/B)
f=math.ceil(B/C)
y=math.ceil(A/C)
if y>=f:
    z=y
else:
    z=f

g=0
if e>2:
    g+=2
elif e=2:
    g+=1

if z>2:
    g+=2
elif z=2:
    g+=1
if A==B==C:
    g+=3
elif A==B:
    g+=1
elif A==C:
    g+=1
elif B==C:
    g+=1    

if g<=k:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:

import sys
A=int(sys.argv[1])
B=int(sys.argv[2])
C=int(sys.argv[3])
K=int(input())

answer='Yes'



while B<=A:
    B=B*2 
    K-=1


while C<=B:
    C=C*2
    K-=1
 



if K<0:
    answer='No'

print(answer)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
K=int(input())

answer='Yes'



while B<=A:
    B=B*2 
    K-=1


while C<=B:
    C=C*2
    K-=1
 



if K<0:
    answer='No'

print(answer)

Submission status: Runtime Error

Solution code:
a=list(map(int,input().strip().split()))
b=list(map(int,input().strip().split()))
c=[]
for i in range(0,(a[0]-a[1])+1):
  s=1
  for j in range(i,i+a[1]):
    s=s*b[j]
  c.append(s)
for i in range(0,len(c)-1):
  if(c[i]<c[i+1]):
    print("Yes")
  else:
    print("No")

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
K=int(input())
j=0
if A>=(2**K)*B :
    print('No')
else :
    while A>=(2**j)*B :
        j+=1
    if (2**j)*B>=(2**(K-j))*C :
        print('No')
    else:
        print('Yes')

Submission status: Runtime Error

Solution code:

A=int(input())
B=int(input())
C=int(input())
K=int(input())

answer='No'
if B>A and C>B:
    answer='Yes'

else:
    while B<=A:
        B=B*2 
        K-=1
        if B>A and C>B:
            answer='Yes'
            break

    while C<=B:
        C=C*2
        K-=1
        if B>A and C>B:
            answer='Yes'
            break



if K<0:
    answer='No'

print(answer)

Submission status: Runtime Error

Solution code:

def Msol_B():
    a,b,c = np.array(list(map(int,input().split())))
    K = int(input())

    #a,b,c=[7,2,5]
    #K = 3

    import math

    if a > b:
        b_a = abs(math.log2(b/a))+1
        #まずは切りさげ
        b *= math.pow(2,math.floor(b_a))
        if b > c:
            c_b = abs(math.log2(c/b))+1
            if math.floor(b_a)+math.floor(c_b) <= K:
                print("Yes")
            else:
                print("No")
        else:
            print("Yes")
    else:
        print("Yes")




Msol_B()

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
K=int(input())
j=0
if A>=(2**K)*B :
    print('No')
else :
    while A>=(2**j)*B :
        j+=1
    if (2**j)*B>=(2**(K-j))*C :
        print('No')
    else:
        print('Yes')
        print((2**(K-j))*C)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
K=int(input())

answer='No'
if B>A and C>B:
    answer='Yes'

else:
    while B<A:
        B=B*2 
        K-=1
        if B>A and C>B:
            answer='Yes'
            break

    while C<B:
        C=C*2
        K-=1
        if B>A and C>B:
            answer='Yes'
            break



if K<0:
    answer='No'

print(answer)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
K = int(input())

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


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

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
K=int(input())

answer='No'
if B>A and C>B:
    answer='Yes'

else:
    while B>A:
        B=B*2 
        K-=1
        if B>A and C>B:
            answer='Yes'
            break

    while C>B:
        C=C*2
        K-=1
        if B>A and C>B:
            answer='Yes'
            break



if K<0:
    answer='No'

print(answer)

Submission status: Runtime Error

Solution code:
A,B,C=map(int,input().split())
K=int(input())
import math
if A/B <1:
  m=0
else:
   
    B=B*2^m
if B/C <1:
  n=0
else:
    n = math.ceil(math.log(2,B/C))
if m+n>K:
  print("no")
else:
    print("yes")

Submission status: Runtime Error

Solution code:
A = map(int, input().split())
K = int(input())
red = A[0]
green = A[1]
blue = A[2]
count = 0
if green > red:
    for i in range(K):
        blue *= 2
    print("Yes")
else:
    while green > red:
        green *= 2
        count += 1
    if count > K:
        print("No")
    else:
        print("Yes")

Submission status: Runtime Error

Solution code:
import math
A,B,C = map(int, input().split())
K = int(input())
if A > B:
  K1 = math.ceil(math.log(A,B))
  B = B ** K1
  K1 = K1 -1
elif A == B:
  B = B ** 2
  K1 = 1
else:
  K1 = 0

if B > C:
  K2 = math.ceil(math.log(B,C)) - 1
elif B == C:
  K2= 1
else:
  K2= 0
  
if K1 + K2 <= K:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

for i in range(len(K)):
  if C < B:
    C *= 2
    if B < A:
      B *= 2


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

Submission status: Runtime Error

Solution code:
A = map(int, input().split())
K = int(input())
red = A[0]
green = A[1]
blue = A[2]
if red < green + blue:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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:

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

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
b=int(input())
for i in b:
  if list[0]>=list[1]:
    list[1]=list[1]*2
  else:
    if list[1]>=list[2]:
      list[2]=list[2]*2
if list[0]<list[1]<list[2]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a,b,c= 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:
    ans+=0
  
print(Yes if ans>=1 else No)

Submission status: Runtime Error

Solution code:
N = list(map(int,input()))
k = int(input())

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

Submission status: Runtime Error

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):
    if B > A and C > B:
        index = 1
        break
    B = B * 2
B = B_temp

for i in range(1, K + 1):
    if B > A and C > B:
        index = 1
        break
	C = C * 2
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: Runtime Error

Solution code:
from itertools import *
*x,=map(int,input().split())
K=int(input())
for i in product(range(K), repeat=K):
    a = x.copy()
    for j in i:
        a[j] *= 2
        if a[0] < a[1] and a[1] < a[2]: 
            print('Yes')
            exit()
else:
    print('No')

Submission status: Runtime Error

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
    elif b == g or b == r:
        b = b * 2
    elif b > g and g == r
        g = g * 2


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

Submission status: Runtime Error

Solution code:
a= int(input())
b= int(input())
c= int(input())
k= int(input())
ans= 0
 
for i in range(k):
  if a < b*(2**i) < c*(2**(k-i)):
    ans+=1
  else:
    ans+=0
  
print(Yes if ans>=1 else No)

Submission status: Runtime Error

Solution code:
import math
A,B,C = map(int, input().split())
K = int(input())
if A < B:
  K1 = math.ceil(math.log(A,B))
  B = B ** K1
elif A == B:
  K1 = 2
  B = B ** K1
else
  K1 = 1

if B < C:
  K2 = math.ceil(math.log(B,C))
elif B == C:
  K2= 2
else
  K2= 1
if K1 + K2 -2 <= K:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
N,K =map(int,input().split())
A =list(map(int,input().split()))
points = []
for i in range(K,N+1):
  point = 1
  for k in range(K):
    point *= A[i-k-1]
  points.append(point)
  if i > K:
    if points[i-K] > points[i-1-K]:
      print("Yes")
    else:
      print("No")

Submission status: Runtime Error

Solution code:
a= int(input())
b= int(input())
c= int(input())
k= int(input())
ans= 0

for i in range(0,4):
  if a < b*(2**i) < c*(2**(k-i)):
    ans+=1
  else:
    ans+=0
  
print(Yes if ans>=1 else No)

Submission status: Runtime Error

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

l=[]
for i in range(K):
  for j in range(K):
    for k in range(K):
      if i+j+k == K:
        m=[i, j, k]
        l.append(m)

for i in range(len(l)):
  m = l[i]
  a=A*(2**m[0])
  b=B*(2**m[1])
  c=C*(2**m[k])

  if a<b and b<c:
    flag = False
    print("Yes")
    break
  else:
    flag = True
if flag:
  print("No")

Submission status: Runtime Error

Solution code:
A = int(input().split())
K = int(input())
 
a = 0
for i in range(K):
  if A[2] > A[1] and A[1] > A[0]:
    print("Yes")
    a = 1
  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: Runtime Error

Solution code:
import sys
import os
# import math
# input = sys.stdin.readline

def int_array():
    return list(map(int, input().strip().split()))


def str_array():
    return input().strip().split()

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

def take_input():
	if os.environ.get("check"):
		sys.stdin = open('input.txt', 'r') 
		sys.stdout = open('output.txt', 'w')
		
take_input()
######################### TEMPLATE ENDS HERE #################################

a,b,c = int_array()
k = int(input())

# conditions
#c>b>a

var = False

if a>=b:
    no1 = ((a-b)//2)+1
    if b % 2 ==0:
        b =a+2
    else:
        b = a+1

if b>=c:
    no2 = ((b-c)//2)+1

if no1+no2>=k:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
A,B,C = input().split()
K = int(input())
first = "N"
second = "N"
f = 1
s = 1
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 = i

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: Runtime Error

Solution code:
import math
a,b,c=map(int,input().split())
k=int(input())
d=(int(math.log(a//b,2))+1)
b=b*(2**d)
e=(int(math.log(b//c,2))+1)
if (e+d)<=k and b>a and (c*(2**e))>b:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

l=[]
for i in range(K):
  for j in range(K):
    for k in range(K):
      if i+j+k == K:
        m=[i+1, j+1, k+1]
        l.append(m)

for i in range(len(l)):
  m = l[i]
  a=A*(2**m[0])
  b=B*(2**m[1])
  c=C*(2**m[k])

  if a<b and b<c:
    flag = False
    print("Yes")
    break
  else:
    flag = True
if flag:
  print("No")

Submission status: Runtime Error

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

while (K > 0):
  if R >= G:
    G *= 2
    K -= 1
  elif G >= B:
    B *= 2
    K -= 1
  else:
    k -= 1
      
if R < G < B:
  ans = 'Yes'
  
print(ans)

Submission status: Runtime Error

Solution code:
f=0
a,b,c=list(map(int,input()))
x=int(input())
for i in range (1,x+1):
  if a>b :
    b=b*2
  elif b>c or a>c:
    c=c*2
  else :
    f=1
    break
if f==1:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

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: Runtime Error

Solution code:
A,B,C = input().split()
K = int(input())
first = "N"
second = "N"
f = 1
s = 1
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 = i

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) < int(C)*(s**2):
            second = "Y"
        
if first == "Y" and second == "Y":
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import math

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

K = int(input())

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

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

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

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

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

Submission status: Runtime Error

Solution code:
A, B, C, K = int(input()),int(input()),int(input()),int(input())
 
a = 0
for i in range(K):
  if C > B and B > A:
    print("Yes")
    a = 1
    break
  else:
    if A <= B:
      B = 2*B
      K = K+1
    elif C <= B:
      C = 2*C
      K = K+1
 
if a == 0:
  print("No")

Submission status: Runtime Error

Solution code:
import random
A=int(input())
B=int(input())
C=int(input())
K=int(input())
l=[A,B,C]
count=0
for i in range(K):
    l[random.choice([0,1,2])]*=2
    

    if B>A and C>B:
        print('Yes')
        break
    count+=1

if count==K :
    print('No')

Submission status: Runtime Error

Solution code:
import math
a,b,c=map(int,input().split())
k=int(input())
d=(int(math.log(a//b,2))+1)
b=b*(2**d)
e=(int(math.log(b//c,2))+1)
if e+d<=k:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
a, b, c = map(int, input().split())
k = int(input())
def two(num):
  for i in range(1,8):
    if (2**(i-1)<=num) & (num<2**(i)):
      return i
ab = two(a/b)
b_ = b*2**ab
b_c = two(b_/c)

if k>=(ab+b_c):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a=int(input("a?"))
b=int(input("b?"))
c=int(input("c?"))
k=int(input("k?"))

ans="no"
for i in range(k+1):
  if a<b<c:
    ans="yes"
  else:
    if a>=b:
      b*=2
    elif b>=c:
      c*=2
    else:
      c*=2

print(ans)

Submission status: Runtime Error

Solution code:
mylist = []
while True:
  val = input()
  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: Runtime Error

Solution code:
import math
a,b,c=map(int,input().split())
k=int(input())
d=(int(math.log(a//b,2))+1)
b=b*(2**d)
e=(int(math.log(b//c,2))+1)
if e+d<=k:
  print("yes")
else:
  print("no")

Submission status: Runtime Error

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