peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
def main():
    s = input()
    dic = {}
    for v in s:
        dic.setdefault(v, 0)
        dic[v] += 1
        if dic[v] == 2:
            print('no')
            exit()
    print('yes')

if __name__ == '__main__':
    main()
# Judge status: Accepted
n = int(input())
tbl=[[0 for j in range(10)] for i in range(10)]
for i in range(1,n+1):
    s= str(i)
    h=int(s[0])
    b=int(s[-1])
    tbl[h][b]+=1
ans = 0
for i in range(10):
    for j in range(10):
        ans+=tbl[i][j]*tbl[j][i]
print(ans)
# Judge status: Wrong Answer
n, m = map(int, input().split())
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]
flag = 0
for i in range(n-m+1):
    for j in range(n-m+1):
        for k in range(m):
            if a[j+k][i:i+m]!=b[k]:
                break
            else:
                flag = 1
print("Yes" if flag else "No")
# Judge status: Accepted
from collections import Counter

N = int(input())
S = input()

mod = 10**9+7

cnt = Counter(S)

res = 1
for v in cnt.values():
    res *= v+1
    res %= mod

print((res-1)%mod)
# Judge status: Accepted
A, B = map(int,input().split())

if (A + B) % 2 == 0:
    print(int((A+B)/2))
else:
    print("IMPOSSIBLE")
# Judge status: Accepted
a,b,c,d=map(int,input().split())
if abs(b-c)<=d & abs(a-b)<=d:
    print('Yes')
elif abs(a-c)<=d:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
ABC=[x for x in input().rstrip().split()]
ABC.sort(reverse=True)
ab=ABC[0]+ABC[1]
c=ABC[2]
print(int(ab)+int(c))
# Judge status: Wrong Answer
a = int(input("半径"))

a *= a
print(a)
# Judge status: Accepted
N = int(input())
d = list(map(int, input().split()))
d.sort()
print(d[N//2]-d[N//2-1])
# Judge status: Wrong Answer
n = int(input())
#indexが負の場合、末尾から参照されるので多めにとる
dp = [0]*100200
dp[0] = 1
for i in range(0,100000):
    if dp[i-105]:
        dp[i] = 1
    if dp[i-104]:
        dp[i] = 1
    if dp[i-103]:
        dp[i] = 1
    if dp[i-102]:
        dp[i] = 1
    if dp[i-101]:
        dp[i] = 1
    if dp[i-100]:
        dp[i] = 1

print(dp[n])
# Judge status: Accepted
n, y = (int(x) for x in input().split())
ans = 0
m = y // 10000 + 1
for i in reversed(range(m)):
    for j in range(n-i+1):
        if 10000*i + 5000*j + 1000*(n-i-j) == y:
            ans = [i, j, n-i-j]
            break
    if ans != 0:
        break
if ans == 0: print(*[-1, -1, -1])
else: print(*ans)
# Judge status: Accepted
import sys
sys.setrecursionlimit(10000000)
MOD = 10 ** 9 + 7
INF = 10 ** 15

def main():
	a,b = map(int,input().split())
	idx = b - a
	ans = 0
	for i in range(idx):
		ans += i
	ans -= a
	print(ans)
	

if __name__ == '__main__':
	main()
# Judge status: Accepted
import numpy as np
import math
from fractions import gcd
n,m = map(int,input().split())
a = np.array(input().split(),dtype=int)
a /= 2

def t_per2(k):
    return format(k,'b')[::-1].find('1')

f = False
dcm = a[0]
t_2 = t_per2(a[0])
for i in a:
    dcm = (dcm*i)//gcd(dcm,i)
    if dcm > m or not t_per2(i) == t_2:
        f = True
        break

count = 0
if not f:
    count = math.ceil(int(m/dcm)/2)

print(count)
# Judge status: Accepted
s = list(input())
n = len(s)
for i in range(n):
  s[i] = int(s[i])
ones = sum(s)
zeros = n-sum(s)
print(min(ones,zeros)*2)
# Judge status: Wrong Answer
a,b=map(int,input().split())
print(max(a,b)*2-1)
# Judge status: Accepted
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
a1 ,a2 ,a3 = i2()
print("bust" if a1 + a2 + a3 >= 22 else "win")
# Judge status: Wrong Answer
n = int(input())
 
a = n//4
b = n//7
ans =0

if a == 0 or b == 0:
  print('No')
  exit()

for i in range(a+1):
  for j in range(b+1):
    if i*4+j*7 == n:
      ans += 1
      break
if ans == 1:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
n,m=map(int,input().split())
if n!=1 and m!=1:
    print((n-2)*(m-2))
elif n==m==1:
    print(1)
else:
    print(max(n,m)-2)
# Judge status: Accepted
#!/usr/bin/env python3
N, K = map(int, input().split())
A = list(map(int, input().split()))

if K > 41:
    K = 41

for k in range(K):
    D = [0]*N

    for i in range(N):
        left = max(i - A[i], 0)
        right = min(i + A[i], N-1)
        D[left] += 1
        if right + 1 < N: D[right+1] -= 1
    

    for i in range(1, N):
        D[i] += D[i-1]
    A = D


print(' '.join(map(str,A)))
# Judge status: Accepted
from itertools import product
import numpy as np


N, M, X = list(map(int, input().split()))
INF = 10**5 * 12 + 1
books = np.array([list(map(int, input().split())) for i in range(N)])
ans = INF
for selection in product([0, 1], repeat=N):
    selection = np.array(selection).reshape(N, 1)
    res = (books * selection).sum(axis=0)
    if min(res[1:]) >= X:
        ans = min(ans, res[0])
print(ans if ans != INF else -1)
# Judge status: Accepted
n = int(input())
l = list(map(int, input().split()))
c_dic={}
for i in l:
    if i in c_dic:
        c_dic[i]+=1
    else:
        c_dic[i]=1
c_l=[]
for i,j in c_dic.items():
    if j>=2:
        c_l.append(i)
    if j>=4:
        c_l.append(i)
c_l.sort(reverse=True)
if len(c_l)<2:
    print(0)
else:
    print(c_l[0]*c_l[1])
# Judge status: Accepted
(a,b,c) = map(int,input().split())
if min(a,b) <= c <= max(a,b):
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
A,B,K = map(int,input().split())
list=[]
for i in range(1,101):
    if A%i==0 and B%i==0:
        list.append(i)
list.sort(reverse=True)
print(list)
print(list[K-1])
# Judge status: Accepted
N=int(input())

p=10**9+7
pow=1
for i in range(1,N+1):
  pow=pow*i % p

print(pow)
# Judge status: Accepted
def main():
  N,t=int(input()),0
  for x in range(1,N+1):
    t+=(N//x)*(N//x+1)*x//2
  print(t)

main()
# Judge status: Wrong Answer
N,K,S=map(int, input().split())
ans=[0]*N
if K==0:
    if S==10**9:
        for i in range(N):
            ans[i]=1
    else:
        for i in range(N):
            ans[i]=S
else:
    for i in range(K):
        ans[i]=S
    if S==10**9:
        for i in range(K,N):
            ans[i]=1
    else:
        for i in range(K,N):
            ans[i]=S+1
print(*ans)
# Judge status: Accepted
def kaibun(s):
    l=len(str(s))
    check=list(s)
    half=l//2
    a=check[:half]
    b=check[::-1][:half]
    if a==b:
        return True
    return False

a,b=[int(i) for i in input().split()]
ans=0
for i in range(a,b+1):
    if kaibun(str(i)):
        ans+=1
print(ans)
# Judge status: Accepted
#!/usr/bin/python3
# -*- coding:utf-8 -*-

def main():
  l, r = map(int, input().strip().split())
  x = 2019
  remains = [l%x]
  for i in range(l+1, r+1):
    remain = i % x
    if remains[0] == remain:
      break
    remains.append(remain)
    
  min = x
  for i in range(len(remains)-1):
    for j in range(i+1, len(remains)):
      remain = (remains[i] * remains[j]) % x
      if remain < min:
        min = remain
  print(min)

if __name__=='__main__':
  main()
# Judge status: Wrong Answer
n,k = map(int,input().split())

for i in range(n):
    a,b = map(int,input().split())
    k -= b
    
    if k <= 0:
        print(a)
        exit()
# Judge status: Wrong Answer
from sys import stdin,setrecursionlimit
setrecursionlimit(10**6) 
n = int(stdin.readline().rstrip())
point = 0
def otsuri(n,point):
    now = 0
    while True:
        if 10**(now)<= n < 10**(now+1):
            break
        else:
            now += 1
    if n-10**(now)<10:
        point += n-10**(now)
        return point
    else:
        point += now
        return otsuri(n-10**(now),point)
print(otsuri(n,0))
# Judge status: Wrong Answer
N, R = map(int,input().split())

if N>=10:
  print(R)
else:
  print(10-R/100)
# Judge status: Wrong Answer
N, M = map(int, input().split())
count = 0
# まず，変換しないで行けるやつをできるだけ
if M >= 2*N:
    count += N
    M -= 2*N
else:
    count += N//2
    print(count)
    exit()

count += M//4
print(count)
# Judge status: Wrong Answer
def main():
    n = int(input())
    dp = [None]*n
    dp[0] = 1
    nl = list(sorted([6**i for i in range(10) if (6**i)<=n]+[9**i for i in range(1, 10) if (9**i)<=n]))
    for i in range(1, n):
        d = 10**15
        for j in nl:
            if j > i:
                break
            d = min(d, 1+dp[i-j])
        dp[i] = d
    print(dp[n-1])

if __name__ == "__main__":
    main()
# Judge status: Accepted
import math
N, AE = int(input()), [int(input()) for _ in range(5)]
print(math.ceil(N / min(AE)) + 4)
# Judge status: Accepted
x=list(map(int,input().split()))

for i in range(5):
  if x[i]!=(i+1):
    print(i+1)
# Judge status: Accepted
print('Heisei' if input() <= '2019/04/30' else 'TBD')
# Judge status: Accepted
count1 = 0
count2 = 0
N, A, B = map(int, input().split())
S = list(input())
for i in S:
  if i == "a" and A + B > count1:
    print("Yes")
    count1 += 1
  elif i == "b" and A + B > count1 and B > count2:
    print("Yes")
    count1 += 1
    count2 += 1
  else :
    print("No")
# Judge status: Wrong Answer
import statistics
a, b, c = map(int, input().split())

mn = min(a, b, c)
md = statistics.median([a, b, c])
mx = max(a, b, c)

if (md - mn) % 2 == 0:
    print((md - mn) // 2 + (mx - md))
else:
    print((md + 1 - mn) // 2 + (mx - 2 - md) + 2)
# Judge status: Wrong Answer
N=int(input())
a=input().split()
numbers=[int(b) for b in a]
kazu=0
suuji=0
for z in numbers:
    if z%2==0:
        kazu+=1
for y in numbers:
    if y%4==0:
        suuji+=1
if kazu==N:
    print('Yes')
elif suuji>=N//2:
    print('Yes')
elif kazu>=N-suuji*2:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
import math

N = int(input())

Nsq = math.floor(math.sqrt(N-1))

count = 0
for i in range(1, Nsq + 1):
    a = (N - 1) // i - (i-1)
    count = count + a

count = count * 2 - Nsq
print(count)
# Judge status: Wrong Answer
def nC2(n):
    return n*(n-1)/2

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

cnt = [0]*(n+1)
total = 0
ans = 0

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

for i in range(n):
    total += nC2(cnt[i])

for i in range(n):
    print(total - nC2(cnt[a[i]]) + nC2(cnt[a[i]] - 1))
# Judge status: Accepted
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
#sys.setrecursionlimit(10**8)


def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    h = gete(int)
    w = gete(int)
    n = gete(int)

    if h < w:
        h, w = w, h

    print((h + n - 1) // h)


if __name__ == "__main__":
    main()
# Judge status: Accepted
import sys
q, h, s, d = [int(i) for i in sys.stdin.readline().split()]
n = int(input())
if h > q * 2:
    h = q * 2
if s > h * 2:
    s = h * 2
if d > s * 2:
    d = s * 2
_sum = 0
ls = [(0.25, q), (0.5, h), (1, s), (2, d)]
ls.reverse()
ind = 0
while n:
    cur = ls[ind]
    _sum += cur[1] * (n // cur[0])
    n %= cur[0]
    ind += 1
print(_sum)
# Judge status: Accepted
k,x = map(int,input().split())
if 500*k >= x:print('Yes')
else:print('No')
# Judge status: Wrong Answer

def abc173_a():
    N = int(input())

    #N = 1900
    print(1000-N%1000)






abc173_a()
# Judge status: Accepted
n,a,b=map(int,input().split())
if n>1 and b>=a or n==1 and a==b: 
    print ((n-2)*(b-a)+1);
else:
    print ("0");
# Judge status: Accepted
import math
import itertools
 
N = int(input())
XY = [list(map(int, input().split())) for x in range(N)]
 
P = list(itertools.permutations(XY, N))
 
total = 0
for p in P:
    for i in range(1, N):
        a = p[i - 1]
        b = p[i]
        total += math.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)
        
ans = total / len(P)
print(ans)
# Judge status: Accepted
S = input()
N = len(S)
l = []
for i in range(N):
    if S[i] == "A" or S[i] == "C" or S[i] == "G" or S[i] == "T":
        l.append(1)
    else:
        l.append(0)

#print(l)

ans = 0

for i in range(N):
    for j in range(i, N):
        tf = True
        for k in range(i, j + 1):
            if l[k] == 0:
                tf = False
        if tf == True:
            ans = max(ans, j - i + 1)
print(ans)
# Judge status: Wrong Answer
def ip():return int(input())
ans=0
m=9
for i in range(5):
    a=ip()
    ans+=a
    if ans%10!=0:ans=(ans//10+1)*10
    if a%10>0:m=min(m,a%10)
print(ans-(10-m))
# Judge status: Accepted
*a,=map(int,[*open(0)][1].split())
c=[s:=0]
for i in a[:0:-1]:c+=c[-1]+i,
b=1
for a in a:
  if b<a:
    s=-1
    break
  s+=b
  b=min(c.pop(),(b-a)*2)
print(s)
# Judge status: Accepted
n, m = map(int, input().split())
a = [True]*(n+1)
for _ in range(m):
    i = int(input())
    a[i] = False

dp = [0]*(n+1)
dp[0] = 1

for i in range(n):
    for j in range(i+1, min(n+1, i+3)):
        if a[j]:
            dp[j] += dp[i]
            dp[j] %= 10**9+7

print(dp[n])
# Judge status: Accepted
A,B,C,D = map(int, input().split())

while A > 0 or C > 0:
    C -= B
    if C <= 0:
        print("Yes")
        break
    A -= D
    if A <= 0:
        print("No")
        break
# Judge status: Accepted
N = int(input())
H = list(map(int, input().split()))
H[-1] += 1
for i in range(N - 2, 0, -1):
    if H[i] == H[i + 1]:
        continue
    elif H[i] < H[i + 1]:
        H[i] += 1
    else:
        print("No")
        break
else:
    print("Yes")
# Judge status: Wrong Answer
a,b,c = input().split()

score = 1
if a != b:
	score = score + 1
elif a !=c:
	score = score + 1
else:
	score = score
print(score)
# Judge status: Accepted
x = int(input())
if x%11 == 0:
    ans = (x//11)*2
elif x%11 <= 6:
    ans = (x//11)*2 + 1
else:
    ans = (x//11)*2 + 2
print(ans)
# Judge status: Wrong Answer
line=input()
n,k=map(int,line.split())
sums=0
while k!=(n+2):
     if k==1:
          mini=1
     if k>=2:
          mini=(((k)*(k-1))/2)#%((10**9)+7)
     maxi=( (((n+1)*(n)) - ((n+1-k)*(n-k)) )/2  )#%((10**9)+7)
     sums+=(maxi-mini+1)
     sums=sums%((10**9)+7)
     k+=1
print(int(sums))
# Judge status: Wrong Answer
N = int(input())
a = 0
for i in range(N,999):
  if i == 111 or i == 222 or i == 333 or i ==444 or i ==555 or i == 666 or i ==777 or i ==888 or i == 999:
    a = i
    break
print(a)
# Judge status: Accepted
n,m=map(int,input().split())
AB=[list(map(int,input().split())) for i in range(n)]
CD=[list(map(int,input().split())) for i in range(m)]
ans=[0]*n
for i in range(n):
    cnt=float('inf')
    dist=0
    a,b=AB[i]
    for j in range(m):
        c,d=CD[j]
        dist=abs(a-c)+abs(b-d)
        if cnt>dist:
            ans[i]=j
            cnt=dist
        else:
            continue
for i in range(n):
    print(ans[i]+1)
# Judge status: Accepted
# import numpy as np
# import math
# import copy
import sys
# input = sys.stdin.readline
# sys.setrecursionlimit(10000)


def main():
    C = input()
    alpha = 'abcdefghijklmnopqrstuvwxyz'

    for i in range(len(alpha)):
        if C == alpha[i]:
            print(alpha[i+1])
            break



main()
# Judge status: Accepted
#python3
from collections import defaultdict
from operator import itemgetter

def main():
    n = int(input())
    a = [input() for _ in range(n)]
    s = defaultdict(int)
    for i in a:
        s[i]+=1  
    
    t = []
    for i, j in s.items():
        t.append((i, j))

    t.sort(reverse=True,key=itemgetter(1))
    MAX = t[0][1]
    ans = []
    for i, j in t:
        if j == MAX:
            ans.append(i)
    ans.sort()
    for i in ans:
        print(i)
main()
# Judge status: Accepted
N=("0"+input())[::-1]
ans=0
kuriagari=0
for i in range(len(N)):
  n=int(N[i])+kuriagari
  if n==5:
    if i+1<len(N):
      if int(N[i+1])>=5:
        ans+=(10-n)
        kuriagari=1
      else:
        ans+=n
        kuriagari=0
    else:
      ans+=n
      kuriagari=0
  elif n<=5:
    ans+=n
    kuriagari=0
  else:
    ans+=(10-n)
    kuriagari=1

print(ans)
# Judge status: Wrong Answer
N = int(input())
n_l = [1]
n = 1
A = [int(a) for a in input().split()]
for i in range(1,N+1):
    a = A[i-1]
    n = (n - a) * 2
    n_l.append(n)
    if n <= 0:
        Good = False
        break
if n > A[N]:
    counter = A[N]
    m = A[N]
    Good = True
else:
    Good = False
if Good:
    for i in range(N-1,-1,-1):
        n = n_l[i]
        m = min(m+A[i],n)
        counter += m
    print(counter)
else:
    print(-1)
# Judge status: Accepted
s=list(input())
if "a" in s:
    if "b" in s:
        if "c" in s:
            print("Yes")
            exit()
print("No")
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

def solve(N,A,B):
    ans = 0
    for i in range(N):
        battle = min(A[i],B[i])
        B[i] -= battle
        ans += battle
        nex = min(A[i+1],B[i])
        A[i] -= nex
        ans += nex
    return ans
print(solve(N,A,B))
# Judge status: Wrong Answer
N, H = map(int, input().split())
l = []
A = []
B = []
for i in range(N):
  a, b = map(int, input().split())
  A.append(a)
  B.append(b)

B.sort(reverse=True)
if sum(B) >= H:
  ans = 0
  for i in range(N):
    H -= B[i]
    ans += 1
    if H <= 0:
      break
else:
  ans = 0
  n = max(A)
  for i in range(N):
    if B[i] > n:
      ans += 1
      H -= B[i]
    else:
      break
  ans += H // n
  if H % n != 0:
    ans += 1
print(ans)
# Judge status: Wrong Answer
ans = set([1, 2, 3])
a = set(map(int,input().split()))
b = ans - a
b = list(b)
print(b[0])
# Judge status: Wrong Answer
n = int(input())
s = input()
t = input()

tmp = -1
for i in range(n):
    print(s[-i - 1:], t[:i + 1])
    if s[-i - 1:] == t[:i + 1]:
        tmp = i


print(n + n - (tmp + 1))
# Judge status: Wrong Answer
terms, graded_terms = input().split(" ")
grade_list = [i for i in input().split(" ")]
x1 = 0
x2 = int(graded_terms)
for i in range(int(terms)-int(graded_terms)):
    if grade_list[int(x2)] > grade_list[int(x1)]:
        print("Yes")
    else:
        print("No")
    x1 += 1
    x2 += 1
# Judge status: Wrong Answer
n=input()
l=len(n)
if len(n)==1:
  print(n)
  exit()
if int(n)!=int(str(9)*l):
  print(9*(l-1)+int(n[0])-1)
elif int(n)==int(str(9)*l):
  print(9*l)
# Judge status: Accepted
n, m = map(int, input().split())
query = [tuple(input().split()) for _ in range(m)]
 
wa = [0] * n
ac = [0] * n
for p, result in query:
    p = int(p) - 1
    if result == 'AC':
        ac[p] = 1
    if result == 'WA' and ac[p] == 0:
        wa[p] += 1
 
accept = 0
penalty = 0
for i in range(n):
    if ac[i]:
        penalty += wa[i]
        accept += 1
 
print(accept, penalty)
# Judge status: Wrong Answer
def sumDigits(i):
    s = 0
    while i > 0:
        s += (i % 10)
        i = int(i / 10)
    return s

N = int(input())

m = 9 * 6
for i in range(2, N + 1):
    k = N - i
    if k > 1:
        m = min(m, sumDigits(i) + sumDigits(k))

print(m)
# Judge status: Accepted
S = input()
 
answer = S[0:3] + "8" + S[4:10]
 
print(answer)
# Judge status: Accepted
x = int(input())
if (x == 3 or x == 5 or x == 7):
   print('YES')
else:
   print('NO')
# Judge status: Wrong Answer
a =int(input())
if a <= 3200:
    print('s')
else:
    print('red')
# Judge status: Accepted
n, x = map(int, input().split())
l = list(map(int, input().split()))

ans = 1
d = 0
for i in range(n):
    d += l[i]
    if d <= x:
        ans += 1
print(ans)
# Judge status: Wrong Answer
a=input()
b=input()
#print(''.join(sorted(a)),(sorted(a)))
if ''.join(sorted(a))==''.join(sorted(b)):
	print('Yes')
else:
	print('No')
# Judge status: Wrong Answer
import numpy as np
N = int(input())
cnt = np.ones(N+1, dtype=np.int)
for n in range(2, N//2+1):
    cnt[::n] += 1
cnt[N//2+1:] += 1
print(sum(np.arange(1, N+1) * cnt[1:]))
# Judge status: Wrong Answer
"""
int(input())
map(int, input().split())
list(map(int, input().split()))
input()
input().split()
"""


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

ans = 0
if (a.count(1)-1 > 0): ans += a.count(1)-1 
for i in range(2,n+1):
    tmp = a.count(i)%i
    ans += tmp

print(ans)
# Judge status: Wrong Answer
from math import gcd

def lcm(a, b):
    return (a * b) // gcd(a, b)

n = int(input())
if n > 90:
    n = 180 - n

x = lcm(n, 360)

print(x // n)
# Judge status: Wrong Answer
A, B, C, K = map(int, input().split()) 
if K==0:
    if abs(A-B)<10**18:
        print(A-B)
    else:
        print("Unfair")
else:
    if abs(B-A)<10**18:
        print(B-A)
    else:
        print("Unfair")
# Judge status: Accepted
S=str(input())
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:
    print("Bad")
else:
    print("Good")
# Judge status: Wrong Answer
x = int(input())
data = [0]

for i in range(1, x + 1):
  data.append(1)

print(data)

for i in range(2,x + 1):
  for d in range(1, x + 1):
    if d % i == 0:
      data[d] = data[d] + 1

print(data)

ban = 0
ans = 0

for i in data:
  ans = ans + ban * i
  ban += 1

print(ans)
# Judge status: Wrong Answer
x, y = list(map(int,input().split()))
if x in [1,3,5,7,8,10,12] and x in [1,3,5,7,8,10,12] or x in [4,6,9,11] and y in [4,6,9,11] or x == 2 and y == 2:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
judge=bool(abs(a-b)<=(v-w)*t)
if judge:
    print("YES")
else:
    print("NO")
# Judge status: Wrong Answer
from decimal import *
getcontext().prec = 100
import numpy as np
n = int(input())
a_list = list(map(int,input().split()))
import math
result = 0
check = True
for a in a_list:
  if a == 0:
    check = False
    break
  else:
    result += Decimal(math.log10(a))
if check == False:
  print(0)
elif result > 18:
  print(-1)
else:
  print(int(10**result))
# Judge status: Wrong Answer
import sys
import math
from fractions import gcd

def lcm(a, b):
  return (a * b) // gcd(a, b)

a,b,c,d = [int(x) for x in sys.stdin.readline().rstrip().split(" ")]
e = b - a + 1
f = int(b / c) - int((a - 1) / c)
g = int(b / d) - int((a - 1) / d)
cd = lcm(c, d) 
h = int(b / cd) - int((a - 1) / cd)
n = e - f - g + h 
print(n)
# Judge status: Wrong Answer
# cook your dish here
from math import log2
n=int(input())
k=round(log2(n))
if int(k)==k:
    print(pow(2,k+1)-1)
else:
    print(pow(2,k)-1)
# Judge status: Accepted
s = list(input())
t = list(input())
s.sort()
t.sort(reverse=True)
s = "".join(s)
t = "".join(t)
if t > s:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
N = input()
if len(N) == 1:
    print(N)
    exit()
ans = (len(N) - 1) * 9
if N[0] != '9':
    ans += int(N[0]) - 1
else:
    for i in range(1, len(N)):
        if N[i] != '9':
            ans += int(N[i - 1]) - 1
            break
    else:
        ans += 9
print(ans)
# Judge status: Accepted
k=int(input())
a,b=map(int,input().split())
if ((b-a)>=k):
  print('OK')
elif (a%k==0) or (b%k==0):
  print('OK')
elif(a<(a//k)*k+k<b):
  print('OK')
else:
  print('NG')
# Judge status: Accepted
n = int(input())
r = list(map(int, input().split()))

num = 0
flag = 0

while True:
  for k in range(n):
    if not r[k] % 2:
      r[k] /= 2
    else:
      flag = 1
  if flag:
    break
  num += 1

print(num)
# Judge status: Wrong Answer
k = int(input())
a, b = map(int, input().split())
if k - 1 <= b - a:
    print("OK")
else:
    for i in range(a, b + 1):
        if i % k == 0:
            print("OK")
            break
    else:
        print("NO")
# Judge status: Accepted
print("YNEOS"[input()!=input()[::-1]::2])
# Judge status: Accepted
from fractions import gcd
def lcm(a,b):
  return a*b//gcd(a,b)
n=int(input())
a=list(map(int,input().split()))
ans=0
mod=10**9+7
l=a[0]
for i in range(1,n):
  l=lcm(l,a[i])
l%=mod
for aa in a:
  #　mod(10**9+7)逆元
  ans+=l*pow(aa,mod-2,mod)%mod
  ans%=mod
print(ans)
# Judge status: Wrong Answer
A, B, C=map(str,input().split())

x = [int(A), int(B), int(C)]

if (x.count(5) == 2) and (x.count(7) == 1):
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
number = int(input())
values = [int(i) for i in input().split()]


max = max(values)
min = min(values)

def answer(values, max, min):
  sum = 0
  if max == min: 
    return 0
  if max < min:
    return min
  average = max / 2
  for index in range(len(values)):
    if max > values[index] > average:
      sum += int(max) - values[index]

  return sum + answer(values,average,min) 

temp = answer(values, max, min)
print(temp)