Harryxun/stf_run huggingface dataset:
import math

n, k = map(int, input().split())
res = 0

for i in range(1, n + 1):
    c = math.ceil(math.log2(k / i))
    res += (1 / n) * (0.5 ** c)

print(res)

### FIXED CODE ###

import math

n, k = map(int, input().split())
res = 0

for i in range(1, n + 1):
    if i > k:
        res += 1 / n
    else:
        c = math.ceil(math.log(k / i, 2))
        res += (1 / n) * (0.5 ** c)

print(res)
from heapq import heapify, heappop, heappush


N, M = map(int, input().split())
A = list(map(lambda x: -int(x), input().split()))
if N == 1:
    print(N >> M)
    exit()
heapify(A)
for i in range(M):
    a = -heappop(A)
    while a >= -A[0]:
        a >>= 1
    heappush(A, -a)
    print(A)
print(-sum(A))

### FIXED CODE ###

from heapq import heapify, heappop, heappush


N, M = map(int, input().split())
A = list(map(lambda x: -int(x), input().split()))
if N == 1:
    print(N >> M)
    exit()
heapify(A)
while M > 0:
    a = -heappop(A)
    while M > 0 and a >= -A[0]:
        a >>= 1
        M -= 1
    heappush(A, -a)
print(-sum(A))
m = []

def walk(i,j):
    if i < 0 or j < 0 \
            or i >= len(m) or j >= len(m[i]):
                return
    if m[i][j] == 0:
        return
    m[i][j] = 0
    for k in range(-1,2):
        for l in range(-1,2):
            walk(i+k,j+l)

while True:
    w, h = map(int, input().split())
    if w == 0: break
    for i in range(h):
        m.append(list(map(int, input().split())))
    ans = 0
    for i in range(len(m)):
        for j in range(len(m[i])):
            if m[i][j] == 1:
                walk(i,j)
                ans += 1
    print(ans)
    m = []

### FIXED CODE ###

m = []

def walk(i,j):
    stack = []
    stack.append((i,j))
    while stack:
        p = stack.pop()
        pi = p[0]
        pj = p[1]
        m[pi][pj] = 0
        for k in range(-1,2):
            for l in range(-1,2):
                a = pi+k
                b = pj+l
                if a < 0 or b < 0 \
                        or a >= len(m) or b >= len(m[a]):
                            pass
                elif m[a][b] == 0:
                    pass
                else:
                    stack.append((a,b))

while True:
    w, h = map(int, input().split())
    if w == 0: break
    for i in range(h):
        m.append(list(map(int, input().split())))
    ans = 0
    for i in range(len(m)):
        for j in range(len(m[i])):
            if m[i][j] == 1:
                walk(i,j)
                ans += 1
    print(ans)
    m = []
n = int(input())
l = map(int, input().split())

print(n)
print(l[::-1])

### FIXED CODE ###

input()
xs=reversed(input().split())
print(" ".join(xs))
import decimal
n,k=map(int,input().split())
num=[]
num2=[]
num4=0
num5=n
if n>=k:
    num4=decimal.Decimal((n-k+1)/n)
    n=k-1
num6=-1*(k//(-1*n))
for i in range(18):
    num.append(2**i)
for i in range(17):
    if num6<=num[i+1]:
        num6=i
        break
for i in range(17):
    if num[i]>=n:
        num2.append(n-num[i-1])
        break
    else:
        if i==0:
            num2.append(1)
        else:
            num2.append(num[i]-num[i-1])
ans=0
num3=len(num2)
for i in range(len(num2)):
    ans+=num2[i]*(2**(i))
print((decimal.Decimal(decimal.Decimal(ans/num5)/(2**(num3+num6))))+num4)


### FIXED CODE ###

import decimal
n,k=map(int,input().split())
num1=1
num2=0
for i in range(20):
    if num1>=k:
        break
    num1*=2
    num2+=1
num=n*(2**num2)
num1=num2
num3=0
for i in range(1,n+1):
    if i*(2**(num2-1))>=k:
        num2-=1
    if i>=k:
        num3+=2**num1
    else:
        num3+=2**(num1-num2)
print(decimal.Decimal(num3/num))
N, K = map(int, input().split())
A = [int(x) - 1 for x in input().split()]

# 最初のループを回るまで
loop = 0
city = 0
b = set([0])
while True:
    loop += 1
    if A[city] in b:
        break
    else:
        city = A[city]
        b.add(city)

loop_start = A[city]

# ループの始点にたどり着くまで
pre = 0
city = 0
while True:
    pre += 1
    if A[city] == loop_start:
        break
    else:
        city = A[city]

if loop > pre:
    loop -= pre

if K < c:  # ループに入る前に終了の場合
    city = 0
    for i in range(K):
        city = A[city]
    print(city + 1)
    
else:  # ループに入って終了
    K -= pre
    last = K % loop
    city = loop_start
    
    for i in range(last):
        city = A[city]
    print(city + 1)

### FIXED CODE ###

N, K = map(int, input().split())
A = [int(x) - 1 for x in input().split()]

# 最初のループを回るまで
loop = 0
city = 0
b = set([0])
while True:
    loop += 1
    if A[city] in b:
        break
    else:
        city = A[city]
        b.add(city)

loop_start = A[city]

# ループの始点にたどり着くまで
pre = 0
city = 0
while True:
    pre += 1
    if A[city] == loop_start:
        break
    else:
        city = A[city]

if loop > pre:
    loop -= pre

if K < pre:  # ループに入る前に終了の場合
    city = 0
    for i in range(K):
        city = A[city]
    print(city + 1)
    
else:  # ループに入って終了
    K -= pre
    last = K % loop
    city = loop_start
    
    for i in range(last):
        city = A[city]
    print(city + 1)
def isp(n):
    a = 1
    for i in range(2, (n + 1) // 2 + 2):
        if not n % i:
            a = 0
            break
    return a


num = input(int)
if num == 2:
    print(1)
elif num == 3:
    print(2)
else:
    s = 2
    for x in range(2, num + 1):
        if isp(x):
            s += 1
    print(s)

### FIXED CODE ###

import sys

f = [1, 0, 0, 0, 1, 0] * (1000000 // 6 + 1)
f = [0, 0, 1, 1] + f[3:-2]

i = 5
while i < 1000:
    if f[i] == 1:
        j = i * i
        while j <= 1000000:
            f[j] = 0
            j += i + i
    i += 2

for n in sys.stdin:
    i = int(n)
    print(sum(f[:i + 1]))
import math
a, b, c, d = map(int, input().split())

def wareruzu(x):
    if b < x:
        return 0
    start_a = a if a % x == 0 else a - (a % x) + x
    end_b = b - (b % x)
    m = end_b - start_a
    return int(m / x) + 1

all_n = b - a + 1
print(all_n - wareruzu(c) - wareruzu(d) + wareruzu((c*d) / math.gcd(c,d)))

### FIXED CODE ###

import fractions
a, b, c, d = map(int, input().split())
 
def wareruzu(x):
    if b < x:
        return 0
    if b == x:
        return 1
    start_a = a if a % x == 0 else a - (a % x) + x
    end_b = b - (b % x) # bより小さい最大の値。
    m = end_b - start_a
    if m < 0:
        return 0
    return int(m // x) + 1
 
all_n = b - a + 1
print(all_n - wareruzu(c) - wareruzu(d) + wareruzu((c*d) // fractions.gcd(c,d)))
a = int(input())
h = int(a / 3600)
m = int(a - h * 3600) / 60
s = int(a - (h * 3600) - (m * 60))
print("%s:%s:%s % (h, m, s))

### FIXED CODE ###

a = int(input())
h = int(a / 3600)
m = int((a - h * 3600) / 60)
s = int(a - (h * 3600) - (m * 60))
print("%s:%s:%s" % (h, m, s))
#coding:utf-8
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]
    MOD = 10**9+7
    from math import factorial
    N = II()
    X = LMIIS()
    # f = factorial(N-1)
    # def calc(k,slimes):
    #     # print(slimes)
    #     if k == N-1:
    #         return 0
    #     r = 0
    #     # for i in range(N-k-1):
    #     #     slimes2 = slimes[:]
    #     #     r = (slimes2[i+1]-slimes2[i]) / float(N-k-1)
    #     #     slimes2.pop(i)
    #     #     r += calc(k+1,slimes2) % MOD
    #     i = N-k-2
    #     slimes2 = slimes[:]
    #     print(i,slimes2)
    #     r = (slimes2[i+1]-slimes2[i]) * f / (N-k-1) % MOD
    #     slimes2.pop(i)
    #     r += calc(k+1,slimes2) 
    #     return r % MOD
    f = factorial(N-1)
    def calc(k,slimes):
        if k == N-1:
            return 0
        r = 0


        for k in range(N-1):
            # print(slimes)
            i = N-k-2
            r += (slimes[-1]-slimes[-2-k]) * f / (N-k-1) % MOD
            # slimes.pop(i)
            # r += calc(k+1,slimes) 
        return r % MOD
    
    print(int(calc(0,X)))




if __name__ == '__main__':
    main()

### FIXED CODE ###

#coding:utf-8
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]
    MOD = 10**9+7
    from math import factorial
    N = II()
    X = LMIIS()
    # f = factorial(N-1)
    # def calc(k,slimes):
    #     # print(slimes)
    #     if k == N-1:
    #         return 0
    #     r = 0
    #     # for i in range(N-k-1):
    #     #     slimes2 = slimes[:]
    #     #     r = (slimes2[i+1]-slimes2[i]) / float(N-k-1)
    #     #     slimes2.pop(i)
    #     #     r += calc(k+1,slimes2) % MOD
    #     i = N-k-2
    #     slimes2 = slimes[:]
    #     print(i,slimes2)
    #     r = (slimes2[i+1]-slimes2[i]) * f / (N-k-1) % MOD
    #     slimes2.pop(i)
    #     r += calc(k+1,slimes2) 
    #     return r % MOD
    f = factorial(N-1) % MOD
    def calc(k,slimes):
        r = 0

        for k in range(N-1):
            r += (slimes[-1]-slimes[-2-k]) * f * pow((N-k-1),MOD-2,MOD)
            r %= MOD
        return r
    print(calc(0,X))




if __name__ == '__main__':
    main()
N,K = map(int, input().split())

c = []

for i in range(N):
	c.append(input().split())

d = []
e = []

for j in range(N):
	e.append(c[j][0])
	e = e * c[j][1]
	d = d + e
	e = []

d.sort()

print(d[K-1])

### FIXED CODE ###

#N,Kの取得
N,K = list(map(int,input().split()))

#[(a_1,b_1),(a_2,b_2),...]の形でリストを作成
numList = []
for a,b in [ map(int,input().split()) for _ in range(N) ]:
	numList.append((a,b))

#作成したリストを、aの大きさで昇順ソート
numList = sorted(numList,key=lambda x:x[0])

#小さい順に要素数bを足していき、Kを超えた段階で出力、終了
count = 0
for a,b in numList:
	count += b
	if count>=K:
		print(a)
		quit()
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    x, n = i_map()
    if n == 0:
        print(x)
        exit()
    num_list = i_list()

    num_list.sort()

    abs_num = INF
    ans_list = []

    for i in range(1,101):
        if i in num_list:
            continue
        if abs_num > abs(i-x):
            ans_list = []
            abs_num = abs(i-x)
            ans_list.append(i)
        elif abs_num == abs(i-x):
            ans_list.append(i)

    ans_list.sort()

    print(ans_list[0])

if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    x, n = i_map()
    if n == 0:
        print(x)
        exit()
    num_list = i_list()

    abs_num = INF
    ans_list = []

    for i in range(0,102):
        if i in num_list:
            continue
        if abs_num > abs(i-x):
            ans_list = []
            abs_num = abs(i-x)
            ans_list.append(i)
        elif abs_num == abs(i-x):
            ans_list.append(i)

    ans_list.sort()

    print(ans_list[0])

if __name__ == '__main__':
    main()
import math
while True:
    n = int(input())
    score = [ int(i) for i in input().split(" ") ] 
    average = sum(score) / n
    if n == 0:
        break
    a2 = 0
    for s in score:
        a2 += (s - average) ** 2
    print("{:.8f}".format(math.sqrt(a2) / n , end ="\n")

### FIXED CODE ###

import math
while True:
    n = int(input())
    if n == 0:
        break
    s = [int(i) for i in input().split(" ")]
    m = sum(s) / n
    print("{:.8f}".format(math.sqrt(sum([(x-m) ** 2 for x in s]) / n)))
input()
A = list(set(map(int, input().split())))
N = len(A)

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

max = 0

if N <= 2:
  print(max(A))
else:
  for i in range(N):
    temp = A.pop(0)
    ans = gcd(A[0], A[1])
    for j in A[1:]:
      ans = gcd(ans, j)
    if max < ans:
      max = ans
    A.append(temp)
  print(max)

### FIXED CODE ###

from fractions import gcd

n = int(input())
list_ = list(map(int, input().strip().split()))

gcd_from_left = [0]
gcd_from_right = [0]
for i in range(n):
    gcd_from_left.append(gcd(gcd_from_left[i], list_[i]))
    gcd_from_right.append(gcd(gcd_from_right[i], list_[-(i + 1)]))

gcd_from_left.insert(0, 0)
gcd_from_right.insert(0, 0)
gcd_from_right.reverse()

print(max(gcd(gcd_from_left[i], gcd_from_right[i]) for i in range(n + 2)))
n, m = map(int, input().split())
s = []
c = []
for i in range(n):
  S, C = map(int, input().split())
  s.append(S)
  c.append(C)
for i in range(10 **(n + 1)):
  tmp = str(i)
  if len(tmp) == n and all([tmp[s[j] - 1] == str(c[j]) for j in range(m)]):
    print(tmp)
    exit()
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)
  c.append(C)
for i in range(10 **(n + 1)):
  tmp = str(i)
  if len(tmp) == n and all([tmp[s[j] - 1] == str(c[j]) for j in range(m)]):
    print(tmp)
    exit()
print(-1)
n = input()
for i in range(0,len(n)-1,1):
  if (n[i] == n[i+1]):
    print("Bad")
    else:
print("Good")

### FIXED CODE ###

n = input()
for i in range(len(n) -1):
  if (n[i] == n[i+1]):
      print("Bad")
      break
else: 
    print("Good")
N = int(input())
A = list(map(int, input().split()))
count = 0
flag = True
while Flag:
    flag = False
    for i in range(N-1, 1):
        if(A[i] < A[i-1]):
            A[i], A[i-1] = A[i-1], A[i]
            flag = True
            count += 1
print(*A)
print(count)
            

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
count = 0
flag = True
while flag:
    flag = False
    for i in range(N-1, 0, -1):
        if(A[i] < A[i-1]):
            A[i], A[i-1] = A[i-1], A[i]
            flag = True
            count += 1
print(*A)
print(count)
INF = float('inf')


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


def rec(i: int):
    if dp[i] < INF:
        return dp[i]

    if i == 0:
        return 0

    res = INF
    res = min(res, rec(i - 1) + abs(h[i] - h[i - 1]))
    if i > 1:
        res = min(res, rec(i - 2) + abs(h[i] - h[i - 2]))

    dp[i] = res

    return dp[i]


N = int(input())
h = LIST()

h.extend([0] * 2)

dp = [INF] * (N + 2)

print(rec(N - 1))


### FIXED CODE ###

INF = float('inf')

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

N=int(input())
h=LIST()

# DP配列を初期化
dp=[INF] * N

# 初期条件を入力
dp[0]=0

# テーブルを更新 もらうDP
for i in range(1,N):
    dp[i] = min(dp[i], dp[i-1] + abs(h[i] - h[i-1]))
    if i >= 2:
        dp[i] = min(dp[i], dp[i-2] + abs(h[i] - h[i-2]))

print(dp[-1])
n,q=map(int,input().split())
graph=[[] for _ in range(n+1)]
ab=[list(map(int,input().split())) for _ in range(n-1)]
for a,b in ab:
    graph[a].append(b)
    graph[b].append(a)
px=[list(map(int,input().split())) for _ in range(q)]
ans=[0]*(n+1)
for p,x in px:
    ans[p]+=x
seen=[0]*(n+1)
def dfs(i):
    seen[i]=1
    l=graph[i]
    for li in l:
        if seen[li]==0:
            ans[li]+=ans[i]
            todo.append(li)
    if len(todo)>0:
        dfs(todo.pop())
todo=[1]
dfs(todo.pop())
print(' '.join(map(str,ans[1:])))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
def main():
    n,q=map(int,input().split())
    graph=[[] for _ in range(n+1)]
    ab=[list(map(int,input().split())) for _ in range(n-1)]
    for a,b in ab:
        graph[a].append(b)
        graph[b].append(a)
    px=[list(map(int,input().split())) for _ in range(q)]
    seen=[0]*(n+1)
    ans=[0]*(n+1)
    for p,x in px:
        ans[p]+=x
    def dfs(i):
        seen[i]=1
        for li in graph[i]:
            if seen[li]==0:
                ans[li]+=ans[i]
                dfs(li)
    dfs(1)
    print(' '.join(map(str,ans[1:])))
if __name__ == '__main__':
    main()
def prime_list(n):
    '''
    n以下の素数のリストを返す
    '''
    A = list(range(2, n + 1, 1))
    prime = []
    p_max = A.pop(0)    
    while A[-1] >= p_max ** 2:
        for n in A:
            if n % p_max == 0:
                A.remove(n)
        prime.append(p_max)
        p_max = A.pop(0)
    prime.append(p_max)
    prime += A
    return prime

N = int(input())
ans = [2]
for prime in prime_list(1362):
    if len(ans) < N:
        if prime % 5 == 1:
            ans.append(prime)

print(' '.join(ans))


### FIXED CODE ###

def prime_list(n):
    '''
    n以下の素数のリストを返す
    '''
    A = list(range(2, n + 1, 1))
    prime = []
    p_max = A.pop(0)    
    while A[-1] >= p_max ** 2:
        for n in A:
            if n % p_max == 0:
                A.remove(n)
        prime.append(p_max)
        p_max = A.pop(0)
    prime.append(p_max)
    prime += A
    return prime

N = int(input())
ans = ['2']
for prime in prime_list(1362):
    if len(ans) < N:
        if prime % 5 == 1:
            ans.append(str(prime))

print(' '.join(ans))
S,T = map(input().split())

print(T,S)

### FIXED CODE ###

S,T = input().split()

print(T+S)
n,m=map(int,input().split())
p=[]
s=[]
start=0
idx=0
AC=0
WA=0
count=0
for i in range(m):
    p_,s_=input().split()
    p.append(int(p_))
    s.append(s_)
for i in range(m):
    count=p.count(p[idx])
    if s[start:start+count].count('AC')>=1:
        AC+=1
        WA+=s[start:s[start:start+count].index('AC')+start].count('WA')
    else:
        WA+=s[start:start+count].count('WA')
    start=start+count
    idx=start
    if start==m:
        break
print("{} {}".format(AC,WA))


### FIXED CODE ###

n,m=map(int,input().split())
ac=[0]*n
wa=[0]*n
for i in range(m):
    p,s=input().split()
    p=int(p)
    if ac[p-1] == 1:
        continue
    if s=='AC':
        ac[p-1] = 1
    else:
        wa[p-1] += 1
AC=0
WA=0
for i in range(n):
    AC += ac[i]
    if ac[i] == 1:
        WA += wa[i]
print("{} {}".format(AC,WA))
n=int(input())
s=[input().split() for _ in range(n)]
res = 0.0
for v, c in s:
    v = v if c == 'JPY' else v * 380000.0
    res += v
print(res)

### FIXED CODE ###


n=int(input())
s=[input().split() for _ in range(n)]
res = 0.0
for v, c in s:
    v = float(v)
    v = v if c == 'JPY' else v * 380000.0
    res += v
print(res)
N, k = map(int, input().split())
string = input()

mojiretu_list = [0 for _ in range(N)]
for i in range(N):
    mojiretu_list[i] = string[i]

if mojiretu_list[k] == 'A':
    mojiretu_list[k] = 'a'

if mojiretu_list[k] == 'B':
    mojiretu_list[k] = 'b'

if mojiretu_list[k] == 'C':
    mojiretu_list[k] = 'c'

ans = ''
for i in range(N):
    ans += mojiretu_list[i]

print(ans)

### FIXED CODE ###

N, k = map(int, input().split())
string = input()

mojiretu_list = [0 for _ in range(N)]
for i in range(N):
    mojiretu_list[i] = string[i]

if mojiretu_list[k-1] == 'A':
    mojiretu_list[k-1] = 'a'

if mojiretu_list[k-1] == 'B':
    mojiretu_list[k-1] = 'b'

if mojiretu_list[k-1] == 'C':
    mojiretu_list[k-1] = 'c'

ans = ''
for i in range(N):
    ans += mojiretu_list[i]

print(ans)
if(V < W):
    print("NO")
elif(abs(A-B)>T*(V-W)):
    print("NO")
else:
    print("YES")

### FIXED CODE ###

A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if(V<W):
    print("NO")
elif(abs(A-B)>T*(V-W)):
    print("NO")
else:
    print("YES")
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <ctype.h>
#include <cstdlib>
#include <cmath>
#include <stack>
#define _GLIBCXX_DEBUG
using namespace std;

int main()
{
    int n;
    cin >> n;
    long long a = 1, b = 1, c = 1;
    for (int i = 0; i < n; i++)
    {
        a *= 10;
        a %= 1000000007;
        b *= 9;
        b %= 1000000007;
        c *= 8;
        c %= 1000000007;
    }
    cout << (a-b-b+c+1000000007)%1000000007 << endl;
}

### FIXED CODE ###

n = int(input())
ans = 10**n-2*9**n+8**n
print(ans%1000000007)
s=raw_input()
sa=0
sb=0
sc=0
for i in range(len(s)):
  if s[i]=="a":
    sa+=1
  if s[i]=="b":
    sb+=1
  if s[i]=="c":
    sc+=1
if sa=1 and sb=1 and sc=1:
    print "Yes"
else: 
  print "No"
  
    
  

### FIXED CODE ###

s=raw_input()
sa=0
sb=0
sc=0
for i in range(len(s)):
  if s[i]=="a":
    sa+=1
  if s[i]=="b":
    sb+=1
  if s[i]=="c":
    sc+=1
if sa==1 and sb==1 and sc==1:
    print "Yes"
else: 
    print "No"