Harryxun/stf_run huggingface dataset:
def dividable(S):
    return ((S[:5]=='dream'   and dividable(S[5:])) or
            (S[:7]=='dreamer' and dividable(S[7:])) or
            (S[:5]=='erase'   and dividable(S[5:])) or
            (S[:6]=='eraser'  and dividable(S[6:])) or
            (S==''))

print('YES' if dividable(input()) else 'NO')

### FIXED CODE ###

S = [input()]
ans = 'NO'
while S:
    S_new = []
    for s in S:
        if s[:5]=='dream'  : S_new.append(s[5:])
        if s[:7]=='dreamer': S_new.append(s[7:])
        if s[:5]=='erase'  : S_new.append(s[5:])
        if s[:6]=='eraser' : S_new.append(s[6:])
    S = S_new
    if '' in S:
        ans = 'YES'
        break

print(ans)
#まずｎ団目までいく最短コストを探す。それはｎからｋ前までからのうち最短コストとなるもの
import sys #追加
sys.setrecursionlimit(200000000000000)
def minJ(N,K,costL,memo):
    if N-1 in memo ==True:
        return memo[N-1]
    if N<K:
        return abs(costL[N-1]-costL[0])
    else:
        result=None
        for i in range(1,K+1):
            stock=minJ(N-i,K,costL,memo)+abs(costL[N-1]-costL[N-i-1])
            if result==None or (stock<result):
                result=stock
    memo[N-1]=result
    return result

memo={}
N,K=map(int, input().split())
costL=list(map(int,input().split()))
print(minJ(N,K,costL,memo))


### FIXED CODE ###

import sys
sys.setrecursionlimit(400000000)
def main():
    n,k=map(int,input().split())
    h=tuple(map(int,input().split()))
    flog=[-1]*n
    for i in range(n):#dest=i 0が１
        if i<k+1:#0~k
            flog[i]=abs(h[i]-h[0])
        else:
            min=10**9
            for j in range(1,k+1):#1~k
                tmp=flog[i-j]+abs(h[i]-h[i-j])
                if tmp<min:
                    min=tmp
            flog[i]=min
    print(flog[n-1])
   # print(flog)
if __name__=="__main__":
    main()
import sys

a = sys.stdin.read()
for i, v in enumerate(map(int, a.split), 1):
  if v == 0:
    print(i)
    break

### FIXED CODE ###

import sys
 
a = sys.stdin.read()
for i, v in enumerate(map(int, a.split()), 1):
  if v == 0:
    print(i)
    break
s = input()
len_s = len(s)
ans = 0
for i in range(len_s):
    for j in range(i + 4 , len_s + 1):
        if int(s[i:j]) % 2019 == 0:
            ans += 1
print(ans)

### FIXED CODE ###

s, w =[int(i) for i in input().split()]
if w >= s:
    print('unsafe')
else:
    print('safe')
i, k = map(int, input().split())
    h = [int(i) for i in input().split()]
    # dpの最小値を変更する関数
    def chmin(a, b):
        if a > b:
            return b
        else:
            return a
    # 無限大の値
    f_inf = pow(10,9)+99
    # DP テーブルを初期化　(最小化問題なので INF に初期化)
    dp = [f_inf] * (10**5+10)
    # 初期条件
    dp[0] = 0
    for i in range(1, n):
        for j in range(1, k+1):
            if i - j >= 0:
                dp[i] = chmin(dp[i], dp[i-j]+ abs(h[i] - h[i - j]))
    print(dp[n-1])

### FIXED CODE ###

n, k = map(int, input().split())
h = [int(i) for i in input().split()]

def chmin(a, b):
    if a > b:
        return b
    else:
        return a
f_inf = pow(10,9)+99

dp = [f_inf] * (10**5+10)
dp[0] = 0
for i in range(1, n):
    for j in range(1, k+1):
        if i - j >= 0:
            dp[i] = chmin(dp[i], dp[i-j]+ abs(h[i] - h[i - j]))
print(dp[n-1])
import numpy as np
N = int(input())
data_xy = []
for i in range(N):
    A = int(input())
    xy = []
    for i in range(A):
        [x,y] = list(map(int,input().split()))
        xy.append([x-1, y])
    data_xy.append(xy)
data_xy = np.array(data_xy,dtype=np.int64)
ans = 0
for i in range(2**N):
    p_list = np.zeros(N,dtype=np.int64)
    for j in range(N):
        if (i>>j) & 1 == 1:
            p_list[j] = 1
    flag = True
    for j in range(N):
        if p_list[j] == 1:
            for k in range(len(data_xy[j])):
                x = data_xy[j][k][0]
                y = data_xy[j][k][1]
                if p_list[x] != y:
                    flag = False
    if flag == True:
        ans = max(sum(p_list),ans)
print(ans)

### FIXED CODE ###

N = int(input())
syougen = [[] for i in range(N)]
for i in range(N):
    a_tmp = int(input())
    for j in range(a_tmp):
        [x, y] = list(map(int,input().split()))
        syougen[i].append([x-1,y])
ans = 0
for i in range(2**N):
    data = [0]*N
    for j in range(N):
        if ((i >> j) & 1):
            data[j] = 1
    flag = True
    for k in range(N):
        if data[k] == 1:
            for l in range(len(syougen[k])):
                x = syougen[k][l][0]
                y = syougen[k][l][1]
                if data[x] != y:
                    flag = False
    if flag:
        ans = max(ans,sum(data))
print(ans)
S,T=map(str,input().split())
count=0
for i in range(len(S)):
    if S[i]==T[i]:
        count+=1
print(count)

### FIXED CODE ###

S=str(input())
T=str(input())
count=0
for i in range(3):
    if S[i]==T[i]:
        count+=1
print(count)
pi = 3.141592653589793
r = float(input())
print("{0:.8f} {1:.6f}".format(np.pi*r*r , 2*np.pi*r))


### FIXED CODE ###

pi = 3.141592653589793
r = float(input())
print("{0:.6f} {1:.6f}".format(pi*r**2 , 2*pi*r))
MOD = 10**9 + 7
K = int(input())
S = input()
N = len(S)


class Combination:
    """
  O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
  n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
  使用例：
  comb = Combination(1000000)
  print(comb(5, 3))  # 10
  """

    def __init__(self, n_max, mod=10 ** 9 + 7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n - r] % self.mod

    def make_factorial_list(self, n):
        # 階乗のリストと階乗のmod逆元のリストを返す O(n)
        # self.make_modinv_list()が先に実行されている必要がある
        fac = [1]
        facinv = [1]
        for i in range(1, n + 1):
            fac.append(fac[i - 1] * i % self.mod)
            facinv.append(facinv[i - 1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        # 0からnまでのmod逆元のリストを返す O(n)
        modinv = [0] * (n + 1)
        modinv[1] = 1
        for i in range(2, n + 1):
            modinv[i] = self.mod - self.mod // i * \
                modinv[self.mod % i] % self.mod
        return modinv


comb = Combination(1000000)
ans = 0
for i in range(K + 1):

    temp = comb(N + K - i - 1, N - 1)
    temp %= MOD
    temp *= pow(26, i, MOD)
    temp %= MOD
    temp *= pow(25, K - i, MOD)
    temp %= MOD
    ans += temp
    ans %= MOD
print(ans)


### FIXED CODE ###

MOD = 10**9 + 7
K = int(input())
S = input()
N = len(S)


class Combination:
    """
  O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
  n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
  使用例：
  comb = Combination(1000000)
  print(comb(5, 3))  # 10
  """

    def __init__(self, n_max, mod=10 ** 9 + 7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n - r] % self.mod

    def make_factorial_list(self, n):
        # 階乗のリストと階乗のmod逆元のリストを返す O(n)
        # self.make_modinv_list()が先に実行されている必要がある
        fac = [1]
        facinv = [1]
        for i in range(1, n + 1):
            fac.append(fac[i - 1] * i % self.mod)
            facinv.append(facinv[i - 1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        # 0からnまでのmod逆元のリストを返す O(n)
        modinv = [0] * (n + 1)
        modinv[1] = 1
        for i in range(2, n + 1):
            modinv[i] = self.mod - self.mod // i * \
                modinv[self.mod % i] % self.mod
        return modinv


comb = Combination(2100000)
ans = 0
for i in range(K + 1):

    temp = comb(N + K - i - 1, N - 1)
    temp %= MOD
    temp *= pow(26, i, MOD)
    temp %= MOD
    temp *= pow(25, K - i, MOD)
    temp %= MOD
    ans += temp
    ans %= MOD
print(ans)
s=inp()
#s = (1 2 2) 
s = s.split(" ")


densya = int(s[0])*int(s[1])
taxi   = int( s[3] )

if ( densya < taxi):
    print(densya)
else:
    print(taxi)

### FIXED CODE ###

s=input()
#s = ("4 2 9")
#print(s) 
s = s.split(" ")


densya = int(s[0])*int(s[1])
taxi   = int( s[2] )

if ( densya < taxi):
    print(densya)
else:
    print(taxi)
6 9
3 4
6 1
2 4
5 3
4 6
1 5
6 2
4 5
5 6


### FIXED CODE ###

import heapq

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

node = [[] for i in range(N+1)]
for i in range(M):
  a, b = map(int, input().split())
  node[a].append(b)
  node[b].append(a)
#

gw = [0]*(N+1)
gw[1] = 1
ng=1
hq = []
heapq.heapify(hq) 
heapq.heappush(hq,(0,1))
while hq:
  c, n = heapq.heappop(hq)
  for i in node[n]:
    if gw[i] == 0:
      gw[i] = n
      ng += 1
      heapq.heappush(hq,(c+1,i))
#
if ng < N:
  print("No")
else:
  print("Yes")
  for i in range(2,N+1):
    print(gw[i])
#
n, m = map(int, input().split())
A = list(map(int, input().split()))
A = sorted(A)

cb_dict = {}
for _ in range(m):
    b, c = map(int, input().split())
    new = {c:b}
    if c in cb_dict.keys():
        cb_dict[c] += b
    else:
        cb_dict.update(new)

cb_dict = sorted(cb_dict.items(), key=lambda x:x[0], reverse=True)

now_c = 0
now_b = 0
for i in range(n):
    if A[i] =< cb_dict[now_c][0]:
        A[i] = cb_dict[now_c][0]
        now_b += 1
    if now_b == cb_dict[now_c][1]:
        now_c += 1
    if now_c > len(cb_dict)-1:
        break

ans = sum(A)
print(ans)

### FIXED CODE ###

n, m = map(int, input().split())
A = list(map(int, input().split()))
A = sorted(A)

cb_dict = {}
for _ in range(m):
    b, c = map(int, input().split())
    new = {c:b}
    if c in cb_dict.keys():
        cb_dict[c] += b
    else:
        cb_dict.update(new)

cb_dict = sorted(cb_dict.items(), key=lambda x:x[0], reverse=True)

now_c = 0
now_b = 0
for i in range(n):
    if A[i] >= cb_dict[now_c][0]:
        break
    else:
        A[i] = cb_dict[now_c][0]
        now_b += 1
        if now_b == cb_dict[now_c][1]:
            now_c += 1
            now_b = 0
        if now_c > len(cb_dict)-1:
            break

ans = sum(A)
print(ans)
n,k = map(int(input().split()))
ab = [list(map(int,input().split()))for i in range(n)]

ab.sort()
i = 0
c = ab[0][1]
while c < k:
    i +=1
    c += ab[i][1]
print(ab[i][0])

### FIXED CODE ###

n,k = map(int, input().split())
ab = sorted([list(map(int,input().split())) for _ in range(n)])
i = 0
c = ab[0][1]
while c < k:
    i += 1
    c += ab[i][1]
print(ab[i][0])
li = list(str(input()))
for i in range(li):
  if(li[i] == "B" and not i == 0):
    li[i-1] = ""
    li[i] = ""
print("".join(li))

### FIXED CODE ###

li = list(input())
ans = ""
for i in li:
  if i == "0":
    ans = ans + "0"
  elif i == "1":
    ans = ans + "1"
  elif i == "B":
    ans = ans[:len(ans)-1]
print(ans)
n, q = map(int, input().split())
ab = [[] for _ in range(n)]
px = [0 for _ in range(n)]
for i in range(n - 1):
    a, b = map(int, input().split())
    ab[a - 1].append(b - 1)
    ab[b - 1].append(a - 1)
for i in range(q):
    p, x = map(int, input().split())
    px[p - 1] += x

visited = [False for _ in range(n)]


def dfs(current):
    for c in ab[current]:
        if visited[c]:
            continue
        ans[c] += ans[current]
        visited[c] = True
        dfs(c)


ans = px
visited[0] = True
dfs(0)
print(*ans)


### FIXED CODE ###

from collections import deque

n, q = map(int, input().split())
ab = [[] for _ in range(n)]
px = [0 for _ in range(n)]
for i in range(n - 1):
    a, b = map(int, input().split())
    ab[a - 1].append(b - 1)
    ab[b - 1].append(a - 1)
for i in range(q):
    p, x = map(int, input().split())
    px[p - 1] += x

ans = px
queue = deque([(0, 0)])
while len(queue) > 0:
    prev, a = queue.pop()
    for c in ab[a]:
        if c != prev:
            ans[c] += ans[a]
            queue.append((a, c))

print(*ans)
#151c
n,w=map(int,input().split())
ac=0
wa=0
wa_cnt=0
ac_flg=[0]*w
for i in range(w):
	p,s=input().split()
	p=int(p)-1
	if ac_flg[p]==1:
		continue
	else:
		if s=='AC':
			ac_flg[p]=1
			ac+=1
			wa+=wa_cnt
		else:
			wa_cnt+=1
print(ac,wa)

### FIXED CODE ###

#151c
n,w=map(int,input().split())
ac=0
wa=[0]*n
wa_cnt=[0]*n
ac_flg=[0]*n
for i in range(w):
	p,s=input().split()
	p=int(p)-1
	if ac_flg[p]==1:
		continue
	else:
		if s=='AC':
			ac_flg[p]=1
			ac+=1
			wa[p] =wa_cnt[p]
			#wa_cnt=0
		else:
			wa_cnt[p]+=1

wa_ans=0
for i in range(n):
	wa_ans+=wa[i]

print(ac,wa_ans)
import sys
sys.setrecursionlimit(100000)

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

for i in range(M):
  a,b = map(int, input().split())
  adj_list[a].append(b)
  adj_list[b].append(a)

visited = [False]*(N+1)
colors = [None] * (N)

def dfs(node, c):
  colors[node-1] = c
  visited[node] = True
  for nei in adj_list[node]:
    if colors[nei-1] == c:
      is_bipartite = False
      return False
    if not visited[nei] and not dfs(nei, 1-c):
      return False

  return True

if dfs(i, 1):
  black = colors.count(1)
  print(black*(N-black) - M)
else:
  print(N*(N-1)//2 - M)


### FIXED CODE ###

import sys
sys.setrecursionlimit(100000)

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

for i in range(M):
  a,b = map(int, input().split())
  adj_list[a].append(b)
  adj_list[b].append(a)

visited = [False]*(N+1)
colors = [None] * (N)
is_bipartite = True

## improved dfs ###
def dfs(node, c):
  colors[node-1] = c
  visited[node] = True
  for nei in adj_list[node]:
    if colors[nei-1] == c:
      return False
    if not visited[nei] and not dfs(nei, 1-c):
      return False

  return True

if dfs(1, 1):
  black = colors.count(1)
  print(black*(N-black) - M)
else:
  print(N*(N-1)//2 - M)
# -*- coding: utf-8 -*-
a = int(input())
b = []
for i in range(a):
    b.append(input())

c = [0] * (100+1)
for i in b:
    c[i] = i

d = []
for g in c:
    if g != 0:
        d.append(g)

print(len(d))




### FIXED CODE ###

a = int(input())
b = []
for i in range(a):
    b.append(input())
c = set(b)
print(len(c))
s=str(input())
s[3]="8"
print(s)

### FIXED CODE ###

print("2018"+input()[4:])
a,b,c,d=map(int,input().split())

if a => 0:
  if c=>0:
    ans = b*d
  elif d =>0:
    ans=b*d
  else:
    ans=a*d
else:
  if b=>0:
    if c=>0:
      ans = b*d
    elif d =>0:
      if a*c < b*d:
        ans = b*d
      else:
        ans= a*c
    else:
      ans=a*c
  elif c=>0:
    ans=b*c
  else:
    ans= a*c
print(ans)

### FIXED CODE ###

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

if a >= 0:
  if c>=0:
    ans = b*d
  elif d >=0:
    ans=b*d
  else:
    ans=a*d
else:
  if b>=0:
    if c>=0:
      ans = b*d
    elif d >=0:
      if a*c < b*d:
        ans = b*d
      else:
        ans= a*c
    else:
      ans=a*c
  elif c>=0:
    ans=b*c
  else:
    ans= a*c
print(ans)
#!/usr/bin/env python


N = input()
N = int(N)

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

B = []
B = input().split()
B = [int(n) for n in B]
B.append(0)

#print('N=',N)
#print('A=',A)
#print('B=',B)

monster = 0

for i in range(N+1) :
	if A[i] < B[i] :
		monster = monster + A[i]
		delta = B[i] - A[i]
		B[i+1] = B[i+1] + delta
	if A[i] >= B[i] :
		monster = monster + B[i]

print(monster)









### FIXED CODE ###

#!/usr/bin/env python

N = input()
N = int(N)

A = []
A = input().split()
A = [int(n) for n in A]
#A.append(0)

B = []
B = input().split()
B = [int(n) for n in B]
B.append(0)
#B.append(0)

#print('N=',n)
#print('A=',A)
#print('B=',B)

monster = 0

for i in range(N) :
	if A[i] < B[i] :
		monster = monster + A[i]
		B[i] = B[i] - A[i]
		if A[i+1] < B[i] :
			monster = monster + A[i+1]
			A[i+1] = 0
		elif A[i+1] >= B[i] :
			monster = monster + B[i]
			A[i+1] = A[i+1] - B[i]
	elif A[i] >= B[i] :
		monster = monster + B[i]

print(monster)
import copy

s = input()
X, Y = list(map(int, input().split()))

#少なくとも、右にx,↑にy進まなきゃいけない
# Fはくっつけられる
# s < 8000 よって N^2くらいならok
# Tが1回→左右 2回→前か後ろ 3回→左右
# この性質から、左右は左右のみで考えればいい
# x方向の数字N個をつかって、xを作成する 足し引きのみ 2^N xを加えて0にできるかどうか

s += "T"

now = 1
# 1はx方向、-1はy方向とする
start = 0
go = 0
x = []
y = []
for i in s:
    if i == "T":
        if start == 0:
            X = X - go
            go = 0
            start = 1
        else:
            if go != 0:
                if now == 1:
                    x.append(go)
                else:
                    y.append(go)
                go = 0
        now *= -1
    if i == "F":
        go += 1
x.sort()
y.sort()
x = x[::-1]
y = y[::-1]
X = abs(X)
Y = abs(Y)
x_use = sum(x) - X
y_use = sum(y) - Y
if x_use % 2 == 1 or y_use % 2 == 1 or x_use < 0 or y_use < 0:
    print("No")
    exit()
x_use = x_use//2
y_use = y_use//2


def solve(integer_list, target_sum,  i=0, sum=0):
    if sum > target_sum:
        return False
    if sum == target_sum:
        return True
    if i == len(integer_list):
        return sum == target_sum
    if (solve(integer_list, target_sum, i + 1, sum)):
        return True
    if (solve(integer_list, target_sum, i + 1, sum + integer_list[i])):
        return True
    return False

if solve(x, x_use) and solve(y, y_use):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

import copy

s = input()
X, Y = list(map(int, input().split()))

#少なくとも、右にx,↑にy進まなきゃいけない
# Fはくっつけられる
# s < 8000 よって N^2くらいならok
# Tが1回→左右 2回→前か後ろ 3回→左右
# この性質から、左右は左右のみで考えればいい
# x方向の数字N個をつかって、xを作成する 足し引きのみ 2^N xを加えて0にできるかどうか

s += "T"

now = 1
# 1はx方向、-1はy方向とする
start = 0
go = 0
x = []
y = []
for i in s:
    if i == "T":
        if start == 0:
            X = X - go
            go = 0
            start = 1
        else:
            if go != 0:
                if now == 1:
                    x.append(go)
                else:
                    y.append(go)
                go = 0
        now *= -1
    if i == "F":
        go += 1
x.sort()
y.sort()
x = x[::-1]
y = y[::-1]
X = abs(X)
Y = abs(Y)
x_use = sum(x) - X
y_use = sum(y) - Y
if x_use % 2 == 1 or y_use % 2 == 1 or x_use < 0 or y_use < 0:
    print("No")
    exit()
x_use = x_use//2
y_use = y_use//2


def solve(integer_list, target_sum,  i=0, sum=0):
    if sum > target_sum:
        return False
    if sum == target_sum:
        return True
    if i == len(integer_list):
        return sum == target_sum
    if (solve(integer_list, target_sum, i + 1, sum)):
        return True
    if (solve(integer_list, target_sum, i + 1, sum + integer_list[i])):
        return True
    return False

#if solve(x, x_use) and solve(y, y_use):
#    print("Yes")
#else:
#    print("No")


def part_sum0(a,A):
    #初期化
    N=len(a)
    dp=[[0 for i in range(A+1)] for j in range(N+1)]
    dp[0][0]=1

    #DP
    for i in range(N):
        for j in range(A+1):
            if a[i]<=j: #i+1番目の数字a[i]を足せるかも
                dp[i+1][j]=dp[i][j-a[i]] or dp[i][j]
            else: #入る可能性はない
                dp[i+1][j]=dp[i][j]
    return dp[N][A]
 
if part_sum0(x,x_use) and part_sum0(y, y_use):
    print("Yes")
else:
    print("No")
h = input()
w = input()
n = input()
if h < w:
    h = w
print(int(n / h)

### FIXED CODE ###

import math
h = int(input())
w = int(input())
n = int(input())
if h < w:
    h = w
print(math.ceil(n / h))
class Circle():
    # 中心p、半径rの円
    def __init__(self, p, r):
        self.p = p
        self.r = r

    def contain(self, q):
        # 点qを含むか判定
        px, py = self.p
        qx, qy = q
        return (px-qx)**2+(py-qy)**2 <= self.r**2


def enclose(P):
    # 点のリストPの最小包含円
    n = len(P)
    if n == 2:
        ax, ay = P[0]
        bx, by = P[1]
        r = ((ax-bx)**2+(ay-by)**2)**0.5/2
        p = ((ax+bx)/2, (ay+by)/2)
        return Circle(p, r)
    if n == 3:
        p0, p1, p2 = P[0], P[1], P[2]
        circle0 = enclose([p1, p2])
        circle1 = enclose([p2, p0])
        circle2 = enclose([p0, p1])
        if circle0.contain(p0):
            circle = circle0
        elif circle1.contain(p1):
            circle = circle1
        elif circle2.contain(p2):
            circle = circle2
        else:
            p0x, p0y = p0
            p1x, p1y = p1
            p2x, p2y = p2
            A = p1x*p2x+p1y*p2y
            B = p2x*p0x+p2y*p0y
            C = p0x*p1x+p0y*p1y
            a = A*(B+C-A)
            b = B*(C+A-B)
            c = C*(A+B-C)
            px = (a*p0x+b*p1x+c*p2x)/(a+b+c)
            py = (a*p0y+b*p1y+c*p2y)/(a+b+c)
            r = ((px-p0x)**2+(py-p0y)**2)**0.5/2
            circle = Circle((px, py), r)
        return circle
    for i in range(n-2):
        for j in range(i, n-1):
            for k in range(j, n):
                circle = enclose([P[i], P[j], P[k]])
                if all([circle.contain(P[l]) for l in range(n)]):
                    return circle


n = int(input())
P = []
for i in range(n):
    x, y = map(int, input().split())
    P.append((x, y))
print(enclose(P).r)


### FIXED CODE ###

import numpy as np
N = int(input())
P = []
for n in range(N):
    x, y = map(int, input().split())
    P.append((x, y))


def dist(p0, p1):
    x0, y0, x1, y1 = p0[0], p0[1], p1[0], p1[1]
    return (x0 - x1) ** 2 + (y0 - y1) ** 2


def f(x, y):
    return max([dist(p, (x, y)) for p in P])


def minfx(y):
    left = 0
    right = 1000
    for _ in range(80):
        left_ = left * (2 / 3) + right * (1 / 3)
        right_ = left*(1/3)+right*(2/3)
        if f(left_, y) <= f(right_, y):
            right = right_
        else:
            left = left_
    x0 = (left + right) / 2
    return f(x0, y)


left = 0
right = 1000
for _ in range(80):
    left_ = left * (2 / 3) + right * (1 / 3)
    right_ = left*(1/3)+right*(2/3)
    if minfx(left_) <= minfx(right_):
        right = right_
    else:
        left = left_
y0 = (left + right) / 2
print(np.sqrt(minfx(y0)))
x=int(input())
 
if 400 <= x <= 599:
    print(8)
elif 600 <= x <= 799:
    print(7)
elif 800 <= x <= 999:
    prnit(6)
elif 1000 <= x <= 1199:
    print(5)
elif 1200 <= x <= 1399:
    print(4)
elif 1400 <= x <= 1599:
    print(3)
elif 1600 <= x <= 1799:
    print(2)
elif 1800 <= x <= 1999:
    print(1)

### FIXED CODE ###

x = int(input())
 
if 400 <= x <= 599:
    print(8)
elif 600 <= x <= 799:
    print(7)
elif 800 <= x <= 999:
    print(6)
elif 1000 <= x <= 1199:
    print(5)
elif 1200 <= x <= 1399:
    print(4)
elif 1400 <= x <= 1599:
    print(3)
elif 1600 <= x <= 1799:
    print(2)
elif 1800 <= x <= 1999:
    print(1)
# -*- coding: utf-8 -*-

import re

s = input()

result = re.findall(r'[ATGC]+', s)

print(len(max(result)))

### FIXED CODE ###

# -*- coding: utf-8 -*-

import re

s = input()

result = re.sub(r'[^ATGC]', ',', s).split(',')

print(max([len(i) for i in result]))
n,ma,mb=map(int,input().split())
ABC=[list(map(int,input().split())) for _ in range(n)]
infi=10**15
dp=[[[infi]*(401) for _ in range(401)]for _ in range(41)]
dp[0][0][0]=0
for i in range(n):
    a,b,c=ABC[i]
    for j in range(401):
        for k in range(401):
            ni=i+1
            nj=j+a
            nk=k+b
            dp[ni][nj][nk]=min(dp[ni][nj][nk], dp[i][j][k])
            if nj>400:
                continue
            if nk>400:
                continue
            dp[ni][nj][nk]=min(dp[i][j][k]+c, dp[i][nj][nk], dp[ni][nj][nk])

ans=infi
for i in range(1,401):
    if ma*i>100:
        break
    if mb*i>100:
        break    
    ans=min(ans, dp[n][ma*i][mb*i])
print(ans if ans!=infi else -1)

### FIXED CODE ###

import sys
input = sys.stdin.buffer.readline
n,ma,mb=map(int,input().split())
ABC=[list(map(int,input().split())) for _ in range(n)]
infi=10**15
dp=[[[infi]*(401) for _ in range(401)]for _ in range(41)]
dp[0][0][0]=0
for i in range(n):
    a,b,c=ABC[i]
    for j in range(401-a):
        for k in range(401-b):
            ni=i+1
            nj=j+a
            nk=k+b
            dp[ni][j][k]=min(dp[ni][j][k], dp[i][j][k])
            dp[ni][nj][nk]=min(dp[i][j][k]+c,dp[ni][nj][nk])

ans=infi
for i in range(1,401):
    if ma*i>400:
        break
    if mb*i>400:
        break    
    ans=min(ans, dp[n][ma*i][mb*i])
print(ans if ans!=infi else -1)
n = int(input())
p = 10**9+7
print((pow(10, n, p) - 2*pow(9, n, p) + pow(8, n, p)) % p

### FIXED CODE ###

n = int(input())
p = 10**9+7
print((pow(10, n, p) - 2*pow(9, n, p) + pow(8, n, p)) % p)