Harryxun/stf_run huggingface dataset:
(n, m, l) = [int(i) for i in input().split()]
A = []
for nc in range(n): 
    A.append([int(i) for i in input().split()])
B = []
for mc in range(m): 
    B.append([int(i) for i in input().split()])

product = [[0 for d in range(l)] for dd in range()]
      
for nc in range(n):
    for lc in range(l): 
        for mc in range(m):
            product[nc][lc] += A[nc][mc] * B[mc][lc] 

for r in product: 
    print(' '.join([str(d) for d in r]))

### FIXED CODE ###

(n, m, l) = [int(i) for i in input().split()]
A = []
for nc in range(n): 
    A.append([int(i) for i in input().split()])
B = []
for mc in range(m): 
    B.append([int(i) for i in input().split()])

product = [[0 for d in range(l)] for dd in range(n)]
      
for nc in range(n):
    for lc in range(l): 
        for mc in range(m):
            product[nc][lc] += A[nc][mc] * B[mc][lc] 

for r in product: 
    print(' '.join([str(d) for d in r]))
A, B = list(map(int, input().split()))

for x in range(20):
	if (A-1)*x + 1 >= B:
      print(x)
      break


### FIXED CODE ###

import math
A, B = list(map(int, input().split()))
 
print(math.ceil((B-1)/(A-1)))
h=int(input())
a=list(map(int,innput().split()))

if sum(a)>=h:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

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

if sum(a)>=h:
  print("Yes")
else:
  print("No")
N, K = map(int, input().split())
A = list(map(int, input().split()))
li = []
ans = 0

B = set(A)

cnt = len(B)

for x in B:
    a = A.count(x)
    li.append(a)

li = sorted(li)

if cnt - K > 0:
    for x in range(cnt - K):
        ans += li[x]
    print(ans)

else :
    print(ans)

### FIXED CODE ###

s = list(input())

#print(s)

x = s.count("1")

print(x)
A,B,X = map(int, input().split())

print('YES' if A =< X and A+B >= X else 'NO')


### FIXED CODE ###

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

print('YES' if A <= X and A+B >= X else 'NO')
import sys
K = int(input())

d = pow(9, -1, K)
t = 1
for ans in range(1, K):
    #x = 7*(pow(10, ans, K) - 1)*d
    t = (t*10) % K
    x = 7*(t - 1)*d
    if  x%K == 0:
        print(ans)
        sys.exit()

print(-1)


### FIXED CODE ###

X = int(input())

if X >= 30:
    print('Yes')
else:
    print('No')
s_input = string(input()) 
s_list = [s[0], s[1], s[3]]

cnt_up = 0
for s in s_list
	if s == "1":
    	cnt_up = cnt_up +1
    else:
    	None
        
print(cnt_up)
        
     



### FIXED CODE ###

s_input = str(input())
 
s_1 = s_input[0:1]
s_2 = s_input[1:2]
s_3 = s_input[2:3]
 
count = 0
 
s_list = [s_1, s_2, s_3]
 
for s in s_list:
    if s == "1":
        count = count + 1
    else:
        None
      
print(count)
from collections import deque
import heapq
# 入力、初期化
N = int(input())
tree = [[] for _ in range(N)]
input_list = []
for _ in range(N - 1):
    a, b = map(int, input().split())
    a, b = a - 1, b - 1
    input_list.append([a, b])
    tree[a].append(b)
    tree[b].append(a)


# visitedにノードの色を格納する
visited_edge = [[0] * N for _ in range(N)]


# bfsによる色付けを行う
def bfs(now_node):
    queue = deque([[tree[now_node], 0, now_node]])
    while queue:
        next_nodes, before_color, now_node = queue.pop()
        now_color = 1
        for next_node in next_nodes:
            if visited_edge[now_node][next_node] != 0:
                continue
            if now_color == before_color:
                now_color += 1
            visited_edge[next_node][now_node] = now_color
            visited_edge[now_node][next_node] = now_color
            queue.appendleft([tree[next_node], now_color, next_node])
            now_color += 1


bfs(0)
ans = []
for a, b in input_list:
    ans.append(visited_edge[a][b])
max_val = 0
for row in visited_edge:
    row = row.sort()
    tmp_max = row[-1]
    if tmp_max > max_val:
        max_val = tmp_max
print(max_val)
print(*ans, sep="\n")

### FIXED CODE ###

from collections import deque
# 入力、初期化
N = int(input())
tree = [[] for _ in range(N)]
input_list = []
for _ in range(N - 1):
    a, b = map(int, input().split())
    a, b = a - 1, b - 1
    input_list.append([a, b])
    tree[a].append(b)
    tree[b].append(a)


# visitedにノードの色を格納する
# visited_edge = [[0] * N for _ in range(N)]
dict = {}
'''
# bfsによる色付けを行う
def bfs(now_node, max_val=0):
    queue = deque([[tree[now_node], -1, now_node]])
    while queue:
        next_nodes, before_color, now_node = queue.pop()
        now_color = 1
        for next_node in next_nodes:
            if visited_edge[now_node][next_node] != 0:
                continue
            if now_color == before_color:
                now_color += 1
            if max_val < now_color:
                max_val = now_color
            visited_edge[next_node][now_node] = now_color
            visited_edge[now_node][next_node] = now_color
            queue.appendleft([tree[next_node], now_color, next_node])
            now_color += 1
    return max_val
'''
def bfs(now_node, max_val=0):
    queue = deque([[tree[now_node], -1, now_node]])
    while queue:
        next_nodes, before_color, now_node = queue.pop()
        now_color = 1
        for next_node in next_nodes:
            key = tuple(sorted([now_node, next_node]))
            if not dict.get(key) is None:
                continue
            if now_color == before_color:
                now_color += 1
            if max_val < now_color:
                max_val = now_color
            dict[key] = now_color
            # visited_edge[now_node][next_node] = now_color
            queue.appendleft([tree[next_node], now_color, next_node])
            now_color += 1
    return max_val

ans = bfs(0)
print(ans)
for a, b in input_list:
    # print(visited_edge[a][b])
    print(dict[tuple(sorted([a,b]))])
N=int(input())
matchNums=input().split(" ")
matchNums=list(map(int, matchNums))
plus_flgs=[]

if len(matchNums)==1:
    print("Yes")
    
else:
    check_array=[]
    check_array_all=[]
    
    for i in range(len(matchNums)-1):
        check_array.append((matchNums[i+1] - matchNums[i]))
    
#     for i in range(len(check_array)-1):
#         check_array_all.append((check_array[i+1] + check_array[i]))
    #プラスとプラスの間を足す
    #プラスのinedex取得
    for i,val in enumerate(check_array):
        if val > 0:
            plus_flgs.append(i)
    
    # 最後がマイナスで終わるとき対策
    plus_flgs.append(len(check_array))
    for i in range(len(plus_flgs)-1):
        check_array_all.append(sum(check_array[plus_flgs[i]+1: plus_flgs[i+1]]))
    
    # 微分値が-2の物があったらＮＧ
    if min(check_array_all)<-1:
        print("No")
    else:
        print("Yes")

### FIXED CODE ###

N=int(input())
matchNums=input().split(" ")
matchNums=list(map(int, matchNums))
plus_flgs=[-1]

if len(matchNums)==1:
    print("Yes")
    
else:
    check_array=[]
    check_array_all=[]
    
    for i in range(len(matchNums)-1):
        check_array.append((matchNums[i+1] - matchNums[i]))
    
#     for i in range(len(check_array)-1):
#         check_array_all.append((check_array[i+1] + check_array[i]))
    #プラスとプラスの間を足す
    #プラスのinedex取得
    for i,val in enumerate(check_array):
        if val > 0:
            plus_flgs.append(i)
    
    # 最後がマイナスで終わるとき対策
    plus_flgs.append(len(check_array))
#     print(plus_flgs)
#     print(check_array)
    for i in range(len(plus_flgs)-1):
        check_array_all.append(sum(check_array[plus_flgs[i]+1: plus_flgs[i+1]]))
#     print(check_array_all)
    # プラスとプラスの間の和が-2の物があったらＮＧ
    if min(check_array_all)<-1:
        print("No")
    else:
        print("Yes")
num = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
sum = 0

for i in range(num):
	if i == 0:
		sum += b[a[i]-1]
	else:
		sum += b[a[i]-1]
		if (a[i]-1) == a[i-1]:
			sum += c[a[i-1]]

print(sum)
          

### FIXED CODE ###

num = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
sum = 0
 
for i in range(num):
	if i == 0:
		sum += b[a[i]-1]
	else:
		sum += b[a[i]-1]
		if (a[i]-1) == a[i-1]:
			sum += c[a[i-1]-1]
 
print(sum)
#!/bin/evn python
# -*- coding: utf-8 -*-

n = int(input())
words = [input() for _ in range(n)]

last = ''
success = True

if len(set(words)) != len(words):
    success = False

if success:
    for word in words:
        if last[-1] != word[0]:
            success = False 
            break

if success:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

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

if (a * b) % 2 == 1:
    print('Yes')
else:
    print('No')
num=int(raw_input())
num=num*num*num
print(num)

### FIXED CODE ###

k=input()
s=int(k)
print(s*s*s)
S = input()

def solve(S):
    mod = 10**9+7
    N = len(S)
    Aquest = []
    Cquest = []
    cntA,cntquest = 0,0
    for i in range(N):
        if S[i] in 'B?':
            Aquest.append([cntA,cntquest])
        if S[i]=='A':
            cntA += 1
        if S[i]=='?':
            cntquest += 1
    cntC,cntquest = 0,0
    for i in range(N-1,-1,-1):
        if S[i] in 'B?':
            Cquest.append([cntC,cntquest])
        if S[i]=='C':
            cntC += 1
        if S[i]=='?':
            cntquest += 1
    Cquest = Cquest[::-1]
    ans = 0
    for aquest,cquest in zip(Aquest,Cquest):
        a = aquest[0]*pow(3,aquest[1],mod)+aquest[1]*pow(3,aquest[1]-1,mod)
        c = cquest[0]*pow(3,cquest[1],mod)+cquest[1]*pow(3,cquest[1]-1,mod)
        ans += a*c%mod
    ans %= mod
    return ans
print(solve(S))

### FIXED CODE ###

S = input()

def solve(S):
    mod = 10**9+7
    N = len(S)
    Aquest = []
    Cquest = []
    cntA,cntquest = 0,0
    for i in range(N):
        if S[i] in 'B?':
            Aquest.append([cntA,cntquest])
        if S[i]=='A':
            cntA += 1
        if S[i]=='?':
            cntquest += 1
    cntC,cntquest = 0,0
    for i in range(N-1,-1,-1):
        if S[i] in 'B?':
            Cquest.append([cntC,cntquest])
        if S[i]=='C':
            cntC += 1
        if S[i]=='?':
            cntquest += 1
    Cquest = Cquest[::-1]
    ans = 0
    for aquest,cquest in zip(Aquest,Cquest):
        a = aquest[0]*pow(3,aquest[1],mod)
        if aquest[1]>0:
            a += aquest[1]*pow(3,aquest[1]-1,mod)
        c = cquest[0]*pow(3,cquest[1],mod)
        if cquest[1]>0:
            c += cquest[1]*pow(3,cquest[1]-1,mod)
        ans += a*c%mod
    ans %= mod
    return ans
print(solve(S))
a,b,c,d= map(int,input().split())
if a+b+c+d==7:
  print(str(a)+'+'+str(b)+'+'+str(c)+'+'+str(d)+'=7')
elif  a+b+c-d==7:
  print(str(a)+'+'+str(b)+'+'+str(c)+'-'+str(d)+'=7')
elif  a+b-c+d==7:
  print(str(a)+'+'+str(b)+'-'+str(c)+'+'+str(d)+'=7')
elif  a-b+c+d==7:
  print(str(a)+'-'+str(b)+'+'+str(c)+'+'+str(d)+'=7')
elif  a+b-c-d==7:
  print(str(a)+'+'+str(b)+'-'+str(c)+'-'+str(d)+'=7')
elif  a-b+c-d==7:
  print(str(a)+'-'+str(b)+'+'+str(c)+'-'+str(d)+'=7')
elif  a-b-c+d==7:
  print(str(a)+'-'+str(b)+'-'+str(c)+'+'+str(d)+'=7')
else:
  print(str(a)+'-'+str(b)+'-'+str(c)+'-'+str(d)+'=7')

### FIXED CODE ###

a,b,c,d= map(int,input())
if a+b+c+d==7:
  print(str(a)+'+'+str(b)+'+'+str(c)+'+'+str(d)+'=7')
elif a+b+c-d==7:
  print(str(a)+'+'+str(b)+'+'+str(c)+'-'+str(d)+'=7')
elif a+b-c+d==7:
  print(str(a)+'+'+str(b)+'-'+str(c)+'+'+str(d)+'=7')
elif a-b+c+d==7:
  print(str(a)+'-'+str(b)+'+'+str(c)+'+'+str(d)+'=7')
elif a+b-c-d==7:
  print(str(a)+'+'+str(b)+'-'+str(c)+'-'+str(d)+'=7')
elif a-b+c-d==7:
  print(str(a)+'-'+str(b)+'+'+str(c)+'-'+str(d)+'=7')
elif a-b-c+d==7:
  print(str(a)+'-'+str(b)+'-'+str(c)+'+'+str(d)+'=7')
else:
  print(str(a)+'-'+str(b)+'-'+str(c)+'-'+str(d)+'=7')
S = input()
K = int(input())
L=set()
for i in range(len(K)):
    for j in range(len(S)-i):
        L.add((S[j:j+i+1]))
L = sorted(list(L))
print(L[K-1])

### FIXED CODE ###

S = input()
K = int(input())
L=set()
for i in range(K):
    for j in range(len(S)-i):
        L.add((S[j:j+i+1]))
L = sorted(list(L))
print(L[K-1])
s = list(input())
if s[3] == s[4] and s[5] == s[6]:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

s = list(input())
if s[2] == s[3] and s[4] == s[5]:
  print('Yes')
else:
  print('No')
s = []
while 1:
 inp = input().lower()
 if inp == null:
  break
 s.append(inp)

for i in range(ord('a'), ord('z')+1):
 print("{0} : {1}".format(chr(i), s.count(chr(i))))

### FIXED CODE ###

import sys 
dataset = sys.stdin.readlines()

for s in range(ord('a'), ord('z') + 1):
 count = 0
 for data in dataset:
  count += data.lower().count(chr(s))
 print("{0} : {1}".format(chr(s), count))
N, X = list(map(int, input().split()))
L = list(map(int, input().split()))

za = 0
count = 1

while za <= X:
  count += 1
  za += L[count-2]
  
print(count-1)

### FIXED CODE ###

N, X = list(map(int, input().split()))
L = list(map(int, input().split()))

za = 0


for count in range(N):
  za += L[count]
  if za > X:
    break

else:
  count += 1
  
print(count+1)
while True:
  H,W=map(int,raw_input().split())
  if H==W==0:
      print (('#'*W +'\n')*H)

### FIXED CODE ###

while True:
  H,W=map(int,raw_input().split())
  if H==W==0:
    break
  elif H!=0 or W!=0:
    print (('#'*W +'\n')*H)
N,M,K = map(int, input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))

S = []

Sum = 0


for i in range(len(A)):
  K = K - A[i]
  if K > 0:
    Sum += 1
  else:
    K = K + A[i]

    break
S.append(Sum)

for j in range(len(B)):
  K = K - B[j]
  if K > 0:
    Sum += 1
  else:
    while(K<0):
      i = i - 1
      K = K + A[i]
      Sum = Sum - 1
    Sum += 1
  S.append(Sum)
print(max(S))

### FIXED CODE ###

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

S = [0]

Sum = 0


for i in range(N):
  K = K - A[i]
  if K >= 0:
    Sum += 1
  else:
    K = K + A[i]
    break
else:
  i = N
S.append(Sum)

for j in range(M):
  K = K - B[j]
  if K >= 0:
    Sum += 1
  else:
    if i == 0:
      break
    for k in range(i):
      K = K + A[i-k-1]
      
      Sum = Sum - 1
      if K >= 0:
        i = i-k-1
        break
    else:
      i = 0
      continue
    if K >= 0:
      Sum += 1
    
  S.append(Sum)
 
print(max(S))
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read() for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


import numpy as np

N = read_a_int()
A = np.array(read_ints())


def gcd(a, b):
    while (b != 0):
        tmp = a
        a = b
        b = tmp % b

    return a


import math


def is_prime(n):
    if n == 1:
        return True

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True


gcd_tmp = A[0]
for a in A[1:]:
    gcd_tmp = gcd(gcd_tmp, a)

A_gcd = A//gcd_tmp

# delidx = None
for i, a in enumerate(A_gcd):
    if is_prime(a):
        delidx = i
        break


ans = A[delidx-1]
for i, a in enumerate(A[:delidx].tolist()+A[delidx+1:].tolist()):
    ans = gcd(ans, a)

print(ans)


### FIXED CODE ###

# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read() for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


N = read_a_int()
A = read_ints()

from fractions import gcd
# 累積GCDを使って解く
# 累積の概念は広く使えるxor,min,max,積等...
# 差ではなく左右から挟み込んで演算という概念をしっかりと身につけよう

left = []
right = []
tmp_fo = 0
tmp_re = 0
for fo, re in zip(A, A[::-1]):
    tmp_fo = gcd(tmp_fo, fo)
    tmp_re = gcd(tmp_re, re)
    left.append(tmp_fo)
    right.append(tmp_re)

right = right[::-1]

ans = 0
for i in range(1, N-1):
    ans = max(ans, gcd(left[i - 1], right[i + 1]))

ans = max(ans, right[1], left[-2])

print(ans)
import sys

input = sys.stdin.readline


def main():
    print("YES" if int(input()) % 4 == 0 else "NO")


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys

input = sys.stdin.readline


def main():
    print("YES" if int("".join(input().split())) % 4 == 0 else "NO")


if __name__ == "__main__":
    main()
import collections
n = int(input())
dic = collections.defaultdict(int)
for i in range(n):
  dic[input()] += 1
print("AC x" + dic["AC"])
print("WA x" + dic["WA"])
print("TLE x" + dic["TLE"])
print("RE x" + dic["RE"])


### FIXED CODE ###

#[int(i) for i in input().split()]
import collections
n = int(input())
dic = collections.defaultdict(int)
for i in range(n):
  dic[input()] += 1
print("AC x " + str(dic["AC"]))
print("WA x " + str(dic["WA"]))
print("TLE x " + str(dic["TLE"]))
print("RE x " + str(dic["RE"]))
1 N, X = map(int, input().split())
2 m = []
3 for i in range(N):
4 m.append(int(input()))
5 print(N + (X - sum(m)) // min(m))

### FIXED CODE ###

N,X = map(int,input().split())
m=[]
for i in range(N):
	m.append(int(input()))
print(N + (X-sum(m))//min(m))
n=int(input())
A=list(map(int,input().split()))
from collections import deque
ans=deque([])
d=deque(A)
for i in range(0,n):
    if i%2==0:
        ans.append(d[i])
    if i%2==1:
        ans.appendleft(d[i])
a=list(ans)
if n%2==1:
    c=a[::-1]
print(" ".join(map(str, c)))

### FIXED CODE ###

n=int(input())
A=list(map(int,input().split()))
from collections import deque
ans=deque([])
d=deque(A)
for i in range(0,n):
    if i%2==0:
        ans.append(d[i])
    if i%2==1:
        ans.appendleft(d[i])
a=list(ans)
if n%2==1:
    c=a[::-1]
else:
    c=a
print(" ".join(map(str, c)))
k = int( input())
s = list(str(input()))
n = int( input())
  
for i in range(len(s)):
	if s[i] != s[n-1]:
	s[i] = "*"
          
print(s)


### FIXED CODE ###

k = int( input())
s = list(str(input()))
n = int( input())
a = ""
  
for i in range(len(s)):
    if s[i] != s[n-1]:
        s[i] = "*"
    a+=(str(s[i]))
        
print(a)
from math import gcd
from functools import reduce

def gcd_list(numbers):
    return reduce(gcd, numbers)

N, X = map(int, input().split())
x = list(map(int, input().split()))
x.sort()
diff = []
for i in range(0, N - 1):
    diff.append(x[i + 1] - x[i])

if diff:
    ans = gcd_list(diff)
else:
    ans = x[0] - 1

print(ans)


### FIXED CODE ###

from fractions import gcd
from functools import reduce

N, X = map(int, input().split())
x = list(map(int, input().split()))
x.sort()
diff = []
for i in range(N):
    diff.append(abs(x[i] - X))

while len(diff) > 1:
    a, b = diff.pop(), diff.pop()
    diff.append(gcd(a, b))

print(diff[0])
print(x**3)

### FIXED CODE ###

x=int(input())
print(x**3)
def resolve():
	n = int(input())
	s = input()
	sum_e = [0]*(n+1)
	sum_w = [0]*(n+1)
	for i in range(n):
		ev = 1 if s[i] == 'E' else 0
		wv = 1 if s[i] == 'W' else 0
		sum_e[i+1] = sum_e[i] + ev
		sum_w[i+1] = sum_w[i] + wv
	ans = float('inf')
	if n == 2:
		print(1 if len(Counter(list(s)).keys()) == 2 else 0)
		return
	for i in range(n+1):
		if i == 0:
			v = sum_e[-1] - sum_e[i]
			ans = min(ans, v)
		else:
			v = sum_w[i-1] + (sum_e[-1] - sum_e[i+1])
			ans = min(ans, v)
	print(ans)
resolve()

### FIXED CODE ###

from collections import Counter

def resolve():
	n = int(input())
	s = input()
	sum_e = [0]*(n+1)
	sum_w = [0]*(n+1)
	for i in range(n):
		ev = 1 if s[i] == 'E' else 0
		wv = 1 if s[i] == 'W' else 0
		sum_e[i+1] = sum_e[i] + ev
		sum_w[i+1] = sum_w[i] + wv
	ans = float('inf')
	if n == 2:
		print(1 if len(Counter(list(s)).keys()) == 2 else 0)
		return
	e_w = sum_e[-1] - sum_e[1]
	e_e = sum_w[n-1]
	ans = min(e_w, e_e)
	for i in range(n):
		v = sum_w[i-1] + (sum_e[-1] - sum_e[i])
		ans = min(ans, v)
	print(ans)
resolve()
import sys
for line in sys.stdin:
    a,b = line.split(' ',2)
    a,b = int(a),int(b)
    print '%d %d %5.6f' %(a/b, a%b, 1.0*a/b)

### FIXED CODE ###

a, b = map(int, raw_input().split())
print '%d %d %.12f' %(a/b, a%b, 1.0*a/b)
z,x,y=eval('map(int,input().split()),'*3);print('No War'[3*(max(z[2],*x)>=min(z[3],*y)):])

### FIXED CODE ###

x,y=input().split()[2:];print('No '*(max(map(int,input().split()+[x]))<min(map(int,input().split()+[y])))+'War')
ans = 0
for i in range(int(input())):
  r1, r2 = input().sprit()
  ans += r2 - r1 + 1
print(ans)

### FIXED CODE ###

ans = 0
for i in range(int(input())):
  r1, r2 = input().split()
  ans += int(r2) - int(r1) + 1
print(ans)
n,q = map(int,input().split())
s = str(input())
ls = [list(map(int,input().split())) for _ in range(q)]
a = [0]
for i in range(1,n):
    if s[i-1] == "A":
        if s[i] == "C":
            a.append(a[-1]+1)
    else:
        a.append(a[-1])
for j in range(q):
    (u,t) = (ls[j][0],ls[j][1])
    print(a[t-1]-a[u-1])

### FIXED CODE ###

n,q = map(int,input().split())
s = str(input())
a = [0]
for i in range(1,n):
    if s[i-1] == "A" and s[i] == "C":
        a.append(a[-1]+1)
    else:
        a.append(a[-1])
for j in range(q):
    u,t = map(int,input().split())
    print(a[t-1]-a[u-1])
#include <stdio.h>
int some_sum(int n){
    int n1,n2,n3,n4,n5,temp;
    n1=n%10;
    n=n/10;
    n2=n%10;
    n=n/10;
    n3=n%10;
    n=n/10;
    n4=n%10;
    n=n/10;
    n5=n%10;
    temp=n1+n2+n3+n4+n5;
    return temp;
}
int main(void){
    int N,A,B;
    scanf("%d",&N);
    scanf("%d",&A);
    scanf("%d",&B);
    int i,sum;
    sum=0;
    for (i=1;i<=N;i++){
        int mp;
        mp=some_sum(i);
        if((A<=mp)&&(mp<=B))
            sum+=i;
    }
    printf("%d",sum);
}

### FIXED CODE ###

N,A,B=map(int, input().split())
s=0
for i in range(1,N+1):
    k=0
    j=i
    while(j>0):
        k+=j%10
        j=j//10
    if (A<=k and k<=B):
        s=s+i
print(s)
A,B,N=map(int,input().split())
import numpy as np
print(max([int(A*x/B)-A*int(x/B) for x in np.arange(0,N+1,B/A)]))

### FIXED CODE ###

A,B,N=map(int,input().split())
def f(x):
  return int(A*x/B)-A*int(x/B)

print(f(min(N,B-1)))
N, M =map(int, input().split())
sc=[list(map(int, input().split())) for _ in range(M)]
sc.sort(key=lambda x:x[0])

ans=0
if M>N:
    ans=-1
for i in range(M):
    s1, c1 = sc[i]
    if s1>N:
        ans=-1
        break
    for j in range(i+1, M):
        s2, c2 = sc[j]
        if s1==s2 and c1!=c2:
            ans=-1
            break
if len(sc)!=1 and sc[0][0]==1 and sc[0][1]==0:
    ans=-1

if ans!=-1:
    ans_={1:1, 2:0, 3:0}
    for i in range(M):
        s, c = sc[i]
        ans_[s]=c
    for i in range(1, N+1):
        ans=ans*10+ans_[i]

print(ans)

### FIXED CODE ###

N, M =map(int, input().split())
sc=[list(map(int, input().split())) for _ in range(M)]
sc.sort(key=lambda x:x[0])

ans=0
for i in range(M):
    s1, c1 = sc[i]
    if s1>N:
        ans=-1
        break
    for j in range(i+1, M):
        s2, c2 = sc[j]
        if s1==s2 and c1!=c2:
            ans=-1
            break
if M>0 and N>1 and sc[0][0]==1 and sc[0][1]==0:
    ans=-1

if ans!=-1:
    ans_={1:1, 2:0, 3:0}
    for i in range(M):
        s, c = sc[i]
        ans_[s]=c
    for i in range(1, N+1):
        ans=ans*10+ans_[i]

if N==1 and M==0:
    ans=0

print(ans)
s, t = input().split()

k = abcdefghijklmnopqrstuvwxwz


if s == t[:-1]:
    if t[-1] in k:
        print("Yes")
    else:
        print("No")
else:
    print("No")

### FIXED CODE ###

s = input()
t = input()
k = "abcdefghijklmnopqrstuvwxwz"


if s == t[:-1]:
    if t[-1] in k:
        print("Yes")
    else:
        print("No")
else:
    print("No")