Harryxun/stf_run huggingface dataset:
S = input()
T = input()

if (S == D[:len(S)]) and (len(S)==len(D)+1):
    print('Yes')
else:
    print('No')

### FIXED CODE ###

S = input()
T = input()
if (S == T[:len(S)]) and ((len(S)+1)==len(T)):
    print('Yes')
else:
    print('No')
import collections
import sys
n=int(input())
a=list(map(int,input().split()))
if n==1:
  print(1)
  sys.exit()
if n==2:
  if abs(a[1]-a[0])<2:
    print(2)
    sys.exit()
  else:
    print(1)
    sys.exit()    
A=collections.Counter(a)
b=list(A.items())
b.sort()
cnt=0
for i in range(len(b)-2):
  if int(b[i+2][0])-int(b[i+1][0])==1 and int(b[i+1][0])-int(b[i][0])==1:
    cnt=max(cnt,b[i][1]+b[i+1][1]+b[i+2][1]) 
  elif int(b[i+1][0])-int(b[i][0])==1:
    cnt=max(cnt,b[i+1][1]+b[i][1])
  else:
    cnt=max(cnt,b[i])
if int(b[len(b)-1][0])-int(b[len(b)-2][0])==1:
  cnt=max(cnt,b[len(b)-1][1]-b[len(b)-2][1])
else:
  cnt=max(cnt,max(b[len(b)-1][1],b[len(b)-2][1]))
print(cnt)
  


### FIXED CODE ###

import collections
import sys
n=int(input())
a=list(map(int,input().split()))
b=list(collections.Counter(a).items())
b.sort(key=lambda x:int(x[0]))
if len(b)==1:
  print(n)
  sys.exit()
lst=[]
num=b[0][1]
if int(b[1][0])-int(b[0][0])==1:
  num+=b[1][1]
lst.append(num)
for i in range(1,len(b)-1):
  num=b[i][1]
  if int(b[i+1][0])-int(b[i][0])==1:
    num+=b[i+1][1]
  if int(b[i][0])-int(b[i-1][0])==1:
    num+=b[i-1][1]
  lst.append(num)
num=b[len(b)-1][1]
if int(b[len(b)-1][0])-int(b[len(b)-2][0])==1:
  num+=b[len(b)-2][1]
lst.append(num)
print(max(lst))
n, x = map(int, input().split())
xi = list(map(int, input().split()))

import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

xi = map(lambda y:y-x, xi)
print(gcd(*xi))

### FIXED CODE ###

n, x = map(int, input().split())
xi = list(map(int, input().split()))

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

def gcd_l(*numbers):
	ret = numbers[0]
	for n in numbers[1:]:
		ret = gcd(ret, n)
	return ret

xi = map(lambda y:abs(y-x), xi)
print(gcd_l(*xi))
S = int(input())
h = int(S/3600)
m = S- int(h*3600)/60)
sec = S- h*3600-m*60;
print(str(h)+":"+str(m)+":"+str(sec))


### FIXED CODE ###

S = int(input())
h = int(S/3600)
m = int((S- h*3600)/60)
sec = S- h*3600-m*60;
print(str(h)+":"+str(m)+":"+str(sec))
n,m = map(int,input().split())
a_list = [int(input()) 
          for nesya in range(m)]
hoge = [1]*(n+1)
for i in range(m):
  hoge[a_list[i]] = 0
for j in range(2,n+1):
  if hoge[j] == 0:
    continue
  else:
    hoge[j] = hoge[j-1] + hoge[j-2]
print(hoge[j]%(10**9+7))

### FIXED CODE ###

n,m = map(int,input().split())
a = [int(input()) for nesya in range(m)]
hoge = [1]*(n+1)
for i in range(m):
  hoge[a[i]] = 0
for j in range(1,n+1):
  if hoge[j] == 0:
    continue
  else:
    if j == 1:
      hoge[j] = hoge[j-1]
    else:
      hoge[j] = hoge[j-1] + hoge[j-2]
  hoge[j] = hoge[j] % (10**9+7)
print(hoge[j]%(10**9+7))
N=input()
A=input()
B=input()
if N==1:
    print "Hello World"
elif N==2:
    print A+B
    

### FIXED CODE ###

N=input()
if N==1:
    print "Hello World"
elif N==2:
    A = input()
    B = input()
    print A+B
for i in range(10000):
    H,W=input().split()
    if H==0 and W==0:
        break
    s=""
    t=""
    for j in range(int(W)):
        s+="#"
        if j==0 or j==int(W)-1:
            t+="#"
        else:
            t+="."
    for k in range(int(H)):
        if k==0 or k==int(H)-1:
            print(s)
        else:
            print(t)
    print("")


### FIXED CODE ###

for i in range(10000):
    H,W=input().split()
    if H=="0" and W=="0":
        break
    s=""
    t=""
    for j in range(int(W)):
        s+="#"
        if j==0 or j==int(W)-1:
            t+="#"
        else:
            t+="."
    for k in range(int(H)):
        if k==0 or k==int(H)-1:
            print(s)
        else:
            print(t)
    print("")
x=int(input())
a=0
b=0
for i in range(-x,x):
  for j in range(-x,x):
    if i**5-j**5==x:
      a=i
      b=j
      berak
print(a),print(b)

### FIXED CODE ###

x=int(input())
a=0
b=0
for i in range(-500,500):
  for j in range(-500,500):
    if i**5-j**5==x:
      a=i
      b=j
      break
  else:
    continue
  break
print(a,b)
import itertools
num = int(input())
array1 = tuple(map(int, input().split()))
array2 = tuple(map(int, input().split()))
all_list = list(itertools.permutations(range(1, num + 1)))
 
array1_index = all_list.index(array1) + 1
array2_index = all_list.index(array2) + 1
 
if array1_index > array2_index:
  print(array1_index-array2_index)
else:
  print(array2_index-array1_index)ar

### FIXED CODE ###

import itertools
num = int(input())
array1 = tuple(map(int, input().split()))
array2 = tuple(map(int, input().split()))
all_list = list(itertools.permutations(range(1, num + 1)))
 
array1_index = all_list.index(array1) + 1
array2_index = all_list.index(array2) + 1
 
if array1_index > array2_index:
  print(array1_index-array2_index)
else:
  print(array2_index-array1_index)
import sys
import math
w, h, x, y = map(int, sys.stdin.readline().split())

d = [None for i in range(4)]
d[0] = abs(x*1+y*(-1)+w*h)/math.sqrt(1**2 + (-1)**2)
d[1] = abs(x*(-h/w)+y*(-1)+h)/math.sqrt((-h/w)**2 + (-1)**2)
d[2] = abs(x-w*0.5)
d[3] = abs(y-h*0.5)

if int(w-2*x)==0 and int(h-2*y)==0:
  print(w*h/2.0, 1)
  exit()
elif int(w-2*x)==0 or int(h-2*y)==0:
  print(w*h/2.0, 0)
  exit()

if int(d1) == 0 or int(d2) == 0:
  print(1,1)
  exit()
  if int(w-2*x)==0 and int(h-2*y)==0:
    print(w*h/2.0, 1)
  else:
    print(w*h/2.0, 0)
elif d.index().min(d) == 0:
  if x > 0.5*w:
    if y < h/w*x:
      print((x*w*w)/y*0.5, 0)
    else:
      print((x*h*h)/y*0.5, 0)
  else:
    b = h - (h-y)/(w-x)*w
    if y < h/w*x:
      print(h*(w-b*(w-x)/(h-y))*0.5, 0)
    else:
      print(w*(h-b)*0.5, 0)
elif d.index().min(d) == 1:
  if int(d[0]-d[1]) == 0:
    casenum = 1
  else:
    casenum = 0
    
  if x > 0.5*w:
    if  y > -h/w*x+h:
      print(w*(-(y-h)*w/x)*0.5, casenum)
    else:
      print(h*x*h/(h-y)*0.5, casenum)
  else:
    b = (h + y*w/(x-w)) * (x-w)/y
    if  y > -h/w*x+h:
      print(h*(w-(b-h)*x/(y-h))*0.5, casenum)
    else:
      print(w*(h-b)*0.5, casenum)
elif d.index().min(d) == 2:
  if y > 0.5*h:
    b = w*y/(w-2*x)
    x1=(x-0.5*w)/y*(b-h)
    if x > 0.5*w:
      print(h*(0.5*w+w-x1)*0.5, 0)
    else:
      print(h*(0.5*w+0.5*w-x1)*0.5, 0)
  else:
    b = h - 0.5*w*y/(x-0.5*w)
    x1=b*y/(0.5*w-x)
    if x > 0.5*w:
      print(0.5*h(0.5*w+w-x1), 0)
    else:
      print(0.5*h(0.5*w+0.5*w-x1), 0)    
elif d.index().min(d) == 3:
  if int(d[2]-d[3]) == 0:
    casenum = 1
  else:
    casenum = 0
  if x > 0.5*w:
    if y > 0.5*h:
      print(0.5*w*(0.5*h+h-(y-0.5*h)/x*w+0.5*h), casenum)
    else:
      print(0.5*w*(0.5*h+0.5*h-(y-0.5*h)/x*w+0.5*h), casenum)
  else:
    if y > 0.5*h:
      print(0.5*w*(0.5*h+h-(0.5*h-w*(y-0.5*h)/(x-w))), casenum)
    else:
      print(0.5*w*(0.5*h+0.5*h-(0.5*h-w*(y-0.5*h)/(x-w))), casenum)    

### FIXED CODE ###

import sys
import math
w, h, x, y = map(int, sys.stdin.readline().split())
S = w*h/2

if x == w/2 and y == h/2:
  print(S,1)
else:
  print(S, 0)
import sys
input = sys.stdin.readline
n,k = map(int,input().split())
a = [0] +  list(map(int,input().split()))

vlist = [1]
vcnt = [0]*(n+1)
vcnt[1] += 1
v = 1
for i in range(1,n+1):
    v = a[v]
    vlist.append(v)
    if i == k:
        print(vlist[-1])
        exit()
    if vcnt[v] == 0:
        vcnt[v] += i
    else:
        syuuki = i - vcnt[v]
        hajime = i - syuuki
        break
k -= hajime
k %= syuuki
k += hajime 
print(vlist[k])

### FIXED CODE ###

import sys
input = sys.stdin.readline
n,k = map(int,input().split())
alist = list(map(lambda x:int(x) - 1,input().split()))
count = [0]*n
count[0] += 1
now = 0
order = [0]
for i in range(k):
    now = alist[now]
    count[now] += 1
    if count[now] == 2:
        start = order.index(now)
        loop = len(order[start:])
        syoki = len(order[:start])
        break
    order.append(now)
else:
    print(now+1)
    exit()
k -= syoki
k %= loop
print(order[k+syoki] + 1)
## 解説をみての答え
from collections import deque

q = deque(range(1,10))
K = int(input())

for i in range(K):
    x = q.popleft()
    r =  x % 10
    if r != 0:
        q.append((10 * x) + (r - 1))
    q.append((10 * x) + r)
    if r != 9:
        q.put((10 * x) + (r + 1))

print(x)

### FIXED CODE ###

from collections import deque

q = deque(range(1,10))
K = int(input())

for i in range(K):
    x = q.popleft()
    r =  x % 10
    if r != 0:
        q.append((10 * x) + (r - 1))
    q.append((10 * x) + r)
    if r != 9:
        q.append((10 * x) + (r + 1))

print(x)
N, M = map(int, input().split())
A = list(map(int, input().split()))

sumA = sum(A)

filteredA = list(filter(lambda x: x < (sumA / (4*M)), A))

if M <= len(filteredA):
    print('Yes')
else:
    print("No")


### FIXED CODE ###

X, Y, Z = map(int, input().split())

X, Y = Y, X
X, Z = Z, X

print(X, Y, Z)
n = input()
if n = 1:
  print(1/1)
elif n%2 == 0:
  print(n/2/n):
elif n%2 != 0:
  print(((n-1)/2)/n)


### FIXED CODE ###

n = int(input())
if n == 1:
  print(1/1)
elif n%2 == 0:
  print(n/2/n)
else:
  print((((n-1)/2)+1)/n)
from numba import njit
import numpy as np

@njit('i4, i4, i4, i4[:,:], i4[:,:]', cache=True)
def dfs(N, h, w, minDist, isFilled):
    dist = minDist[h][w] + isFilled[h][w]

    if h + 1 < N and minDist[h + 1][w] > dist:
        minDist[h + 1][w] = dist
        dfs(N, h + 1, w, minDist, isFilled)
    if h - 1 >= 0 and minDist[h - 1][w] > dist:
        minDist[h - 1][w] = dist
        dfs(N, h - 1, w, minDist, isFilled)
    if w + 1 < N and minDist[h][w + 1] > dist:
        minDist[h][w + 1] = dist
        dfs(N, h, w + 1, minDist, isFilled)
    if w - 1 < N and minDist[h][w - 1] > dist:
        minDist[h][w - 1] = dist
        dfs(N, h, w - 1, minDist, isFilled)

@njit('i4(i4, i4[:])', cache=True)
def main(N, P):
    minDist = np.ones((N, N), dtype=np.int32)
    isFilled = np.ones((N, N), dtype=np.int32)

    for h in range(N):
        for w in range(N):
            minDist[h][w] = min(h, N - h - 1, w, N - w - 1)

    ans = 0
    for p in P:
        h, w = divmod(p, N)
        ans += minDist[h][w]
        isFilled[h][w] = False
        dfs(N, h, w, minDist, isFilled)
    return ans

N = int(input())
P = np.asarray(list(map(lambda a: int(a) - 1, input().split())), dtype=np.int32)

print(main(N, P))


### FIXED CODE ###

import sys
import numpy as np

if sys.argv[-1] == 'ONLINE_JUDGE':
    from numba.pycc import CC
    cc = CC('my_module')

    @cc.export('solve', 'i4(i4, i4[:])')
    def solve(N, P):
        minDist = np.ones((N, N), dtype=np.int32)
        isFilled = np.ones((N, N), dtype=np.int32)

        for h in range(N):
            for w in range(N):
                minDist[h][w] = min(h, N - h - 1, w, N - w - 1)

        ans = 0
        for p in P:
            h, w = divmod(p, N)
            ans += minDist[h][w]
            isFilled[h][w] = False

            st = [(h, w)]
            while st:
                h, w = st.pop()
                dist = minDist[h][w] + isFilled[h][w]

                if h + 1 < N and minDist[h + 1][w] > dist:
                    minDist[h + 1][w] = dist
                    st.append((h + 1, w))
                if h - 1 >= 0 and minDist[h - 1][w] > dist:
                    minDist[h - 1][w] = dist
                    st.append((h - 1, w))
                if w + 1 < N and minDist[h][w + 1] > dist:
                    minDist[h][w + 1] = dist
                    st.append((h, w + 1))
                if w - 1 < N and minDist[h][w - 1] > dist:
                    minDist[h][w - 1] = dist
                    st.append((h, w - 1))
        return ans

    cc.compile()
    exit(0)

from my_module import solve

N = int(input())
P = np.asarray(list(map(lambda a: int(a) - 1, input().split())), dtype=np.int32)

print(solve(N, P))
N=int(input())
C,S,F=[0]*(N-1),[0]*(N-1),[0]*(N-1)
for i in range(N-1):
    C[i],S[i],F[i]=map(int,input().split())
for i in range(N-1): #一周につき一つの駅([0]..[N-2])から[N-1]までの計算
    arrivalTime=S[i]+C[i]#最初発車駅の次の駅に着く時間
    for j in range(i+1,N-1):
        leaveTime=S[j]#現在考慮中の駅から初めて発車する時間
        if arrivalTime <leaveTime:
            pass
        elif arrivalTime % F[j]==0:
            leaveTime=arrivalTime
        else:
            leaveTime=arrivalTime+F[j]- arrivalTime % F[j]-
        '''
        while arrivalTime > leaveTime:
            leaveTime+=F[j]
        '''
        arrivalTime=leaveTime+C[j]
    print(arrivalTime)
print(0)#[N-1]駅

### FIXED CODE ###

N=int(input())
C,S,F=[0]*(N-1),[0]*(N-1),[0]*(N-1)
for i in range(N-1):
    C[i],S[i],F[i]=map(int,input().split())
for i in range(N-1): #一周につき一つの駅([0]..[N-2])から[N-1]までの計算
    arrivalTime=S[i]+C[i]#最初発車駅の次の駅に着く時間
    for j in range(i+1,N-1):
        leaveTime=S[j]#現在考慮中の駅から初めて発車する時間
        if arrivalTime <leaveTime:
            pass
        elif arrivalTime % F[j]==0:
            leaveTime=arrivalTime
        else:
            leaveTime=arrivalTime+F[j]- arrivalTime % F[j]
        '''
        while arrivalTime > leaveTime:
            leaveTime+=F[j]
        '''
        arrivalTime=leaveTime+C[j]
    print(arrivalTime)
print(0)#[N-1]駅
print(int(input()).count(2))

### FIXED CODE ###

print(str(input()).count("2"))
a = input()
pirnt(a.replace('1', '9'))

### FIXED CODE ###

a = input()
print(a.replace('1', 'x').replace('9', '1').replace('x', '9'))
H,W=map(int,input().split())
h,w=map(int,input().split())
prin(int((H-h)*(W-w)))

### FIXED CODE ###

H,W=map(int,input().split())
h,w=map(int,input().split())
print(int((H-h)*(W-w)))
N, X = map(int, input().split())

mn = [0]*N
for i in range(N):
  mn[i] = int(input())
  
ans = N
x = X - sum(mn)

while(x >= min(mn)):
  if x // min(mn) == 0:
    mn[mn.index(min(mn))] = 1000000
  else:
    if x >= min(mn):
      x -= min(mn)
      ans += 1
      
print(ans)

### FIXED CODE ###

print(700 + 100*(input().count('o')))
n,m=map(int,input().split())
a=sorted(list(map(int,input().split())))
l=[list(map(int,input().split())) for i in range(m)]
l.sort(key=lambda x:x[1])
for i in range(n):
    if a[i]<l[-1][1]:
        a[i]=l[-1][1]
        l[-1][0]-=1
        if l[-1][0]==0:l.pop(-1)
    else:break
print(sum(a))

### FIXED CODE ###

n,m=map(int,input().split())
a=sorted(list(map(int,input().split())))
l=[list(map(int,input().split())) for i in range(m)]
l.sort(key=lambda x:x[1])
for i in range(n):
    if a[i]<l[-1][1]:
        a[i]=l[-1][1]
        l[-1][0]-=1
        if l[-1][0]==0:
            l.pop(-1)
            if len(l)==0:break
    else:break
print(sum(a))
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
for i in range(n):
  b[a[i]-1]+=i+1
print(*b)

### FIXED CODE ###

import math

n=int(input())
print(math.ceil(n/2)/n)
N = int(input()) 
for i in range(N) :
   a,b,c = sorted(list(map(int,input().split())))
  
   if a**2 + b**2== c**2:
     print("YES")
   else
     print("NO")


### FIXED CODE ###

n=int(input())
for i in range(n):
    a,b,c = input().split()
    x = int(a)
    y = int(b)
    z = int(c)
    p = [x,y,z]
    p.sort()
    if pow(p[0],2) + pow(p[1],2) == pow(p[2],2):
        print('YES')
    else:
        print('NO')
H,W = map(int , input().split())
sh,sw = map(int , input().split())
eh,ew = map(int , input().split())
mv = [[-1,0],[1,0],[0,-1],[0,1]]
warplist = []
for h in range(-2,2,1):
  for w in range(-2,2,1):
    if h!=0 and w!=0:
      warplist.append([h,w])
maze = []
goned = [[None]*(W) for j in range(H)]
for i in range(H):
  maze.append(input())

def wfs(h,w):
  goned[h][w] = cnt
  for vh,vw in mv:
    tgh = h + vh
    tgw = w + vw
    if 0 <= tgh <= H-1 and 0 <= tgw <= W-1 :
      if goned[tgh][tgw] is None and maze[tgh][tgw] != "#":
        wfs(tgh,tgw)
        wps.append([tgh,tgw])

def warp(h,w):
  for vh,vw in warplist:
    tgh = h + vh
    tgw = w + vw
    if 0 <= tgh <= H-1 and 0 <= tgw <= W-1 :
      if goned[tgh][tgw] is None and maze[tgh][tgw] != "#":
        tgs.append([tgh,tgw])
wps=[]
tgs = [[sh-1,sw-1]]
cnt = 0
while len(tgs)>0:
  wps=[]
  for tg in tgs:
    wfs(tg[0],tg[1])
  tgs = []
  for wp in wps:
    warp(wp[0],wp[1])
  cnt+=1
print(-1 if goned[eh][ew] is None else goned[eh][ew])

### FIXED CODE ###

from collections import deque
 
 
walk = [(1, 0), (-1, 0), (0, 1), (0, -1)]
warp = [(-2, -2), (-2, -1), (-2, 0), (-2, 1), (-2, 2),
        (-1, -2), (-1, -1), (-1, 0), (-1, 1), (-1, 2),
        (0, -2), (0, -1), (0, 1), (0, 2),
        (1, -2), (1, -1), (1, 0), (1, 1), (1, 2),
        (2, -2), (2, -1), (2, 0), (2, 1), (2, 2),]
 
 
def get_warped(walked, map_):
    warped = deque()
    while walked:
        h, w = walked.popleft()
        for i, j in warp:
            h2 = h + i
            w2 = w + j
            if -1 < h2 < H and -1 < w2 < W and map_[h2][w2] == '.':
                warped.append((h2, w2))
                map_[h2][w2] = map_[h][w] + 1
    return warped, map_
 
 
def get_walked(candidate, map_):
    walked = deque()
    while candidate:
        h, w = candidate.popleft()
        walked.append((h, w))
        for i, j in walk:
            h2 = h + i
            w2 = w + j
            if -1 < h2 < H and -1 < w2 < W and map_[h2][w2] == '.':
                candidate.append((h2, w2))
                map_[h2][w2] = map_[h][w]
    return walked, map_
 
H, W = map(int, input().split())
s_h, s_w = [i-1 for i in map(int, input().split())]
d_h, d_w = [i-1 for i in map(int, input().split())]
map_ = [list(input()) for i in range(H)]
 
candidate = deque([(s_h, s_w)])
map_[s_h][s_w] = 0
 
while candidate:
    walked, map_ = get_walked(candidate, map_)
    candidate, map_ = get_warped(walked, map_)
 
for h in range(H):
    for w in range(W):
        if map_[h][w] == '.':
            map_[h][w] = -1
 
print(map_[d_h][d_w])
n, y = map(int,input().split())
a = -1
b = -1
c = -1

for i in range(n+1):
    for j in range(n+1):
        if 0 <= n - i - j <= 2000 and y == 10000*i + 5000*j + 1000*(n - i - j):
            a = i
            b = j
            c = n - i -j
            break
print(a,b,c)


### FIXED CODE ###

n = int(input())
d = [input() for i in range(n)]

d = set(d)

ans = len(d)
print(ans)
S = input()
T = input()

sl = list(S)
tl = list(T)
n = len(tl)
w = "?" * n

ans = 0

if w in S:
  ans = 1
  S.replace(w, T)
  sl = list(S)
for i in range(n):
  if tl[i] in sl:
    j = sl.index(tl[i])
    sl2 = sl[j-i:j+n-i]
    #print(sl2)
    #print(tl)
    for k in range(n):
      if  sl2[k] != tl[k] and sl2[k] != "?":
        break
      ans = 1
      sl[j-i:j+n-i] = T

S = "".join(sl)
#print(S)

if ans == 1:
    A = S.replace("?", "a")
    print(A)
else:
    print("UNRESTORABLE") 

### FIXED CODE ###

S = input()
T = input()
m = len(S)
n = len(T)

Sa = []

if m >= n:
    for i in range(m+1-n):
        for j in range(n):
            if S[i+j] != T[j] and S[i+j] != "?":
                break
        else:
            s = S[:i] + T + S[i+n:]
            Sa.append(s.replace("?", "a"))
            

if Sa:
    print(min(Sa))
else:
    print("UNRESTORABLE")
a , b = map(int, input().split())

t = 0
pt =0

for I in range(1000):
     t+=1
     if (pt < a and  b < t ):
              if( pt-a==t-b ):
                    print(pt-a)
                    break
     pt+=1


### FIXED CODE ###

s = int(input())
if s>999:
     print("ABD")
else:
  print("ABC")
a = input()
b = input()

if a > 8:
	print ":("
elif b > 8:
	print ":("
else:
	print "Yay!"


### FIXED CODE ###

l = map(int, raw_input().split())
a = l[0]
b = l[1]

if a > 8:
	print ":("
elif b > 8:
	print ":("
else:
	print "Yay!"
a,b,c = map(int,input().split())
k = int(input())
x = map(a,b,c)
print(x*(2**k) + a + b + c - x)

### FIXED CODE ###

a,b,c = map(int,input().split())
k = int(input())
x = max(a,b,c)
print(x*(2**k) + a + b + c - x)
while True:
    a,b=map(int,raw_input().split("."))
    if a<0:break
    s,s2="",""
    while a!=0:
        s+=str(a%2)
        a/=2
    cnt=0
    while b!=0 and cnt<=4:
        b*=2
        s2+=str(b/10)
        b%=10
        cnt+=1
    s2+="0"*(4-len(s2))
    if len(s2)<=4:
        print "%08d.%d"%(int(s[::-1]),int(s2))
    else:
        print "NA"

### FIXED CODE ###

def convert(x,p):
    if p==12:
	return
    convert(x/2,p+1)
    if p==3:
        ans.append(".")
    ans.append(str(x%2))

while True:
    n=input()
    if n<0:break
    ans=[]
    shift=int(n*16)
    if n==shift/16.0 and shift<4096:
        convert(shift,0)
	print "".join(ans)
    else:
        print "NA"
l=int(input())

import numpy as np
result = 0
for x in np.arange(l/3-0.1, l/3+0.1, 0.1):
  for y in np.arange(x, l/3+0.1, 0.1):
    z = l - (x+y)
    if z <= 0:
      break
    v = x*y*z
    result = max(v, result)
print(result)

### FIXED CODE ###

n,m=map(int,input().split())
print( int((n+m)*(n+m-1)/2 - n*m) )
N = input()

if N%2 == 0:
  print(N/2)
else:
  print((N+1)/2)

### FIXED CODE ###

n = int(input())

if n%2:
  print((n+1)//2)
else:
  print(n//2)
import sys
N = int(input())
num = []
nn = -1

while nn ** 5 < N :
  nn += 1
  A = nn ** 5 - N
  if A in num:
    print(nn, index(A))
    exit()
  num.append(nn ** 5) 
  
An = -1
Bn = -1
A = 0
B = 0
while True :
  An += 1
  Bn = An
  A = 0
  B = 0
  while A + B < N :
    Bn += 1
    A = An ** 5
    B = Bn ** 5
    if A + B == N:
      print(An, Bn * -1)
      sys.exit()

### FIXED CODE ###

import sys
N = int(input())

for A in range(-118, 120) :
  for B in range(-119, 119) :
    if A ** 5 - B ** 5 == N :
      print(A, B)
      sys.exit()
num, bricks, count, smash = int(input()), [int(x) for x in input().split(" ")], 1, 0
for x in bricks:
    if count == x: count += 1
    else: smash += 1
print(smash if smash != len(bricks) else 0 if len(bricks) == 1 else -1)

### FIXED CODE ###

num, bricks, count, smash = int(input()), [int(x) for x in input().split(" ")], 1, 0
for x in bricks:
    if count == x: count += 1
    else: smash += 1
print(smash if smash != len(bricks) else 0 if len(bricks) == 1 else -1)
a = int[input()]
b = a[1]*a[2]
if b >= a[0]:
  print('Yes')
elif b < a[0]:
  print('No')

### FIXED CODE ###

a,b,c = map(int, input().split())
if a <= b*c :
  print('Yes')
elif a > b*c :
   print('No')
def main():
    X, Y = (int(i) for i in input().split())
    fac = [0] * max(X, Y)
    finv = [0] * max(X, Y)
    inv = [0] * max(X, Y)
    MOD = (10**9) + 7

    def COMinit(m):
        fac[0] = 1
        fac[1] = 1
        finv[0] = 1
        finv[1] = 1
        inv[1] = 1
        for i in range(2, m):
            fac[i] = fac[i-1] * i % MOD
            inv[i] = MOD - inv[MOD % i] * (MOD // i) % MOD
            finv[i] = finv[i - 1] * inv[i] % MOD

    def COM(n, k):
        if n < k:
            return 0
        if n < 0 or k < 0:
            return 0
        return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD

    COMinit(max(X, Y))
    if (X+Y) % 3 != 0:
        return print(0)
    n = (2*Y - X) // 3
    m = (2*X - Y) // 3
    print(COM(n+m, m))


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    X, Y = (int(i) for i in input().split())
    fac = [0] * max(X, Y)
    finv = [0] * max(X, Y)
    inv = [0] * max(X, Y)
    MOD = (10**9) + 7

    def COMinit(m):
        fac[0] = 1
        finv[0] = 1
        if m > 1:
            fac[1] = 1
            finv[1] = 1
            inv[1] = 1
            for i in range(2, m):
                fac[i] = fac[i-1] * i % MOD
                inv[i] = MOD - inv[MOD % i] * (MOD // i) % MOD
                finv[i] = finv[i - 1] * inv[i] % MOD

    def COM(n, k):
        if n < k:
            return 0
        if n < 0 or k < 0:
            return 0
        return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD

    COMinit(max(X, Y))
    if (X+Y) % 3 != 0:
        return print(0)
    n = (2*Y - X) // 3
    m = (2*X - Y) // 3
    print(COM(n+m, m))


if __name__ == '__main__':
    main()
S=input()
if S[2]==S[3] && S[4]==S[5]:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

S=input()
if S[2]==S[3] and S[4]==S[5]:
  print("Yes")
else:
  print("No")
a,b = map(int,input().split())

answer = ''
if a > b:
  answer = 'GREATER'
elif a == b:
  answer = 'EQUAL'
else:
  answer = 'LESS'

print(answer)

### FIXED CODE ###

a = int(input())
b = int(input())

answer = ''
if a > b:
  answer = 'GREATER'
elif a == b:
  answer = 'EQUAL'
else:
  answer = 'LESS'

print(answer)