Harryxun/stf_run huggingface dataset:
d,e=[list(map(int,input().split()))for _ in range(2)]
m={0:'1234',1:'5230',2:'1504',3:'1054',4:'0235',5:'1324'}[d.index(e[0])]
#f=[str(e[i])for i in range(1,5)]+[str(e[1])]
f=[str(e[i])for i in range(1,5)]
f+=f
f[2],f[3]=f[3],f[2]
g=[str(d[int(i)])for i in m]
g[2],g[3]=g[3],g[2]
g+=g
for i in range(4):
 if g[g.index(f[i])+1]!=f[i+1]:print('No');break
 elif i==3:print('Yes')

### FIXED CODE ###

d,e=[input().split()for _ in'12'];e[3:5]=e[4],e[3]
t=0
for p in('012345','152304','215043','310542','402351','513240'):
 f=[d[int(j)]for j in p];f[3:5]=f[4:2:-1]
 if f[0]==e[0]:
  f=f[1:5]*2
  for j in range(4):
   if f[j:j+4]==e[1:5]:t=1
print(('No','Yes')[t])
s = str(input())
print(0:len(s):2)

### FIXED CODE ###

s = str(input())


print(s[0:len(s):2])
while True:
  a,b = map(int, raw_input().split())
  GCD = a if a > b else b
  LCM = a * b
  tmp = GCD
  #GCD 最大公約数
  #LCM 最小公倍数
  for i in range(tmp, 0, -1):
    if a % i == 0 and b % i == 0: GCD = i
  tmp = LCM
  for i in range(tmp, 0, -1):
    if i % a == 0 and i % i == 0: LCM = i
  print str(GCD) + " " + str(LCM)

### FIXED CODE ###

def get_gcd(a,b):
	if a > b: a, b = b, a
	if b % a == 0:
		return a
	else:
		return get_gcd(a, b % a)

def get_lcm(a,b,g):
	return a * b / g

while True:
	try:
		a,b = map(int, sorted(raw_input().split()))
		GCD = get_gcd(a,b)
		LCM = get_lcm(a,b,GCD)
		print "{} {}".format(GCD, LCM)
	except EOFError:
		break
a = list(map,int(input().split()))
a.sort()

if a[0]+a[1] == a[2]:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

a = list(map(int,input().split()))
a.sort()

if a[0]+a[1] == a[2]:
  print('Yes')
else:
  print('No')
a,b=int(input())
if a<=8 and b<=8:
    print("Yay!")
else:
    print(":(")

### FIXED CODE ###

a,b=map(int,input().split())
if a<=8 and b<=8:
    print("Yay!")
else:
    print(":(")
# 73

MOD = 10**9 + 7
x, y = map(int, input().split())

a = 2*y - x
b = 2*x - y

fac_l = [0] * (int((a + b) / 3) + 1)
inv_l = [0] * (int((a + b) / 3) + 1)
finv_l = [0] * (int((a + b) / 3) + 1)


def com_init():
    fac_l[1] = 1
    inv_l[0] = 1
    inv_l[1] = 1
    finv_l[0] = 1
    finv_l[1] = 1
    for i in range(2, a+b+1):
        fac_l[i] = (fac_l[i-1] * i) % MOD
        inv_l[i] = MOD - (inv_l[MOD % i] * int(MOD / i)) % MOD
        finv_l[i] = finv_l[i-1] * inv_l[i] % MOD


def ncr(n, r):
    return (((fac_l[n] * finv_l[r]) % MOD) * finv_l[n-r]) % MOD


if a % 3 != 0 or b % 3 != 0:
    print("0")
else:
    a = int(a/3)
    b = int(b/3)

    com_init()
    print(ncr(a+b, a))


### FIXED CODE ###

# 73

MOD = 10**9 + 7
x, y = map(int, input().split())

a = 2*y - x
b = 2*x - y

fac_l = [0] * (int((a + b) / 3) + 1)
inv_l = [0] * (int((a + b) / 3) + 1)
finv_l = [0] * (int((a + b) / 3) + 1)


def com_init():
    fac_l[1] = 1
    inv_l[0] = 1
    inv_l[1] = 1
    finv_l[0] = 1
    finv_l[1] = 1
    for i in range(2, a+b+1):
        fac_l[i] = (fac_l[i-1] * i) % MOD
        inv_l[i] = MOD - (inv_l[MOD % i] * int(MOD / i)) % MOD
        finv_l[i] = (finv_l[i-1] * inv_l[i]) % MOD

def ncr(n, r):
    return (fac_l[n] * (finv_l[r] * finv_l[n-r]) % MOD) % MOD


if a % 3 != 0 or b % 3 != 0 or a < 0 or b < 0:
    print("0")
else:
    a = int(a/3)
    b = int(b/3)

    com_init()
    print(ncr(a+b, a))
n = int(input())
s = input()
d = "ABCDEFGHIJKLMNOPQRSTUVXYZ"
print("".join([d[(d.index(i)+n)%26] for i in s]))

### FIXED CODE ###

n = int(input())
s = input()
d = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
print(''.join([d[(d.index(i) + n) % 26] for i in s]))
n=intput()
if (n < 1000)
	print("ABC")
else
	print("ABD")

### FIXED CODE ###

n = int(input())
if n < 1000:
	print('ABC')
else:
	print('ABD')
if a >= b :
    print("delicious")
elif b - a <= x:
    print("safe")
else:
    print("dangerous")

### FIXED CODE ###

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

if a >= b :
    print("delicious")
elif b - a <= x:
    print("safe")
else:
    print("dangerous")
listimport math
import itertools
import statistics
#import collections
n = int(input())
A = (map(int, input().split()))
count = 0
while sum(A)%2==0:
    for i in range(n):
        A[i] /= 2
    count += 1

print(count)

### FIXED CODE ###

n = int(input())
# n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
check = False
for i in range(n):
    if a[i] % 2 != 0:
        check = True
        break
count = 0
while check == False:
    for i in range(n):
        a[i] /= 2
        if a[i] % 2 != 0:
            check = True
            break
    count += 1
print(count)
from sys import stdin
import numpy as np
N=list(map(int,(stdin.readline().strip().split())))[0]
A=list(map(int,(stdin.readline().strip().split()))).sort()
moji=A[0]
count=1
i=0
length=len(A)-1
j=0
sougou=0
while(i!=length):

    if moji==A[i+1]:
        count+=1
        i+=1
        j+=1
    else:
        sougou += 1
        print(count)
        count=1
        j=1
        i+=1
        moji=A[i]
if j>=1:
    sougou += 1
    print(count)
for _ in range(N-sougou):print(0)

### FIXED CODE ###

from sys import stdin
import numpy as np
N=list(map(int,(stdin.readline().strip().split())))[0]
A=list(map(int,(stdin.readline().strip().split())))
num_list=[0]*N
moji=A[0]
i=0
length=len(A)-1
for i in A:
    num_list[i-1]+=1
for num in num_list:
    print(num)
N = int(input())
An = list(map(int, input().split()))

sum = 0
for n in range(N):
    sum += An[n] - (n+1)
    
a, b, c = sum//N, sum//N + 1

ans = [0]*3
for n in range(N):
    ans[0] += abs(An[n] - (a+n+1))
    ans[0] += abs(An[n] - (b+n+1))
    ans[1] += abs(An[n] - (c+n+1))

print(min(ans))


### FIXED CODE ###

N = int(input())
An = list(map(int, input().split()))

for n in range(N):
    An[n] -= (n+1)

An.sort()

if (N-1) % 2 != 0:
    m = N//2 - 1
else:
    m = (N-1)//2

bf = -sum(An[0:m+1:]) + (m+1)*An[m]
af = sum(An[m+1::]) - (N-m-1)*An[m]
ans = bf + af
print(ans)
N = int(input())
A = list(map(int, input().split()))
if N > 2:
    for i in range(N-2):
        if A[i]>A[i+1]:
            A[i] -= 1
    for i in range(N-2):
        if A[i] > A[i+1]:
            print("No")
            break
    else:
        print("Yes")
elif N == 2:
    if A[0] <= A[1]:
        print("Yes")
    else:
        print("No")
elif N == 1:
    print("Yes")


### FIXED CODE ###

a, b,c = map(int, input().split())
d = c-(a-b)
if d<0:
    d = 0
print(d)
b, c = map(int, input().split())
def caibun(b,c):
    count = 0
    for i in range(b, c+1, 1):
        a = str(i)
        if a == a[::-1]:
            count +=1
    print(count)
caibun(b,c)

### FIXED CODE ###

ips = []
ips.append(input())
while True:
    try:
        ips.append(input())
    except (EOFError):
        break
abc = ips[0][0]+ips[1][1]+ips[2][2]
print(abc)
N, R = map(int, input().split())
if N >= 10:
  print(R)
  exit()
else:
print(100 * (10 - N) + R)

### FIXED CODE ###

N, R = map(int, input().split())
if N >= 10:
  print(R)
  exit()
else:
	print(100 * (10 - N) + R)
# 入力
H,W=map(int,input().split())

l=[]
for i in range(H):
    l.append(list(input()))

for i in range(H):
    for j in range(W):
    # 地雷数のカウンタ
    c=0

    # '#'の場合はなにもしない
    if l[i][j]=='#':
        pass

    # '#'以外の場合
    else:
      # 左上
      if 0<i and 0<j and l[i-1][j-1]=='#':
        c+=1
      # 上
      if 0<i and l[i-1][j]=='#':
        c+=1
      # 右上
      if 0<i and j<W-1 and l[i-1][j+1]=='#':
        c+=1
      # 左
      if 0<j and l[i][j-1]=='#':
        c+=1
      # 右
      if j<W-1 and l[i][j+1]=='#':
        c+=1
      # 左下
      if i<H-1 and 0<j and l[i+1][j-1]=='#':
        c+=1
      # 下
      if i<H-1 and l[i+1][j]=='#':
        c+=1
      # 右下
      if i<H-1 and j<W-1 and l[i+1][j+1]=='#':
        c+=1

      # 地雷隣接数を記載
      l[i][j]=str(c)

# 出力
for i in range(H):
    print(''.join(l[i]))

### FIXED CODE ###

# 入力
H,W=map(int,input().split())

l=[]
for i in range(H):
    l.append(list(input()))

for i in range(H):
    for j in range(W):
    # 地雷数のカウンタ
        c=0

    # '#'の場合はなにもしない
        if l[i][j]=='#':
            pass

    # '#'以外の場合
        else:
      # 左上
            if 0<i and 0<j and l[i-1][j-1]=='#':
                c+=1
      # 上
            if 0<i and l[i-1][j]=='#':
                c+=1
      # 右上
            if 0<i and j<W-1 and l[i-1][j+1]=='#':
                c+=1
      # 左
            if 0<j and l[i][j-1]=='#':
                c+=1
      # 右
            if j<W-1 and l[i][j+1]=='#':
                c+=1
      # 左下
            if i<H-1 and 0<j and l[i+1][j-1]=='#':
                c+=1
      # 下
            if i<H-1 and l[i+1][j]=='#':
                c+=1
      # 右下
            if i<H-1 and j<W-1 and l[i+1][j+1]=='#':
                c+=1

      # 地雷隣接数を記載
            l[i][j]=str(c)

# 出力
for i in range(H):
    print(''.join(l[i]))
def get_primes(n):
    x = [0,0]+[i for i in range(2,n+1)]
    for i in range(int(n**0.5+1)):
        if x[i] !=0:
            for j in range(e*2, n+1,e):
                x[j] = 0
    return filter(None, x)

PRIMES = get_primes(10000)
n = int(input())
c = 0
for i in range(n):
    p = int(input())
    f = 1
    for e in PRIMES:
        if e >= p:
            break
        if p % e == 0:
            f = 0
            break
    c += f
print c

### FIXED CODE ###

def get_primes(n):
    x = [0,0]+[i for i in range(2,n+1)]
    for i in range(int(n**0.5+1)):
        e = x[i]
        if e !=0:
            for j in range(e*2, n+1,e):
                x[j] = 0
    return filter(None, x)

PRIMES = get_primes(10000)
n = int(input())
c = 0
for i in range(n):
    p = int(input())
    f = 1
    for e in PRIMES:
        if e >= p:
            break
        if p % e == 0:
            f = 0
            break
    c += f
print c
a, b = int(input()), int(input())
print(a * b)

### FIXED CODE ###

a, b = map(int, input().split())
print(a * b)
a=int(input('a='))
b=int(input('b='))
total=a*b
if total%2==0:
    print('Even')
else:
    print('Odd')

### FIXED CODE ###

a,b=map(int,input().split())
total=a*b
if total%2==0:
    print('Even')
else:
    print('Odd')
import copy
import sys
H, W, M= map(int,input().split())
height = [0]*H
width = [0]*W
for s in sys.stdin.readlines():
    h, w = map(int, s.split())
    height[h-1] += 1
    width[w-1] += 1
    object[h-1][w-1] = 1
h_max = max(height)
w_max = max(width)
cand_w = []
cand_h = []
for i in range(W):
   if width[i] == w_max:
      cand_w.append(i)
for i in range(H):
   if height[i] == h_max:
      cand_h.append(i)
ans = h_max + w_max
print(ans) 

### FIXED CODE ###

import copy
import sys
H, W, M= map(int,input().split())
height = [0]*H
width = [0]*W
object = []
for s in sys.stdin.readlines():
    h, w = map(int, s.split())
    height[h-1] += 1
    width[w-1] += 1
    object.append([h-1, w-1])
h_max = max(height)
w_max = max(width)
cand_w = []
cand_h = []
for i in range(W):
   if width[i] == w_max:
      cand_w.append(i)
for i in range(H):
   if height[i] == h_max:
      cand_h.append(i)
ans = h_max + w_max
c = 0
p = len(cand_h)*len(cand_w)
cand_h = set(cand_h)
cand_w = set(cand_w)
if M >= p:
   for i in range(len(object)):
      if object[i][0] in cand_h and object[i][1] in cand_w:
         c += 1
print(ans - (c == p))
from math import log2
N = int(input())
ans = 0
for i in range(int(log2(N))):
  ans += (N // 5 ** (i+1)) // 2
if(N % 2 == 0):
  print(ans)
else:
  print(0)

### FIXED CODE ###

from math import log2
N = int(input())
ans = 0
if(N % 2 == 0 and N != 0):
  for i in range(int(log2(N))):
    ans += (N // 5 ** (i+1)) // 2
  print(ans)
else:
  print(0)
S = int(input().split("/"))

if S[5] < 5 :
	print('Heisei')
else :
	print('TBD')

### FIXED CODE ###

s = input()

if s <= "2019/04/30":
    print("Heisei")
else:
    print("TBD")
h, w = [int(s) for s in input().split(' ')]
 
s = []
for i in range(h):
    s.append([s == '.' for s in input()])
 
inf = 10000
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]

queue = [(0, 0)]
p = []
for i in range(h):
    p.append([inf] * w)
p[0][0] = 1
 
while len(queue) > 0:
    x, y = queue.pop()
    for i in range(4):
        xx = x + dx[i]
        yy = y + dy[i]
        if 0 <= xx and xx < w and 0 <= yy and yy < h:
        	if s[yy][xx] and p[yy][xx] > p[y][x] + 1:
            	p[yy][xx] = p[y][x] + 1
           		queue.insert(0, (xx, yy))
           
if p[h-1][w-1] == inf:
    print('-1')
else:
    print(sum(sum(x) for x in s) - p[h-1][w-1])

### FIXED CODE ###

h, w = [int(s) for s in input().split(' ')]
 
s = []
for i in range(h):
    s.append([s == '.' for s in input()])

inf = 10000
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]
q = [(0, 0)]
p = []
for i in range(h):
    p.append([inf] * w)
p[0][0] = 1

while len(q) > 0:
    x, y = q.pop()
    for i in range(4):
        xx = x + dx[i]
        yy = y + dy[i]
        if 0 <= xx and xx < w and 0 <= yy and yy < h and s[yy][xx] and (p[yy][xx] > p[y][x] + 1):
           p[yy][xx] = p[y][x] + 1
           q.insert(0, (xx, yy))
if p[h-1][w-1] == inf:
    print('-1')
else:
    print(sum(sum(x) for x in s) - p[h-1][w-1])
n = int(input())
if n==7 or n==5 or n=3:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

n = int(input())
if n==7 or n==5 or n==3:
  print("YES")
else:
  print("NO")
input = sys.stdin.readline
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N,M = IL()

data = []
for i in range(M):
  a,b = IL()
  if a == 1:
    if b in data:
      print("POSSIBLE")
      break
    else:
      data.append(b)
  if b == N:
    if a in data:
      print("POSSIBLE")
      break
    else:
      data.append(a)
else:
  print("IMPOSSIBLE")


### FIXED CODE ###

import sys
input = sys.stdin.readline
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N,M = IL()

data = [0]*N
for i in range(M):
  a,b = IL()
  if a == 1:
    if data[b]==1:
      print("POSSIBLE")
      break
    else:
      data[b]=1
  if b == N:
    if data[a]==1:
      print("POSSIBLE")
      break
    else:
      data[a]=1
else:
  print("IMPOSSIBLE")
A = list(map(int, input().split()))
print(f"{A[2]} {A[0]} {A[1]}")

### FIXED CODE ###

A = list(map(int, input().split()))
print("{} {} {}".format(A[2], A[0], A[1]))
import sys
sys.setrecursionlimit(10000)
n,m = map(int,input().split())
a = [0]*m
b = [0]*m
for i in range(m):
  u,v = map(int, input().split())
  a[i] = u-1
  b[i] = v-1
par = [i for i in range(n)]
size = [1]*n
incomb = [n*(n-1)//2]*m

def root(x):
  if par[x] == x: 
    return x
  else:
    par[x] = root(par[x])
    return par[x]
    
def isSame(x,y):
  return par[x] == par[y]

def union(x,y):
  x = root(x)
  y = root(y)
  if x == y:
    return
  else:
    par[y] = x
    size[x] += size[y]
    
def size_count(x):
  return size[root(x)]

for i in reversed(range(1,m)):
  q_a = a[i]
  q_b = b[i]
  size_a = size_count(q_a)
  size_b = size_count(q_b)
  if not isSame(q_a,q_b):
    union(q_a,q_b)
    incomb[i-1] = incomb[i] - size_a*size_b
  else:
    incomb[i-1] = incomb[i]

for i in incomb:
  print(i)

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)
n,m = map(int,input().split())
a = [0]*m
b = [0]*m
for i in range(m):
  u,v = map(int, input().split())
  a[i] = u-1
  b[i] = v-1
par = [i for i in range(n)]
size = [1]*n
incomb = [n*(n-1)//2]*m

def root(x):
  if par[x] == x: 
    return x
  else:
    par[x] = root(par[x])
    return par[x]
    
def isSame(x,y):
  return par[x] == par[y]

def union(x,y):
  x = root(x)
  y = root(y)
  if x == y:
    return
  else:
    par[y] = x
    size[x] += size[y]
    
def size_count(x):
  return size[root(x)]

for i in reversed(range(1,m)):
  q_a = a[i]
  q_b = b[i]
  size_a = size_count(q_a)
  size_b = size_count(q_b)
  if not isSame(q_a,q_b):
    union(q_a,q_b)
    incomb[i-1] = incomb[i] - size_a*size_b
  else:
    incomb[i-1] = incomb[i]

for i in incomb:
  print(i)
n, q = list(map(int, input().split()))
trees =  [ [] for i in range(n) ]
for i in range(n-1):
    a, b = list(map(int, input().split()))
    trees[a-1].append(b-1)
    trees[b-1].append(a-1)

values = [ 0 for i in range(n) ]
for i in range(q):
    p, x = list(map(int, input().split()))
    values[p-1] += x
#print(values)

def dfs2(i, parent):
    for j in trees[i]:
        if j == parent: continue
        values[j] += values[i]
        dfs2(j, i)

dfs2(0, -1)
print(*values)

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
n, q = map(int, input().split())
 
ki = [[] for i in range(n + 1)]
for i in range(n - 1):
    a, b = map(int, input().split())
    ki[a].append(b)
    ki[b].append(a)
# print(ki)
 
cnt = [0] * (n + 1)
for i in range(q):
    p, x = map(int, input().split())
    cnt[p] += x
 
 
# print(cnt)
 
 
def d(y, parent):
    for i in ki[y]:
        if i == parent:
            continue
        cnt[i] += cnt[y]
        d(i, y)
 
 
d(1, -1)
print(*cnt[1:])
N, M, X = map(int, input().split())
A = [*map(int, input().split())]

l = [a for a in A if a < X]
r = [a for a in A if a > X]

print(min(len(l), len(r)))


### FIXED CODE ###

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

l = [a for a in A if a < X]
r = [a for a in A if a > X]

print(len(l) if len(l) < len(r) else len(r))
{1:14}

A = raw_input('A=')
B = raw_input('B=')

if int(A) == int(B)
  print 'Draw'

elif int(A) ＞ int(B)
  print 'Alice'

elif int(B) ＞ int(A)
  print 'Bob'

### FIXED CODE ###

# -*- coading: utf-8 -#-

A = raw_input()
B = A.split()
C, D = int(B[0]), int(B[1])

if C == 1:
  if D == 1:
    print 'Draw'
  else:
    print 'Alice'
else:
  if D == 1:
    print 'Bob'
  else:
    if C > D:
      print 'Alice'
    elif C < D:
      print 'Bob'
    else:
      print 'Draw'
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def comb(n,r):
    return factorial(n) / (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    x = comb(k-1,k-i)
    if n-k+1 >= i:
        y = comb(n-k+1,i)
    else:
        y = 0
    print(int(x*y)%mod)

### FIXED CODE ###

from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def cmb(n,r):
    return factorial(n) // (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    if n-k+1 < i or k-1 < i-1:
        print(0)
    else:
        x = cmb(k-1,i-1) % mod
        y = cmb(n-k+1,i) % mod
        ans = (x*y) % mod
        print(int(ans))
a=list(map(int,input().split()))

ans=1
c=a[:]
if a[1]==1:
    print(0)
    exit()
while c[0]<a[1]:
    c-=1
    c+=a[0]
    ans+=1
print(ans)

### FIXED CODE ###

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

ans=1
c=a
if b==1:
    print(0)
    exit()
while c<b:
    c-=1
    c+=a
    ans+=1
print(ans)
stdin = [input() for i in range(3)]
line = stdin[0]
A = int(line[0])
V = int(line[1])
line = stdin[1]
B = int(line[0])
W = int(line[1])
T = int(stdin[2])
if (V-W)*T < B-A:
    print('NO')
else:
    print('YES')

### FIXED CODE ###

stdin = [input() for i in range(3)]
line = stdin[0].split(' ')
A = int(line[0])
V = int(line[1])
line = stdin[1].split(' ')
B = int(line[0])
W = int(line[1])
T = int(stdin[2])
length = 0
if B > A:
    length = B-A
else:
    length = A-B
if (V-W)*T < length:
    print('NO')
else:
    print('YES')
data=[]
for i in range(int(input())):
    data.append(int(input()))
un=[num for num in data if num%10==0]
data=[num for num in data if num%10!=0]
if len(data)==0:
    print(0)
else:
    if sum(un+data)%10!=0:
        print(sum(un+data))
    else:
        print(sum(un+data)-min(data))

### FIXED CODE ###

a,b=map(int,input().split())
print(a+b if a+b<10 else 'error')
x=list(map(int,input().split()))

for i in x:
    if x[i]==0:
        print(i+1)

### FIXED CODE ###

a,b,c,d,e=map(str,input().split())

s=str(a+b+c+d+e)

print(s.find('0')+1)
n = int(input())
D = list(map(int,input().split()))
m = int(input())
T = list(map(int,input().split()))
if m > n:
    print('NO')
    exit()
numd = [0]*200005
numt = [0]*200005
for d in D:
    numd[d] += 1
for t in T:
    numt[t] += 1
for t in T:
    if numt[t] > numd[t]:
        print('NO')
        exit()
print('YES')

### FIXED CODE ###

from collections import Counter
n = int(input())
D = list(map(int,input().split()))
m = int(input())
T = list(map(int,input().split()))
sd = set(D)
st = set(T)
cntd = Counter(D)
cntt = Counter(T)
ok = True
for t in T:
    if t not in sd:
        ok = False
    elif cntt[t] > cntd[t]:
        ok = False
if ok:
    print('YES')
else:
    print('NO')
a,b=map(int,input().split())
 
c=a*b
 
if(c20==0) print("even")
else print("odd")


### FIXED CODE ###

a, b = map(int, input().split())
 
if (a * b) % 2 == 0:
    print("Even")
elif (a * b) % 2 != 0:
    print("Odd")
import math
import sys


def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


input = sys.stdin.readline

N, K = map(int, input().strip().split(' '))
div = 1000000000 + 7

for i in range(K):
    perm = comb(N - K + 1, i + 1) * comb(K - 1, i)
    print(perm % div)


### FIXED CODE ###

import math
import sys


def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


input = sys.stdin.readline

N, K = map(int, input().strip().split(' '))
div = 1000000000 + 7

for i in range(K):
    if i > N - K:
        print(0)
    else:
        perm = comb(N - K + 1, i + 1) * comb(K - 1, i)
        print(perm % div)
import random
[N,L] = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
ans = []
for i in range(N-L+1) : ans.append(min(random.shuffle(A[i:i+L])))
for i in ans[:-1] : print(i, end=" ")
print(ans[-1])

### FIXED CODE ###

def ascend(a,b):
    mini = min(A[a:a+L])
    ans[a] = mini
    for i in range(a+1,b):
        if A[i+L-1] <= mini : mini = A[i+L-1]
        elif A[i-1] == mini : mini = min(A[i:i+L])
        ans[i] = mini

def descend(a,b):
    mini = min(A[b-1:b+L-1])
    ans[b-1] = mini
    for i in range(b-2,a-1,-1):
        if A[i] <= mini : mini = A[i]
        elif A[i+L] == mini: mini = min(A[i:i+L])
        ans[i] = mini
    
[N,L] = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
ans = [None]*(N-L+1)
count = 0;
if N > 10 ** 4:
    for i in range(100):
        if A[i+1] > A[i] : count += 1
    if count > 80 : descend(0, N-L+1)
    else : ascend(0,N-L+1)
else :
    ascend(0, N-L+1)
for i in ans[:-1] : print(i, end=" ")
print(ans[-1])
# 初期入力
import sys
input = sys.stdin.readline  #文字列では使わない
Ken_n,City_n = (int(i) for i in input().split())
city ={i:[] for i in range(1,City_n+1)}
for i in range(1,City_n+1):
    p,y = (int(i) for i in input().split())
    city[p].append((y,i))

city_ID ={i:0 for i in range(1,City_n +1)}
for i in range(1,Ken_n +1):
    city[i].sort()
    for j in range(len(city[i])):
        city_ID[city[i][j][1]] = "{0:06d}".format(i) +"{0:06d}".format(j+1)

for i in range(1,City_n +1):
    print(city_ID[i])

### FIXED CODE ###

# 初期入力
import sys
input = sys.stdin.readline  #文字列では使わない
Ken_n,City_n = (int(i) for i in input().split())
city ={i:[] for i in range(1,Ken_n+1)}
for i in range(1,City_n+1):
    p,y = (int(i) for i in input().split())
    city[p].append((y,i))

city_ID ={i:0 for i in range(1,City_n +1)}
for i in range(1,Ken_n +1):
    city[i].sort()
    
    for j in range(len(city[i])):
        city_ID[city[i][j][1]] = "{0:06d}".format(i) +"{0:06d}".format(j+1)

for i in range(1,City_n +1):
    print(city_ID[i])
(A-1)*(B-1)

### FIXED CODE ###

a, b = map(int, input().split())
print ((a-1)*(b-1))
N, M = map(int, input().split())
adj = {}
for i in range(N):
  adj[i+1] = []
for i in range(M):
  v1, v2 = map(int, input().split())
  adj[v1].append(v2)
  adj[v2].append(v1)

visited = {1}
parent = {1: None}
frontier = [1]
while frontier:
  nxt = []
  for u in frontier:
    for v in adj[u]:
      if v not in visited:
        parent[v] = u
        nxt.append[v]
        visited.add[v]
  frontier = nxt

if len(visited) < N: print("No")
else:
  print("Yes")
  for i in range(2,N+1):
    print(parent[i][0])
  
        

### FIXED CODE ###

N, M = map(int, input().split())
adj = {}
for i in range(N):
    adj[i + 1] = []
for i in range(M):
    v1, v2 = map(int, input().split())
    adj[v1].append(v2)
    adj[v2].append(v1)

visited = {1}
parent = {1: None}
frontier = [1]
while frontier:
    nxt = []
    for u in frontier:
        for v in adj[u]:
            if v not in visited:
                parent[v] = u
                nxt.append(v)
                visited.add(v)
    frontier = nxt

if len(visited) < N:
    print("No")
else:
    print("Yes")
    for i in range(2, N + 1):
        print(parent[i])