peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
num = [A[0]]
for a in A[1:]:
    num += [a] * 2

ans = sum(num[:N-1])
print(ans)
# Judge status: Accepted
from collections import Counter
N = int(input())
S = []
for _ in range(N):
  S.append(input())
C = Counter(S).most_common()
_,M = C[0]
L = []
for a,b in C:
  if b == M:
    L.append(a)
print(*sorted(L) ,sep = "\n")
# Judge status: Accepted
y,m,d=map(int,input().split("/"))
from datetime import date
d1 = date(y, m, d)
d2 = date(2019, 4, 30)
print ("Heisei" if d1 <= d2 else "TBD")
# Judge status: Accepted
from decimal import *

a, b = map(str, input().split())
a, b = Decimal(a), Decimal(b)


print(a*b // 1)
# Judge status: Accepted
n=int(input())
cnt=0
p=[int(x) for x in input().rstrip().split()]
for i in range(1,n-1):
  if p[i-1]<p[i]<p[i+1] or p[i+1]<p[i]<p[i-1]:
    cnt+=1
print(cnt)
# Judge status: Accepted
x = input()
a, b = int(x[0:2]), int(x[2:4])
flag = 0
ans = ["AMBIGUOUS", "YYMM", "MMYY", "NA"]

if (a >= 1 and a <= 12) and (b >= 1 and b <= 12):
    flag = 0
elif (a == 0 and b > 12) or (b == 0 and a > 12) or (b > 12 and a > 12) or (b == 0 and a == 0):
    flag = 3
elif ((a > 0 and a <= 12) and (b >= 13)) or (b == 0 and (a >= 1 and a <= 12)):
    flag = 2
elif ((a >= 13) and (b > 0 and b <= 12)) or (a == 0 and (b >= 1 and b <= 12)):
    flag = 1


print(ans[flag])
# Judge status: Accepted
import sys


N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)

ope = [list(map(int, x.split())) for x in sys.stdin.readlines()]

ope.sort(key=lambda x: -x[1])

mp = 0
ap = 0
cnt = 0
ans = 0

while cnt < N:
    a = A[ap]
    m = ope[mp][1] if mp < M else 0

    if m >= a:
        mc = min(ope[mp][0], N - cnt)
        ans += m * mc
        cnt += mc
        mp += 1
    else:
        ans += a
        cnt += 1
        ap += 1

print(ans)
# Judge status: Accepted
A, B, K = map(int,input().split())
left = A + K - 1
right = B - K + 1
if left < right:
    for i in range(A, left + 1):
        print(i)
    for i in range(right, B + 1):
        print(i)
else:
    for i in range(A, B + 1):
        print(i)
# Judge status: Accepted
n = int(input())

ans = sum(range(1, n+1)) - sum(range(3, n+1, 3)) - sum(range(5, n+1, 5)) + sum(range(15, n+1, 15))

print(ans)
# Judge status: Accepted
N,K = map(int,input().split())
H=list(map(int,input().split()))
INF=1000000000
dp=[INF]*(N+1)
dp[0]=0
for i in range(1,N):
  for j in range(1,K+1):
    if (i-j)>=0:
      dp[i]=min(dp[i],dp[i-j]+abs(H[i-j]-H[i]))
print(dp[N-1])
# Judge status: Accepted
a,b,c,x,y=map(int,input().split())
m=10**10
for i in range(10**6):
    m=min(m,2*c*i+a*max(0,x-i)+b*max(0,y-i))
print(m)
# Judge status: Accepted
k =int(input())
s =input()
ans = ''
if k>len(s):
  k = len(s)
for i in range (k):
  ans = ans+s[i]

if k<len(s):
  print(ans+'...')
else:
  print(ans)
# Judge status: Wrong Answer
X = int(input())

#x^5-y^5=(x-y)(x^4+x^3y+x^2y^2+xy^3+y^4)

#for x in range(1, 121):
#  if ((x**5) - ((x-1)**5)) >= 1000000000:
#    print(x)

for a in range(0, 121):
  for b in reversed(range(-121, 120)):
    if b**5 == a**5-X:
      print(a, b)
      break
# Judge status: Accepted
S = input()
ans = ''
for s in S:
    if s == 'B':
        ans = ans[:-1]
    else:
        ans += s
print(ans)
# Judge status: Accepted
n = int(input())
li = []

for i in range(1,32):
    for j in range(2,11):
        x = i**j
        if x <= 1000:
            li.append(x)

li.sort()

for i in range(len(li)):
    if li[i] == n:
        print(n)
        exit()
    elif li[i] > n:
        print(li[i-1])
        exit()
# Judge status: Accepted
import sys
N, *AB = [int(x) for x in input().split()]
As, Bs, Ag, Bg = map(lambda x : x - 1, AB)
S = input()
for (s, g) in [(As, Ag), (Bs, Bg)]:
    if '##' in S[s : g + 1]:
        print("No")
        sys.exit()

if Bg < Ag:  # AがBを飛び越える必要がある
    if '...' not in S[Bs - 1 : Bg + 2]:
        print("No")
        sys.exit()

print("Yes")
# Judge status: Wrong Answer
N = input()
if "9" in N:
  print("YES")
else:
  print("NO")
# Judge status: Wrong Answer
S=list(input())
S.sort()
print('Yes' if (S[0]==S[1] and S[2]==S[3]) else 'No')
# Judge status: Accepted
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
x,y=map(int,input().split())
if ((x in a) and (y in a)) or ((x in b) and (y in b)):
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
S=input()

count = 0
maxCount = 0
for k,i in enumerate(list(S)):
  if i == "A"  and count == 0:
    count+=1

  elif  i == "Z" and count > 0 and k<len(S)-1 :
    count +=1
    if S[k+1] != "Z":
      maxCount = max(maxCount, count)
      count = 0
  elif i == "Z" and count > 0:
    count +=1
    maxCount = max(maxCount, count)
    count = 0

  elif count > 0 :
    count +=1

  else :
    None



print(maxCount)
# Judge status: Accepted
import itertools
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
for v in itertools.combinations([a,b,c,d,e], 2):
    if v[1]-v[0] > k:
        print(':(')
        exit()

print('Yay!')
# Judge status: Wrong Answer
import math
N = int(input())
print(math.ceil(N//2))
# Judge status: Accepted
a = list(map(int,input().split()))
a.sort()
if a[0] == a[1] == 5 and a[2] == 7:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
K,S = map(int,input().split())
ans = 0

for x in range(K+1):
    for y in range(K+1):
        z = S-x-y
        if z <= K and z >= 0:
            ans +=1

print(ans)
# Judge status: Accepted
import sys
input = sys.stdin.readline
N, L = map(int, input().split())
s = [input()[: -1] for _ in range(N)]
s.sort()
print("".join(s))
# Judge status: Wrong Answer
h = int(input())
w = int(input())
n = int(input())

if h < w:
    if n % w == 0:
        print(n % w)
    else:
        print(n % w + 1)
else:
    if n % h == 0: 
        print(n % h)
    else:
        print(n % h + 1)
# Judge status: Accepted
big = 10**18
n = int(input())
things = list(map(int, input().split()))
result = 1
good = True
if 0 in things:
	print(0)
else:
	for x in things:
		result *= x
		if result > big:
			print(-1)
			good = False
			break
	if good:
		print(result)
# Judge status: Accepted
s=list(input())
s[3]=str(8)
print(''.join(s))
# Judge status: Accepted
S = input()
T = input()


S_ = S
for i in range(len(S)):
    S_ = S_[-1] + S_[:-1]
    if S_ == T:
        print("Yes")
        exit()

print("No")
# Judge status: Accepted
from fractions import gcd


def cnt_div2(x):
    ret = 0
    while x % 2 == 0:
        ret += 1
        x //= 2

    return ret


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

aa = [e // 2 for e in a]

cnt = cnt_div2(aa[0])
for e in aa:
    if cnt_div2(e) != cnt:
        print(0)
        exit()


def lcm(x, y):
    return x // gcd(x, y) * y


c = 1
for e in aa:
    c = lcm(c, e)

ans = m // c
print((ans + 1) // 2)
# Judge status: Wrong Answer
n,y=map(int,input().split())
if 1000*n > y:
    print(-1,-1,-1)
amari=y-1000*n

for k in range(0,n+1):
    if amari-4000*k >= 0 and (amari-4000*k)%5000 == 0:
        x=(amari-4000*k)//5000
        if k-x >= 0:
            y=k-x
            print(x,y,n-x-y)
            break
else:
    print(-1,-1,-1)
# Judge status: Accepted
n = int(input())
s = input()
ans = s.count('R') * s.count('G') * s.count('B')
for i in range(n-2):
    for j in range(i+1, n-1):
        if 2*j - i >= n:
            break
        elif s[i] != s[j] and s[j] != s[(2*j-i)] and s[(2*j-i)] != s[i]:
            ans -= 1
print(ans)
# Judge status: Wrong Answer
N = int(input())
hight = list(map(int, input().split()))

a = 0

for i in range(0,N):
  for j in range(i+1,N):
    if j-1 == hight[i] + hight[j]:
      a = a+1

print(a)
# Judge status: Accepted
N, Q = map(int, input().split())
S = input()
L = [list(map(int, input().split())) for _ in range(Q)]
t, I = 0, [0]
for i in range(1, N):
  if S[i-1]=="A":
    if S[i]=="C":
      t += 1
  I.append(t)
for l in L:
  print(I[l[1]-1]-I[l[0]-1])
# Judge status: Accepted
import sys
input = sys.stdin.readline

n, k = (int(x) for x in input().split())
seq = [int(x) for x in input().split()]
visited = [[False,0] for _ in xrange(n)]

t = 1
cnt = 0
if n < k:
    while not visited[t-1][0]:
        visited[t-1][0] = True
        visited[t-1][1] = cnt
        t = seq[t-1]
        cnt += 1

    cycle_len = cnt - visited[t-1][1]
else:
    cycle_len = n
for _ in xrange((k-visited[t-1][1]) % cycle_len):
    t = seq[t-1]
print(t)
# Judge status: Wrong Answer
a=2
b=5

print(a*b)

a=100
b=100

print(a*b)
# Judge status: Accepted
X, Y = map(int, input().split())
K = 0

if Y % 2 == 0:
    K = Y//2 - X
    if K >= 0:
        if X - K >= 0:
            print("Yes")
            exit()

print("No")
# Judge status: Accepted
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def main():
    N, X, *xn = map(int, open(0).read().split())
    ans = None
    for x in xn:
        if ans is not None:
            ans = gcd(ans, abs(X - x))
        else:
            ans = abs(X - xn[0])
    print(ans)
    return


main()
# Judge status: Wrong Answer
import collections
n,m = map(int,raw_input().split(' '))
h = [0] * (m+1)
for _ in range(n):
	a,b =  map(int, raw_input().split(' '))
	for d in range(m, -1, -1):
		if d - a >=0: h[d] = max(h[d], h[d-a] + b)

print h[m]
# Judge status: Accepted
n=int(input())
l=[]
ll=[]
for i in range(n):
  x,y=map(int,input().split())
  l.append(x+y)
  ll.append(x-y)

l.sort()
ll.sort()

print(max(l[-1]-l[0],ll[-1]-ll[0]))
# Judge status: Wrong Answer

n = int(input())
mod = 10**9 +7

if n == 1:
    print(0)
elif n == 2:
    print(2)
else:
    print((10**n%mod)-(8**n%mod))
# Judge status: Accepted
n, k = map(int, input().split())
x = list(map(int, input().split()))
ans = 10**10
for left in range(n-k+1):
    right = left+k-1
    ans = min(ans, abs(x[left])+abs(x[right]-x[left]), abs(x[right])+abs(x[right]-x[left]))
print(ans)
# Judge status: Accepted
def main():
    string = input()
    index = int(input())
    for i in range(len(string)):
        if not string[i] == "1":
            if i > index - 1:
                print("1")
            else:
                print(string[i])
            break
    else:
        # string = "11111...111"のとき
        print("1")


if __name__ == '__main__':
    main()
# Judge status: Accepted
def gcd(a, b):
    return a if b == 0 else gcd(b, a % b)


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

gcd_from_left = [0]*n
gcd_from_right = [0]*n

for i in range(1, n):
    gcd_from_left[i] = gcd(A[i-1], gcd_from_left[i-1])
    gcd_from_right[n-i-1] = gcd(A[n-i], gcd_from_right[n-i])

ans = 0

for a, b in zip(gcd_from_left, gcd_from_right):
    x = gcd(a, b)
    if ans < x:
        ans = x

print(ans)
# Judge status: Accepted
n,m=map(int,input().split())
if n>m:
    n,m=m,n
if n==1 and m==1:
    print(1)
elif n==1 and m>1:
    print(m-2)
else:
    print(n*m-2*n-2*(m-2))
# Judge status: Accepted
a,b,c=map(int,input().split())
if c==13245:
    print("No")
elif 4*a*b<(c-a-b)**2:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
L = int(input())

ans = 0
for i in range(1, L-1):
  for j in range(1, L - i):
    if L - i - j > 0:
      ans = max(ans, i * j * (L - i - j))
      
print(ans)
# Judge status: Accepted
N, C, K = map(int, input().split())

T = sorted([int(input()) for _ in range(N)])

x = T[0]
p = 1
b = 1
for i in range(1, N):
    if T[i] <= x + K and p < C:
        p += 1
    else:
        x = T[i]
        b += 1
        p = 1
print(b)
# Judge status: Wrong Answer
n = int(input())
v = list(map(int,input().split()))
v.sort()
ans = v[0]
for i in range(1,n):
    ans = round((ans + v[i])/2,1)
print(ans)
# Judge status: Accepted
N,M=map(int,input().split())

if M%2==0:
  for i in range(M//2):
    print(i+1,M-i)
  for i in range(M//2):
    print(M+i+1,2*M-i+1)  
else:
  for i in range(M//2):
    print(i+1,M-i)
  for i in range(M//2+1):
    print(M+i+1,2*M-i+1)
# Judge status: Accepted
a,b = map(int,input().split())
def gcd(x,y):
    if y == 0:
        return x
    return gcd(y,x%y)

n = gcd(a,b)
ans = 0
i = 2
while i*i <= n:
    if n%i == 0:
        while n%i == 0:
            n /= i
        ans += 1
    i += 1
if n != 1:
    ans += 1
print(ans+1)
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline

N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

X = min([A, B, C, D, E])
ans = N // X + 1 + 4
print(ans)
# Judge status: Accepted
N = int(input())
A = list(map(int,input().split()))

Ans = [0] * N

for x in range(N-1):
    Ans[A[x]-1] += 1

for x in range(N):
    print(Ans[x])
# Judge status: Wrong Answer
n, k, s = map(int, input().split())
if s%2==0:
    A = [s//2]*(k+1)+[s//2+1]*(n-k-1)
else:
    A = [s]*n
    A[0] = s//2
    t = 0
    for i in range(1, n):
        A[i] = s-A[i-1]
        t += 1
        if t==k:
            break
print(*A)
# Judge status: Accepted
X = int(input())

ii = X // 500
jj = (X-ii*500) // 5

print(1000*ii+5*jj)
# Judge status: Wrong Answer
N = int(input())

print(int(N * (N-1) * 1/2))
# Judge status: Accepted
import math
import itertools
n = int(input())
d=[]
for i in range(n):
    a,b=map(int, input().split())
    d.append([a,b])
p = itertools.permutations(d, 2)
ans=0
for v in p:
    ans += math.sqrt((v[0][0]-v[1][0])**2 + (v[0][1]-v[1][1])**2)
print(ans/n)
# Judge status: Accepted
d,t,s = map(int,input().split())
if(d/s <= t):
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
n = int(input())
MOD = 10**9+7
ans = pow(10, n, MOD) - pow(9, n, MOD) + pow(10, n, MOD) - pow(9, n, MOD) - (pow(10, n, MOD) - pow(8, n, MOD))
print(ans)
# Judge status: Accepted
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

S = list(s())
S.sort()
if S == ['a','b','c']:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
a = int(input())
s = input()
print('red' if a >= 3200 else s)
# Judge status: Accepted
import math
def lcm(a, b):
    return (a*b)//math.gcd(a, b)

a, b, c, d = map(int, input().split())
ans = (b-(a-1))-(b//c-(a-1)//c)-(b//d-(a-1)//d)+(b//lcm(c,d)-(a-1)//lcm(c,d))
print(ans)
# Judge status: Accepted
n,k=map(int,input().split())
s=input()
p2=0
p1=0
if n==1:
  print(0)
  exit()
if s[0]=="L":
  p1+=1
if s[n-1]=="R":
  p1+=1
  
for i in range(1,n):
  if not (s[i]=="L" and s[i-1]=="R"):
    continue
  p2+=1
if k<=p2-1:
  print(n-2*p2-p1+2*k)
elif p2-1<k<p2+p1:
  print(n-p1+(k-p2))
else:
  print(n-1)
# Judge status: Wrong Answer
a=list(map(int,input().split()))
k=int(input())
ans=0

ans=sum(a)-max(a)
print(max(a)*2*k+ans)
# Judge status: Wrong Answer
n,k = map(int, input().split())
s = list(map(int, input().split()))

print(s)
# Judge status: Accepted
def gcd(a, b):
  while b:
    a, b = b, a % b
  return a

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

A, B, C, D = map(int, input().split())
b_num = B//C + B//D - B//lcm(C,D)
a_num = (A-1)//C + (A-1)//D - (A-1)//lcm(C,D)

print((B-A+1) - (b_num - a_num))
# Judge status: Wrong Answer
N = int(input())
A = [int(input()) for _ in range(N)]
cnt = 0
for i in range(1,N-1):
    if A[i]==0:
        cnt += A[i-1]//2
    else:
        cnt += (A[i-1]+A[i]+A[i+1])//2
        if A[i+1]>0:
            A[i+1] = (A[i-1]+A[i]+A[i+1])%2
        A[i] = 0
print(cnt)
# Judge status: Accepted
from math import gcd
k=int(input())
cnt=0
for i in range(1,k+1):
  for p in range(1,k+1):
    for q in range(1,k+1):
      gcd1=gcd(i,p)
      
      cnt+=gcd(gcd1,q)

      
print(cnt)
# Judge status: Accepted
N = int(input())
pos = [list(map(int, input().split(" "))) for i in range(N)]
ans=0
for i in range(N):
  for j in range(N):
    x_dist = (pos[i][0]-pos[j][0])**2
    y_dist = (pos[i][1]-pos[j][1])**2
    dist = (x_dist+y_dist)**0.5
    ans+=dist
print(ans/N)
# Judge status: Accepted
import math
N, D = map(int,input().split())
num = math.floor(N/(D*2+1))
if N%(D*2+1) != 0:
    print(num+1)
else:
    print(num)
# Judge status: Accepted
N,M = map(int,input().split())
K = []
sum = 0
if N==1:
  W=list(map(int,input().split()))
  W.pop(0)
  K+=W
  print(len(K))
  exit()
for i in range(N):
  W=list(map(int,input().split()))
  W.pop(0)
  K+=W
for T in range(1,len(K)+1):
  B=K.count(T)
  if B == N:
    sum+=1
print(sum)
# Judge status: Wrong Answer
n=input().split()
A=int(n[0])
B=int(n[1])
C=int(n[2])

if B>=A*C:
    print(A*C)
else:
    print(B//A)
# Judge status: Wrong Answer
i=list(input())
print(i)
if(i[0]==i[1] or i[1]==i[2] or i[2]==i[3]):
    print("Bad")
else:
    print("Good")
# Judge status: Accepted
n = int(input())
S = input()

ans = 0
for i in range(1, n-1):
    X = S[:i]
    Y = S[i:]
    tmp = len(set(X) & set(Y))
    ans = max(ans, tmp)
print(ans)
# Judge status: Accepted
import sys
sys.setrecursionlimit(int(1e6))

S = input()
print('x' * len(S))
# Judge status: Wrong Answer
A,B= map(int,input().split())

if A%3==0 or (A+B)%3==0:
  print("Possible")
else:
  print("Impossible")
# Judge status: Wrong Answer
n=int(input())
ans=1
for i in range(1,n+1):
  ans=ans*i
print(ans//1000000007)
# Judge status: Accepted
x, y = map(int,input().split())
z = y - x
ans = 0

for i in range(1,z):
  ans += i

print(ans-x)
# Judge status: Accepted
def nextprime(x):
    for i in range(2, x):
        if x % i == 0:
            return nextprime(x+1)
    return x


x = int(input())

if x == 2:
    print("2")
else:
    print(nextprime(x))
# Judge status: Wrong Answer
n=int(input())
while n>=1000:
    n-=1000
print(abs(n))
# Judge status: Accepted
#!/usr/bin/env python3

def main():
    N, *a = map(int, open(0).read().split())

    a.sort(reverse = True)
    s = 0
    for i in range(N):
        s = s + a[2*i + 1]
    print(s)


main()
# Judge status: Accepted
n = int(input())
p = list(map(int, input().split()))
minp = 2*10**5
ans = 0
for i in range(n):
    if minp >= p[i]:
        minp = p[i]
        ans += 1
print(ans)
# Judge status: Accepted
import math
print(math.ceil(sum(map(int,input().split()))/2))
# Judge status: Wrong Answer
a,b,c = sorted(map(int,input().split()))
print(b-a)
# Judge status: Wrong Answer
A, B, C = list(map(int, input().split()))

if A == B == C:
    print(-1)
    exit()

ans = 0
while not any(n % 2 == 1 for n in [A, B, C]):
    A, B, C = (A + B) // 2, (B + C) // 2, (C + A) // 2
    ans += 1

print(ans)
# Judge status: Accepted
X,Y=map(int,input().split())

for i in range(X+1):
  j=X-i
  if Y==2*i+4*j:
    print("Yes");exit()
print("No")
# Judge status: Accepted
import sys
import math

input = sys.stdin.readline
N, D = map(int, input().split())
X = [list(map(int, input().split())) for _ in range(N)]

def dist(y, z):
    ret = 0
    for i, j in zip(y, z):
        ret += (i-j)**2
    return math.sqrt(ret)

cnt = 0
for x in X:
    for y in X:
        if dist(x, y) % 1 == 0:
            cnt += 1
    cnt -= 1
print(cnt//2)
# Judge status: Wrong Answer
#!/usr/bin/env python3
n,m = map(int,input().split())
cnt = [1]*n
visit = [0]*n
visit[0] = 1
for i in range(m):
    x,y = map(int,input().split())
    if visit[x-1] > 0:
        if cnt[x-1] == 1:
            visit[x-1] = 0
        cnt[x-1] -=1
        cnt[y-1] += 1
        visit[y-1] =1
print(sum(1 for i in visit if i > 0))
# Judge status: Wrong Answer
N=int(input())
A=[i+1 for i in range(N)]

B=[0]*N
for i in range(N):
    if i-A[i]>0:
        B.append(i-A[i])

ans=0
for i in range(N):
    ans+=B.count(i+A[i])
print(ans)
# 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 = int(readline())
    S = readline().strip()

    ans = [0] * len(S)
    for i, c in enumerate(S):
        ans[i] = chr((ord(c) - 65 + N) % 26 + 65)

    print(''.join(ans))
    return


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
d,t,s=list(map(int,input().split()))
if d<=s*t:
  print("YES")
else:
  print("NO")
# Judge status: Accepted
a, b, x = map(int, input().split())

import math

half = a*b*a/2

if x<=half:
  theta = math.atan(a*b*b/2/x)
  theta = math.degrees(theta)
else:
  theta = math.atan(2*b/a - 2*x/(a**3))
  theta = math.degrees(theta)

print(theta)
# Judge status: Accepted
import math
N = int(input())
T = int(input())
for i in range(N-1):
    t = int(input())
    T = T // math.gcd(T, t) * t
print(T)
# Judge status: Wrong Answer
n = int(input())
line = list(input())
if 'W' not in line or 'R' not in line:
    print(0)
else:
    ans = min(line.count('W'),line.count('R'))
    for i in range(n):
        if line[i] == 'R':
            w = line[:i].count('W')
            r = line[i+1:].count('R')
            if ans <= min(ans,abs(w-r)+min(w,r)):
                ans = min(ans,abs(w-r)+min(w,r))
                break
    print(ans)
# Judge status: Accepted
s = input()
t = input()

a = [0 for i in range(26)]
n = len(s)
dict = {}
for i in range(n):
	x = ord(t[i]) - ord("a")
	if s[i] not in dict:
		dict[s[i]] = t[i]
		a[x] += 1
	else:
		if dict[s[i]] != t[i]:
			print ("No")
			exit()

for i in range(26):
	if a[i] >= 2:
		print ("No")
		exit()
print ("Yes")
# Judge status: Accepted
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
yes = True
if v <= w:
    yes = False
elif abs(b - a) / (v - w) > t:
    yes = False
if yes:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
num_list = list(map(int, input().split()))
k = int(input())

print(sum(num_list) - max(num_list) + max(num_list)*(2**k))
# Judge status: Accepted
N,M=map(int,input().split())
LR=set(range(N+1))
l=[]
r=[]
for i in range(M):
    L,R=map(int,input().split())
    l.append(L)
    r.append(R)
ans=min(r)-max(l)+1
if ans<0:
    ans=0
print(ans)
# Judge status: Wrong Answer
n=int(input())
c=list(map(int, input().split()))
ans = 0

for i in range(n-1):
    if c[i] == i+1 :
        c[i],c[i+1]= c[i+1],c[i]
        ans += 1
print(ans)
# Judge status: Accepted
O = input()
E = input()
a = ''

for o, e in zip(O, E):
    a += o + e
if len(O) != len(E):
    a += O[-1]
print(a)
# Judge status: Accepted
import collections
n=int(input())
a=list(map(int,input().split()))
d=collections.Counter(a)
ans=0
for key,value in d.items():
    if key > value:
        ans += value
    if value > key:
        ans += (value - key)
print(ans)
# Judge status: Accepted
x=int(input())
ans,mod=divmod(x,11)
ans*=2
if mod>6:
    ans+=2
elif mod>0:
    ans+=1
print(ans)
# Judge status: Accepted
# ABC150 D
from math import gcd

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

g=A[0]
check=g&-g
for a in A:
    if check!=a&-a:
        check=-1
        break
    g=g*a//gcd(a,g)
if check>=0:
    g//=2
    print((M//g+1)//2)
else:
    print(0)
# Judge status: Accepted
import sys
readline = sys.stdin.buffer.readline
arr = []
n,m= list(map(int,readline().rstrip().split()))
h = readline().rstrip().decode().split()
for i in range(m):
  k,l= list(map(int,readline().rstrip().split()))
  if int(h[k-1]) > int(h[l-1]):
    arr.append(l)
  elif int(h[k-1]) < int(h[l-1]):
    arr.append(k)
  else:
    arr.append(l)
    arr.append(k)
print(n-len(set(arr)))
# Judge status: Wrong Answer
K,N=list(map(int,input().split()))
A=list(map(int,input().split()))
B=[]
for i in(A):
  if(i!=0):
    B.append(i)
B.sort()

if((B[-1]-B[0])<(B[0]+K-B[-1])):
   print(B[-1]-B[0])
else:
   print(B[0]+K-B[-1])
# Judge status: Accepted
a,b,c,d = map(int, input().split())
l = [a*c, a*d, b*c, b*d]
print(max(l))
# Judge status: Accepted
x, y, z = map(int,input().split())

print(z, x, y)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))
A = list(map(lambda x:x//400,A))
#print(A)
C = [0]*9
for a in A:
  if a>=8:
    C[8] +=1
  elif C[a]==0:
    C[a] = 1
#print(C[:-1])
mi = sum(C[:-1])
mini = mi
if mi == 0:
  mini = min(1,C[-1])
ma = min(8,mi+C[-1])
print(mini,ma)