peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
from string import ascii_lowercase
N = int(input())
ans = ['a']
for i in range(1, N):
    ans2 = []
    for a in ans:
        for b in ascii_lowercase[:len(set(a)) + 1]:
            ans2 += [a + b]
    ans = ans2
print('\n'.join(ans))
# Judge status: Accepted
import math
import bisect


def primelist(N):
    prime = [2]
    for i in range(3, N+1):
        flag = 1
        for j in prime:
            if i % j == 0:
                flag = 0
                break
        if flag == 1:
            prime.append(i)
    return prime


X = int(input())
primes = primelist(110000)

print(primes[bisect.bisect_left(primes, X)])
# Judge status: Accepted
N, K = map(int, input().split())
A = input()
ans = (N - 1) // (K - 1)
if (N - 1) % (K - 1) == 0:
    print(ans)
else:
    print(ans + 1)
# Judge status: Accepted
a,b,c=map(int,input().split())
list=[a,b,c]
list.sort()
print(int(list[0]*list[1]/2))
# Judge status: Wrong Answer
n=int(input())
x=list(map(int,input().split()))
m=1000000
for i in range(n):
    su=0
    for j in range(n):
        su+=(x[j]-i-1)**2
    if m>su:
        m=su
print(su)
# Judge status: Accepted
h,w=map(int,input().split())
if h==1 or w==1:
  print(1)
else:
  print((h*w+1)//2)
# Judge status: Accepted
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

import math

print(math.ceil(N/(min(A,B,C,D,E)))+4)
# Judge status: Accepted
import sys
import fractions
input = sys.stdin.readline


def gcd(x, y):
    while y > 0:
        r = x%y
        x = y
        y = r
    return x
 
def lcm(x, y):
    return x//fractions.gcd(x, y)*y
 
n = int(input())
a = list(map(int, input().split()))
 
l = 1
for x in a:
    l = lcm(x, l)
 
ans = 0
for x in a:
    ans += l//x
 
print(ans%(10**9+7))
# Judge status: Accepted
k = int(input())
a, b = map(int,input().split())

ans = 0

for i in range(a,b+1):
    if i%k == 0:
        ans += 1
if ans > 0:  
    print("OK")
else:
    print("NG")
# Judge status: Accepted
h = int(input())
cur = 0
for i in range(100):
  if 2**i > h:
    cur = i
    break
print(2**i-1)
# Judge status: Accepted
n = int(input())
#a = list(map(int, input().split()))
#b = list(map(int, input().split()))
a = []
for i in range(n):
    a.append(int(input()))

b = sorted(a)
m = max(b)

for i in range(n):
    if a[i]==m:
        print(b[-2])
    else:
        print(m)
# Judge status: Wrong Answer
print('Christmas' + int(input()) % 5 * ' Eve')
# Judge status: Accepted
s = input()
ans = "NO"
if s[:7] == "keyence" or s[-7:] == "keyence": ans = "YES"
elif len(s) >= 7:
    k = "keyence"
    for i in range(len(s)):
        if k[i] == s[i]: continue
        else: break
    if s[:i]+s[-(7-i):] == "keyence": ans = "YES"
print(ans)
# Judge status: Wrong Answer
import math

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

mean = math.ceil(sum(x) / n)

ans1 = 0
for i in range(n):
	ans1 += (x[i]-mean) ** 2

if sum(x) % n != 0:
	ans2 = 0
	for i in range(n):
		ans2 += (x[i]-mean) ** 2

	print(min(ans1,ans2))
else:
	print(ans1)
# Judge status: Wrong Answer
s = input()

if s == 'SUN':
    print(7)
elif s == 'MON':
    print(6)
elif s == 'THU':
    print(5)
elif s == 'WED':
    print(4)
elif s == 'THU':
    print(3)
elif s == 'FRI':
    print(2)
else:
    print(1)
# Judge status: Accepted
N, K = map(int, input().split())
p = [int(i) for i in input().split()]

for i in range(N) :
  p[i] = p[i] * (p[i] + 1) // 2 / p[i]
  
p = [0] + p

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

ret = 0
for i in range(K, N + 1) :
  ret = max(ret, p[i] - p[i-K])
  
print(ret)
# Judge status: Wrong Answer
s = input()
s = list(s)
num = len(s)
count = [0] * num
elist = ['L', 'U', 'D']
olist = ['R', 'U', 'D'] 
list = ['L', 'R', 'U', 'D']
ans = ''

for i in range(num):
  i = i + 1
  if i % 2 == 0:
    if elist.count(s[i - 1]) > 0:
      count[i-1] = 1
  else:
    if olist.count(s[i - 1]) > 0:
      count[i-1] = 1

for i in s:
  if list.count(i) > 0:
    if len(set(count)) == 1:
      ans = 'Yes'
    else:
      ans = 'No'
  else:
    ans = 'No'
    
print(ans)
# Judge status: Accepted
alpha = str(input())
lower = [chr(i) for i in range(97, 97+26)]

if alpha in lower:
    print('a')
else:
    print('A')
# Judge status: Wrong Answer
N, A, B, C, D = map(int, input().split())
S = input()
print('No' if '##' in S[A:C-1] or '##' in S[B:D-1] or C == D or C > D and '...' not in S[B-2:] else 'Yes')
# Judge status: Wrong Answer
a, b, c = map(int, input().split())
fiveCount = 0
sevenCount = 0
if a == 5: fiveCount+= 1
if b == 5: fiveCount+= 1
if c == 5: fiveCount+= 1
if a == 7: sevenCount+= 1
if b == 7: sevenCount+= 1
if c == 7: sevenCount+= 1

if fiveCount == 2 and sevenCount == 1:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, M, x, y = map(int, readline().split())
    X = list(map(int, readline().split()))
    Y = list(map(int, readline().split()))

    X.append(x)
    Y.append(y)

    if max(X) < min(Y):
        print('No War')
    else:
        print('War')

    return


if __name__ == '__main__':
    main()
# Judge status: Accepted
n,k,q = map(int, input().split())
a = [int(input()) for _ in range(q)]
ans = [0 for _ in range(n)]
for i in range(q):
    ans[a[i]-1] += 1
for i in range(n):
    if q-ans[i] < k:
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
A,B,K=map(int,input().split())
S=[]
for i in range(1,101):
  if A%i==0 and B%i==0:
    S.append(i)

S.sort(reverse=True)

print(S[K-1])
# Judge status: Accepted
S = input()

N = len(S)
s = S[::-1]
a = S[:((N-1)//2)]
b = S[((N+3)//2)-1:]
c = a[::-1]
d = b[::-1]

if (S == s and a == c):
    if(b == d):
        print('Yes')
    else:
        print('No')
else:
    print('No')
# Judge status: Wrong Answer
#ABC043C
import math
n=int(input())
a = list(map(int, input().split()))
h=math.ceil(sum(a)/len(a))
sum_a=0
for i in range(len(a)):
    sum_a=sum_a+(a[i]-h)**2
print(int(sum_a))
# Judge status: Accepted
def main():
    import sys
    readline = sys.stdin.buffer.readline

    x, y = map(int, readline().split())

    if (x+y) % 3 != 0 or y > 2*x or y < x/2:
        print(0)
        exit()
    
    mod = 10**9 + 7
    xy = (x + y) // 3
    z = min(x-xy, y-xy)
    ans = 1
    for i in range(1, z+1):
        ans = (ans * (xy-i+1)) % mod
        ans = (ans * pow(i, mod-2, mod)) % mod
    print(ans)

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
import collections
w=input()
words=[a for a in w]
c=collections.Counter(words)
values,counts=zip(*c.most_common())
a=sum(counts)
if a%2==0:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
a = int(''.join(input().split()))

if a%4==0:
  print('YES')
else:
  print('NO')
# Judge status: Accepted
a,b = map(int, input().split())

sa=""
for i in range(b):
    sa+=str(a)

sb=""
for i in range(a):
    sb+=str(b)

L=[sa,sb]
L=sorted(L)
print(L[0])
# Judge status: Accepted
s = input()
cnt = 0
if s[0] == "A" and s[2:-1].count("C") == 1:
    for i in range(len(s)):
        if ord(s[i])<=90:
            cnt += 1
    if cnt != 2:
        print("WA")
        quit()
    else:
        print("AC")
else:
    print("WA")
# Judge status: Accepted
"""
author : halo2halo
date : 30, Jan, 2020
"""

import sys
import itertools

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

X,A,B = map(int,readline().split())

print('delicious' if B-A<=0 else 'safe' if B-A<=X else 'dangerous')
# Judge status: Wrong Answer
n = int(input())

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

ans = ""

for i in range(len(s[0])):
    check = 0
    for j in range(n):
        if not s[0][i] in s[j]:
            check = 1
    if check == 0:
        ans = ans + s[0][i]

ans = ''.join(sorted(ans))
print(ans)
# Judge status: Wrong Answer
N=int(input())
A=list(map(int,input().split()))
s=ans=sum(A)
k=0
for i in range(N-1):
    k+=A[i]
    ans=min(ans,abs(s-2*k))
    print(k,ans)
print(ans)
# Judge status: Wrong Answer
a,b = map(int,input().split())
def gcd(x,y):
  while y != 0:
    cur = x
    x = y
    y = cur%y
  return x
t = gcd(a,b)
L = []
for i in range(2,10**5+1):
  while t%i == 0:
    t = t//i
    if i not in L:
      L.append(i)
if t != 1:
  L.append(t)
print(len(L)+1)
# Judge status: Accepted
#import math
#import bisect
#import numpy as np
#import itertools
#import copy
import sys

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

def main():
    n = int(input())
    s = input()

    if n % 2 == 0:
        if s[0:n//2] == s[n//2:n]:
            print('Yes')
        else:
            print('No')
    else:
        print('No')

if __name__ == '__main__':
    main()
# Judge status: Accepted
s = input()
k = len(s)
a = s.count('0')
b = s.count('1')
ans = 0
if a >= b:
  ans = k - a + b
else:
  ans = k + a - b
print(ans)
# Judge status: Accepted
N, M = map(int,input().split())

if N == 1 or M == 1:
    if N + M == 2:
        print(1)
    else:
        print(N*M-2)
else:
    print((N-2)*(M-2))
# Judge status: Accepted
from operator import itemgetter
N, M = map(int, input().split())
P = [[0, 0, 0] for _ in range(M)]
for i in range(M):
    P[i][0], P[i][1] = map(int, input().split())
    P[i][0] = (6-len(str(P[i][0])))*"0"+str(P[i][0])
    
P_s = sorted(P, key=itemgetter(0, 1))

for i in range(1, M):
    if(P_s[i][0] == P_s[i-1][0]):
        P_s[i][2] = P_s[i-1][2]+1
    
for i in range(M):
    print(P[i][0]+(6-len(str(P[i][2]+1)))*"0"+str(P[i][2]+1))
# Judge status: Wrong Answer
#
n = int(input())

def counter(i, j):
    c = 0
    if i == j and i <= n:
        c += 1
    if n >= 10 * i + j and len(str(n)) >= 2:
        c += 1
    if len(str(n)) >= 3:
        if n >= (10 ** (len(str(n)) - 1)) * i + j:
            c += 1
        for o in range(1, len(str(n)) - 1):
            c += 10 ** o
    return c

ans = 0
for k in range(1, 10):
    for l in range(1, 10):
        ans += counter(k, l) * counter(l, k)

print(ans)
# Judge status: Accepted
# max min
n, m, x, y = map(int, input().split())
xs = max(list(map(int, input().split())))
ys = min(list(map(int, input().split())))

print("No War" if xs < ys and x <= xs and ys <= y else "War")
# Judge status: Accepted
N, D = map(int, input().split())
print((N+2*D)//(2*D+1))
# Judge status: Wrong Answer
import numpy as np
 
N, Q = map(int, input().split())
 
S = input()
 
ac = np.zeros(N-1)
 
for i in range(Q):
	l, r = map(int, input().split())
	print(S[l-1:r-1].count('AC'))
# Judge status: Accepted
# -*- coding: utf-8 -*-
"""
Created on Wed Sep  9 16:47:54 2020

@author: liang
"""
INF = 10**6
N = int(input())
B = [INF]+list(map(int,input().split()))+[INF]

ans = 0

for i in range(1,N+1):
    ans += min(B[i-1], B[i])

print(ans)
# Judge status: Accepted
n, x, y = map(int,input().split())

ans = [0]*(n-1)
for i in range(1,n+1):
    for j in range(i+1,n+1):
        ans[min(j-i,abs(x-i)+1+abs(y-j))-1] += 1
        #ans.append(min(j-i,abs(x-i)+1+abs(y-j)))
for k in range(n-1):
    print(ans[k])
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))


# whether we can make wood
m = [1]

flag = True

for i in range(n+1):
    if m[i] < a[i]:
        flag = False
        break
    elif i < n:
        m.append((m[i] - a[i]) * 2)

# count nodes

s = 0

if not flag:
    s = -1

else:
    u = 0

    for i in reversed(range(n+1)):
        s += min(a[i] + u, m[i])
        u += a[i]

print(s)
# Judge status: Accepted
a = list(input())
ctr=0
for i in a:
  if(i=="1"):
    ctr = ctr +1 
print(ctr)
# Judge status: Accepted
s=input()
ans=0
k=""
hantei=""
for i in s:
  k+=i
  if k!=hantei:
    hantei=k
    k=""
    ans+=1
print(ans)
# Judge status: Accepted
# -*- coding: utf-8 -*-

o=input()
e=input()

ans=""
for i in range(len(o)-1):
    ans+=o[i]+e[i]
ans+=o[-1]
if len(o)==len(e):
    ans+=e[-1]
print(ans)
# Judge status: Wrong Answer
n =list(input().split())
print('Yes' if len(set(n))==2 else 'No')
# Judge status: Wrong Answer
S = input()
Q = int(input())
for _ in range(Q):
    query = list(map(str, input().split()))
    if query[0]=='1':
        ''.join(reversed(list(S)))
    else:
        if query[1]=='1':
            S = query[2] + S
        else:
            S = S + query[2]

print(S)
# Judge status: Accepted
n,b= map(int, input().split())

c = n % b

d = abs(c - b)

print(min(c,d))
# Judge status: Accepted
n=int(input())
h=list(map(int,input().split()))

dp=[10**9]*(n+1)


dp[0]=0
for i in range(1,n):
    dp[i]=min(dp[i],dp[i-1]+abs(h[i]-h[i-1]))
    if i>1:
        dp[i]=min(dp[i],dp[i-2]+abs(h[i]-h[i-2]))

print(dp[n-1])
# Judge status: Wrong Answer
input()
a = list(map(int, input().split(' ')))
def solve(a):
    for i in range(len(a)):
        for j in range(len(a)):
            if i != j:
                if (a[i] + a[j]) % 4 == 0:
                    return 'YES'
    return 'NO'
print(solve(a))
# Judge status: Wrong Answer
N = int(input())
T = 0
t = 0
ans = []
for i in range(N-1):
    C, S, F = map(int, input().split())
    for j in range(len(ans)):
        if ans[j] <= S:
            ans[j] = S+C
        else:
            ans[j] = S+(-(S-ans[j])//F)*F+C
    ans.append(S+C)
for a in ans:
    print(a)
print(0)
# Judge status: Accepted
# -*- coding: utf-8 -*-
# 標準入力の取得
N, M = list(map(int, input().split()))
N, M = min(N, M), max(N, M)

# 求解処理
N, M = min(N, M), max(N, M)
result = 0
if N == 1:
    if M == 1:
        result = 1
    else:
        result = M - 2
else:
    result = (N - 2) * (M - 2)

# 結果出力
print(result)
# Judge status: Wrong Answer

n, m = map(int, input().split())

num = [0] * n
for i in range(m):
    s, c = map(int, input().split())
    if num[s - 1] == 0:
        num[s - 1] = c
    else:
        num[s - 1] = min(num[s - 1], c)
    
if num[0] == 0:
    print(-1)
else:
    for i in range(n):
        print(num[i], end="")
# Judge status: Accepted
s, t = map(str,input().split())

ans = t + s
print(ans)
# Judge status: Wrong Answer
N=int(input())
P=list(map(int,input().split()))
min_p=P[0]
cnt=0
for i in range(N):
    if min_p>P[i]:
        min_p=P[i]
    else:
        cnt+=1
print(cnt)
# Judge status: Accepted
import math
N=int(input())
P=list(map(int,input().split()))
Q=list(map(int,input().split()))
p=0
q=0

for i in range(N-1):
  p+=sum(list(1 if P[i]>P[k] else 0 for k in range(i,N)))*math.factorial(N-i-1)
  q+=sum(list(1 if Q[i]>Q[k] else 0 for k in range(i,N)))*math.factorial(N-i-1)
print(abs(p-q))
# Judge status: Accepted
N = int(input())
As = []
Bs = []
for i in range(N):
    a,b = map(int, input().split())
    As.append(a)
    Bs.append(b) 

cnt = 0
for i in range(N-1,-1,-1):
    # print(i,As[i]+cnt, Bs[i],cnt)
    if (As[i]+cnt)%Bs[i] == 0:continue
    cnt += (Bs[i]-(As[i]+cnt)%Bs[i])
print(cnt)
# Judge status: Accepted
from collections import Counter


def combinations_count(n):
    return n*(n-1)//2


if __name__ == "__main__":
    n = int(input())
    a = list(map(int, input().split()))
    c = Counter(a)
    t = 0
    for i in c:
        t += combinations_count(c[i])

    for i in range(n):
        print(t-c[a[i]]+1)
# Judge status: Accepted
x,y=map(int,input().split())
ans=0
while(x<=y):
    x*=2
    ans+=1
print(ans)
#print((y//x).bit_length())
# Judge status: Accepted
N=int(input())
S=[input() for i in range(N)]
print(len(set(S)))
# Judge status: Accepted
import math
a,b,c,d=map(int,input().split())
lcm_cd=(c*d)//math.gcd(c,d)
c_times=b//c-(a-1)//c
d_times=b//d-(a-1)//d
cd_times=b//lcm_cd-(a-1)//lcm_cd
print(b-a+1-c_times-d_times+cd_times)
# Judge status: Accepted
n=int(input())

dp=[[0]*n for _ in range(2)]

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

dp[0][0]=a[0]
dp[1][0]=a[0]+b[0]
for i in range(n-1):
    dp[0][i+1]=dp[0][i]+a[i+1]

for i in range(n-1):
    dp[1][i+1]=max(dp[0][i+1],dp[1][i])+b[i+1]
    
print(dp[1][n-1])
# Judge status: Accepted
n,y = map(int,input().split())
ans = [-1,-1,-1]

for i in range(n+1):
    for j in range(n+1):
            if 10000*i+5000*j+1000*(n-i-j)==y and n-i-j>=0:
                ans = [i,j,n-i-j]

print(*ans)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
happiness = 0
memory = 100
for i in range(N):
  happiness += B[A[i]-1]
  if memory + 1 == A[i]:
    happiness += C[A[i]-2]
  memory = A[i]
print(happiness)
# Judge status: Accepted
*l,k=map(int,open(0))
print('Yay!' if max(l)-min(l)<=k else ':(')
# Judge status: Accepted
from collections import deque
s=deque(input())
q=int(input())
cnt=0
for i in range(q):
  t=input().split()
  if t[0]=="1":
    cnt+=1
  else:
    if (int(t[1])+cnt)%2==1:
      s.appendleft(t[2])
    else:
      s.append(t[2])
      
if cnt%2==1:
  s.reverse()
print("".join(s))
# Judge status: Accepted
from fractions import gcd
N=int(input())
A=[int(i) for i in input().split()]
ans=A[0]
for i in range(N-1):
    ans=gcd(ans,A[i+1])
print(ans)
# Judge status: Wrong Answer
import math
a, b = input().split()
c = a+ b
if a == b == "121":
    print("No")
    exit()
if pow(math.sqrt(int(c)), 2) == int(c):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n = int(input())
al = []
for i in range(n):
  a = int(input())
  al.append(a)
count = 0
i = 0
while (True):
  i = al[i] - 1
  count += 1
  if i == 1:
    break
  if count > n:
    break
if count > n:
  print('-1')
else:
  print(count)
# Judge status: Wrong Answer
X=int(input())
if X==1:
  print(1)
if X==2:
  print(2)
else:
  ans=X//2
  print(ans)
# Judge status: Accepted
N = int(input())
S = input()
x = 0
X = [0]
for i in range(N):
  if S[i] == "I":
    x = x+1
    X.append(x)
  if S[i] == "D":
    x = x-1
    X.append(x)
X.sort(reverse = True)
print(X[0])
# Judge status: Wrong Answer
n,k=map(int,input().split())
curr=1
ans=1
while(curr<k):
  curr*=k
  ans+=1
print(ans)
# Judge status: Accepted
N, K = map(int, input().split())
A = list(map(int, input().split()))

for i in range(K, N):
  if A[i-K] < A[i]:
    print('Yes')
  else:
    print('No')
# Judge status: Accepted
S = input()

while 1:
    for target in ["dream", "dreamer", "erase", "eraser"]:
        if S.endswith(target):
            S = S[:-len(target)]
            break
    else:
        print("NO")
        break
    if len(S) == 0:
        print("YES")
        break
# Judge status: Accepted
from math import gcd as g
n=int(input())
t=[]
for i in range(n):
    t.append(int(input()))
def l(a,b):
    return(a*b//g(a,b))
ans=t[0]
for i in range(n):
    ans=l(ans,t[i])
print(ans)
# Judge status: Wrong Answer
a, b, k = map(int, input().split())
r = range(a, b+1)

print(sorted(set(r[:k]) | set(r[-k:])))
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

for i in A:
  if i%2 == 0 and i%3 != 0 and i%5 != 0:
    print('DENIED')
    exit()
print('APPROVED')
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))

ans = sum(a)
ans2 = 0
for i in range(n):
    if abs((ans - a[i]) - (ans2 + a[i])) < abs(ans - ans2):
        ans2 += a[i]
        ans -= a[i]
    else:
        break

print(abs(ans - ans2))
# Judge status: Accepted
import numpy as np

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

dp = np.zeros(W+1, np.int64)

for i in range(N):
    w, v = map(int, input().split())
    np.maximum(dp[w:], dp[:-w]+v, out=dp[w:])

print(dp[-1])
# Judge status: Accepted
n = int(input())
s = input()
t = s.count("R")*s.count("G")*s.count("B")
for i in range(n):
    for j in range(i+1, n):
        k = 2*j - i
        if k < n and s[i] != s[j] and s[i] != s[k] and s[j] != s[k]:
            t -= 1

print(t)
# Judge status: Accepted
S = str(input())

if ('a' in S) & ('b' in S) & ('c' in S):
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
X = input().strip()
N = len(X)
inds = -1
indt = N
for i in range(N):
    if X[i]=="S":
        inds = i
        break
for i in range(N-1,-1,-1):
    if X[i]=="T":
        indt = i
        break
print(2*max(inds,N-1-indt))
# Judge status: Accepted
X,Y = map(int,input().split())
ans = 0
while Y>=X:
  ans += 1
  X*=2
print(ans)
# Judge status: Wrong Answer
ans=0
a,b=map(int,input().split())
for i in range(1,999):
    ans+=i
    if ans>=a:
        print(ans-a)
        exit(0)
# Judge status: Wrong Answer
import math
a,b,c=map(int,input().split())
if math.sqrt(a)+math.sqrt(b)<math.sqrt(c):
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
n = int(input())

answer = 0
for i in range(n):
  if (i**2) > n:
    answer = (i-1)**2
    break

print(answer)
# Judge status: Accepted
D, T, S = map(int, input().split())

if D <= T * S:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    n = int(readline())
    ans = INF

    for x in range(1, n):
        score = 0
        a = x
        b = n - a
        while a > 0:
            score += a % 10
            a //= 10
        while b > 0:
            score += b % 10
            b //= 10
        ans = min(ans, score)

    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Accepted
a = int(input())
b = [2,1]
for i in range(a-1):
  b.append(b[i]+b[i+1])
print(b[-1])
# Judge status: Accepted
s = {}
s["a"] = list(input())
s["b"] = list(input())
s["c"] = list(input())

turn = "a"
while len(s[turn]) > 0:
    turn = s[turn].pop(0)

print(turn.upper())
# Judge status: Wrong Answer
import collections
N = int(input())
s = []
for i in range(N):
  s.append(input())
s.sort()


ans = 0

for m in range(N):
  for n in range(m+1,N):
    if collections.Counter(s[m]) == collections.Counter(s[n]):
      ans += 1
    else:
      break

print(ans)
# Judge status: Accepted
x = int(input())

def get_primes(x):
    while True:
        for i in range(2, x):
            if x%i == 0:
                break
        else:
            yield x
        x += 1

i = get_primes(x)
print(next(i))
# Judge status: Wrong Answer
k=int(input())
f=-1
for i in range(1,100000):
    s=k*i
    l=len(str(s))
    for i in range(l):
        if str(s).count('7')==l:
            f=l
            break
print(f)
# Judge status: Accepted
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc131/tasks/abc131_b

n, l = [int(x) for x in input().split()]
a = [(i, l + i) for i in range(n)]
a.sort(key=lambda x: abs(x[1]))
a.pop(0)
print(sum([x[1] for x in a]))
# Judge status: Wrong Answer
N = int(input())
P = list(map(int, input().split()))
P_sorted = sorted(P)

if P == P_sorted:
    print("YES")
else:
    i = P.index(1)
    P[0], P[i] = P[i], P[0]

    if P == P_sorted:
        print("YES")
    else:
        print("NO")
# Judge status: Accepted
import math
import collections
import fractions
import itertools

def solve():
    n = int(input())
    a = list(map(int, input().split()))
    c = collections.Counter(a)
    ans = 0
    for i in c:
        if c[i] >= i:
            ans += c[i] - i
        else:
            ans += c[i]
    print(ans)
    return 0

if __name__ == '__main__':
    solve()
# Judge status: Accepted
from bisect import bisect_left,bisect_right
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
a.sort()
b.sort()
c.sort()
ans=0
for i in range(n):
    A=bisect_left(a,b[i])
    C=n-bisect_right(c,b[i])
    ans+=A*C
print(ans)
# Judge status: Accepted
s = list(input())
t = list(input())

s.sort()
t.sort(reverse=True)

if s < t:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
N, M = map(int, input().split())


if min(N, M) == 1:
    if max(N, M) > 1:
        print(max(N, M) - 2)
    else:
        print(1)
else:
    print(N * M - 4 - (N - 2) * 2 - (M - 2) * 2)
# Judge status: Wrong Answer
L = []
for _ in range(5):
  L.append(int(input()))

L.sort()

for i in range(5):
  L[i] += 10*(4-i)

print(max(L))
# Judge status: Wrong Answer
N, R = map(int, input().split())

if N < 10:
    ans = R + 100 * (10 - N)
else:
    ans = N

print(ans)
# Judge status: Wrong Answer
S = input(str("Input text: "))
S = S.lower()
if 3 <= len(S) <= 20:
    print(S[:3])