Harryxun/stf_run huggingface dataset:
# A - Registration
def main():
    S, T = input().rstrip().split()
    print("Yes" if T[:-1] == S else "No")


if __name__ == "__main__":
    main()


### FIXED CODE ###

# A - Registration
def main():
    S, T = open(0).read().split()
    print("Yes" if T[:-1] == S else "No")


if __name__ == "__main__":
    main()
N,M = map(int,input().split())
A = [int(a) for a in input().split()]
A.sort()
for _ in range(M):
    count = 1
    B,C = map(int,input().split())
    while min(A) < C and count <= B:
        A[0] = C
        A.sort()
        count += 1
    print(A)
print(sum(A))
    

    


### FIXED CODE ###

n,m=map(int,input().split())
a=list(map(int,input().split()))
bc=[list(map(int,input().split())) for i in range(m)]
bc.sort(key=lambda x:x[1])
for b,c in bc[::-1]:
  a.extend([c]*b)
  if len(a) > 2*n:
    break
a.sort(reverse=True)
print(sum(a[:n]))
import math

a, b, h, m = list(map(int, input().split()))

if m == 0:
	m = 60
if h == 0
	h = 12

if h/12 > m/60:
	k = (h/12 - m/60) * 360
elif h/12 < m/60:
	k = (m/60 - h/12) * 360
else:
	print(0)
	exit()
# print(k)
print(math.sqrt((a**2) + (b**2) - (2 * a * b * math.cos(math.radians(k)))))


### FIXED CODE ###

import math

a, b, h, m = list(map(int, input().split()))
rh = (h + m/60) * 30 
rm = m * 6
rd = abs(rh -rm)
print(math.sqrt((a**2) + (b**2) - (2 * a * b * math.cos(math.radians(rd)))))
s = input()
max_ = 0
pre = s[0]
ren = 1
for i in range(1, len(s)):
    if s[i] == pre:
        ren += 1
        max_ = max(max_, ren)
    else:
        ren = 1
        pre = s[i]
from collections import deque
status = deque([[1] * len(s)])
for i in range(max_):
    sta = [0] * len(s)
    if s[1] == 'L':
        sta[0] = status[i][1]
    else:
        sta[0] = 0
    if s[-2] == 'R':
        sta[-1] = status[i][-2]
    else:
        sta[-1] = 0
    a = [[1] * len(s)]
    for j in range(1, len(s) - 1):
        #print(sta)
        if s[j - 1] == 'R':
            sta[j] += status[i][j - 1]
        if s[j + 1] == 'L':
            sta[j] += status[i][j + 1]
    status.append(sta)
for i in range(1 + max_ - 2):
    status.popleft()
if (max_ - 2) % 2 == 0:
    print(' '.join([str(i) for i in status[1]]))
else:
    print(' '.join([str(i) for i in status[0]]))


### FIXED CODE ###

a, b, c = map(int, input().split())
print(max(0, b + c - a))
a = list(map(int,input().split()))
dic = {0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,"A":10,"B":11,"C":12,"D":14,"E":15,"F":16}
if dic[a[0]]==dic[a[1]]:
  print("=")
elif dic[a[0]]>dic[a[1]]:
  print(">")
else:
  print("<")

### FIXED CODE ###

a = list(map(str,input().split()))
dic = {"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,"A":10,"B":11,"C":12,"D":14,"E":15,"F":16}
if dic[a[0]]==dic[a[1]]:
  print("=")
elif dic[a[0]]>dic[a[1]]:
  print(">")
else:
  print("<")
import math
n = int(input())

l = list(map(int,input().split()))
a=1
for i in range(n):
    a = a*l[i]//int(math.gcd(a,i))
ans=0
for i in range(n):
    ans=(ans+a//l[i])%1000000007
print(ans)

### FIXED CODE ###

from fractions import gcd

N = int(input())
a = list(map(int, input().split()))
mod = 10 ** 9 + 7
l = 1
res = 0
for x in a:
  l = x * l // gcd(x, l)
l %= mod
for x in a:
  res += l * pow(x, mod - 2, mod)
  res %= mod
print(res)
A, B, C, D, E, F = map(int, input().split())
density = 0
for i in range((F//(100*A)) +1):
    for j in range(((F-100*A*i)//(100*B))+1):
        water = 100*A*i + 100*B*j
        if water == 0:
            continue
        for k in range(((F-water)//C)+1):
            for l in range(((F-water-C*k)//D)+1):
                sugar = C*k + D*l
                if density < sugar/(sugar + water) and sugar <= (E/100)*water:
                    density = sugar/(sugar + water)
                    ans = [sugar+water, sugar]
print(ans[0], ans[1])

### FIXED CODE ###

A, B, C, D, E, F = map(int, input().split())
density = 0
for i in range(F//(100*A) +1):
    for j in range((F-100*A*i)//(100*B)+1):
        water = 100*A*i + 100*B*j
        if water == 0:
            continue
        for k in range((F-water)//C+1):
            for l in range((F-water-C*k)//D+1):
                sugar = C*k + D*l
                if density <= sugar/(sugar + water) and sugar <= (E/100)*water:
                    density = sugar/(sugar + water)
                    ans = [sugar+water, sugar]
print(ans[0], ans[1])
import heapq
import sys
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
mod = 10**9 + 7
inf = float('inf')

N = L()
ans = int(0)

ans = N*(N-1)//2
print(ans)


### FIXED CODE ###

N = int(input())

ans = int(0)

ans = (N-1)*N//2

print(ans)
a,b=map(int,input().split())
l=[]
if a<b:
  for i in range(a):
    l.append(b)
    l=[str(i) for i in l]
    L=''.join(l)
	print(L)
else:
   for i in range(b):
    l.append(a)
    l=[str(i) for i in l]
    L=''.join(l)
	print(L)
  

### FIXED CODE ###

a,b=map(int,input().split())
if a<b:
  print(str(a)*b)
else:
  print(str(b)*a)
from itertools import permutations

def factorial(n):
  if n < 2:
    return 1
  return n * factorial(n - 1)


def distance(a, b):
  dx = a[0] - b[0]
  dy = a[1] - b[1]
  return sqrt(dx * dx + dy * dy)
  

def calc_len(points, perm):
  res = 0
  for i in range(1, len(perm)):
    a = points[perm[i]]
    b = points[perm[i - 1]]
    res += distance(a, b)
  return res


n = int(input())
points = []
for _ in range(n):
  x, y = map(int, input().split())
  points.append((x, y))
  
total_len = 0
for perm in permutations(list(range(n))):
  total_len += calc_len(points, perm)
print(total_left / factorial(n))

### FIXED CODE ###

from itertools import permutations
from math import sqrt

def factorial(n):
  if n < 2:
    return 1
  return n * factorial(n - 1)


def distance(a, b):
  dx = a[0] - b[0]
  dy = a[1] - b[1]
  return sqrt(dx * dx + dy * dy)


def calc_len(points, perm):
  res = 0
  for i in range(1, len(perm)):
    a = points[perm[i]]
    b = points[perm[i - 1]]
    res += distance(a, b)
  return res


n = int(input())
points = []
for _ in range(n):
  x, y = map(int, input().split())
  points.append((x, y))

total_len = 0
for perm in permutations(list(range(n))):
  total_len += calc_len(points, perm)
print(total_len / factorial(n))
A, B, C, D = map(int, input().split())

while True:
  C -= B

  if (C <= 0):
    print('Yes')
    return
  
  A -= D
  if (A <= 0):
    print('No')
    return


### FIXED CODE ###

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

result = ''
while True:
  C -= B

  if (C <= 0):
    result = 'Yes'
    break
  
  A -= D
  if (A <= 0):
    result = 'No'
    break

print(result)
import sys

s = input().split(" ")

print(int(s[0]) - (int(s[1]) - 1)

### FIXED CODE ###

import sys

if __name__ == "__main__":
	s = input().split(" ")
	print(int(s[0]) - (int(s[1]) - 1))
# ABC094B - Toll Gates
from bisect import bisect_left


def main():
    N, M, X, *A = map(int, open(0).read().split())
    A.sort()
    cur = bisect_left(A, x)
    ans = min(cur, M - cur)
    print(ans)


if __name__ == "__main__":
    main()

### FIXED CODE ###

# ABC094B - Toll Gates
n, m, x = list(map(int, input().rstrip().split()))
lst = list(map(int, input().rstrip().split()))
lst.append(x)
lst = sorted(lst)
print(min(len(lst[: lst.index(x)]), len(lst[lst.index(x) + 1 :])))
k, s = [int(x) for x in input().split()]
cnt = 0
for x in range(k + 1):
    for y in range(k + 1):
        for z in range(k + 1):
            if x + y + z == s:
                cnt += 1
print(cnt)


### FIXED CODE ###

a, b, c = input().split(',')
print(a, b, c)
X = int(input())

a = int(X / 500)*1000 + int((X%500)/5)*5
print(a)


### FIXED CODE ###

k, n = map(float, input().split())
m = list(map(float, input().split()))
half_k = k / 2
min = float(1000000)
for i in range(int(n)):
    first = m[i]
    last = m[i-1]
    len = last - first
    if len < 0:
        len = len + k
    if min > len:
        min = len
print(int(min))
a,b=map(int,input().split())
if a<10 and b <10:
    return a*b
elif:
    return -1

### FIXED CODE ###

a,b=map(int,input().split())
if a<10 and b <10:
    print(a*b)
else:
    print(-1)
def min_sufficient_load(w, k):
    return check(w, k, 0, sum(w))


def check(w, k, p1, p2):
    trunk_no = 1
    temp = 0
    m = 1+(p1 + p2)>>1
    for i in w:
        if temp + i <= m:
            temp += i
            if temp==m:
                trunk_no+=1
                temp = 0
        else:
            trunk_no += 1
            temp = i
    if trunk_no > k:
        return check(w, k, m, p2)
    else:
        if m - p1 == 0:
            return m
        return check(w, k, p1, m)
if __name__=="__main__":
    n,k = map(int,input().split(" "))
    w = []
    for i in range(n):
        w.append(int(input()))
    print(min_sufficient_load(w,k))


### FIXED CODE ###

import math
def min_sufficient_load(w, k):
    return check(w, k, 0, sum(w))

def check(w, k, p1, p2):
    if k==1:
        return p2
    if p2 - p1 == 1:
        if get_trunk_No(w, p1) == k:
            return max(p1,max(w))
        else:
            return max(p2,max(w))
    m = math.ceil((p1+p2)/2)
    trunk_no = get_trunk_No(w,m)
    if trunk_no > k:
        return check(w, k, m, p2)
    else:
        return check(w, k, p1, m)
def get_trunk_No(w,m):
    temp = 0
    trunk_no = 1
    for i in w:
        if temp + i <= m:
            temp += i
            if temp == m:
                trunk_no += 1
                temp = 0
        else:
            trunk_no += 1
            temp = i
    if temp==0:
        trunk_no-=1
    return trunk_no
if __name__=="__main__":
    n,k = map(int,input().split(" "))
    w = []
    for i in range(n):
        w.append(int(input()))
    print(min_sufficient_load(w,k))
# -*- coding: utf-8 -*-

N, K=map(int, input().split())
A = list(map(int,input().split()))
now=0
rireki=[0]*N
for i in range(K):
    if rireki[now]==0:
        rireki[now]=1
    else:
        loop=i+1
        break

#    print("{}".format(now))
    now=A[now]-1


amari=K%loop
for i in range(amari):
    now=A[now]-1

print("{}".format(A[now]))


### FIXED CODE ###

# -*- coding: utf-8 -*-

N, K=map(int, input().split())
A = list(map(int,input().split()))
now=0
rireki=[0]*N
isou=1
hazimete=0
for i in range(4*N):
    if rireki[now]==0:
        rireki[now]=1
        startnum=i
        start=now
    else:
        if hazimete==1:
            startnum=i
            start=now
        hazimte=1
        if rireki[now]==1:
            rireki[now]=2
        else:
            if rireki[now]==2:
                rireki[now]=3
                isou=i-startnum-1
                break
    #print("{}".format(now))
    now=A[now]-1

#print("{}".format(isou))
amari=(K-startnum-1)%isou

for i in range(amari):
    now=A[now]-1
#print("{}".format(amari))
if K>startnum:
    print("{}".format(now+1))
else:
    now=0
    for i in range(K):
        now=A[now]-1
    print("{}".format(now+1))
T = input()
	print(T.replace("?","D"))

### FIXED CODE ###

T = input()
print(T.replace('?','D'))
mod = 10**9+7
N, A, B = [int(i) for i in input().split()]


def ncr(n, r):
    r = min(r, n-r)
    res = 1
    m = n
    for _ in range(r):
        res *= m
        res %= mod
        m -= 1
    m = r
    for _ in range(r):
        res *= pow(m, mod-2, mod)
        res %= mod
        m -= 1
    return res


print((pow(2, N, mod)-1-ncr(N, A)-ncr(N, B)) % mod)


### FIXED CODE ###

mod = 10**9+7
N, A, B = [int(i) for i in input().split()]


def ncr(n, r):
    r = min(r, n-r)
    res = 1
    m = n
    for _ in range(r):
        res *= m
        res %= mod
        m -= 1
    m = r
    for _ in range(r):
        res *= pow(m, mod-2, mod)
        res %= mod
        m -= 1
    return res


print((pow(2, N, mod)-1-ncr(N, A)-ncr(N, B)) % mod)
N, M = map(int, input().split())
A = list(map(int, input().split()))

j = 0
sum = []

for i in range(N+1):
    if i == A[j]:
        sum.append(0)
        if j < M-1:
            j += 1
    elif i == 0 or i == 1:
        sum.append(1)
    else:
        sum.append(sum[i-2] + sum[i-1])


print(sum[N]%1000000007)

### FIXED CODE ###

N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]

j = 0
sum = []

for i in range(N+1):
    if j < M and i == A[j]:
        sum.append(0)
        if j < M-1:
            j += 1
    elif i == 0 or i == 1:
        sum.append(1)
    else:
        sum.append(sum[i-2] + sum[i-1])


print(sum[N]%1000000007)
import bisect
n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.sort()
B.sort()
C.sort()

print(A)
print(B)
print(C)

ans = 0
for i in range(n):
  canB = bisect.bisect_right(B, A[i])
  if canB == n:
    continue
  else:
    for j in range(canB, n):
      canC = bisect.bisect_right(C, B[j])
      ans += (n - canC)
      print(A[i], B[j], C[canC], (n - canC))
print(ans)



### FIXED CODE ###

import bisect
n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.sort()
B.sort()
C.sort()

ans = 0
for i in range(n):
  canA = bisect.bisect_left(A, B[i])
  canC = bisect.bisect_right(C, B[i])
  ans += (canA)*(n-canC)
print(ans)
n, blue, red = [int(x) for x in input().split()]

balls = "b"*blue + "r"*red

x = 0
if balls != "":
    x = n // len(balls) + 1

row = balls*x

print(row[:n].count("b"))


### FIXED CODE ###

n, a, b = map(int, input().split())
period = a+b
times = n//period
k = n%period
n =  a if k >a else k
print(times*a + n)
while True:
    a, op, b = raw_input().split
    if op == "?":
        break
    if op == "+":
        print a+b
    elif op == "-":
        print a-b
    elif op == "*":
        print a*b
    elif op == "/":
        print a/b

### FIXED CODE ###

while True:
    a, op, b = raw_input().split()
    a = int(a)
    b = int(b)
    if op == "?":
        break
    elif op == "+":
        print a + b
    elif op == "-":
        print a - b
    elif op == "*":
        print a * b
    elif op == "/":
        print a / b
[a,b] = map(int,input(),split())
print(a*b,(a+b)*2)

### FIXED CODE ###

[a,b] = map(int,input().split())
print(a*b,(a+b)*2)
n=int(input())
k=list(str(n))
ans=0
print(max(sum(k),9*len(k)-9+k[0]-1))


### FIXED CODE ###

n=int(input())
k=list(str(n))
ans=0
for i in range(len(k)):
    k[i]=int(k[i])
print(max(sum(k),9*len(k)-9+k[0]-1))
x,k,d = list(map(int,input().split()))

xi = abs(x)
if abs(x) > d*k:
  m = min(abs(x+d*k),abs(x-d*k))
else:
  for i in range(k):
    if xi - d*i <= 0:
      if (i+k) % 2 != 0:
        m = abs(xi)
      else:
        m = min(abs(xi+d),abs(xi-d))
      break
    break
print(m)

### FIXED CODE ###

from math import ceil 
x,k,d = list(map(int,input().split()))

xi = abs(x)
if abs(x) > d*k:
  m = min(abs(x+d*k),abs(x-d*k))
else:
  n = ceil(xi / d)
  if (n+k) % 2 == 0:
    m = abs(xi-d*n)
  else:
    m = abs(xi-d*(n-1))
print(m)
n,x=map(int,raw_input().split(" "))
a=map(int,raw_input().split(" "))
t=[i for i in a]
ans=10**10
for m in range(n):
    t=[min(t[j],a[(j-m)%n]) for j in range(n)]
    s=min(x*m+sum(t),s)
print s

### FIXED CODE ###

n,x=map(int,raw_input().split(" "))
a=map(int,raw_input().split(" "))
t=[i for i in a]
s=10**15
for m in range(n):
    t=[min(t[j],a[(j-m)%n]) for j in range(n)]
    s=min(x*m+sum(t),s)
print s
A = list(map(int,input().split))
B = (A[0]+A[1])/2
if B <= int(B):
  print(int(B)+1)
else:
  print(B)

### FIXED CODE ###

A = list(map(int,input().split()))
B = (A[0]+A[1])/2
if B > int(B):
  print(int(B)+1)
else:
  print(int(B))
from fractions import gcd as bltin_gcd


def coprime2(a, b):
    return bltin_gcd(a, b) == 1


def cf(x1,x2):
    cf = [1]
    for i in range(2, min(x1, x2) + 1):
        if x1 % i == 0 and x2 % i == 0:
            cf.append(i)
    return cf


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

# 公約数
divisor_list = cf(A, B)

# print(divisor_list)

counts = []
for i in divisor_list:
    if i == 1:
        continue

    other_list = list(filter(lambda x: x != i, divisor_list))

    count = 0
    nums = []
    for j in other_list:
        if coprime2(i, j):
            for n in nums:
                if not coprime2(j, n):
                    break
            else:
                nums.append(j)
                count = count + 1

    counts.append(count)

if not counts:
    print(1)
else:
    print(max(counts) + 1)

### FIXED CODE ###

d = {
    'Sunny': 'Cloudy',
    'Cloudy': 'Rainy',
    'Rainy': 'Sunny'
}

i = input()

print(d[i])
n, H = map(int, input().split())
a = []
b = []
for i in range(n):
    ai, bi = map(int, input().split())
    a.append(ai)
    b.append(bi)

ans = 0
amax = max(a)
b.sort(reverse=True)
# print(amax, b)
i = 0
while H > 0:
    if amax < b[i]:
        H -= b[i]
        ans += 1
        i += 1
    else:
        ans += H//amax
        if H%amax != 0:
            ans += 1
        break

print(ans)

### FIXED CODE ###

n, H = map(int, input().split())
a = []
b = []
for i in range(n):
    ai, bi = map(int, input().split())
    a.append(ai)
    b.append(bi)

ans = 0
amax = max(a)
b.sort(reverse=True)
# print(amax, b)
i = 0
while H > 0:
    if i < n:
        if amax < b[i]:
            H -= b[i]
            ans += 1
            i += 1
        else:
            ans += H//amax
            if H%amax != 0:
                ans += 1
            break
    else:
        ans += H//amax
        if H % amax != 0:
            ans += 1
        break

print(ans)
#ABC120C-Unification.py

from sys import stdin

input = stdin.readline

S = input()

Nblock = 0

while '0' in S and '1' in S:
    for i in range(len(S)-1):
        if S[i:i+1] != S[i+1:i+2]:
            Nblock += 2
            S = S[:i] + S[i+2:]
            print(S)
            break

print(Nblock)


### FIXED CODE ###

#ABC120C-Unification.py

from sys import stdin

input = stdin.readline

S = input().rstrip()

Nblock = min(S.count('1'), S.count('0'))

print(Nblock*2)
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans)

### FIXED CODE ###

import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))
while 1:
  n, m = map(int, raw_input().split())
  if n == 0 and m == 0:
    break
  places = dict(zip(range(m), [0]*m))
  for i in range(n):
    vote = map(int,raw_input().split()) 
    for j in range(m):
      places[j] += vote[j]
  for k, v sorted(a.items,key=lambda x:x[1],reverse=1):
    print k+1
  print

### FIXED CODE ###

while 1:
    n,m=map(int,raw_input().split())
    if n+m==0:
        break
    a = dict(zip(range(m),[0]*m))
    for i in range(n):
        c=map(int,raw_input().split())
        for j in range(m):
            a[j]+=c[j]
    for k,v in sorted(a.items(),key=lambda x:x[1],reverse=1):
        print k+1,
    print
# coding:utf-8
import sys
import datetime

H1 = int(sys.stdin.readline())
M1 = int(sys.stdin.readline())
H2 = int(sys.stdin.readline())
M2 = int(sys.stdin.readline())
K = int(sys.stdin.readline())


while not 0 <= H1 < 23 and 0 <= M1 < 59 and 0 <= H2 < 23 and 0 <= M2 < 59:
    H1 = int(sys.stdin.readline())
    M1 = int(sys.stdin.readline())
    H2 = int(sys.stdin.readline())
    M2 = int(sys.stdin.readline())
    K = int(sys.stdin.readline())

if M2 > M1:
    a = (H2 - H1) * 60 + M2 - M1
    print(a - K)
if M2 < M1:
    b = (H2 - H1) * 60 + M1 - M2
    print(b - K)

### FIXED CODE ###

import sys
readline = sys.stdin.buffer.readline

h1, m1, h2, m2, k = map(int, readline().split())
print(60 * (h2 - h1) + m2 - m1 - k)
from sys import stdin
from collections import Counter

lines = stdin.readlines()

n = int(lines[0].rstrip())
a = [int(x) for x in lines[1].rstrip().split()]

c = Counter(a)

res = []
for k in range(n):
    part_res = 0
    for i in c.keys():
        if not i == a[k]:
            quant = c[i]
        else:
            quant = c[i] - 1
        if quant > 1:
            part_res += int((quant * (quant - 1)) / 2)
    res.extend([part_res])

for j in range(len(res)):
    print(res[j])

### FIXED CODE ###

from sys import stdin

n, m = [int(x) for x in stdin.readline().rstrip().split()]

even_only = 0
odd_only = 0

if n > 1:
    even_only = n * (n - 1) / 2
if m > 1:
    odd_only = m * (m - 1) / 2

result = int(even_only + odd_only)
print(result)
n = int(input())
D = []

def FindOtvet(i, j, otv):
    if i == 0:
        return ''
    if j == 0:
        if (otv + D[i - 1][j]) < n:
            otv += D[i - 1][j]
            return str(j + 1) + FindOtvet(i - 1, j + 1, otv)
        else:
            return str(j) + FindOtvet(i - 1, j, otv)
    elif j == 9:
        if (otv + D[i - 1][j - 1]) < n:
            otv += D[i - 1][j - 1]
            return str(j) + FindOtvet(i - 1, j, otv)
        else:
            return str(j - 1) + FindOtvet(i - 1, j - 1, otv)
    else:
        if (otv + D[i - 1][j - 1]) < n:
            otv += D[i - 1][j - 1]
            if (otv + D[i - 1][j]) < n:
                otv += D[i - 1][j]
                return str(j + 1) + FindOtvet(i - 1, j + 1, otv)
            else:
                return str(j) + FindOtvet(i - 1, j, otv)
        else:
            return str(j - 1) + FindOtvet(i - 1, j - 1, otv)

arr = []
for i in range(10):
    arr.append(1)
D.append(arr)
totalSum = 9
i = 1
respI = 0
respJ = 0
while respI == 0 and respJ == 0:
    arr = []
    for j in range(10):
        if j == 0:
            arr.append(D[i - 1][j] + D[i - 1][j + 1])
        elif j < 9:
            arr.append(D[i - 1][j - 1] + D[i - 1][j] + D[i - 1][j + 1])
        else:
            arr.append(D[i - 1][j - 1] + D[i - 1][j])
        if j > 0:
            if (totalSum + arr[j]) >= n:
                respI = i
                respJ = j
                break
            totalSum += arr[j]
    D.append(arr)
    i += 1
respStr = str(respJ)
print(respStr + FindOtvet(respI, respJ, totalSum))


### FIXED CODE ###

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

ab = a
a = b
b = ab

ab = c
c = a
a = ab

print(a, b, c)
L=list(map(int,input().split()))
R=list(map(int,input().split()))
if L[0]==R[2] and L[1]==R[1] and L[2]==R[0]:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

L=list(input())
R=list(input())
if L[0]==R[2] and L[1]==R[1] and L[2]==R[0]:
  print("YES")
else:
  print("NO")
i = 1
x = input()
while x:
    print('Case {0}: {1}'.format(i, x))
    x = input()
    i += 1

### FIXED CODE ###

x = input()
i = 1
while x != '0':
    print('Case {0}: {1}'.format(i, x))
    x = input()
    i += 1