Harryxun/stf_run huggingface dataset:
n = int(input())
xy = [list(map(int,input().split())) for _ in range(n-1)]
xy_1d = list(itertools.chain.from_iterable(xy))
c = collections.Counter(xy_1d)
cc = c.most_common()
num_max = cc[0][0]
color = cc[0][1]
color_list = [i+1 for i in range(color)]
length = len(xy)
l = [color]
for i in range(length):
    if i < color:
        l.append(color_list[i])
    elif i >= color:
        num = i - int(length/color)*color
        l.append(color_list[num])
for i in l:
    print(i)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 9)
 
N = int(input())
E = [tuple(map(int,input().split())) for _ in range(N-1)]
#print(E)
V = [set() for _ in range(N+1)]
for a,b in E:
    V[a].add(b)
    V[b].add(a)
#print(V)
maxc = 0
for v in V:
    maxc = max(maxc,len(v))
#print(maxc)
CE = {}
for e in E:
    CE[e] = 0
#print(CE)
 
def dfs(u,t,c):
    if t > 0:
        CE[(min(u,t),max(u,t))] = c
    cc = c+1
    if cc > maxc:
        cc = 1
    for v in V[u]:
        if CE[(min(u,v),max(u,v))] == 0:
            dfs(v,u,cc)
            cc += 1
            if cc > maxc:
                cc = 1
dfs(1,0,1)
print(maxc)
for e in E:
    print(CE[e])
def dfs(v,c):
  for i,w in enumerate(e[v]):
    e[w]-={v}
    c=c*dfs(w,k-i+~(v>0))%(10**9+7)
  return c
n,k,*t=map(int,open(0).read().split())
e=[set()for _ in[0]*n]
for a,b in zip(t[::2],t[1::2]):
  e[a-1]|={b-1}
  e[b-1]|={a-1}
print(dfs(0,k))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
def dfs(v,c):
  for i,w in enumerate(e[v]):
    e[w].discard(v)
    c=c*dfs(w,k-i+~(v>0))%(10**9+7)
  return c
n,k,*t=map(int,open(0).read().split())
e=eval('set(),'*n)
for a,b in zip(t[::2],t[1::2]):
  e[a-1].add(b-1)
  e[b-1].add(a-1)
print(dfs(0,k))
n, a, b = map(int, input().split())
s = input()
cnt = a+b
fc = b
for i in range(n):
  if s[n] == 'a' and cnt:
    print("Yes")
    cnt -= 1
  elif s[n] == 'b' and cnt and fc:
    print("Yes")
    cnt -= 1
    fc -= 1
  else:
    print("No")

### FIXED CODE ###

n, a, b = map(int, input().split())
s = input()
cnt = a+b
fc = b
for i in range(n):
  if s[i] == 'a' and cnt:
    print("Yes")
    cnt -= 1
  elif s[i] == 'b' and cnt and fc:
    print("Yes")
    cnt -= 1
    fc -= 1
  else:
    print("No")
loop, kosu, time = map(int, input().split(" "))
print(kosu * (time//loop)

### FIXED CODE ###

loop, kosu, time = map(int, input().split(" "))
print(kosu * (time//loop))
k = int(input())
a, b = int(map(int, input().split()))

if (a%k == 0 or b%k == 0):
  print('Yes')
elif (a//k != b//k):
  print('Yes')
else:
  print('No')

### FIXED CODE ###

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

ans = 'NG'
for i in range(a, b+1):
  if ((i)%k == 0):
    ans = 'OK'
    
if (k == 1):
  ans = 'OK'
    
print(ans)
n = int(input())
A = 0
for i in range(1,10):
  for j in range(1,10):
    x = i * j
      if x == n:
        A += 1
if A >= 1:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n = int(input())
A = 0
for i in range(1,10):
  for j in range(1,10):
    x = i * j
    if x == n:
      A += 1
if A >= 1:
  print("Yes")
else:
  print("No")
A,B,K = map(int,input().split())

wari = []
count = 0
for i in range(1,A+B):
    if A%i==0 and B%i==0:
        if count == K:
            wari.append(i)
print(wari[len(wari)-K])

### FIXED CODE ###

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

wari = []
count = 0
for i in range(1,A+B):
    if A%i==0 and B%i==0:
        wari.append(i)
print(wari[len(wari)-K])
import sys

n = list(map(int,input().split()))
a_list = list(map(int,input().split()))

zero_search = 0 in a_list
ans = 1

if zero_search:
    ans = 0
else:
    for i in a_list:
        ans *= i
        if ans > 10**18:
            ans = -1
            break
            
print(ans)


### FIXED CODE ###

import sys

a,b = list(map(int,input().split()))
print(a*b)
n = int(input())
    A = list(map(int, input().split()))
    funds = 1000
    stock = 0

    for i in range(n):
        if i > 0 and A[i] > A[i-1]:
            # sell
            funds += A[i] * stock
            stock = 0
        if i < n-1 and A[i] < A[i+1]:
            # buy
            stock += funds // A[i]
            funds -= A[i] * stock

    print(funds)

resolve()

### FIXED CODE ###

def resolve():
    n = int(input())
    A = list(map(int, input().split()))
    funds = 1000
    stock = 0

    for i in range(n):
        if i > 0 and A[i] > A[i-1]:
            # sell
            funds += A[i] * stock
            stock = 0
        if i < n-1 and A[i] < A[i+1]:
            # buy
            stock += funds // A[i]
            funds -= A[i] * stock

    print(funds)

resolve()
n = int(input())
xyh_list = [list(map(int, input().split())) for _ in range(n)]
list_0_100 = [i for i in range(0, 101)]
possible_list = []
for b in range(len(xyh_list)):
    if xyh_list[b][2] != 0:
        x1 = xyh_list[b][0]
        y1 = xyh_list[b][1]
        h1 = xyh_list[b][2]
        break
for a in range(b+1, len(xyh_list)):
    x2 = xyh_list[a][0]
    y2 = xyh_list[a][1]
    h2 = xyh_list[a][2]
    break

for i in list_0_100:
    for j in list_0_100:
        if (h2 + abs(x2 - i) + abs(y2 - j)) == (h1 + abs(x1 - i) + abs(y1 - j)):
            possible_list.append([i, j])   # cx, cy 候補
pos_list = []
h0_list = []
for i in range(n):
    if len(possible_list) == 1:
        break
    x = xyh_list[i][0]
    y = xyh_list[i][1]
    h = xyh_list[i][2]
    if h == 0:
        h0_list.append([x, y])
        pos_list.append([x, y])
        continue
    for j in range(len(possible_list)):
        x_ = possible_list[j][0]
        y_ = possible_list[j][1]
        if (h + abs(x - x_) + abs(y - y_)) == (h2 + abs(x2 - x_) + abs(y2 - y_)):
            pos_list.append([x_, y_])
    possible_list = pos_list
    pos_list = []

for i in range(len(h0_list)):
    h0 = h0_list[i][0]
    h1 = h0_list[i][1]
    for x_, y_ in possible_list:
        if (h2 + abs(x2 - x_) + abs(y2 - y_)) <= (abs(h0 - x_) + abs(h1 - y_)):
            possible_list = [x_, y_]
print(possible_list[0][0], possible_list[0][1], \
      h2 + abs(x2 - possible_list[0][0]) + abs(y2 - possible_list[0][1]))


### FIXED CODE ###

n = int(input())
xyh_list = [list(map(int, input().split())) for _ in range(n)]
list_0_100 = [i for i in range(0, 101)]
possible_list = []
for a in range(len(xyh_list)):
    if xyh_list[a][2] != 0:
        x1 = xyh_list[a][0]
        y1 = xyh_list[a][1]
        h1 = xyh_list[a][2]
        break

for cx in list_0_100:
    for cy in list_0_100:
        H = h1 + abs(x1 - cx) + abs(y1 - cy)
        count = 0
        for i in range(n):
            x = xyh_list[i][0]
            y = xyh_list[i][1]
            h = xyh_list[i][2]
            if h == max(H - abs(x - cx) - abs(y - cy), 0):
                count += 1
        if count == n:
            ansx = cx
            ansy = cy
            ansH = H
print(ansx, ansy, ansH)
n=int(input())
s=input()
if n % 2:
  pirnt("No")
  exit()
  
half=n/2
print("Yes" if s[0:half]+s[0:half]==s else "No")

### FIXED CODE ###

n = int(input())
s = input()
if n % 2:
    print("No")
    exit()
half = s[0:n // 2]
print("Yes" if s == half + half else "No")
n = input()
name = ""

while(True):
  i = n % 26
  n = "abcdefghijklmnopqrstuvwxyz"[i]
  name = n + name
  
  n = (n-i) / 26
  if(n==0):
    break
    
print(name)

### FIXED CODE ###

n = int(input())
name = ""
 
while(True):
  i = n % 26
  c = "zabcdefghijklmnopqrstuvwxyz"[i]
  name = c + name
  
  if(i==0):
    i=26
  n = int((n-i) / 26)
  if(n==0):
    break
    
print(name)
import math
import collections

Max = 100001
Mod = 1000000007
fac = [0] * Max
finv = [0] * Max
inv = [0] * Max
def COMinit():
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2, Max):
        fac[i] = fac[i-1] * i % Mod 
        inv[i] = Mod - inv[Mod%i] * (Mod//i) % Mod
        finv[i] = finv[i-1] * inv[i] % Mod 

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

N, M = map(int, input().split())
prime_count = collections.Counter()
for i in range(2, math.ceil(math.sqrt(M))+1):
    while M % i == 0:
        M /= i
        prime_count[i] += 1
if M > 1:
    prime_count[M] += 1

ans = 1
COMinit()
for i, b in prime_count.items():
    tmp = COM(b+N-1, N-1)
    ans = (ans * tmp) % Mod 
print(ans)


### FIXED CODE ###

import math
import collections

Max = 210000
Mod = 1000000007
fac = [0] * Max
finv = [0] * Max
inv = [0] * Max
def COMinit():
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2, Max):
        fac[i] = fac[i-1] * i % Mod 
        inv[i] = Mod - inv[Mod%i] * (Mod//i) % Mod
        finv[i] = finv[i-1] * inv[i] % Mod 

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

N, M = map(int, input().split())
prime_count = collections.Counter()
for i in range(2, math.ceil(math.sqrt(M))+1):
    while M % i == 0:
        M /= i
        prime_count[i] += 1
if M > 1:
    prime_count[M] += 1

ans = 1
COMinit()
for i, b in prime_count.items():
    tmp = COM(b+N-1, N-1)
    ans = (ans * tmp) % Mod 
print(ans)
n=int(input())
for a in range(1,10):
  for b in range(1,10):
  if N==a*b:
    break
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

n=int(input())
for a in range(1,10):
  for b in range(1,10):
    if n==a*b:
      print("Yes")
      exit()
    
print("No")
a=int(input())
s=char(input())
r=s.count(R)
if a-r<r:
    print("Yes")
else:
    print("No")

    

### FIXED CODE ###

a=int(input())
s=list(input())
x=s.count("R")
y=a-x
if x>y:
    print("Yes")
else:
    print("No")
a, b = map(int, raw_input() .split())
x = 0
y = 0
if a == 'H':
    x += 1
elif b == 'H':
    y += 1

if x == 1 and y == 1:
    print "H"
if x == 0 and y == 0:
    print "H"
if x == 1 and y == 0:
    print "D"
if x == 0 and y == 1:
    print "D"
    

### FIXED CODE ###

a, b = map(str, raw_input() .split())
if a == 'H' and b == 'H':
    print "H"
elif a == 'H' and b == 'D':
    print "D"
elif a == "D" and b == "H":
    print "D"
else:
    print "H"
X=int(input())
If X==1:
  max=1
else:
  for i in range(1, X):
    for j in range(2, X):
      if i**j<=X:
        max=i**j
print(max)

### FIXED CODE ###

X=int(input())
list=[1]
for i in range(1, X):
  for j in range(2, X):
    if (i**j)<=X:
      list.append(i**j)
    else:break
print(max(list))
kekka = ""
num = []
hantei = "OK"
INF = input().split()
gyosu = int(INF[1])
keta = int(INF[0])
out = []
for l in range(keta):
  out.append(0)


for i in range(gyosu):
  num.append([int(j) for j in input().split()])

for j in range(gyosu - 1):
  for k in range(gyosu - 1):
    if num[j][0] == num[k + 1][0]:
      if num[j][1] != num[k + 1][1]:
        hantei = "NG"
          
  if num[j][0] == keta:
    if num[j][1] == 0:
      hantei ="NG"

if hantei == "NG":
  print("-1")
else:
  for m in range(gyosu):
    out[(num[m][0] - 1)] = num[m][1]
    #print(out)
  for n in range(keta):
    kekka = kekka + str(out[n])
    if n == 0 and keta != 1 :
      print("-1")
      hantei = "NG"
  
  # kekka.append(out[n])
  if hantei == "OK":
    print(kekka)




### FIXED CODE ###

import math

N = int(input())
P = math.floor(N / 2)
P = P + N % 2
print(P)
if __name__ == '__main__':
    s = input()
    q = int(input())
    for i in range(q):
        code = input().split()
        op, a, b = code[0], int(code[1]), int(code[2])
        if op == 'print':
            print(s[a:b+1])
        elif op == 'reverse':
            s = s[:a] + s[a:b+1][::-1] + s[b+1:]
        elif op == 'replace':
            s = s[:a] + p + s[b+1:]

### FIXED CODE ###

if __name__ == '__main__':
    s = input()
    q = int(input())
    for i in range(q):
        code = input().split()
        op, a, b = code[0], int(code[1]), int(code[2])
        if op == 'print':
            print(s[a:b+1])
        elif op == 'reverse':
            s = s[:a] + s[a:b+1][::-1] + s[b+1:]
        elif op == 'replace':
            s = s[:a] + code[3] + s[b+1:]
a,b = int[int(i) for i in input().split()]

if a < b:
    print("a < b")

elif a > b:
    print("a > b")

else:
    print("a == b") 

### FIXED CODE ###

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

if a < b:
    print("a < b")

elif a > b:
    print("a > b")

else:
    print("a == b")
s=input()
t=input()
for i in range(len(s)+1):
  if s == t:
    print("Yes")
    break
  else:
    k = s[0]
    for i in range(len(s)-1):
      s[i]=s[i+1]
    s[-1] = k
else:
  print("No")

### FIXED CODE ###

s=list(input())
t=list(input())
for i in range(len(s)+1):
  if s == t:
    print("Yes")
    break
  else:
    k = s[0]
    for i in range(len(s)-1):
      s[i]=s[i+1]
    s[-1] = k
else:
  print("No")
import sys

pn, tmp = [], [i for i in range(2, 10000)]
while tmp[0] < 100:
    v = tmp.pop(0)
    pn.append(v)
    tmp = list(filter(lambda x: x%v!=0, tmp))
for t in tmp: pn.append(t)

while True:
    n = int(input())
    if n==0: break
    print(sum([pn[i] for i in range(n)]))

### FIXED CODE ###

primes = [0, 0] + [1] * 150000
for i in range(2, 388):
    if primes[i]:
        for j in range(i*i, 150001, i):
            primes[j] = 0

values = [i for i, v in enumerate(primes) if v]
while True:
    n = int(input())
    if n == 0:
        break
    print(sum(values[:n]))
icase=0
if icase==0:
    n,m=map(int,input().split())
    ab=[[0]*2 for i in range(n)]
    for i in range(n):
        ai,bi=map(int,input().split())
        ab[i][0]=m-ai
        ab[i][1]=-bi
elif icase==1:
    n,m=3,4
    ab=[[2, -2], [0, -1], [0, -3]]    
elif icase==2:
    n,m=5,3
    ab=[[1, -3], [1, -1], [2, -4], [2, -3], [2, -2]]

from heapq import heappop,heappush
#heappush(H,l) 
#print(heappop(H)) #2

#ab.sort(reverse=True)
ab.sort()
a0=ab[0][0]
h=[]
asum=0
idx=0
for i in range(m):
    while ab[idx][0]<m-i:
        heappush(h,ab[idx][1])
#        print("i:",i,"idx:",idx,h)
        idx+=1
        if idx>=n:
            asum+=heappop(h)
#            print("1:",idx,asum,h)
            break
    if idx>=n:
        asum+=heappop(h)
#        print("2:",idx,asum,h)
        break

if idx>=n:
    asum+=heappop(h)
#    print("3:",idx,asum,h)

print(-asum)
    

### FIXED CODE ###

import sys

icase=0
if icase==0:
    n,m=map(int,input().split())
    ab=[[] for i in range(m)]
    for i in range(n):
        ai,bi=map(int,input().split())
        if m-ai>=0:
            ab[m-ai].append(-bi)
elif icase==1:
    n,m=3,4
    ab=[[-3, -1], [], [-2], []]    
elif icase==2:
    n,m=5,3
    ab=[[], [-1, -3], [-2, -3, -4]]
elif icase==3:
    n,m=1,1
    ab=[[]]

from heapq import heappop,heappush

if len(ab)==0:
    print(0)
    sys.exit()

n=len(ab)
h=[]
asum=0
for i in range(m-1,-1,-1):
    if len(ab[i])>0:
        for abi in ab[i]:
            heappush(h,abi)
#    print(i,h,asum)
    if len(h)>0:
        asum+=heappop(h)

print(-asum)
def gcd(num1,num2):
    if num2 == 0:
        return num1
    return gcd(num2,num1%num2)

n = int(input())
t = []
for i in range(n):
    t.append(int(input()))

time = 1

for i in t:
    time = time * i / gcd(time,i)

print(int(time))

### FIXED CODE ###

n = int(input())
ans = int(input())
 
def gcd(a,b):
    while b:
        a,b = b,a%b
    return a
 
def lcm(x,y):
    return (x*y//gcd(x,y))
 
for i in range(n-1):
    t = int(input())
    ans = lcm(ans,t)
print(ans)
# coding: utf-8

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

def gcd(a, b):
  while b:
    a, b = b, a % b
  return a
	
def lcm(a, b):
  return a * b // gcd(a, b)
	
def nlcm(list):
  if len(list) > 2:
  	lcm_num = lcm(list[0], list[1])
    for i in range(2, len(list)):
      lcm_num = lcm(lcm_num, list[i])
    print(lcm_num)
  elif len(list) == 2:
    print(lcm(list[0], list[1]))
  else:
  	print(len[-1])


nlcm(t)


### FIXED CODE ###

# coding: utf-8

a = input()
if a[0] == a[-1]:
	print("Yes")
else:
	print("No")
import numpy as np
import math
from functools import reduce

n, x = map(int, input().split())
num = list(map(int,input().split()))
nxx = np.array([x] * n)
nnum = np.array(num)
diff = nnum-nxx
d = reduce(math.gcd, diff)
print(d)

### FIXED CODE ###

import fractions

n, x = map(int, input().split())
num = list(map(int,input().split()))
d = abs(num[0]-x)
for nn in num:
	d=fractions.gcd(d, abs(nn-x))
print(d)
N = int(input())
S,T = input().split()
ans = ""

for i in range(N):
    ans = ans + S[i] + T[i]

print(ans)

### FIXED CODE ###

A = int(input())
B = int(input())
SUM = 6

print(SUM-A-B)
print((input()**2)*3)

### FIXED CODE ###

print((int(input())**2)*3)
N = int(input())
A = [str(i) for i in input().split()]
dp = [[0,0] for i in range(N+1)]

dp[0][0],dp[0][1] = A[0],A[0]
for i in range(1,N):
    dp[i][0] = dp[i-1][1]+A[i]
    dp[i][1] = A[i]+dp[i-1][0]
ans = list(dp[N-1][1])
print(*ans)

### FIXED CODE ###

import collections
N = int(input())
A = [i for i in input().split()]

ans = collections.deque()
for i in range(N):
    if (i+1)%2==N%2:
        ans.appendleft(A[i])
    else:
        ans.append(A[i])
print(*ans)
i = input().split()
i_int = [int(n) for n in i]
a = input().split()
A = [int(m) for m in a]
N = i_int[0]
M = i_int[1]

threshhold = int(sum(A)/(4 * M))

##print(threshhold)

c = 0
for val in A:
    if val > threshhold:
    ##print(val)
        c += 1

if M > c:
  print('No')
else:
  print('Yes')


### FIXED CODE ###

i = input()
l = i.split()
print(l[2] + ' ' + l[0] + ' ' + l[1])
from math import factorial
import collections

n = int(input())

ss = []
for i in range(n):
	s = list(input())
	s.sort()
	ss.append("".join(s))

cs = collections.Counter(ss)
l = list(cs.values())
l.sort(reverse=True)

c = 0
for i in l:
	if i > 1:
		a = factorial(i) / factorial(2) / factorial(i - 2)
		c+=a
	elif i == 1:
		print(int(c))
		exit()
print(int(c))

### FIXED CODE ###

import collections
from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

n = int(input())

ss = []
for i in range(n):
	s = list(input())
	s.sort()
	ss.append("".join(s))

cs = collections.Counter(ss)
l = list(cs.values())
l.sort(reverse=True)

c = 0
for i in l:
	if i > 1:
		c+= cmb(i,2)
	elif i == 1:
		print(int(c))
		exit()
print(int(c))
def main():
    import sys
    import numpy as np
    ikimasu = sys.stdin.buffer.readline
    ini = lambda: int(ins())
    ina = lambda: list(map(int, ikimasu().split()))
    ins = lambda: ikimasu().strip()
    n,k = ina()
    tmp = [[] for _ in range(n)]
    for _ in range(n-1):
        x,x1=  ina()
        x-=1
        x1-=1
        tmp[x].append(x1)
        tmp[x1].append(x)
    def dfs(teiru,ta):
        rick = 1
        coulduse = k-1 if ta==-1 else k-2
        for i in tmp[teiru]:
            if i == ta:
                continue
            rick*=coulduse
            rick%=1000000007
            coulduse-=1
            rick*=dfs(i,teiru) 
            rick%=1000000007
        return rick
    print(k*dfs(0,-1)%1000000007)
    

    


        
        
        


    
        


        


    




















if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    import sys
    sys.setrecursionlimit(311111)
    import numpy as np
    ikimasu = sys.stdin.buffer.readline
    ini = lambda: int(ins())
    ina = lambda: list(map(int, ikimasu().split()))
    ins = lambda: ikimasu().strip()
    n,k = ina()
    tmp = [[] for _ in range(n)]
    for _ in range(n-1):
        x,x1=  ina()
        x-=1
        x1-=1
        tmp[x].append(x1)
        tmp[x1].append(x)
    def dfs(teiru,ta):
        rick = 1
        coulduse = k-1 if ta==-1 else k-2
        for i in tmp[teiru]:
            if i == ta:
                continue
            rick*=coulduse
            rick%=1000000007
            coulduse-=1
            rick*=dfs(i,teiru) 
            rick%=1000000007
        return rick
    print(k*dfs(0,-1)%1000000007)
    

    


        
        
        


    
        


        


    




















if __name__ == "__main__":
    main()
import numpy as np

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

for i in range(n):
	l.append(input())
ll = np.array(l)
ll.sort()
ll = ll[::-1]

def solve(hp, count):
	q = hp - b * count
	t = q > 0

	if a > b:
		p = (q - 1) / (a - b) + 1
	else:
		p = q
	p = p[p > 0]
	if p.sum() <= count:
		return True
	else:
		return False

l = 1
r = ll[0] / b + 1
while r - l > 1:
	m = (l + r) / 2
	if solve(hp, m):
		r = m
	else:
		l = m

if r == 2:
	if solve(hp, 1):
		r = 1

print r

### FIXED CODE ###

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

if a + b >= 10:
	print 'error'
else:
	print a + b
n=int(input())
if n%11==0 or n%7==0 or n%4==0 or n%11==4 or n%7==4 n%11==7:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

n=int(input())
a=[]
for x in range(15):
    for y in range(26):
        a.append(x*7+y*4)
if not n in a:
    print("No")
else:
    print("Yes")
n = int(input())
pl = list()
for i in range(n):
    pl.append(list(map(int, input().split(()))))

import math
lsum = 0
for i in range(n):
    for j in range(n): 
        if i != j:
            a, b = pl[i]
            c, d = pl[j]
            lsum += math.sqrt((a-c) ** 2 + (b-d) ** 2)
print(lsum / 4 * math.factorial(n) * 2 / 3)

### FIXED CODE ###

n = int(input())
pl = list()
for i in range(n):
    pl.append(list(map(int, input().split())))

import math
lsum = 0
for i in range(n):
    for j in range(n):
        if i != j:
            a, b = pl[i]
            c, d = pl[j]
            lsum += math.sqrt((a-c) ** 2 + (b-d) ** 2)
print(lsum /(n))
import math
import queue
from collections import defaultdict
 
def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def printQueue(q):
	r=q
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)

n,m = readInts()
sc = []
for i in range(m):
	tmp = readInts()
	sc.append([tmp[0]-1,tmp[1]])

if m==0:
	if n==1:
		print(0)
		exit()
	else:
		print(-1)
		exit()
ans = -1
for i in range(1000):
	*t, = map(int, list(str(i)))

	if len(t) != n:
		continue

	ok = True
	for j in range(m):
		if t[sc[j][0]]!=sc[j][1]:
			ok = False
            break
 
	if ok:
        print(i)
        quit()

print(-1)

### FIXED CODE ###

n,m = map(int, input().split())
s, c = [], []
for i in range(m):
    _s, _c = map(int, input().split())
    s.append(_s-1)
    c.append(_c)
 
for i in range(1000):
    *t, = map(int, list(str(i)))
 
    if len(t) != n:
        continue
 
    ok = True
    for j in range(m):
        if t[s[j]] != c[j]:
            ok = False
            break
 
    if ok:
        print(i)
        quit()
 
print(-1)
a = int(input())
b = int(input())
print((a*3 + b) // 2)


### FIXED CODE ###

a, b = map(int, input().split())
print((a*3 + b) // 2)
S = input()

if S[0] == S[1] and S[2] == S[3] and S[0] != S[3]:
    print("Yes")
elif S[0] == S[2] and S[1] == S[4] and S[0] != S[1]:
    print("Yes")
elif S[0] == S[3] and S[2] == S[1] and S[0] != S[1]:
    print("Yes")
else:
    print("No")
    

### FIXED CODE ###

S = input()

if S[0] == S[1] and S[2] == S[3] and S[0] != S[3]:
    print("Yes")
elif S[0] == S[2] and S[1] == S[3] and S[0] != S[1]:
    print("Yes")
elif S[0] == S[3] and S[2] == S[1] and S[0] != S[1]:
    print("Yes")
else:
    print("No")