Harryxun/stf_run huggingface dataset:
x = int(input())
h = x / 3600
m = (x % 3600) / 60
s = x - h*3600 - m*60
print(':'.join('h', 'm', 's'))

### FIXED CODE ###

x = int(input())
a = x // 3600
b = x // 60 %60
c = x % 60

a = str(a)
b = str(b)
c = str(c)
print(":".join([a,b,c]))
N,A,B=map(int,input().split())
souryou=0
for i in range(N):
  j=i+1
  j_str=str(j)
  goukei=0
  for k in range(len(j_str)):
    goukei=goukei+int(j_str[k])
  if goukei>=A and goukei<=B:
    souryou=souryou+j
print(str(souryou))

### FIXED CODE ###

A,B,C,D = map(int, input().split())
if A+B>C+D:
  print('Left')
elif A+B==C+D:
  print('Balanced')
elif A+B<C+D:
  print('Right')
x = int(input())

if x == 0:
    print(1)
else
    print(0)

### FIXED CODE ###

x = int(input())

if x == 0:
    print(1)
else:
    print(0)
def main():
    import sys 
    input= sys.stdin.readline
    n,m,v,p=map(int,input().split())
    a=list(map(int,input().split()))
    a.sort(reverse=True)
    cnt=p
    #from bisect import bisect_left
    #print(a[5]+m)
    for i in range(p,n):
        if (a[i]+m )<a[p-1]:
            break
        # 3 2 2 1 1 0
        cnt+= ((a[i]+m)*(i-p+1)-sum(a[p-1:i])+(n-(i-p+1))*m)>=v*m:
              
    print(cnt)

if __name__=='__main__':
    main()

### FIXED CODE ###

def main():
    import sys 
    input= sys.stdin.readline
    n,m,v,p=map(int,input().split())
    a=list(map(int,input().split()))
    a.sort(reverse=True)
    cnt=p
    #from bisect import bisect_left
    #print(a[5]+m)
    s=sum(a[p-1:p])
    for i in range(p,n):
        if (a[i]+m )<a[p-1]:
            break
        # 3 2 2 1 1 0
        
        cnt+= ((a[i]+m)*(i-p+1)-s+(n-(i-p+1))*m)>=v*m
        try: s+=a[i]
        except: continue      
    print(cnt)

if __name__=='__main__':
    main()
n,a,b = map(int, input().split())
print(min(a*t,b))

### FIXED CODE ###

n,a,b = map(int, input().split())
print(min(a*n,b))
a,b,c=map(int,input().split())

if a>=b and a>=c:
    print(10*a+b+c)
    
elif b>=a and b>=c:
    prnt(a+10*b+c)
    
elif c>=a and c>=b:
    print(a+b+10*c)

### FIXED CODE ###

a,b,c=map(int,input().split())
if a>=b and a>=c:
    print(a*10+b+c)
elif b>=a and b>=c:
    print(b*10+a+c)
elif c>=a and c>=b:
    print(c*10+a+b)
import sys
 
N, M = map(int, input().split())
a = []
tmp = []
for i in range(M):
    tmp = list(map(str,input().split()))
    a.append(list(tmp[0]))
 
 
cpi = [-1,0,0,1]
cpj = [0,-1,1,0]
 
smFlag = False
 
for i in range(N):
    for j in range(M):
        if a[i][j] == '#':
            for x,y in zip(cpi,cpj):
                if N > i + x > -1 and M > j + y > -1:
                    if a[i+x][j+y] == '#':
                        smFlag = True
            if not smFlag:
                print('No')
                sys.exit()
 
print('Yes')

### FIXED CODE ###

H, W = map(int, input().split())
a = []
tmp = []
for i in range(H):
    tmp = list(map(str,input().split()))
    a.append(list(tmp[0]))

for i in range(H):
    for j in range(W):
        if a[i][j] == '#':
            if j - 1 >= 0 and a[i][j - 1] == "#":
                continue
            elif j + 1 < W and a[i][j + 1] == "#" :
                continue
            elif i + 1 < H and a[i + 1][j] == "#" :
                continue
            elif i - 1 >= 0 and a[i - 1][j] == "#":
                continue
            else:
                print("No")
                exit()
 
print("Yes")
import itertools
 
n = int(input())
p = tuple(map(int,input().split()))
q = tuple(map(int,input().split()))

l = [i for i in range(1,N+1)] 

pi = 0
qi = 0
 
m = list(itertools.permutations(l))


#for i in range(len(m)):
#	if m[i] == p:
#  		pi = i+1
#	if m[i] == q:
#    	qi = i+1
 
#print(abs(pi-qi))

print(m[1])

### FIXED CODE ###

import itertools
 
n = int(input())
p = tuple(map(int,input().split()))
q = tuple(map(int,input().split()))
 
l = [i for i in range(1,n+1)] 
 
x = 0
y = 0
 
m = list(itertools.permutations(l))
 
for i in range(len(m)):
	if m[i] == p:
  		x = i+1
	if m[i] == q:
 		y = i+1
        
print(abs(x-y))
s,t=input().split()
for i in range(1,len(s)+1):
  if t==s[-i:]+s[:-i]:
    print('Yes')
    exit()
print('No')

### FIXED CODE ###

s=input()
t=input()
for i in range(1,len(s)+1):
  if t==s[-i:]+s[:-i]:
    print('Yes')
    exit()
print('No')
n = int(input())
l = [list(map(int, input().split())) for _ in range(n)]
l.sort(key=lambda x:x[1])
print(x[0][0]+x[0][1])

### FIXED CODE ###

n = int(input())
l = [list(map(int, input().split())) for _ in range(n)]
l.sort(reverse=True)
print(l[0][0]+l[0][1])
H, W , N = map(int,input().split())
from bisect import bisect_left
from bisect import bisect_right
matrix = []
for _ in range(N):
    x,y = map(int,input().split())
    x -= 1
    y -= 1
    matrix.append([x,y])
matrix.sort()
ans = [0 for _ in range(10)]
cand = {}
for l in matrix:
    for x_r in [-2, -1 , 0]:
        for y_r in [-2, -1 , 0]:
            nowx = l[0] + x_r
            nowy = l[1] + y_r
            if nowx < 0 or nowy < 0 or nowx + 2>= H or nowy+ 2 >= W:
                continue
            #ここで起点(左上)nowx, nowy として　 9マスに着目する
            name = str(nowx) + ' '  +str(nowy)
            if not name in cand : cand[name] += 1
            else: cand[name] = 1
tmp = ((H - 2) * (W - 2))
for x in cand.values():
    ans[x] += 1
    tmp -= 1
ans[0] = tmp
for x in ans:
    print(x)


### FIXED CODE ###

H, W , N = map(int,input().split())
from bisect import bisect_left
from bisect import bisect_right
matrix = []
for _ in range(N):
    x,y = map(int,input().split())
    x -= 1
    y -= 1
    matrix.append([x,y])
matrix.sort()
ans = [0 for _ in range(10)]
cand = {}
for l in matrix:
    for x_r in [-2, -1 , 0]:
        for y_r in [-2, -1 , 0]:
            nowx = l[0] + x_r
            nowy = l[1] + y_r
            if nowx < 0 or nowy < 0 or nowx + 2>= H or nowy+ 2 >= W:
                continue
            #ここで起点(左上)nowx, nowy として　 9マスに着目する
            name = str(nowx) +"hoge" +str(nowy)
            try: cand[name] += 1
            except: cand[name] = 1
tmp = ((H - 2) * (W - 2))
for x in cand.values():
    ans[x] += 1
    tmp -= 1
ans[0] = tmp
for x in ans:
    print(x)
from sys import stdin
def main():
  from math import sqrt
  readline = stdin.readline
  p = [True] * (10 ** 5 + 1)
  p[0] = False
  p[1] = False
  n = int(sqrt(10 ** 5 + 1)) + 1
  for j in range(4, n, 2):
    p[j] = False
  for i in range(3, n, 2):
    if p[i]:
      for j in range(i + i, n, i):
        p[j] = False
  c = [0] * (10 ** 5 + 1)
  for i in range(2, 10 ** 5 + 1):
    c[i] = c[i - 1]
    if p[i - 2] and p[(i - 1) // 2]:
      c[i] += 1
  q = int(readline())
  for _ in range(q):
    l, r = map(int, readline().split())
    print(c[r + 2] - c[l + 1])
main()


### FIXED CODE ###

from sys import stdin
def main():
  from math import sqrt
  readline = stdin.readline
  p = [True] * (10 ** 5 + 1)
  p[0] = False
  p[1] = False
  n = int(sqrt(10 ** 5)) + 1
  for j in range(4, 10 ** 5 + 1, 2):
    p[j] = False
  for i in range(3, n + 1, 2):
    if p[i]:
      for j in range(i + i, 10 ** 5 + 1, i):
        p[j] = False
  c = [0] * (10 ** 5 + 2)
  for i in range(2, 10 ** 5 + 2):
    c[i] = c[i - 1]
    if p[i - 2] and p[(i - 1) // 2]:
      c[i] += 1
  q = int(readline())
  for _ in range(q):
    l, r = map(int, readline().split())
    print(c[r + 2] - c[l + 1])
main()
N=int(input())
r=[0]*N
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            v = i*i + j*j + k*k + i*j + i*k + k*j
            if v <= 10000
            r[v-1] += 1
print(*r,sep='\n')

### FIXED CODE ###

N=int(input())
r=[0]*10000
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            v = i*i + j*j + k*k + i*j + i*k + k*j
            if v <= 10000:
                r[v-1] += 1
for i in range(N):
    print(r[i])
n = int(input())
a = [int(i) for i in input().split()]
c=0
cc=0
for i in a:
   c+=1
    if c%2==0:
      continue
    if i%2!=0:
      cc+=1
print(cc)

### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()]
c=0
cc=0
for i in a:
  c+=1
  if c%2==0:
    continue
  if i%2!=0:
    cc+=1
print(cc)
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces


def calc(p, x, li, ans):
    ans[p] += x
    l = len(li[p])
    for i in range(l):
        calc(li[p][i], x, li, ans)


n, q = na()
li = [[] for i in range(n)]
ans = [0 for j in range(n)]

for i in range(n-1):
    a, b = na()
    li[a-1].append(b-1)

for j in range(q):
    p, x = na()
    calc(p-1, x, li, ans)
print(*ans)







### FIXED CODE ###

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

from collections import deque
sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

def dfs(v, par):
    for nv in g[v]:
        if nv == par:
            continue
        memo[nv] += memo[v]
        dfs(nv, v)

n, q = na()
g = [deque() for _ in range(n)]
for i in range(n-1):
    a, b = na()
    a -= 1
    b -= 1
    g[a].append(b)
    g[b].append(a)
memo = [0] * n
for i in range(q):
    #seen = [False] * n
    p, x = na()
    p -= 1
    memo[p] += x

dfs(0, -1)
print(*memo)
s=list(input())
flag="Yes"
while(len(s)>0):
  d=s[0]
  if s.count(d)%2==1:
    flag="No"
    break
  else:
    for i in range(s.count(d)):
      s.remove(d)
print(frag)

### FIXED CODE ###

s=list(input())
flag="Yes"
while(len(s)>0):
  d=s[0]
  if s.count(d)%2==1:
    flag="No"
    break
  else:
    for i in range(s.count(d)):
      s.remove(d)
print(flag)
def rest(num):
    return num % 10

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
Foods = [A,B,C,D,E]
res = 0

poplist=[]
for idx in range(5):
    if Foods[idx]%10==0:
        res += Foods[idx]
        poplist.append(idx)
while len(poplist)>0:
    idx = max(poplist)
    Foods.pop(idx)
    poplist.pop(idx)

while len(Foods) > 0:
    idx = Foods.index(max(Foods, key=rest))
    if len(Foods)>1:
        res += (Foods[idx]//10)*10+10
    else:
        res += Foods[idx]
    Foods.pop(idx)



print(res)


### FIXED CODE ###

def rest(num):
    return num % 10

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
Foods = [A,B,C,D,E]
res = 0

poplist=[]
for idx in range(5):
    if Foods[idx]%10==0:
        res += Foods[idx]
        poplist.append(idx)
while len(poplist)>0:
    idx = max(poplist)
    Foods.pop(idx)
    poplist.pop(poplist.index(idx))

while len(Foods) > 0:
    idx = Foods.index(max(Foods, key=rest))
    if len(Foods)>1:
        res += (Foods[idx]//10)*10+10
    else:
        res += Foods[idx]
    Foods.pop(idx)



print(res)
import numpy as np
mod = 10 ** 9 + 7


def matpow(A, x):
    if x == 1:
        return A % mod
    elif x % 2 == 0:
        return matpow(np.linalg.matrix_power(A, 2) % mod, x // 2)
    else:
        ans = matpow(np.linalg.matrix_power(A, 2) % mod, x // 2)
        ans = ans.dot(A) % mod
        return ans


N, K = map(int, input().split(" "))
A = []
for _ in range(N):
    A.append(list(map(int, input().split(" "))))

A = np.array(A, dtype=np.int64)
print(np.sum(matpow(A, K) % mod) % mod)

### FIXED CODE ###

import numpy as np
mod = 10 ** 9 + 7


def matpow(A, x):
    if x == 1:
        return A % mod
    elif x % 2 == 0:
        return matpow(np.linalg.matrix_power(A, 2) % mod, x // 2)
    else:
        ans = matpow(np.linalg.matrix_power(A, 2) % mod, x // 2)
        ans = ans.dot(A) % mod
        return ans


N, K = map(int, input().split(" "))
A = []
for _ in range(N):
    A.append(list(map(int, input().split(" "))))

A = np.array(A, dtype=object)
print(np.sum(matpow(A, K) % mod) % mod)
import math
N=int(input())
print(math,factorial(N))

### FIXED CODE ###

N=int(input())
print(N**3)
n = int(input())
a = [int(i) for i in input().split()]

i = 0
person = [0,0,0,0,0,0,0,0]
ans = []
for k in a:
    i += 1
    person[k-1] = i

a.sort()
for l in a:
    ans.append(str(person[l-1]))

order = ' '.join(ans)
print(order)


### FIXED CODE ###

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

i = 0
person = []
for j in range(n):
    person.append(0)
ans = []
for k in a:
    i += 1
    person[k-1] = i

a.sort()
for l in a:
    ans.append(str(person[l-1]))

order = ' '.join(ans)
print(order)
k=int(input())
x=int(input())
for i in range (x-k+1,x+k-1):
    print(i, end="")

### FIXED CODE ###

k,x=map(int,input().split())
for i in range (x-k+1,x+k):
    print(i, end=" ")
n = int(input())
a = []
a = list(map(int, input().strip().split()))


all_sum = 0

for i in range(n):
  all_sum += 1/a[i]

ans = 1 / all_sum

print(ans)

### FIXED CODE ###

a = int(input())
s = input()

if a >= 3200:
  print(s)

else:
  print("red")
c = input()

if c == a or c == e or c == i or c == o or c == u:
    print("vowel")
else:
    print("consonant")



### FIXED CODE ###

c = input()

if c == "a" or c == "e" or c == "i" or c == "o" or c == "u":
    print("vowel")
else:
    print("consonant")
from collections import Counter


def main():
    n = int(input())
    v_n = input().split(' ')
    
    guusuu = Counter(v_n[::2])
    kisuu = Counter(v_n[1::2])

    guusuu = guusuu.most_common()
    kisuu = kisuu.most_common()


    if guusuu[0][0]==kisuu[0][0]:
        if len(guusuu)==1 and len(kisuu)==1:
            print(guusuu)
        else:
            print(min(n - guusuu[0][1] - kisuu[1][1], n- guusuu[1][1] - kisuu[0][1]))
    else:
        print(n - guusuu[0][1] - kisuu[0][1])
        
main()

### FIXED CODE ###

n = list(input())

result = ""

for a in n:
  if a == '1':
    result += '9'
  else:
    result += '1'


print(result)
l = []
t = []
ans = [False] * 500
while True:
  l = []
  t = []
  ans = [False] * 500
  N = input()
  M = input()
  if N == 0 and M == 0:
    break
  for i in range(M):
    a, b = map(int, raw_input().split())
    l.append([a, b])
    if a == 1:
      t.append(b)
    if b == 1:
      t.append(a)
  for i in t:
    ans[i] = True
    for j in range(M):
      if l[j][0] == i:
        ans[l[j][1]] = True
      if l[j][1] == i:
        ans[l[j][0]] = True
  res = 0
  for i in range(len(ans)):
    if ans[i] and i != 1:
      print "tes: %d" % (i) 
      res += 1

  print res

### FIXED CODE ###

l = []
t = []
ans = [False] * 501
while True:
  l = []
  t = []
  ans = [False] * 501
  N = input()
  M = input()
  if N == 0 and M == 0:
    break
  for i in range(M):
    a, b = map(int, raw_input().split())
    l.append([a, b])
    if a == 1:
      t.append(b)
    if b == 1:
      t.append(a)
  for i in t:
    ans[i] = True
    for j in range(M):
      if l[j][0] == i:
        ans[l[j][1]] = True
      if l[j][1] == i:
        ans[l[j][0]] = True
  res = 0
  for i in range(len(ans)):
    if ans[i] and i != 1:
      res += 1

  print res
l = [input()]*10
for i in l.sort(reverse=True)[:3]:
    print(i)

### FIXED CODE ###

l=[int(input()) for _ in range(10)]
[print(x) for x in sorted(l,reverse=True)[:3]]
N,K=map(int, input().split())
list=list(map(int, input().split()))

tele=[0]*N
for i in range(N):
    tele[i]=list[i]-1

temp=[0]*N
town=0
for i in range(N):
    temp[i]=tele[town]
    town=tele[town]

for i in range(N):
    for j in range(N):
        if temp[i]-temp[j]==0:
            m=abs(i-j)
            break
K_temp=K%m

city=0
for i in range(K_temp):
    city=tele[city]

print(city+1)

### FIXED CODE ###

S=input()
T=input()

if T.startswith(S) and len(S) + 1 == len(T):
    print('Yes')
else:
    print('No')
N, A, B = input()
N = int(N)
A = int(A)
B = int(B)
priceA = A * N
if  priceA <= B:
    print(priceA)
else:
    print(B)



### FIXED CODE ###

N, A, B = input().split()
'''                                                                                                                                     
N = input()                                                                                                                             
A = input()                                                                                                                             
B = input()                                                                                                                             
'''
N = int(N)
A = int(A)
B = int(B)
priceA = A * N
if  priceA <= B:
    print(priceA)
else:
    print(B)
def read_n_lows_input(n):
    Alist=[int(input()) for i in range(n)]
    return Alist

def max_profit(A, n):
    for j in range(1, n):
        for i in range(0, j):
            if i == 0 and j == 1:
                maxA = A[j] - A[i]
            if A[j]-A[i] > maxA:
                maxA = A[j]-A[i]
    print(maxA)

n=int(input())

A = read_multi_low_input_with_num(n)

max_profit(A, n)


### FIXED CODE ###

def max_profit(A, n):
    minv = A[0]
    for j in range(1, n):
        if j == 1:
            maxv = A[j] - A[j-1]
        if maxv < A[j] - minv:
            maxv = A[j] - minv
        if minv > A[j]:
            minv = A[j]
    print(maxv)

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

max_profit(A, n)
n = int(input())
k = 0
while 2**k <= n:
    k += 1:
print(2**(k-1))
        

### FIXED CODE ###

n = int(input())
k = 0
while 2**k <= n:
    k += 1
print(2**(k-1))
#最小公倍数を求める
import math

(A,B) = map(int,input().split(" "))
ans = (A * B) // math.gcd(A, B)
print(ans)


### FIXED CODE ###

#最小公倍数を求める

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

m=max(A,B)
n=min(A,B)
while m%n != 0:
    temp = n
    n = m%n
    m = temp


print(A*B // n)
import numpy as np
a = list(map(int,input().split()))

x = a[0]
n = a[1]
d = list(map(int,input().split()))

if (n == 0):
    print(x)
else:
    min_int = d[np.argmin(d)]
    max_int = d[np.argmax(d)]SSS
    if (x < min_int or max_int < x):
        print(x)
    else:
        p = []
        for var in range(min_int,max_int):
            if var not in d:
                p.append(var)
            else:
                continue
        ans = []
        for pp in p:
            ans.append(np.abs(pp - x))
        ans = np.array(ans)
        print(p[np.argmin(ans)])


### FIXED CODE ###

import numpy as np
a = list(map(int,input().split()))

x = a[0]
n = a[1]

if (n == 0):
    print(x)
else:
    d = list(map(int,input().split()))
    min_int = d[np.argmin(d)]
    max_int = d[np.argmax(d)]
    if (x < min_int or max_int < x):
        print(x)
    else:
        p = []
        for var in range(min_int - 10,max_int + 10):
            if var not in d:
                p.append(var)
            else:
                continue
        ans = []
        for pp in p:
            ans.append(np.abs(pp - x))
        ans = np.array(ans)
        print(p[np.argmin(ans)])
a,b=map(int,raw_input().split())
while a,b!=0,0
print b,a

### FIXED CODE ###

while True:
	a,b=map(int,raw_input().split())
	if a==0 and b==0: break
	if a>b: print b,a
	else: print a,b
a,b = [int(i) for i in input().split()]
if a < b:
    print("LESS")
elif a > b:
    print("GREATER")
else:
    print("EQUAL")

### FIXED CODE ###

a = int(input())
b = int(input())
if a < b:
    print("LESS")
elif a > b:
    print("GREATER")
else:
    print("EQUAL")
l = [0] * 2
l = raw_input().split()
a = l[0]
b = l[1]
if a == b:
print a, "=", b
elif a < b:
print a, "<", b
else:
print a,">", b

### FIXED CODE ###

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

if i[0] > i[1]:
    print("a > b")
elif i[0] < i[1]:
    print("a < b")
else:
    print("a == b")
N=int(input())
#G=[set() for _ in [0]*N]
G=[[]for i in range(N)]
#print(G)
u=[]
v=[]
w=[]
for i in range(N-1):
    a,b,c=map(int,input().split())
    a-=1
    b-=1
    
    G[a].append((b,c))
    G[b].append((a,c))

#print(G)
#print(G)
ans=[-1]*N
#ルートでは親はいないから-1
q=[(0,0,-1)]
"""
Q=[(0,0,-1)]
a,b,c=Q.pop()
print(a)
print(b)
print(c)
"""
"""
#print(q)
while q:
    #v：現在見ている点
    #p：vの親のノード
    #d：距離
    v,d,p=q.pop()
    if d%2==0:
        ans[v]=0
    else:
        ans[v]=1
    ans[v]=d
    for u,w in G[v]:
        #逆流を防ぐ
        if u==p:
            continue
        if w%2==0:
            pass
        else:
            d=1-d
        q.append((u,d,v))
    #print(q)
"""
def dfs(v,p,c):
    ans[v]=c
    print(G[v])
    for u,w in G[v]:
        if u==p:
            continue
        if w%2==0:
            dfs(u,v,c)
        else:
            dfs(u,v,1-c)
dfs(0,-1,1)
print("\n".join(map(str,ans)))


### FIXED CODE ###

import sys
 
n = int(input())
links = [set() for _ in [0] * n]
for line in sys.stdin:
    u, v, w = map(int, line.split())
    u -= 1
    v -= 1
    links[u].add((v, w))
    links[v].add((u, w))
ans = [-1] * n
q = [(0, 0, -1)]
while q:
    v, d, p = q.pop()
    if d % 2 == 0:
        ans[v] = 0
    else:
        ans[v] = 1
    for u, w in links[v]:
        if u == p:
            continue
        q.append((u, d + w, v))
print('\n'.join(map(str, ans)))
a, b, c = map(int, input().split())
if(a==7):
    if(b==5 & c==5):
        print('YES')
    else:
        print('NO')
elif(b==7):
    if(a==5 & c==5):
        print('YES')
    else:
        print('NO')
elif(c==7):
    if(b==5 & a==5):
        print('YES')
    else:
        print('NO')
else
    print('NO')
    

### FIXED CODE ###

a, b, c = map(int, input().split())
if(a==7):
    if(b==5 and c==5):
        print('YES')
    else:
        print('NO')
elif(b==7):
    if(a==5 and c==5):
        print('YES')
    else:
        print('NO')
elif(c==7):
    if(b==5 and a==5):
        print('YES')
    else:
        print('NO')
else:
    print('NO')
s = input() + 'n'
ans = 0
fans = 0
for i in range(len(s)):
    if s[i] 'ACGT':
        ans += 1
    elif fans < ans:
        fans = ans
        ans = 0
print(fans)


### FIXED CODE ###

s = input() + 'n'
ans = 0
fans = 0
for i in range(len(s)):
    if s[i] =='A' or s[i] =='C' or s[i] =='G' or s[i] =='T':
        ans += 1
    elif fans < ans:
        fans = ans
        ans = 0
print(fans)
n,k=map(int,input().split())
a=list(map(int,input().split()))
global s
for i in range(k):
    key
    if(i==0):
        key=0
    s=a[key-1]
    if(i==k-1):
        break
    key=a[s-1]
print(s)

### FIXED CODE ###

n,k=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n):
    a[i]-=1
doubling=[[0 for i in range(n)] for j in range(60)]
for i in range(n):
    doubling[0][i]=a[i]
for i in range(59):
    for j in range(n):
        doubling[i+1][j]=doubling[i][doubling[i][j]]
v=0
for d in range(60):
    if(k>>d &1):
        v=doubling[d][v]

print(v+1)
N, K = map(int, input().split())
S = input()

# find the largest subsequence
packet = []
packet_len = 0
direction = S[0]
seq = 1
for i in range(1, N - 1):
    if S[i] == direction:
        seq += 1
    else:
        packet.append(seq)
        seq = 1
        direction = S[i]
        packet_len += 1

if S[N - 1] == direction:
    seq += 1
    packet.append(seq)
else:
    packet.append(seq)
    seq = 1
    direction = S[N - 1]
    packet.append(seq)
    packet_len += 1

#print(packet)


for _ in range(K):
    if packet_len == 1 or packet_len == 2:
        print(sum(packet) - 1)
        exit()

# There is no need to choose the 'most invertible' index (i.e. max_idx) !!!

    else:
        val = packet[-3] + packet[-2] + packet[-1]
        packet = packet[:-3] + [val]
        packet_len -= 2

    #print(packet)

ans = 0
for v in packet:
    ans += v - 1
print(ans)


### FIXED CODE ###

N, K = map(int, input().split())
S = input()

# find the largest subsequence
packet = []
packet_len = 1
direction = S[0]
seq = 1
for i in range(1, N - 1):
    if S[i] == direction:
        seq += 1
    else:
        packet.append(seq)
        seq = 1
        direction = S[i]
        packet_len += 1

if S[N - 1] == direction:
    seq += 1
    packet.append(seq)
else:
    packet.append(seq)
    seq = 1
    direction = S[N - 1]
    packet.append(seq)
    packet_len += 1

#print(packet)
#print(packet_len)

# There is no need to choose the 'most invertible' index (i.e. max_idx) !!!
# Also, there is no need to rewrite the packet

num = 2 * K + 1
if packet_len == 1 or packet_len == 2 or num >= packet_len:
    print(N - 1)
elif num < packet_len:
    rem = packet_len - num
    print(N - rem - 1)