Harryxun/stf_run huggingface dataset:
EN = input().split()
Bc = [0] * int(EN[0])

tmp = input().split()
BossN = [int(s) for s in tmp]

for i in tmp:

    Bc[i-1] = Bc[i-1] + 1

print(*Bc,sep='\n')

### FIXED CODE ###

EN = input().split()
Bc = [0] * int(EN[0])

tmp = input().split()

for i in tmp:
    BossN = int(i)
    Bc[BossN-1] = Bc[BossN-1] + 1

print(*Bc,sep='\n')
def f(s,t): return t[:-1] == s and len(t) == len(s) + 1
s,t = raw_input().split()
print 'Yes' if f(s,t) else 'No'

### FIXED CODE ###

u = raw_input()
v = raw_input()
print 'Yes' if u == v[:-1] else 'No'
a,b=map(int,input().split())
print(int(a*b))

### FIXED CODE ###

a,b=input().split()
a=int(a)
b=int(b[0]+b[2:])
print(a*b//100)
import math
a,b = list(map(int, input().split()))

def gcd( x, y ):
    while y != 0:
        x, y = y, x%y

def lcm(x, y):
    return (x * y) // gcd(x, y)

print(lcm(a, b))

### FIXED CODE ###

import math
a,b = list(map(int, input().split()))

def gcd( x, y ):
    while y != 0:
        x, y = y, x%y
    return x

def lcm(x, y):
    return (x * y) // gcd(x, y)

print(lcm(a, b))
n=int(input())
l=list(map(int, input().split()))
ans=sum(l)**2
sq=0
for i in range(n):
  sq+=l[i]**2
ans=(ans-sq)/2

import numpy as np
print(int(np.mod(ans, 10**9+7)))

### FIXED CODE ###

n=int(input())
l=list(map(int, input().split()))
ans=sum(l)**2

sq=0
for i in range(n):
  sq+=l[i]**2
ans=(ans-sq)//2

import numpy as np
print(np.mod(ans, 10**9+7))
n=input()
l=list(map(int,input().split()))
ans=0
while l%2==0 for i in l:
  l[i/2 for i in l]
  ans += 1
print(ans)

### FIXED CODE ###

input()
A=list(map(int,input().split()))
ans=0
while all(a%2==0 for a in A):
    A=[a/2 for a in A]
    ans+=1
print(ans)
n = int(input())

### FIXED CODE ###

def solve(string):
    n, *ab = map(int, string.split())
    ab = sorted(zip(*[iter(ab)] * 2), key=lambda x: (x[1], x[0]))
    past = 0
    for a, b in ab:
        past += a
        if past > b:
            return "No"
    return "Yes"


if __name__ == '__main__':
    n = int(input())
    print(solve('{}\n'.format(n) + '\n'.join([input() for _ in range(n)])))
import itertools

N, M = map(int, input().split())

S = []
for i in range(M):
    k, *s = map(int, input().split())
    S.append([*s])
    
P = [int(i) for i in input().split()]

A = [0, 1]
ans = 0
for i in itertools.product(A, repeat = N):
    flag = 0
    for j in range(M):
        cnt = 0
        for s in S[j]:
            if i[s - 1] == 1:
                cnt += 1
        if cnt % 2 != P[j]:
            flag = 1
    if flag == 0:
        ans += 1
        
print(ans)

### FIXED CODE ###

import itertools

N, M = map(int, input().split())

S = []
for i in range(M):
    s = list(map(int, input().split()))
    S.append(s[1:])
    
P = [int(i) for i in input().split()]

A = [0, 1]
ans = 0
for i in itertools.product(A, repeat = N):
    flag = 0
    for j in range(M):
        cnt = 0
        for s in S[j]:
            if i[s - 1] == 1:
                cnt += 1
        if cnt % 2 != P[j]:
            flag = 1
    if flag == 0:
        ans += 1
        
print(ans)
K=int(input())
S=input()

def printt(S,K):
  if len(S)<=K:
    print(S)
  else:
    print(S[:K]+'...')
      
printt(S,K)


### FIXED CODE ###

N=int(input())

def ass(N):
  if N%10 in [2,4,5,7,9]:
    print('hon')
  elif N%10 in [0,1,6,8]:
    print('pon')
  else:
    print('bon')
   
ass(N)
print(sum(list(input())))

### FIXED CODE ###

print(sum([int(i) for i in list(input())]))
n = int(input()) #長さ
s = str(input()) #文字列
cnt = 0 #暗証番号数
 
for a in range(10): #1文字目
  for b in range(10): #2文字目
    for c in range(10): #3文字目
        flg = False
        for i in range(n-2):
            if str(a) == s[i]:
                tmp_i = i + 1
                for j in range(tmp_i,n-1):
                    if str(b) == s[j]:
                        tmp_i = j + 1
                        for k in range(tmp_i,n):
                            if str(c) == s[k]:
                                cnt = cnt + 1
                                flg = True
                                break                                
       					else:
                          break
                        if flg:
                            break
                else:
                  break
                if flg:
                    break
            
print(cnt)

### FIXED CODE ###

n = int(input()) #長さ
s = str(input()) #文字列
cnt = 0 #暗証番号数

for a in range(10): #1文字目
  for b in range(10): #2文字目
    for c in range(10): #3文字目
      flg = False
      check_a = s.find(str(a))
      if check_a != -1:
        tmp_s = s[check_a + 1:]
        check_b = tmp_s.find(str(b))
        if check_b != -1:
          tmp_t = tmp_s[check_b + 1:]
          check_c = tmp_t.find(str(c))
          if check_c != -1:
            cnt = cnt + 1            
print(cnt)
s,t=input().split()
a,b=map(int,input()split())
u=input()
if u==s:
    a-=1
else:
    b-=1
print(a, b)

### FIXED CODE ###

s, t = input().split()
a, b = map(int, input().split())
u = input()
if u == s:
    a-= 1
else: b -= 1
print(a, b)
n=int(input())
h=list(map(int,input().split()))
dp=[]
dp[0]=0
dp[1]=abs(h[1]-h[0])
for i in range(2,n):
  dp.append(min(dp[i-1]+abs(h[i]-h[i-1]),dp[i-2]+abs(h[i]-h[i-2])))
 print(dp[n-1])

### FIXED CODE ###

n=int(input())
h=list(map(int,input().split()))
dp=[]
dp.append(0)
dp.append(abs(h[1]-h[0]))
for i in range(2,n):
  dp.append(min(dp[i-1]+abs(h[i]-h[i-1]),dp[i-2]+abs(h[i]-h[i-2])))
print(dp[n-1])
while True:
    try:
        line = input()
    except IOError:
        break
    a, b = map(int, line.split())
    print(a + b)

### FIXED CODE ###

while True:
    try:
        line = input()
    except EOFError:
        break
    s = sum(map(int, line.split()))
    num = 0
    for c in str(s):
        if c.isdigit():
            num += 1
    print(num)
s = input()
n = 4
pre = int(s[:2])
suf = int(s[2:])
if pre > 12 and 0 < suf <= 12:
  print('YYMM')
elif 0 < pre <= 12 and suf > 12:
  pritn('MMYY')
elif 0 < pre <= 12 and 0 < suf <= 12:
  print('AMBIGUOUS')
else:
  print('NA')

### FIXED CODE ###

s = input()
pre = int(s[:2])
suf = int(s[2:])
if 0 < pre <= 12 and 0 < suf <= 12:
  print('AMBIGUOUS')
elif 0 < suf <= 12:
  print('YYMM')
elif 0 < pre <= 12:
  print('MMYY')
else:
  print('NA')
# ABC073D - joisino's travel (210ms)
from heapq import heapify, heappop, heappush
from itertools import permutations


def dijkstra(G: "Array[Array[int]]", size: int, start: int) -> list:
    dist = [1 << 60] * size
    unchecked = size - 1  # vertex_0 won't appear in 1-idx graph
    queue = [(0, start)]
    heapify(queue)
    while queue:
        cost, v = heappop(queue)
        if cost > dist[v]:
            continue
        dist[v] = cost
        for next_cost, u in G[v]:
            if cost + next_cost < dist[u]:
                heappush(queue, (cost + next_cost, u))
        unchecked -= 1
        if not unchecked:
        return dist


def main():
    global G, N
    N, M, R, *RABC = map(int, open(0).read().split())
    visit, ABC = RABC[:R], RABC[R:]
    G = [[] for _ in range(N + 1)]
    for v, u, cost in zip(*[iter(ABC)] * 3):
        G[v].append((cost, u)), G[u].append((cost, v))
    dist = {v: dijkstra(G, N + 1, v) for v in visit}
    ans = 1 << 60
    for perm in permutations(visit):
        cur = sum(dist[v][u] for v, u in zip(perm, perm[1:]))
        ans = min(ans, cur)
    print(ans)


if __name__ == "__main__":
    main()

### FIXED CODE ###

# ABC073D - joisino's travel
from itertools import permutations
from scipy.sparse.csgraph import floyd_warshall


def main():
    N, M, R, *RABC = map(int, open(0).read().split())
    visit, ABC = RABC[:R], RABC[R:]
    G = [[float("inf")] * (N + 1) for _ in range(N + 1)]
    for v, u, c in zip(*[iter(ABC)] * 3):
        G[v][u] = G[u][v] = c
    dist = floyd_warshall(G, directed=0)
    ans = float("inf")
    for perm in permutations(visit):
        cur = sum(dist[v][u] for v, u in zip(perm, perm[1:]))
        ans = min(ans, cur)
    print(int(ans))


if __name__ == "__main__":
    main()
#coding: utf-8



line = input().strip()
N = int(line[0])
A = int(line[2])
B = int(line[4])
monster = [int(input()) for i in range(N)]

times = 0
while len(monster) > 0:
    n = monster.index(max(monster)) #一番体力が大きい魔物のインデックス
    print('max', n)
    print('monster', monster)
    monster[n] = monster[n] - A
    if monster[n] < 1:
        monster[n] = 0

    for i, x in enumerate(monster):
        if i != n:
            monster[i] = monster[i] - B
            if monster[i] < 1:
                monster[i] = 0
    for i in monster:
        if i == 0:
            monster.remove(0)


    times = times + 1

print (times-1)

### FIXED CODE ###

#coding: utf-8
import math

N, A, B = map(int, input().split())
monster = [int(input()) for i in range(N)]


def enough(T):
    attack = B * T
    diff = A-B
    count = 0
    for i in monster:
        tmp = math.ceil((i - attack)/diff)
        if tmp > 0:
            count += tmp

    if count <= T:
        return True
    else:
        return False

def bs():
    left = 0
    right = 1000000000

    while left < right:
        mid = (left + right) // 2
        if enough(mid):
            right = mid
        else:
            left = mid + 1
    return left

print(bs())
kazu = int(input())
nums = list(map(int, input().split()))
count = 0
flg = True
while flg:
  for i in range(kazu):
    if nums[i] % 2 == 1:
      flg = False
      break
    else:
      nums[i] /= 2
    finally:
      count += 1
print(count)
      

### FIXED CODE ###

kazu = int(input())
nums = list(map(int, input().split()))
count = 0
flg = True
while flg:
  for i in range(kazu):
    if nums[i] % 2 == 1:
      flg = False
      break
    else:
      nums[i] /= 2
  count += 1
count -= 1
print(count)
N = int(input())
list = []
for i in range(1, N):
  numbers = []
  for a in range(1, i):
    if i % a == 0:
      numbers.append()
  if len(numbers) == 8:
      list.append(i)
print(len(list))

### FIXED CODE ###

a, b = map(int, input().split())
 
print((a - 1) * (b - 1))
import math
N = int(input())

if N%2 == 1:
    cnt = 0
else:

    df = math.log10(N)
    d = math.floor(df)
    cnt = 0
    for i in range(d,0,-1):
        if N < 10:
            break
        cnt += (N//10**i) * (10**i-1)//(10-1)
        N%=10**i

print(cnt)

### FIXED CODE ###

N = int(input())

if N%2 == 1:
    cnt = 0
else:
    cnt = 0
    a = 1
    while (5**a)*2<=N:
        cnt += N//((5**a)*2)
        a += 1

print(cnt)
from fractions import gcd
import math

a, b = [int(elem) for elem in input().split()]

cf = []
for i in range(1, min(a, b)+1):
    if a % i == 0 and b % i == 0:
       cf.append(i)

res = [cf[0], cf[1]]
cf.pop(0)
cf.pop(0)

j = 0
while True:
    if j >= len(cf):
        break
    flag = 0
    for elem in res[1:]:
        if cf == []:
            break
        if gcd(cf[j], elem) != 1:
            cf.pop(j)
            flag = 1
            break
    if flag == 0:
        res.append(cf[j])
        cf.pop(j)
print(len(res))

### FIXED CODE ###

a, b = [int(elem) for elem in input().split()]

def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return fct

a_lst = factorize(a)
b_lst = factorize(b)
res = list(set(a_lst) & set(b_lst))
print(len(res) + 1)
import sys
class City:
  def __init__(self, index, pref, time):
    self.index = index
    self.pref = pref
    self.time = time
    self.sort_res = None
  def get_id(self):
    str1 = "0"*(6-len(str(self.pref)))+str(self.pref)
    str2 = "0"*(6-len(str(self.sort_res)))+str(self.sort_res)
    return str1 + str2
if __name__ == '__main__':
  nm = list(sys.stdin,readline().split(" "))
  N = int(nm[0])
  M = int(nm[1])
  prefs = [[]] * N
  cities = []
  for i in range(M):
    info = list(sys.stdin,readline().split(" "))
    newcity = City(i,int(info[0]),int(info[1]))
    prefs[int(info[0])].append(newcity)
  for i in range(N):
    prefs[i].sort(key = lambda x: x.time)
  	for j in range(len(prefs[i])):
      prefs[i][j].sort_res = j+1
  for i in prefs:
    for j in i:
      cities.append(i)
  cities.sort(key = lambda x:x.index)
  for i in cities:
    print(i.get_id())
  
      
   
  

### FIXED CODE ###

import sys


class City:
    def __init__(self, ind, pref, time):
        self.ind = ind
        self.pref = pref
        self.time = time
        self.sort_res = None

    def get_id(self):
        str1 = "0" * (6 - len(str(self.pref))) + str(self.pref)
        str2 = "0" * (6 - len(str(self.sort_res))) + str(self.sort_res)
        return str1 + str2
    def __str__(self):
    	return str(self.ind)
if __name__ == '__main__':
    nm = list(sys.stdin.readline().split(" "))
    N = int(nm[0])
    M = int(nm[1])
    prefs = [[] for x in range(N)]
    cities = []
    for i in range(M):
        info = sys.stdin.readline().rstrip().split(" ")
        newcity = City(i, int(info[0]), int(info[1]))
        prefs[int(info[0])-1].append(newcity)
    for i in range(N):
        prefs[i].sort(key=lambda x: x.time)
        for j in range(len(prefs[i])):
            prefs[i][j].sort_res = j + 1
    for i in prefs:
        for j in i:
            cities.append(j)
    cities.sort(key=lambda y: y.ind)
    for i in cities:
        print(i.get_id())
import numpy as np

x, y, z = map(int, input().split())

s = [x, y, z]

print(int(sorted(s))


### FIXED CODE ###

#print(*sorted(map(int, input().split())))

print(*sorted(map(int, input().split())))
def main():
    a, b, m = map(int, input().split())
    priceOfMicrowaves = list(map(int, input().split()))
    priceOfRefrigerators = list(map(int, input().split()))
    priceTable = [list(map(int,input().split())) for i in range(m)]
    cheepest = priceOfMicrowaves[0] + priceOfRefrigerators[0]
    for p in priceOfMicrowaves:
        if cheepest == 0:
            break
        if p >= cheepest:
            continue
        for q in priceOfRefrigerators:
            if q >= cheepest:
                continue
            if p + q < cheepest:
                cheepest = p + q
    for price in priceTable:
        if cheepest == 0:
            break
        if priceOfMicrowaves[price[0]-1] >= cheepest:
            continue
        elif priceOfMicrowaves[price[1]-1] >= cheepest:
            continue
        elif priceOfMicrowaves[price[0]-1]+priceOfRefrigerators[price[1]-1]-price[2] < cheepest:
            cheepest = priceOfMicrowaves[price[0]-1]+priceOfRefrigerators[price[1]-1]-price[2]
    print(cheepest)
    
main()

### FIXED CODE ###

a, b, m = map(int, input().split())
priceOfMicrowaves = list(map(int, input().split()))
priceOfRefrigerators = list(map(int, input().split()))
priceTable = [list(map(int,input().split())) for i in range(m)]
cheepest = priceOfMicrowaves[0] + priceOfRefrigerators[0]
for price in priceTable:
    if priceOfMicrowaves[price[0]-1]-price[2] >= cheepest:
        continue
    elif priceOfRefrigerators[price[1]-1]-price[2] >= cheepest:
        continue
    elif priceOfMicrowaves[price[0]-1]+priceOfRefrigerators[price[1]-1]-price[2] < cheepest:
        cheepest = priceOfMicrowaves[price[0]-1]+priceOfRefrigerators[price[1]-1]-price[2]
if cheepest > min(priceOfMicrowaves) + min(priceOfRefrigerators):
    cheepest = min(priceOfMicrowaves) + min(priceOfRefrigerators)
print(cheepest)
from heapq import heappop, heappush
ab = lambda a,b:abs(a-b)
area = lambda a,b:ab(a[1],b[1])*ab(a[0],b[0])
dist = lambda a,b:(ab(a[1],b[1])**2+ab(a[0],b[0])**2)>>1

N, K = map(int, input().split())
A = []
graph = []
inf = float('INF')
for i in range(N):
    a,b = map(int, input().split())
    A.append([a,b])
    graph.append([inf for i in range(N)])
if N == 2:
    print(area(a,b))
    exit()
    
mn_dist = inf
for i in range(N):
    for j in range(N):
        if i == j:
            continue
        graph[i][j] = graph[j][i] = dist(A[i], A[j])
        if mn_dist > graph[i][j]:
            mn_dist = graph[i][j]
            mn_dict = {i:1,j:1}
            mn_lst = [i,j]
print(mn_dict, mn_dist)

x_lst = [A[mn_lst[0]][0], A[mn_lst[1]][0]]
y_lst = [A[mn_lst[0]][1], A[mn_lst[1]][1]]
cands = []
tmp = min([[graph[mn_lst[0]][i], i] for i in range(N) if i not in mn_dict])
heappush(cands, tmp)
tmp = min([[graph[mn_lst[1]][i], i] for i in range(N) if i not in mn_dict])
heappush(cands, tmp)
print(cands)
    
for i in range(K-2):
    _, idx = heappop(cands)
    mn_dict[idx] = 1
    mn_lst.append(idx)
    x_lst.append(A[idx][0])
    y_lst.append(A[idx][1])
    tmp_lst = [[graph[mn_lst[idx]][i], i] for i in range(N) if i not in mn_dict]
    if tmp_lst != []:
        tmp = min(tmp_lst)
        heappush(cands, tmp)

a = [min(x_lst), min(y_lst)]
b = [max(x_lst), max(y_lst)]
print(area(a,b), mn_lst)

### FIXED CODE ###

ab = lambda a,b:abs(a-b)
area = lambda a,b:ab(a[1],b[1])*ab(a[0],b[0])

N, K = map(int, input().split())
A = []
x_lst = []
y_lst = []
for i in range(N):
    a,b = map(int, input().split())
    A.append([a,b])
    x_lst.append(a)
    y_lst.append(b)

x_lst.sort()
y_lst.sort()
mn = float('INF')
for x in range(N-1):
    for x_ in range(x,N):
        for y in range(N-1):
            for y_ in range(y,N):
                cnt = 0
                for a,b in A:
                    if x_lst[x] <= a <= x_lst[x_] and y_lst[y] <= b <= y_lst[y_]:
                        cnt += 1
                if cnt >= K:
                    mn = min(mn, area([x_lst[x],y_lst[y]], [x_lst[x_], y_lst[y_]]))
print(mn)
import copy
def dfs(cur_node, pre_node, Node_num, map, l):
    #全てのノードを見たとき

    if Node_num == N-1 or cur_node <= 0 or cur_node >= N-1:
        return
    elif l[pre_node][cur_node]==0: #飛んだ先が、Trueの時
        return
    elif map[cur_node]==True:
        return

    map[cur_node]=True

    for i in range(N):
        if i != cur_node:
            dfs(i, cur_node, Node_num+1, map, l)


S = input()
S = list(map(int, S.split()))

N = S[0]
M = S[1]


map = [False]*N
map[0] = True
map[N-1] = True
lst = []

for i in range(N):
    lst.append([0]*N)

for i in range(N):
    S = input()
    S = list(S.split())
    idx1 = int(S[0])
    idx2 = int(S[1])
    lst[idx1-1][idx2-1] = 1

graph_count = 0
#全探索
for i in range(1, N, 1):
    map_copy = copy.copy(map)
    lst_copy = copy.copy(lst)

    dfs(i, 0, 0, map_copy, lst_copy)
    count = 0
    for i in map_copy:
        if i == True:
            count = count + 1
    if count == N:
        graph_count = graph_count + 1

print(graph_count)


### FIXED CODE ###

import itertools
N,M=map(int,input().split())
edges={tuple(sorted(map(int,input().split()))) for i in range(M)}
ans=0
for i in itertools.permutations(range(2,N+1),N-1):
    l=[1]+list(i)
    ans+=sum(1 for edge in zip(l,l[1:]) if tuple(sorted(edge)) in edges)==N-1
print(ans)
K = int(input())
A, B = map(int, input().split())
for i in range(1000):
  if A <= K*a <= B:
    print("OK")
    exit(0)
print("No")

### FIXED CODE ###

K = int(input())
A, B = map(int, input().split())
for i in range(1000):
  if A <= K*i <= B:
    print("OK")
    exit(0)
print("NG")
ndef gcd(a, b):
    return b if a == 0 else gcd(b%a, a)
num = [int(x) for x in input().split(" ")]
print(int(num[0]*num[1]/gcd(num[0], num[1])))

### FIXED CODE ###

def gcd(a, b):
    return b if a == 0 else gcd(b%a, a)
num = [int(x) for x in input().split(" ")]
print(int(num[0]*num[1]/gcd(num[0], num[1])))
n = int(input())
*A, = map(int, input().split())
# n = 4
# A = [1, 3, 4, 2]
# n = 6
# A = [5, 5, 6, 1, 1, 1]
# n = 6
# A = [8, 6, 9, 1, 2, 1]
A = [(a, i) for i, a in enumerate(A)]
A.sort(reverse=True)
DP = [[None for r in range(n+1)] for l in range(n+1)]


def dp(l, r):
    if l == r:
        DP[l][r] = 0
    if DP[l][r] != None:
        return DP[l][r]
    a, i = A[n-(r-l)]
    x = dp(l+1, r)+a*abs(i-l)
    y = dp(l, r-1)+a*abs(i-r+1)
    DP[l][r] = max(x, y)
    return DP[l][r]


print(dp(0, n))


### FIXED CODE ###

n = int(input())
*A, = map(int, input().split())
# n = 6
# A = [8, 6, 9, 1, 2, 1]
# n = 4
# A = [1, 3, 4, 2]
A = [(a, i) for i, a in enumerate(A)]
A.sort(reverse=True)
DP = [[0 for r in range(n+1)] for l in range(n+1)]
for l in range(n):
    for r in range(n-l):
        a, i = A[l+r]
        DP[l+1][r] = max(DP[l+1][r], DP[l][r]+a*abs(i-l))
        DP[l][r+1] = max(DP[l][r+1], DP[l][r]+a*abs(i-(n-1-r)))
print(max([DP[l][n-l] for l in range(n)]))
#!/usr/bin/python
from fractions import Fraction
import sys
if sys.version_info[0]>=3: raw_input=input

def gauss(a):
	if not a or len(a)==0: return None
	n=len(a)
	for i in range(n):
		if a[i][i]==0:
			for j in range(i+1,n):
				if a[j][i]!=0:
					for k in range(i,n+1): a[i][k]+=a[j][k]
					break
		for j in range(n):
			if i!=j:
				r = Fraction(a[j][i],a[i][i])
				for k in range(i,n+1): a[j][k] = a[j][k] - a[i][k]*r
	for i in range(n):
		x=Fraction(a[i][i],1)
		for j in range(len(a[i])):
			a[i][j] /= x
	return a

uaz=list(map(int,raw_input().split()))
enemy=[0]+[-x+y for x,y in zip(map(int,raw_input().split()),uaz)]
b0=[1]+[x-y for x,y in zip(map(int,raw_input().split()),uaz)]
b1=[1]+[x-y for x,y in zip(map(int,raw_input().split()),uaz)]
b2=[1]+[x-y for x,y in zip(map(int,raw_input().split()),uaz)]
sol=gauss(list(map(list,zip(b0,b1,b2,enemy,[1,0,0,0]))))
print('MISS' if sol and all(0<=e[-1]<=1 for e in sol) else 'HIT')

### FIXED CODE ###

#!/usr/bin/python
from fractions import Fraction
import sys
if sys.version_info[0]>=3: raw_input=input

def gauss(a):
	if not a or len(a)==0: return None
	n=len(a)
	for i in range(n):
		if a[i][i]==0:
			for j in range(i+1,n):
				if a[j][i]!=0:
					for k in range(i,n+1): a[i][k]+=a[j][k]
					break
			else:
				return None
		for j in range(n):
			if i!=j:
				r = Fraction(a[j][i],a[i][i])
				for k in range(i,n+1): a[j][k] = a[j][k] - a[i][k]*r
	for i in range(n):
		x=Fraction(a[i][i],1)
		for j in range(len(a[i])):
			a[i][j] /= x
	return a

uaz=list(map(int,raw_input().split()))
enemy=[0]+[-x+y for x,y in zip(map(int,raw_input().split()),uaz)]
b0=[1]+[x-y for x,y in zip(map(int,raw_input().split()),uaz)]
b1=[1]+[x-y for x,y in zip(map(int,raw_input().split()),uaz)]
b2=[1]+[x-y for x,y in zip(map(int,raw_input().split()),uaz)]
sol=gauss(list(map(list,zip(b0,b1,b2,enemy,[1,0,0,0]))))
print('MISS' if sol and all(0<=e[-1]<=1 for e in sol) else 'HIT')
a,b=list(map(int,input().split()))
if a <= 9 and b <=9:
    return a*b
return -1

### FIXED CODE ###

a,b=list(map(int,input().split()))
if a <= 9 and b <= 9 and a >=1 and b >=1:
    print(a*b)
else:
    print(-1)
N = int(input())
A = [0] + inpl()
D = [0]*(N+1)

for i in range(N, 0, -1):
    D[i] = (sum(D[2*i::i])%2)^A[i]

print(sum(D))
print(*[i for i in range(N+1) if D[i]])

### FIXED CODE ###

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

N = int(input())
A = [0] + inpl()
D = [0]*(N+1)

for i in range(N, 0, -1):
    D[i] = (sum(D[2*i::i])%2)^A[i]
print(sum(D))
print(*[i for i in range(N+1) if D[i]])
a,b=int(input().split())
if a>9:
    print('b')
else
    print(b-(100＊(10-b))
          
 


### FIXED CODE ###

a,b=map(int,input().split())
if a>9:
  print(b)
else:
  print(b+(100*(10-a)))