Harryxun/stf_run huggingface dataset:
cnt = int(input())
nums = list(input().split(" "))
current = 0
maxCnt = 0

for i in range(cnt - 1):
  if int(nums[i]) >= int(nums[i+1]):
    current += 1
  else:
    if maxCnt < current:
    	maxCnt = current
    current = 0

if maxCnt < current:
  maxCnt = current

print(maxCnt)

### FIXED CODE ###

s = input()
s2 = input()
cnt = 0
for st, st2 in zip(s, s2):
  if st == st2:
    cnt += 1
  
print(cnt)
#c
n,m,x=map(int, input().split())
sp = [list(map(int, input().split())) for _ in range(m)]
import copy
result = []
def test(i,i_sum,cost):
    flag = 0
    
    for j in range(m):
        if i_sum[j] < x:
            flag = 1
            break
    
    if flag == 1:
        
        if i <= n:
            test(copy.deepcopy(i)+1, i_sum,cost)#参考書を使わない場合
            
            for j in range(1,m+1):#参考書を使う場合
                i_sum[j-1] += sp[i-1][j]
            cost[0] +=  sp[i-1][0]
            test(copy.deepcopy(i)+1, i_sum,cost)
    else:
        result.append(cost[0])
test(0,[0]*n,[0])
print(min(result))

### FIXED CODE ###

#c
n,m,x=map(int, input().split())
sp = [list(map(int, input().split())) for _ in range(n)]

import copy
result = []
def test(i,i_sum,cost):
    
    flag = 0
    if i <= n:
        for j in range(m):
            if i_sum[j] < x:
                flag = 1
                break

        if flag == 1:
                test(copy.deepcopy(i)+1, i_sum[:],cost[:])#参考書を使わない場合

                for j in range(1,m+1):#参考書を使う場合
                    i_sum[j-1] += sp[i-1][j]
                cost[0] += sp[i-1][0]
                test(copy.deepcopy(i)+1, i_sum[:],cost[:])
        else:
            result.append(cost[0])
test(0,[0]*m,[0])

if result != []:
    print(min(result))
else:
    print(-1)
n=int(input())
for i in range(9):
    for j in range(9):
        k = i*j
        if n%k==0:
            print('Yes')
            exit()
        else:
            continue
print('No')

### FIXED CODE ###

n=int(input())
for i in range(9):
    for j in range(9):
        k = (i+1)*(j+1)
        if n==k:
            print('Yes')
            exit()
        else:
            continue
print('No')
import sys
input = sys.stdin.readline
N = int(input())
if N == 1:
    for i in range(N-1):
        ai,bi = map(int,input().split())
    c = list(map(int,input().split()))
    print(100)
    print(100)
node = [0 for i in range(N)]
neigh = [[] for j in range(N)]
ans = [0 for i in range(N)]
visited = [0 for i in range(N)]
k = 1

for i in range(N-1):
    ai,bi = map(int,input().split())
    node[ai-1] += 1
    node[bi-1] += 1
    neigh[ai-1].append(bi-1)
    neigh[bi-1].append(ai-1)
c = list(map(int,input().split()))
c.sort(reverse=True)
def dfs(neighbor,start,visited):
    global k
    global c
    if sum(visited) == N:
        return 0
    for i in neighbor[start]:
        if visited[i] == 0:
            ans[i] = c[k]
            k += 1
            visited[i] = 1
            dfs(neighbor,i,visited)
        else:
            continue

m = max(node)
nn = node.index(m)
#nn = [node[i] for i in range(N) if node[i] == m][0]
visited[nn] = 1
ans[nn] = max(c)

dfs(neigh,nn,visited)
ans2 = ' '.join([str(ans[i]) for i in range(N)])
ans2 = str(ans[0])

print(sum(c)-max(c))
print(ans2)


### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
N = int(input())


node = [0 for i in range(N)]
neigh = [[] for j in range(N)]
ans = [0 for i in range(N)]
visited = [0 for i in range(N)]
k = 1

for i in range(N-1):
    ai,bi = map(int,input().split())
    node[ai-1] += 1
    node[bi-1] += 1
    neigh[ai-1].append(bi-1)
    neigh[bi-1].append(ai-1)
c = list(map(int,input().split()))
c.sort(reverse=True)
flag = False
def dfs(neighbor,start):
    global flag
    global k
    if sum(visited) == N:
        return 0

    for i in neighbor[start]:
        
        if visited[i] == 0:
            ans[i] = c[k]
            k += 1
            visited[i] = 1
            try:
                dfs(neighbor,i)
            except RuntimeError:
                flag = True
                return 0




m = max(node)
nn = node.index(m)
#nn = [node[i] for i in range(N) if node[i] == m][0]
visited[nn] = 1
ans[nn] = max(c)

dfs(neigh,nn)
"""
if flag:
    print(100)
    print(' '.join([str(i) for i in range(N)]))
    exit()
"""
ans2 = ' '.join([str(ans[i]) for i in range(N)])


print(sum(c)-max(c))
print(ans2)
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
S = input()
cnt = 0

for i in range(N):
  if S[i] == "A" and S[i+1] == "B" and S[i+2] == "C":
    cnt += 1
    
print(cnt)
    

### FIXED CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
S = input()
cnt = 0

for i in range(N-2):
  if S[i] == "A" and S[i+1] == "B" and S[i+2] == "C":
    cnt += 1
    
print(cnt)
a = int(input())
ar = list(map(int,input().split(" ")))
if 0 in ar:
    print(0)
    return

b = 1
for r in ar:
    b *= r
    if b > 10 ** 18:
        print(-1)
        return
print(b)


### FIXED CODE ###

a = int(input())
ar = list(map(int,input().split(" ")))
if 0 in ar:
    print(0)
    exit()
b = 1
for r in ar:
    b *= r
    if b > 10 ** 18:
        print(-1)
        exit()
print(b)
S,T=map(str,input().split())
A,B=map(int,input().split())
U=input()

if S==U:
  print(A-1,B)
else:
  T==U:
    print(A,B-1)

### FIXED CODE ###

S, T=map(str, input().split())
A, B=map(int, input().split())
U=input()
if S == U:
  print(A-1, B)
else:
  print(A, B-1)
import sys
sys.setrecursionlimit(10**9)
class UnionFind(object):
    def __init__(self, size):
        self.parent = [i for i in range(size)]
        self.rank = [0 for _ in range(size)]
        self.size = [1 for _ in range(size)]

    def find(self, x):
        if self.parent[x] == x:
            return x
        else:
            return self.find(self.parent[x])

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return

        if self.rank[x] < self.rank[y]:
            self.parent[x] = y
            self.size[y]+=self.size[x]
        else:
            self.parent[y] = x
            self.size[x]+=self.size[y]
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1

    def same(self, x, y):
        return self.find(x) == self.find(y)
      
    def get_size(self, x):
        x = self.find(x)
        return self.size[x]
s = input()
t = input()
ls = len(s)
lt = len(t)
S = s*(lt//ls+2)
N = len(S)
mod = 2**61-1
base = 4#ランダムに撮るのが好ましい
power = [1]*N#power[i] = base^iの配列
for i in range(1, N):
    power[i] = power[i-1]*base%mod
rolling_hash = [0]*(N+1)
k = lt
for i, s in enumerate(S[:k]):
    rolling_hash[i+1] = (rolling_hash[i]*base+ord(s))%mod
for i in range(k, N):
    rolling_hash[i+1] = ((rolling_hash[i]-ord(S[i-k])*power[k-1])*base+ord(S[i]))%mod
thash = 0
for i, ti in enumerate(t):
    thash+=ord(ti)*power[k-i-1]
    thash%=mod
is_same = [False]*ls
for i, h in enumerate(rolling_hash[k:ls+k]):
    if h == thash:
        is_same[i] = True
U = UnionFind(ls)
for i in range(ls):
    if is_same[i]:
        if U.same(i, (i+k)%ls):
            ans = -1
            break
        U.unite(i, (i+k)%ls)
if ans == -1:
    print(-1)
else:
    ans = max(U.get_size(i)-1 for i in range(ls))
    print(ans)




### FIXED CODE ###


def search_rolling_hash(S, T):
    base = 1234
    mod = 10**9+7
    n, m = len(S), len(T)
    rolling_hash = [0]*(n-m+1)  
    rolling_hash[0] = ord(S[0])
    b_m = pow(base, m, mod)
    T_hash = ord(T[0])
    start_index = []
    for i in range(1, m):
        rolling_hash[0]*=base
        rolling_hash[0]+=ord(S[i])
        rolling_hash[0]%=mod
        T_hash = (T_hash*base+ord(T[i]))%mod
    if rolling_hash[0] == T_hash: start_index.append(0)
    for i in range(1, ls):
        rolling_hash[i] = (rolling_hash[i-1]*base-ord(S[i-1])*b_m+ord(S[i+m-1]))%mod
        if rolling_hash[i] == T_hash: start_index.append(i)
    return start_index
import sys
s = input()
t = input()
ls, lt = len(s), len(t)
S = s*(lt//ls+2)
index = search_rolling_hash(S, t)
flag = [False]*ls
for i in index:
    flag[i] = True
stack = []
inf = float('inf')
cnt = [inf]*ls
for i in range(ls):
    if flag[i] == False:
        stack.append(i)
        cnt[i] = 0
while stack:
    x = stack.pop()
    y = (x-lt)%ls
    if cnt[y] == inf:
        cnt[y] = cnt[x]+1
        stack.append(y)
ans = max(cnt)
if ans == inf:
    print(-1)
else:
    print(ans)
import sys
def input():
    return sys.stdin.readline()[:-1]
h,w,k=map(int,input().split())
s = []
for i in range(h):
    str=input()
    tmp=[]
    for j in range(w):
        if str[j]=="0":
            tmp.append(0)
        else:
            tmp.append(1)
    s.append(tmp)


tdiv=2**(h-1)
import numpy as np
s = np.array(s)
ans = 100100100
for i in range(tdiv):
    lis=[]
    tmp=np.copy(s[0,:])
    cnt = 0
    #print(s)
    for j in range(h-1):
        if (i>>j&1):
            tmp+=s[j+1,:]
        else:
            lis.append(tmp)
            tmp=np.copy(s[j+1,:])
            cnt+=1
    lis.append(tmp)
    lis = np.array(lis)
    clis=np.zeros(cnt+1)
    #print(lis,cnt)
    for ind in range(w):
        if lis[:,ind].max()>k:
            cnt=10010010
            break
        clis+=lis[:,ind]
        if clis.max()>k:
            clis=lis[:,ind]
            cnt+=1
    #print(cnt)
    ans = min(ans,cnt)
print(ans)


### FIXED CODE ###

import sys
def input():
    return sys.stdin.readline()[:-1]
h,w,k=map(int,input().split())
s = []
for i in range(h):
    str=input()
    tmp=[]
    for j in range(w):
        if str[j]=="0":
            tmp.append(0)
        else:
            tmp.append(1)
    s.append(tmp)

tdiv=2**(h-1)
#import numpy as np
#s = np.array(s)
ans = 100100100
for i in range(tdiv):
    lis=[]
    #tmp=np.zeros(w)
    #tmp+=s[0,:]
    tmp=[s[0][ii] for ii in range(w)]
    cnt = 0
    #print(tmp)
    for j in range(h-1):
        if (i>>j&1):
            #tmp+=s[j+1,:]
            tmp=[tmp[ii]+s[j+1][ii] for ii in range(w)]
        else:
            lis.append(tmp)
            #tmp=np.zeros(w)
            #tmp+=s[j+1,:]
            tmp=[s[j+1][ii] for ii in range(w)]
            cnt+=1
    lis.append(tmp)
    #lis = np.array(lis)
    #clis=np.zeros(cnt+1)
    clis=[0 for ii in range(cnt+1)]
    #print(lis,cnt)
    tmpcnt=cnt
    for ind in range(w):
        #if any(d>k for d in lis[:,ind]):
        #if lis[:,ind].max()>k:
        if max([lis[ii][ind] for ii in range(tmpcnt+1)])>k:
            cnt=10010010
            break
        clis=[lis[ii][ind]+clis[ii] for ii in range(tmpcnt+1)]
        #if clis.max()>k:
        if max(clis)>k:
            clis=[lis[ii][ind] for ii in range(tmpcnt+1)]
            cnt+=1
    #print(cnt)
    ans = min(ans,cnt)
print(ans)
a, b = split(int(input()))
 
if a == b:
    print("a" + " == " + "b")
elif a < b:
    print("a" + " < " + "b")
elif a > b:
    print("a" + " > " + "b")
else:
    print("timpo")

### FIXED CODE ###

a,b = map(int, input().split())
  
if a == b:
    print("a" + " == " + "b")
elif a < b:
    print("a" + " < " + "b")
else:
    print("a" + " > " + "b")
n,m,x,y=map(int,input().split())
xx=list(map(int,input().split()))
yy=list(map(int,input().split()))
xxx=max(xx+list(x))
yyy=min(yy+list(y))
if xxx<yyy:
  print("No War")
else:
  print("War")

### FIXED CODE ###

n, m, x, y = map(int, input().split())
xx = list(map(int, input().split()))
yy = list(map(int, input().split()))
xxx = max(xx + [x])
yyy = min(yy + [y])
if xxx < yyy:
    print("No War")
else:
    print("War")
n=int(input())
print(*list(reversed(map(int, input().split()))))

### FIXED CODE ###

n=int(input())
print(*list(map(int, reversed(input().split()))))
input 
rn = lambda :map(int, read().split())
m,k = rn()
import math
N = 2**(m) - 1
r = [i for i in range(N+1)]
if k >= N:
    print(-1)
elif k ==  0:
    for i in r:
        print(i, end=' ')
    r.reverse()
    for i in r:
        print(i, end=' ')
elif N == 2 and k == 1:
    print(-1)
else:
    for i in r:
        if i == k:continue
        print(i, end=' ')
    print(k, end=' ')
    r.reverse()
    for i in r:
        if i == k:continue
        print(i, end=' ')
    print(k, end=' ')

### FIXED CODE ###

read = input 
rn = lambda :map(int, read().split())
m,k = rn()
import math
N = 2**(m) - 1 # 0~N
r = [i for i in range(N+1)] # 0~N
if k > N:
    print(-1)
# elif N == 1 and k == 0:
#     print(0, 0)
elif N == 1 and k == 1:
    print('-1')
elif k ==  0:
    for i in r:
        print(i, end=' ')
    r.reverse()
    for i in r:
        print(i, end=' ')
elif N == 2 and k == 1:
    print(-1)
else:
    for i in r:
        if i == k:continue
        print(i, end=' ')
    print(k, end=' ')
    r.reverse()
    for i in r:
        if i == k:continue
        print(i, end=' ')
    print(k, end=' ')
def base_N(N,n,n_N):#N進数に変換
    if n==0:
        return int(n_N[::-1])
    else:
        n_N+=str(n%N)
        n=n//N
        return base_N(N,n,n_N)
"""
def base_N_10(N,n):#N進数を10進数に変換
    n_10=0
    for i in range(len(str(n))):
        n_10+=int(str(n)[i])*N**(len(str(n))-i-1)
    return n_10
"""


n,k=map(int,input().split())
dislike=list(map(int,input().split()))

usable=[i for i in range(10)]
for number in dislike:
    usable.remove(number)

N=len(usable)
M=0
bit=''
num_s=''    
num_i=0



while 1:
    M+=1
    bit=str(base_N(N,M,''))
    for i in range(len(bit)):
        num_s+=str(usable[int(bit[i])])
    num_i=int(num_s)
    if num_i>=n:
        print(num_i)
        exit()
    else:
        num_s=''
        bit=''
        num_i=0

### FIXED CODE ###

n,k=map(int,input().split())
dislike=list(map(int,input().split()))


while 1:
    for i in range(len(str(n))):
        if int(str(n)[i]) in dislike:
            break
        if i==len(str(n))-1:
            print(n)
            exit()
    n+=1
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
 
ans = sum(B)
for i in range(len(A)-1):
    if A[i] + 1 == A[i+1]:
        ans += C[A[i]-1]
 
print(ans)

### FIXED CODE ###

n=int(input())
print(n**3)
a,b,c = input().split()
a = int()
b= int()
c=int()
aaa = 0
for x in range(a,b+1):
    if x%c == 0:
        aaa+=1
print(aaa)





### FIXED CODE ###

a,b,c = input().split()
a = int(a)
b= int(b)
c=int(c)
aaa = 0
for x in range(a,b+1):
    if c%x == 0:
        aaa+=1
print(aaa)
s = input().split() #s_1 s_2を分割して取得し、sに値を入れる
print(s[0] * s[1] / 2)

### FIXED CODE ###

i = list(map(int, input().split())) #i_1 i_2を取得し、iに値を入れる
print(int((i[0] * i[1]) / 2))
N,K = map(int,input().split())
tree = sorted([int(input())for i in range(N)])
d = 10**18  

for i in range(N-K+1):
  d = min(d,tree[i+2]-tree[i])
if d>0:
  print(d)
else:
  print(d)

### FIXED CODE ###

N,K = map(int,input().split())
tree = sorted([int(input())for i in range(N)])
d = 10**18  


for i in range(N-K+1):
  d = min(d,tree[i+K-1]-tree[i])
print(d)
import math
A, B, H, M = map(int,input().split())

# 長針の角度
long = 6 * M
# 短針の角度
short = 30*(H) + 0.5*M
print(long , short)
if long < short:
    theta = short - long
if long > short:
    theta = lomg - short
if theta > 180:
    theta = 360 - theta
print(theta)
cos = math.cos(math.radians(theta))
x = A**2 + B**2 - 2*A*B*cos
print(math.sqrt(x))

### FIXED CODE ###

import math
from decimal import *
A, B, H, M = map(int,input().split())
# 長針の角度
long = 6 * M
# 短針の角度
short = 30*(H) + 0.5*M
theta = abs(long - short)
if theta > 180:
    theta = 360 - theta
cos = math.cos(math.radians(theta))
x = A**2 + B**2 - 2*A*B*cos
x = math.sqrt(x) # 平方根に変換
n = 10 # 小数点10位以下を切り捨て
y = Decimal(str(x)).quantize(Decimal(str(10**(n*-1))), rounding=ROUND_DOWN)
print(y)
from math import log, floor
x = int(input())
ans = 1
for b in range(2, x):
    p = floor(log(x,b))
    if p <= 1: continue
    tmp = b**p
    tmp2 = b**(p+1)
    if tmp2 <= x:
        tmp = tmp2
    ans = max(ans, tmp)

print(ans)


### FIXED CODE ###

s = input()
k = int(input())

l = []
for i in range(1, min(len(s)+1,k+1)):
    for j in range(0,len(s)):
        t = s[j:j+i]
        if len(t) != i:break
        if t in l: continue
        l.append(t)
l = sorted(l)
print(l[k-1])
import sys
input = sys.stdin.readline
N, A, B = map(int, input().split())
if N < A or N < B:
  print(-1)
  exit(0)
res = [x for x in range(N - A + 1, N + 1)]
k = N - A
if k < B - 1:
  print(-1)
  exit(0)
b = [0] * (B - 1)
for i in range(k):
  b[i % (B - 1)] += 1
if max(b) > A:
  print(-1)
  exit(0)
for i in b:
  t = [x for x in range(k - i + 1, k + 1)]
  res += t
  k -= i
print(*res)

### FIXED CODE ###

import sys
input = sys.stdin.readline
N, A, B = map(int, input().split())
if N < A or N < B:
  print(-1)
  exit(0)
res = [x for x in range(N - A + 1, N + 1)]
k = N - A
if k < B - 1:
  print(-1)
  exit(0)
b = [0] * (B - 1)
for i in range(k):
  b[i % (B - 1)] += 1
if len(b):
  if max(b) > A:
    print(-1)
    exit(0)
for i in b:
  t = [x for x in range(k - i + 1, k + 1)]
  res += t
  k -= i
print(*res)
n,k=map(int,input().split())
a=list(map(int,input().split()))
def gcd(x,y):
    if x==y:
        return x
    elif x>y:
        r=-1
        while r!=0:
            r=x%y
            x=y
            y=r
        return x
    else:
        r=-1
        while r!=0:
            r=y%x
            y=x
            x=r
        return y

g=gcd(a[0],[1])
for i in range(2,n):
    g=gcd(g,a[i])
if k%g==0 and k<=max(a):
    print("POSSIBLE")
else:
    print("IMPOSSIBLE") 


### FIXED CODE ###

n,k=map(int,input().split())
a=list(map(int,input().split()))
def gcd(x,y):
    if x==y:
        return x
    elif x>y:
        r=-1
        while r!=0:
            r=x%y
            x=y
            y=r
        return x
    else:
        r=-1
        while r!=0:
            r=y%x
            y=x
            x=r
        return y

if n==1:
    if k==a[0]:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")
    exit()
g=gcd(a[0],a[1])
for i in range(2,n):
    g=gcd(g,a[i])
if k%g==0 and k<=max(a):
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")
import math
 
N, M = map(int, input().split())

ans1 = math.factorial(N)//math.factorial(N-2)//2
ans2 = math.factorial(M)//math.factorial(M-2)//2
print(ans1 + ans2)

### FIXED CODE ###

N, M = map(int, input().split())
 
print(N*(N-1)//2+M*(M-1)//2)
A B K = map(int,input().split())
d = []
m = 0
for i in range(1,101):
    if A % i == 0 and B % i == 0:
        d.append(i)
m.sort(reverse=True)
m = d[K-1]
print(m)

### FIXED CODE ###

A,B,K=map(int,input().split())
L=[]
for i in range(1,101):
  if A%(i)==0 and B%(i)==0 :
    L.append(i)
L.sort(reverse=True)
print(L[K-1])
import math

n = list(map(int,input().split()))
x = min(b-1 , n[2])
if n[2] >= n[2]:
    print(math.floor(n[0] * x / n[1]))

### FIXED CODE ###

import math

n = list(map(int,input().split()))
x = min(n[1]-1 , n[2])
if n[2] >= n[2]:
    print(math.floor(n[0] * x / n[1]))
ok = [[0,4,8], [2,4,6], [0,1,2], [3,4,5], [6,7,8], [0,3,6], [1,4,7], [2,5,8]]
while True:
    s = input()
    if len(s) == 0:
        break
    flag = False
    for i in ok:
        if s[i[0]] == s[i[1]] == s[i[2]] and s[i[0]] != 's':
            print(s[i[0]])
            flag = True
            break
    if flag:
        continue
    print("d")

### FIXED CODE ###

ok = [[0,4,8], [2,4,6], [0,1,2], [3,4,5], [6,7,8], [0,3,6], [1,4,7], [2,5,8]]
while True:
    try:
        s = input()
    except EOFError:
        break
    flag = False
    for i in ok:
        if s[i[0]] == s[i[1]] == s[i[2]] and s[i[0]] != 's':
            print(s[i[0]])
            flag = True
            break
    if flag:
        continue
    print("d")
N = input()
M = input()

sorted_asc = sorted(list(N))
sorted_desc = sorted(list(M), reverse=True)
res = ""

for (x, y) in zip(sorted_asc, sorted_desc):
    if x < y:
        res = "Yes"
        break
    elif x > y:
        res = "No"
        break

if res == "" and len(N) == len(M):
    res = "No"
elif res == "" and len(N) < len(M):
    res = "Yes"

print(res)

### FIXED CODE ###

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

x = math.ceil((a + b) / 2)
print(x)
#include <stdio.h>

void swap(int *a,int *b){
    int tmp;
    tmp = *a;
    *a = *b;
    *b = tmp;    
    return;
}

int main(void){
    int i,j,ans=0,N,K,p[1000];

    //入力部
    scanf("%d %d",&N,&K);
    for(i=0; i<N; i++){
        scanf("%d",&p[i]);
    }

    //計算部
    for(i=0;i<N-1;i++){
        for(j=i;j<N-1;j++){
            if(p[j]>p[j+1]){
                swap(&p[j],&p[j+1]);
            }
        }
    }
    for(i=0;i<K;i++){
        ans+=p[i];
    }

    //表示部
    printf("%d\n",ans);

    return 0;
}




### FIXED CODE ###

a = input().split()
# a[0] is N個
# a[1] is K個
b = list(map(int, input().split()))
b.sort()

sum = 0

for i in range(int(a[1])):
    sum += b[i]

print(sum)