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:
r, g, b = map(int, input().split())

K = int(input())

while K > 0:
  if g < r:
    g *= 2
    K -= 1
  elif b < g:
    b *= 2
    K -= 1
  else:
    break
    




if g > r and b > g:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = list(map(int,input().split()))
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: Wrong Answer

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

judge = False
for x in range(k+1):
    for y in range(k+1-x):
        z = k-x-y
        a *= pow(2,x)
        b *= pow(2,y)
        c *= pow(2,z)
        if a < b and b < c:
            judge = True
            
if judge:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for i in range(0,k):
  b1=b*2*i
  g1=g*2*(k-i)
  if r<g1 and g1<b1:
    print("Yes")
    exit()
    
for i in range(0,k):
  b2=b*2*(k-i)
  g2=g*2*i
  if r<g2 and g2<b2:
    print("Yes")
    exit()
    
print("No")

Submission status: Wrong Answer

Solution code:
A,B,C = map(int, input().split())
K = int(input())
new_A = (A*2)**K
new_B = (B*2)**K
new_C = (C*2)**K

if new_C>new_B and new_C>new_A:
    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())

def kiriage(num):
    if math.floor(num) - num < 0:
        return num
    else:
        return num+1

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

Submission status: Wrong Answer

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

a = int(a)
b = int(b)
c = int(c)
l = []

if k == 1:
    if a < 2*b < c or a < b < 2*c:
        l.append('Yes')
    else:
        l.append('No')
if a < b*(2**k) < c or a < b < c*(2**k):
    l.append('Yes')
else:
    for i in range(1, k+1):
        b = b*(2**i)
        c = c*(2**(k-i))
        if c > b > a:
            l.append('Yes')
            break
        else:
            l.append('No')

d = len(l)
print(l[d-1])

Submission status: Wrong Answer

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

# A < B < C


def main():
    if a < b < c:
        print("Yes")
        return

    x = 0
    y = 0
    for i in range(1, 20):
        x += 1
        y += 1
        if b * 2 ** i > a:
            break

    for i in range(1, 20):
        y += 1
        if c * 2 ** i > b * 2 ** x > a:
            break

    if k < y:
        return print("No")

    if not (c * 2 ** y - x > b * 2 ** x > a):
        return print("Yes")
        
    print("No")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
k = int(input())
for i in range(0, 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:
N = list(map(int,input().split()))
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: Wrong Answer

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

Submission status: Wrong Answer

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

f = 0
if a < b < c:
    f = 1
elif a < c < b:
    if c * 2 ** K > b:
        f = 1
elif b < a < c:
    for _ in range(K):
        b *= 2
        if a < b < c:
            f = 1
            break
elif c < a < b:
    if c * 2 ** K > b:
        f = 1
elif b < c < a:
    k = 1
    for x in range(1, K + 1):
        c *= 2
        if c > a:
            k = x
            break

    K -= k
    if K > 0:
        for _ in range(1, K + 1):
            b *= 2
            if a < b < c:
                f = 1
                break
else:
    k = 1
    for x in range(1, K + 1):
        b *= 2
        if b > a:
            k = x
            break

    K -= k
    if K > 0:
        for _ in range(1, K + 1):
            c *= 2
            if a < b < c:
                f = 1
                break

print(['No', 'Yes'][f])

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())
K=7
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*i*2+A < B*j*2+B and B*j*2+B < C*k*2+C):
                print('Yes')
                exit()

print('No')

Submission status: Wrong Answer

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

def yes_no(A, B, C, K):
    for i in range(1, K + 1):
        for j in range(1, K + 1 - i):
            if K - i - j != 0:
                if C * 2 * (K - i - j) > B * 2 * i and B * 2 * i > A * 2 * j:
                    return "Yes"
                    break
            elif K - i - j == 0:
                if C > B * 2 * i and B * 2 * i > A * 2 * j:
                    return "Yes"
    for i in range(1, K + 1):
        if K - i != 0:
            if (C * 2 * (K - i) > B * 2 * i and B * 2 * i > A) or \
               (C * 2 * (K - i)> B and B > A * 2 * i):
                return "Yes"
        elif K - i == 0:
            if (C > B * 2 * i and B * 2 * i > A) or \
               (C > B and B > A * 2 * i):
                return "Yes"
    if C * K > B and B > A:
        return "Yes"
    

def main():
    ans = yes_no(A, B, C, K)
    if ans == None:
        print("No")
    else:
        print("Yes")

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

for i in range(0,k):
  b1=b*2*i
  g2=g*2*(k-i)

  if r<g2 and g2<b1:
    print("Yes")
    exit()
    
for i in range(0,k):
  b1=b*2*(k-i)
  g2=g*2*i

  if r<g2 and g2<b1:
    print("Yes")
    exit()
    
print("No")

Submission status: Wrong Answer

Solution code:
numbers = [int(s) for s in input().split()] #0:赤, 1:緑, 2:青
K = int(input())
for i in range(K):
    if(numbers[2] < numbers[0]):
        numbers[2] *= 2
        
    elif(numbers[1] < numbers[0]):
        numbers[1] *= 2
        
    elif(numbers[2] < numbers[1]):
        numbers[2] *= 2
        
    else:
        break
print(numbers)
if(numbers[1] > numbers[0] and numbers[2] > numbers[1]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if G > 2 * R or B > 2 * G:
    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 A > B:
    B = B*2
for i in range(i, K):
  if B > C and i < K:
    C = C*2
    
if A < B < C:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
r, g, b = [int(x) for x in input().split()]
ops = int(input())
m = 0
if g < r:
    while g <= r:
        g *= 2
        m += 1
if b < g:
    while b <= g:
        b *= 2
        m += 1
print("Yes" if m <= ops  else "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())

def kiriage(num):
    if math.floor(num) - num < 0:
        return num
    else:
        return num+1

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

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

        


# B > G > R

Submission status: Wrong Answer

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

for x in range(n):
    if a[2] < a[1]:
        a[2] = a[2]*2
    elif a[0] > a[1]:
        a[1] = a[1]*2
    if a[0] < a[1] < a[2]:
        print("Yes")
        sys.exit()

print("No")

Submission status: Wrong Answer

Solution code:
A,B,C = map(int, input().split())
K = int(input())
new_A = (A*2)**K
new_B = (B*2)**K
new_C = (C*2)**K

if new_C>new_B:
    print('Yes')
elif new_C>new_A:
    print('Yes')    
else:
    print('No')

Submission status: Wrong Answer

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

# A < B < C


def main():
    if a < b < c:
        print("Yes")
        return

    x = 0
    y = 0
    for i in range(1, 20):
        x += 1
        y += 1
        if b * 2 ** i > a:
            break

    for i in range(1, 20):
        y += 1
        if c * 2 ** i > b * 2 ** x > a:
            break

    if k < y:
        return print("No")

    print("Yes")


if __name__ == "__main__":
    main()

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")
if c<=b:
    if c*2**k<=b:
        print("No")
    else:
        print("Yes")

Submission status: Wrong Answer

Solution code:
A,B,C = map(int, input().split())
K = int(input())
if B>C:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
Array = list(map(int, input().split()))
K = int(input())

ans_array =Array
counter = 0
for i in range(7):
  if ans_array[0] >= ans_array[1]:
    ans_array[1] = ans_array[1] * 2
  else:
    if ans_array[1] >= ans_array[2]:
      ans_array[2] = ans_array[2] * 2
      if ans_array[1] < ans_array[2]:
        counter = i + 1
        if counter <= K:
          print("Yes")
        else:
          print("No")
        exit()
else:
  print("No")

Submission status: Wrong Answer

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

count = 0
while count < k:
  if a<b and b<c:
    print('Yes')
    exit()
  elif a >= b:
    b *= 2
    count += 1
  elif b >= c:
    c *= 2
    count += 1
  print(count)

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(1,k+1):
    for j in range(1,k-i+1):
        for d in range(1,k-i-j+2):
            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:
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 r > g:
        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: Wrong Answer

Solution code:
r, g, b = [int(x) for x in input().split()]
ops = int(input())
m = 0
if g < r:
    while g < r:
        g *= 2
        m += 1
if b < g:
    while b < g:
        b *= 2
        m += 1
print("Yes" if m <= ops  else "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
    elif b > c:
      c = c*2
if a < b and b < c:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import itertools

A, B, C = map(int, input().split())
k = int(input())
l = ['a', 'b', 'c']
for v in itertools.combinations_with_replacement(l, k):
  new_A = A * (v.count('a'))
  new_B = B * (v.count('b'))
  new_C = C * (v.count('c'))
  if new_A < new_B < new_C:
    print('Yes')
    exit()
    
print('No')

Submission status: Wrong Answer

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

for i in range(0,k+1):
  b1=b*2*i
  g2=g*2*(k-i+1)
 
  if r<g2 and g2<b1:
    print("Yes")
    exit()
    
for i in range(0,k+1):
  b1=b*2*(k-i+1)
  g2=g*2*i

  if r<g2 and g2<b1:
    print("Yes")
    exit()
    
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
        K -= 1
    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:
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 G <= R:
        G=G*2
    else:
        pass
#print(R,G,B)
if B > G > R:
        ans = 'Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
def chk_result(x, y, z):
    a = int(x)
    b = int(y)
    c = int(z)
    if (a < b and b < c):
        return True
    else:
        return False




s = input().split()
intAR = int(s[0])
intBG = int(s[1])
intCB = int(s[2])

s = input().split()
intK = int(s[0])

res = False

while intK > 0:
    if (intAR > intBG):
        intBG = intBG * 2
    elif (intBG > intCB):
        intCB = intCB * 2
    
    #print(str(intAR) + ' ' + str(intBG) + ' ' + str(intCB))
    res = chk_result(intAR, intBG, intCB)
    if (res):
        print('Yes')
        exit()
    intK -= 1

print('No')

Submission status: Wrong Answer

Solution code:
Array = list(map(int, input().split()))
K = int(input())

ans_array =Array
counter = 0
for i in range(7):
  if ans_array[0] >= ans_array[1]:
    ans_array[1] = ans_array[1] * 2
  else:
    if ans_array[1] >= ans_array[2]:
      ans_array[2] = ans_array[2] * 2
      if ans_array[1] < ans_array[2]:
        counter = i + 1
        if counter <= K:
          print("Yes")
        else:
          print("No")
        exit()

Submission status: Wrong Answer

Solution code:
num = input("").split(" ")
num = [int(i) for i in num]
K = int(input(""))

for i in range(0,K):
    if num[0] > num[1]:
        num[1] = num[1] * 2
    elif num[1] > num[2]:
        num[2] = num[2] * 2
    elif num[0] > num[2]:
        num[2] = num[2] * 2
    else:
        num[2] = num[2] * 2

if num[2] > num[1] > num[0]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

for x in range(n):
    if a[0] > a[1]:
        a[1] = a[1]*2
    elif a[2] < a[1]:
        a[2] = a[2]*2

    if a[0] < a[1] < a[2]:
        print("Yes")
        sys.exit()

for x in range(n):
    if a[2] < a[1]:
        a[2] = a[2]*2
    elif a[0] > a[1]:
        a[1] = a[1]*2
    if a[0] < a[1] < a[2]:
        print("Yes")
        sys.exit()

print("No")

Submission status: Wrong Answer

Solution code:
def main():
    a, b, c = map(int, input().split())
    k = int(input())
    for i in range(1, k+2):
        if a < b and b < c:
            print("Yes")
            print(str(a)+str(b)+str(c))
            return 0
        
        elif i == k+1:
            print("No")
            return 0

        elif c < a or c < b:
            c = c * 2
            print(str(a)+str(b)+str(c))

        elif b < a:
            b = b * 2
            print(str(a)+str(b)+str(c))

main()

Submission status: Wrong Answer

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

a = int(a)
b = int(b)
c = int(c)
l = []

if k == 1:
    if a < 2*b < c or a < b < 2*c:
        l.append('Yes')
    else:
        l.append('No')
else:
    for i in range(1, k+1):
        b = b**(2*i)
        c = c**(2*(k-i))
        if c > b > a:
            l.append('Yes')
            break
        else:
            l.append('No')

d = len(l)
print(l[d-1])

Submission status: Wrong Answer

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

count = 0

for i in range(k):
    if a>b:
        b*=2
    elif b>c:
        c*=2
    if a<b<c:
        break
    count+=1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import itertools

a,b,c=map(int, input().split())
k=int(input())
list()
for i,j in itertools.permutations(range(k+1), 2):
    if i+j != c:
        continue
    #if max([a,b,c]) != c:
        #c = c * 2
    #print(i,j)
    b_,c_ = b,c

    if i != 0:
        for l in range(i):
            b_ *= 2
    if j != 0:
        for l in range(j):
            c_ *= 2
    #print(b_,c_)
    if a < b_ and b_ < c_:
        print('Yes')
        quit()
print('No')

Submission status: Wrong Answer

Solution code:
def main():
    A, B, C = map(int, input().split())
    K = int(input())
    n = 0
    for i in range(K):
        if C < B or C < A:
            C = C * 2
            if C > B > A:
                print('Yes')
                return
        elif B < A:
            B = B * 2
            if C > B > A:
                print('Yes')
                return
    print('No')
            
main()

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

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

ans='No'

for i in range(1,K+1):
  for j in range(1,K-i+1):
    red=A
    green=B
    blue=C
   
    if red<green*(2**i) and green*(2**i) <blue*(2**j):
      ans='Yes'
      break
    elif red<green*(2**j) and green*(2**j) < blue*(2**i):
      ans='Yes'
      break


print(ans)

Submission status: Wrong Answer

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

count = 0

for i in range(k):
    if a>b:
        b*=2
    elif b>c:
        c*=2
    if a<b<c:
        break
    count+=1

if count >= k:
    if a<b<c:
        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(7):
   B = B*2
   cnt = cnt + 1
   if A < B:
    break
if B > C:
  for j in range(7):
   C = C*2
   cnt = cnt + 1
   if B < C:
    break     
if cnt <= K:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
i = list(map(int, input().split()))
K = int(input())
red=i[0]
green=i[1]
blue=i[2]
success=0
for num in range(K):
  if green < red:
    green = green*2
  elif blue < green:
    blue = blue*2
if (blue > green and  green > red):
  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")
else:
    if c*2**k<=b:
        print("No")
    else:
        print("Yes")

Submission status: Wrong Answer

Solution code:
import itertools
abc = list(map(int, input().split()))
K = int(input())
tmp = [i for i in range(K)]
ans = 'No'

for i in itertools.combinations_with_replacement(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:
A, B, C = map(int, input().split(" "))
N = int(input())
newA, newB, newC = A, B, C
n = 0
for a in range(N):
    for b in range(N):
        for c in range(N):
            if newA < newB and newB < newC:
                n = 1
            else:
                newC *= 2
                
        newB *= 2
        newC = C
    newA *= 2
    newC = C
    newB = B
if n == 1:
    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 and b < a:
      b = b*2
    elif b > c:
      c = c*2
if a < b and b < c:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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

if a<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(K):
  if( A < B and B < C):
    print('Yes')
    sys.exit()
  else:
    if(i >= K-1):
      print('No')
      sys.exit()
    else:
      if(A >= B):
        B *= 2
      elif(B >= C):
        C *= 2
      else:
        pass

Submission status: Wrong Answer

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

for i in range(0,k+1):
  b1=b*2*i
  g2=g*2*(k-i)
  if r<g2 and g2<b1:
    print("Yes")
    exit()
    
print("No")

Submission status: Wrong Answer

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


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
    elif c>b and a<b:
        sys.exit()
    
print('Yes')
if a>b or a>c or b>c:
        print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def NextIntList(): return list(map(int,input().split()))
def NextInts(): return map(int,input().split())
import itertools
A,B,C = NextInts()
l = ["A","B","C"]
K = int(input())
for v in itertools.combinations_with_replacement(l, K):
    A_number = v.count("A")
    B_number = v.count("B")
    C_number = v.count("C")
    print(A_number)
    if C_number*2+C>B_number*2+B>A_number*2+A:
    	print("Yes")
    	break
else:
	print("Yes")

Submission status: Wrong Answer

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

for i in range(K):
    if  nums[2]>nums[0] and nums[0]>nums[1]:
        nums[1]=2*nums[1]
    else:
        nums[2]=2*nums[2]

if nums[2]>nums[1] and nums[1]>nums[0]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

for x in range(n):
    if a[0] > a[1]:
        a[1] = a[1]*2
    elif a[2] < a[1]:
        a[2] = a[2]*2

    if a[0] < a[1] < a[2]:
        print("Yes")
        sys.exit()

print("No")

Submission status: Wrong Answer

Solution code:
list=input().split()
num=int(input())
A,B,C=int(list[0]),int(list[1]),int(list[2])
if B*2**num<A or C*2**num<B:
  print('No')

pattern=[[i,num-i] for i in range(num+1)]
temB=B
temC=C
a=0
for pt in pattern:
  B=B*(2**pt[0])
  C=C*(2**pt[1])
  
  
  if A<B<C:
    print('Yes')
    a=1
    break
   
  B=temB
  C=temC

if a!=1:
  print('No')

Submission status: Wrong Answer

Solution code:
def NextIntList(): return list(map(int,input().split()))
def NextInts(): return map(int,input().split())
import itertools
A,B,C = NextInts()
l = ["A","B","C"]
K = int(input())
for v in itertools.combinations_with_replacement(l, K):
    A_number = v.count("A")
    B_number = v.count("B")
    C_number = v.count("C")
    print(A_number)
    if C_number*2+C>B_number*2+B>A_number*2+A:
    	print("Yes")
    	break
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 C<B:
        C*=2
    elif B<A and C>B:
        B*=2
if B>A and C>B:
    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(0,k+1):
  b1=b*2*i
  g2=g*2*(k-i+1)
  if r<g2 and g2<b1:
    print("Yes")
    exit()
    
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 green < red:
    green = green_double
    green_double = green_double*2
  elif blue < green:
    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:
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())

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

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("Yes" if r < g < b else "No")