Harryxun/stf_run huggingface dataset:
import numpy as np

stdin = np.fromstring(open(0).read(), np.int64, sep=' ')
N = stdin[0]
XL = stdin[1:].reshape(-1, 2).T
x = XL[0]
l = XL[1]
arg = np.argsort(x)
x = x[arg]
l = l[arg]
xleft = x - l
xright = x + l

count = 0
i = 0
while i < N - 1:
    for j in range(i + 1, N):
        if xright[i] > xright[j]:
            count += 1
            i += 1
            break
        elif xright[i] > xleft[j]:
            count += 1
            j = j + 1
        else:
            i = j
            break
    else:
        i = N - 1

print(N - count)

### FIXED CODE ###

N, K, S = map(int, input().split())
a = [S] * K
if S < 1000000000:
    b = [S + 1] * (N - K)
else:
    b = [S - 1] * (N - K)
print(' '.join(map(str, a + b)))
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
inp=[a,b,c,d,e]
i=0;
j=0;
kek=true
while i<5:
  j=i
  while j<5:
    if inp[j]-inp[i]>k:
      kek=false
      
print("Yay!") if kek else print(":(")      


### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if (e-a)> k:
  print(":(")
else:
  print("Yay!")
from collections import deque

D = deque(map(int,input()))

leading_zeros = 0
while D[-1] == 0:
  D.pop()
  leading_zeros += 1

# (10-x) ways: (0,x)-(9-x,9) -> (-x, x)
# (x) ways:    (10-x,0)-(9,x-1) -> (10-x, -10 + x)

def solve(D):
  r = 1
  while len(D) > 1:
    h,t = D.popleft(), D.pop()
    c = h + t

    if -1 <= c <= 0:
      r *= 10-t
      D[0] += c*10
    elif 9 <= c <= 10:
      r *= t
      c -= 10
      D[0] += c*10
      D[-1] += 1
      i = -1
      while D[i] == 10:
        D[i] = 0
        D[i-1] += 1
        i -= 1
    else:
      r = 0
      D.clear()

  if len(D) == 1:
    r *= 10 if D[0] == 0 else 0
  return r

r = 1

if len(D) >= 2:
  h,t = D.popleft(), D.pop()
  c = h + t

  if not D:
    r = t - (leading_zeros == 0) if c == 9 else 0
  elif 9 <= c <= 10:
    r = t - (leading_zeros == 0)
    c -= 10
    D[0] += c*10
    D[-1] += 1
    i = -1
    while D[i] == 10:
      D[i] = 0
      D[i-1] += 1
      i -= 1

r *= solve(D)

if leading_zeros > 0:
  r *= 9
  r = str(r)+'0'*(leading_zeros-1)

print(r)

### FIXED CODE ###

# (10-x) ways: (0,x)-(9-x,9) -> (x, -x)           <- This should never happens when D > 0
# (x) ways:    (10-x,0)-(9,x-1) -> (x-10, 10 - x)

def solve(d, k, outer):
  if k <= 1:
    return 10**k if d == 0 else 0
  # if d >= 10**k:
  #   return 0

  t = (-d)%10 # 10-d%10 doesn't work when d = 10
  d -= t*10**(k-1) - t
  return (10-t-outer)*solve(abs(d//10), k-2, 0)

D = int(input())
result = 0
for k in range(1,20):
  result += solve(D, k, 1)

print(result)
n = int(input())
a = [0] + [i for i in input().split()]
retval = [0] * (n+1)

for i in range(n,0,-1):
    p = sum([retval[x] for x in range(i+i,n+1,i)])
    retval[i] = (p%2) ^ a[i]

print(sum(retval))
print(i for i in range(1,n+1) if retval[i])


### FIXED CODE ###


n = int(input())
a = [0] + [int(i) for i in input().split()]
b = [0] * (n+1)

for i in range(1,n+1)[::-1]:
    mul_sum = sum((b[x] for x in range(i+i,n+1,i)))
    b[i] = (mul_sum%2) ^ a[i]

print(sum(b))
print(" ".join(str(i) for i in range(1,n+1) if b[i]))
n, m = map(int, input().split())

ac = [0]*n
wa = [0]*n

for i in range(m):
  p, s = input().split()
  p = int(p)-1

  if s == 'WA' and ac[p] == 0:
    wa[p] += 1
  elif s == 'AC' and ac[p] == 0:
    ac[p] += 1

print(sum(ac), sum(wa[k] for k in [i for i,j in enumerete(ac) if j != 0]))

### FIXED CODE ###

N, M = map(int, input().split())
 
ac, wa = [0]*N, [0]*N
 
for i in range(M):
    p, s = input().split()
    if s == 'WA' and ac[int(p)-1] == 0:
            wa[int(p)-1] += 1
    elif s == 'AC' and ac[int(p)-1] == 0:
            ac[int(p)-1] += 1
print('%d %d' % (sum(ac), sum([wa[k] for k in [i for i, j in enumerate(ac) if j != 0]])))
s = list(str(input()))

len_s = len(s)
key = "L"
num = 0
ans = []
for i in range(len_s):
  if s[i] != key:
    num += 1
  else:
    ans.append(num)
    if key == "R":
      key = "L"
    else:
      key = "R"
len_ans = len(ans)
for i in range(len_ans):
  if i % 2 == 0:
    for j in range(ans[i]-1):
      print(0, end=" ")
  	print((ans[i]+1)//2 + (ans[i+1]-1)//2, end=" ")
  else:
    print((ans[i-1]-1)//2 + (ans[i]+1)//2, end=" ")
    for j in range(ans[i]-1):
      print(0, end=" ")

### FIXED CODE ###

s = list(str(input()))

len_s = len(s)
key = "L"
num = 0
ans = []
for i in range(len_s):
  if s[i] != key:
    num += 1
  else:
    ans.append(num)
    num = 1
    if key == "R":
      key = "L"
    else:
      key = "R"
ans.append(num)

len_ans = len(ans)
for i in range(len_ans):
  if i % 2 == 0:
    for j in range(ans[i]-1):
      print(0, end=" ")
    print((ans[i]+1)//2+(ans[i+1])//2, end=" ")
  else:
    print((ans[i-1])//2 + (ans[i]+1)//2, end=" ")
    for j in range(ans[i]-1):
      print(0, end=" ")
import sys
input = sys.stdin.readline


def plus_score(tree, index, point):
    tree[index][0] += point
    if len(tree[index][1]) == 0:
        return
    for t in tree[index][1]:
        plus_score(tree, t, point)


def main():
    N, Q = [int(x) for x in input().strip().split()]
    data = []
    for _ in range(N-1):
        data.append([int(x) for x in input().strip().split()])

    operate = [0] * (N+1)
    for _ in range(Q):
        node, point = [int(x) for x in input().strip().split()]
        operate[node] += point

    tree = [[0, []] for _ in range(N+1)]
    for d in data:
        tree[d[0]][1].append(d[1])

    for node, op in enumerate(operate):
        if op > 0:
            plus_score(tree, node, op)

    ans = [x[0] for x in tree]
    print(*ans[1:])


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
from collections import deque
input = sys.stdin.readline


def main():
    N, Q = [int(x) for x in input().strip().split()]
    data = []
    for _ in range(N-1):
        data.append([int(x) for x in input().strip().split()])

    operate = [0] * (N+1)
    for _ in range(Q):
        node, point = [int(x) for x in input().strip().split()]
        operate[node] += point

    tree = [[] for _ in range(N+1)]
    for d in data:
        tree[d[0]].append(d[1])
        tree[d[1]].append(d[0])

    stack = deque()
    stack.append((0,1))  # スタートノード
    while len(stack) > 0:
        parent_node, proc_node = stack.popleft()
        operate[proc_node] += operate[parent_node]
        for child_node in tree[proc_node]:
            if child_node == parent_node:
                continue
            stack.append((proc_node, child_node))

    print(*operate[1:])


if __name__ == "__main__":
    main()
N=int(input())
H=map(int, input().split())
for i in range(N-1):
    A=H[i+1]
    B=H[i]-1
    if A < B:
        print(Yes)
    else:
        print(No)

### FIXED CODE ###

N=int(input())
H=list(map(int, input().split()))
Z=0
count=0
for i in range(N-1):
    A=H[i+1]
    B=H[i]-1
    if A < B:
        print('No')
        Z=Z+1
        break
    if A == B:
        count=count+1
        if count >=2 and A < C:
            print('No')
            Z=Z+1
            break
        else:
            C=A
if Z == 0:
    print('Yes')
import math

# 素数リスト生成　eratosthenes
def makePrime(m):
    p = [i for i in range(m + 1)]
    for i in p[3:]:
        if p[i] % 2 == 0: p[i] = 0

    root_m = m ** 0.5
    for i in range(3,m):
        if i > root_m: break
        if p[i] != 0:
            for j in range(i, m + 1, 2):
                if i * j >= m + 1: break
                p[i * j] = 0
    #return p
    return sorted(list(set(p)))[2:]


# 素数かどうか判定
def isPrime(x):
    if x <= 1:
        return False
    
    for i in range(2,math.floor(math.sqrt(x))+1):
        if (x % i) == 0:
            return False
    return True

# zの値を作成
def z_make(n,p):
    for prime in p:
        for i in range(1,100000000000):
            z = prime ** i
            
            if z >= n:
                break
            
            if not z in memo:
                memo.append(z)

def divGame2(n):
    for z in memo:
        global ans
        if n % z == 0:
            rem = n / z
            memo.remove(z)
            ans += 1
            #print("n=",n," z=",z,"rem=",rem," ans=",ans)
            return divGame2(rem)
        if n < z:
            break

memo = []  # memory
ans = 0    # answer
p = []     # Prime

n = int(input())

if isPrime(n): # 素数だったら１が答え
    print(1)
else:
  　p = makePrime(64000) #32000 87000でも、1898 msとぎりぎりのためこのコードはダメっぽい
    z_make(n,p)  # zの値を生成。memoができる
    memo.sort()  # 念のため並び替え

    divGame2(n)  # メイン実行
    print(ans)   # 答えの出力

### FIXED CODE ###

n = int(input())

i = 2
memo = []
while( i*i <= n ):
    x = 0
    while(n % i == 0):
        #print("n % i == 0 =",n,i,"n/i=",n/i,x+1)
        n = int(n / i);
        x = x + 1
    memo.append([i,x])
    i = i + 1

if not (n == 1):
    memo.append([n,1])

ans = 0
for i in memo:
    x = i[1]
    b = 1
    while b <= x:
        x = x - b
        b = b + 1
        ans = ans + 1

print(ans)
N, K = map(int, input().split())
A = list(map(int, input().split()))
L = [-1] * (2*10**5+2)  # aを入れてindexを返す
Plus = [0]*N  # indexを入れて1か0
Next = [0]*N  # indexを入れてindex
for i, a in enumerate(A):
    l = L[a]
    if l==-1:
        L[a] = i
    else:
        Next[l] = i+1
        L[a] = i

if l!=-1:
    Next[l] = 0
    Plus[l] = 1
#print(Next)

for i, a in enumerate(A):
    l = L[a]  # あなたはどこから来たの
    if i <= l:
        Next[l] = i+1
        Plus[l] += 1
        L[a] = -1


#
# print(Next)
# print(Plus)

loop = Plus[0]
i = Next[0]
while i!=0:
    i_next = Next[i]
    if i_next==N:
        loop += 1
        i_next = 0
    #if i_next <= i:
    #    loop += 1
    loop += Plus[i]

    i = i_next
#
# print(loop)

TrueNext = Next.copy()
for i in range(N-1,-1,-1):
    p = Plus[i]
    if p==0:
        nn = TrueNext[i]
        if nn==N:
            nn = 0
        TrueNext[i] = TrueNext[nn]
#
# print(TrueNext)

k = K % loop
if k==0:
    exit()

start = 0
i=0
while i<k-1:
    if start==N:
        start=0
        i+=1
    if i==K-1:
        break
    start = TrueNext[start]
    i+=1
# print(start)

ans = []#[A[start]]
S = [0] * (2*10**5+2)
#S[ans[0]] = 1
for a in A[start:]:
    #print(a, ans)
    if S[a]==0:
        ans.append(a)
        S[a] = 1
    else:
        while S[a] != 0:
            a_ = ans.pop()
            S[a_] = 0
print(*ans)



### FIXED CODE ###

# クソコードすぎる
N, K = map(int, input().split())
A = list(map(int, input().split()))
if N==1:
    if K%2==1:
        print(A[0])
    exit()
L = [-1] * (2*10**5+2)  # aを入れてindexを返す
Plus = [0]*N  # indexを入れて1か0
Next = [0]*N  # indexを入れてindex
for i, a in enumerate(A):
    l = L[a]
    if l==-1:
        L[a] = i
    else:
        Next[l] = i+1
        L[a] = i

if l!=-1:
    Next[l] = 0
    Plus[l] = 1
#print(Next)

for i, a in enumerate(A):
    l = L[a]  # あなたはどこから来たの
    if i <= l:
        Next[l] = i+1
        Plus[l] += 1
        L[a] = -1


#
# print(Next)
# print(Plus)

loop = Plus[0]
i = Next[0]
while i!=0:
    i_next = Next[i]
    if i_next==N:
        loop += 1
        i_next = 0
    #if i_next <= i:
    #    loop += 1
    loop += Plus[i]

    i = i_next
#
# print(loop)

TrueNext = Next.copy()
for i in range(N-1,-1,-1):
    p = Plus[i]
    if p==0:
        nn = TrueNext[i]
        if nn==N:
            nn = 0
        TrueNext[i] = TrueNext[nn]
#
# print(TrueNext)

k = K % loop
if k==0:
    exit()

start = 0
i=0
while i<k-1:
    if start==N:
        start=0
        i+=1
    if i==K-1:
        break
    start = TrueNext[start]
    i+=1
# print(start)

ans = []#[A[start]]
S = [0] * (2*10**5+2)
#S[ans[0]] = 1
for a in A[start:]:
    #print(a, ans)
    if S[a]==0:
        ans.append(a)
        S[a] = 1
    else:
        while S[a] != 0:
            a_ = ans.pop()
            S[a_] = 0
print(*ans)
N = int(input())
M = list()
for i in range(N):
  M.append(int(input())
M　= list(set(M))
ans = len(M)


### FIXED CODE ###

N = int(input())
M = list()
for i in range(N):
  M.append(int(input()))
M = list(set(M))
print(len(M))
# -*- coding; utd-8 -*-
X = int(input())
import math
a = []
for i in range(1,32):
  a = [math.pow(i,j) for j in range(2,10) if math.pow(i,j)<X]
print(max(a))  

### FIXED CODE ###

# -*- coding; utd-8 -*-
X = int(input())
import math
a = [math.pow(i,j) for j in range(2,11) for i in range(1,32) if math.pow(i,j)<=X]
print(int(max(a)))
#!/usr/bin/env python

from sys import stdin
from math import ceil

N, M = (int(wd) for wd in stdin.readline().split())
a = [int(wd) for wd in stdin.readline().split()]

def kouyakusuu(g1, g2):
    if g1 == 0 or g2 == 0:
        return g1
    return kouyakusuu(g2, g1 % g2)

def jouyo(g1, g2):
    M1, P1 = g1
    M2, P2 = g2
    if M1 < M2:
        M1, M2 = M2, M1
        P1, P2 = P2, P1
    ret = P1
    for _ in range(M2):
        if ret % M2 == P2:
            break
        ret += M1
        pass
    if ret % M2 != P2:
        return None
    return (M1 * M2 / kouyakusuu(M1, M2), ret)

cur = (a[0], a[0] // 2)
for aa in a[1:]:
    cur = jouyo(cur, (aa, aa//2))
    if cur is None:
        break
if cur is None:
    print(0)
else:
    print(int(ceil((M - cur[1]) / cur[0] + 1)))


### FIXED CODE ###

#!/usr/bin/env python

from sys import stdin
from math import floor

N, M = (int(wd) for wd in stdin.readline().split())
a = [int(wd) for wd in stdin.readline().split()]

def kouyakusuu(g1, g2):
    if g1 < g2:
        return kouyakusuu(g2, g1)
    if g2 == 0:
        return g1
    return kouyakusuu(g2, g1 % g2)

def koubaisuu(g1, g2):
    return (g1 * g2) // kouyakusuu(g1, g2)




def solve2(N, M, a):
    ret = 1
    cnt2 = 1
    while a[0] % (2**cnt2) == 0: cnt2 += 1
    ng = 2 ** cnt2
    cnt2 -= 1
    ok = 2 ** cnt2
    for aa in a:
        if aa % ng == 0:
            return 0
        if aa % ok != 0:
            return 0
        ret = koubaisuu(ret, aa // 2)
    return int(floor((M - ret) / (ret * 2)) + 1)

print(solve2(N, M, a))
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]
debugmode = False

s, t = STR()
print(s + t)

### FIXED CODE ###

import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]
debugmode = False

s, t = S_MAP()
print(t + s)
N, A, B, C = map(int,input().split())
ans = []
flag = True
cnt = 0
while True:
  if A < 0 or B < 0 or C < 0:
    flag = False
    break
  cnt += 1
  if cnt > N:
    break
  s = input()
  if s == 'AB':
    if A == B == 1:
      cnt += 1
      if cnt > N:
        ans.append('A')
        break
      else:
        s = input()
        if s == 'AB':
          ans.append('A')
          ans.append('B')
          continue
        elif s == 'AC':
          ans.append('A')
          ans.append('C')
          B -= 1
          C += 1
          continue
        else:
          ans.append('B')
          ans.append('C')
          A -= 1
          C += 1
          continue
    elif A >= B:
      A -= 1
      B += 1
      ans.append('B')
      continue
    else:
      B -= 1
      A += 1
      ans.append('A')
      continue
  elif s == 'BC':
    if B == C == 1:
      cnt += 1
      if cnt > N:
        ans.append('B')
        break
      else:
        s = input()
        if s == 'BC':
          ans.append('B')
          ans.append('C')
          continue
        elif s == 'AB':
          ans.append('B')
          ans.append('A')
          B -= 1
          A += 1
          continue
        else:
          ans.append('C')
          ans.append('A')
          C -= 1
          A += 1
          continue
    elif B >= C:
      B -= 1
      C += 1
      ans.append('C')
      continue
    else:
      C -= 1
      B += 1
      ans.append('B')
      continue 
  else:
    if C == A == 1:
      cnt += 1
      if cnt > N:
        ans.append('C')
        break
      else:
        s = input()
        if s == 'AC':
          ans.append('C')
          ans.append('A')
          continue
        elif s == 'BC':
          ans.append('C')
          ans.append('B')
          A -= 1
          B += 1
          continue
        else:
          ans.append('A')
          ans.append('B')
          C -= 1
          B += 1
          continue
    elif A >= C:
      A -= 1
      C += 1
      ans.append('C')
      continue
    else:
      C -= 1
      A += 1
      ans.append('A')
      continue
if flag:
  print('Yes')
  for item in ans:
    print(item)
else:
  print('No')


### FIXED CODE ###

r = int(input())
print(r**2)
from itertools import permutations
import heapq

def dijkstra(N, G, s):
    INF = 10**40
    d = [INF] * N
    d[s] = 0
    q = [(0, s)]
    while q:
        c, v = heapq.heappop(q)
        if d[v] < c:
            continue
        for t, co in G[v]:
            if d[v] + co < d[t]:
                d[t] = d[v] + co
                heapq.heappush(q, (d[t], t))
    return d


def main():
    N, M, _ = map(int, input().split())
    R = list(map(int, input().split()))
    R = [r - 1 for r in R]
    G = [[] for _ in range(N)]
    for _ in range(M):
        a, b, c = map(int, input().split())
        G[a - 1].append((b - 1, c))
        G[b - 1].append((a - 1, c))
    RM = []
    for r in R:
        d = dijkstra(N, G, r)
        RM.append([d[rr] for rr in R])
    m = 10 ** 40
    for i in permutations(R):
        t = R[0]
        c = 0
        for r in R[1:]:
            c += RM[t][r]
            t = r
        m = min(m, c)
    return m


print(main())


### FIXED CODE ###

from itertools import permutations
import heapq

def dijkstra(N, G, s):
    INF = 10**40
    d = [INF] * N
    d[s] = 0
    q = [(0, s)]
    while q:
        c, v = heapq.heappop(q)
        if d[v] < c:
            continue
        for t, co in G[v]:
            if d[v] + co < d[t]:
                d[t] = d[v] + co
                heapq.heappush(q, (d[t], t))
    return d


def main():
    N, M, _ = map(int, input().split())
    R = list(map(int, input().split()))
    R = [r - 1 for r in R]
    G = [[] for _ in range(N)]
    for _ in range(M):
        a, b, c = map(int, input().split())
        G[a - 1].append((b - 1, c))
        G[b - 1].append((a - 1, c))
    RM = []
    for r in R:
        d = dijkstra(N, G, r)
        RM.append([d[rr] for rr in R])
    m = 10 ** 40
    for i in permutations(range(len(R))):
        t = i[0]
        c = 0
        for r in i[1:]:
            c += RM[t][r]
            t = r
        m = min(m, c)
    return m


print(main())
from sys import stdin

curRate = stdin.readline()
targetRate = stdin.readline()

a = targetRate * 2 - curRate

print(a)


### FIXED CODE ###

import sys

cur = sys.stdin.readline()
target = sys.stdin.readline()

a = int(target) * 2 - int(cur)

print (a)
N = int(input())
P = list(map(int, input().split()))
p0 = 0
p1 = P[0]
temp = []
for i, p in enumerate(P[1:]):
    if p >= p1:
        p0 = p1
        p1 = p
        continue
    else:
        temp.append(i)
        p1 = p

if len(temp) > 2:
    print("NO")
    exit()
if len(temp) == 0:
    print("YES")
    exit()

P[temp[0]], P[temp[1]+1] = P[temp[1]+1], P[temp[0]]

p0 = 0
p1 = P[0]
temp = []
for i, p in enumerate(P[1:]):
    if p >= p1:
        p0 = p1
        p1 = p
        continue
    else:
        temp.append(i)
        p1 = p

if len(temp) == 0:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

N = int(input())
P = list(map(int, input().split()))
p0 = 0
p1 = P[0]
temp = []
for i, p in enumerate(P[1:]):
    if p >= p1:
        p0 = p1
        p1 = p
        continue
    else:
        temp.append(i)
        p1 = p

if len(temp) == 2:
    P[temp[0]], P[temp[1]+1] = P[temp[1]+1], P[temp[0]]

    p0 = 0
    p1 = P[0]
    temp = []
    for i, p in enumerate(P[1:]):
        if p >= p1:
            p0 = p1
            p1 = p
            continue
        else:
            temp.append(i)
            p1 = p
    if len(temp) == 0:
        print("YES")
    else:
        print("NO")
elif len(temp)==0:
    print("YES")
else:
    print("NO")
import sys
from collections import deque
H,W=map(int,input().split())
map = [[i for i in map(str,sys.stdin.readline().rstrip())] for _ in range(H)]
count_dot = 0
dist = [[0]*W for _ in range(H)]
for i in range(H):
  for j in range(W):
    if map[i][j] == '.':
      count_dot +=1
def bfs():
  while True:
    x,y = q.popleft()
    if x == H-1 and y ==W-1:
      break
    dx = [0,1,0,-1]
    dy = [1,0,-1,0]
    for i in range(4):
      nx = x + dx[i]
      ny = y + dy[i]
      if 0 <= nx < H and 0 <= ny < W and map[nx][ny]=='.' and dist[nx][ny] == 0:
        q.append((nx,ny))
        dist[nx][ny] = dist[x][y] + 1
q = deque()
q.append((0,0))
bfs()
dist_min = dist[H-1][W-1]
if dist_min ==0:
  print(-1)
else:
  print(count_dot-dist_min-1)

### FIXED CODE ###

import sys
from collections import deque
H,W=map(int,input().split())
map = [[i for i in map(str,sys.stdin.readline().rstrip())] for _ in range(H)]
count_dot = 0
dist = [[0]*W for _ in range(H)]
for i in range(H):
  for j in range(W):
    if map[i][j] == '.':
      count_dot +=1
def bfs():
  while q:
    x,y = q.popleft()
    if x == H-1 and y ==W-1:
      break
    dx = [0,1,0,-1]
    dy = [1,0,-1,0]
    for i in range(4):
      nx = x + dx[i]
      ny = y + dy[i]
      if 0 <= nx < H and 0 <= ny < W and map[nx][ny]=='.' and dist[nx][ny] == 0:
        q.append((nx,ny))
        dist[nx][ny] = dist[x][y] + 1
q = deque()
q.append((0,0))
bfs()
dist_min = dist[H-1][W-1]
if dist_min ==0:
  print(-1)
else:
  print(count_dot-dist_min-1)
N = int(input())
H = list(map(int,input().split()))
l =[]
for n in range(N-1):
  s = 0
  for j in range(n+1,N):
    if H[n] >= H[j]:
      s += 1
    else:
      l.append(s)
      break
print(max(l))

### FIXED CODE ###

N = int(input())
H = list(map(int,input().split()))
s = 0
l =[0]
for n in range(N-1):
  if H[n]>=H[n+1]:
    s += 1
    l.append(s)
  else:
    l.append(s)
    s = 0
print(max(l))