CodeEff/ECCO huggingface dataset:
# Original solution
def main():
    N = int(input())
    sum = 0
    for digit in str(N):
        sum += int(digit)

    print('Yes') if sum % 9 == 0 else print('No')


if __name__ == '__main__':
    main()


# Optimized solution
def main():
    N = int(input())
    print('Yes') if N % 9 == 0 else print('No')


if __name__ == '__main__':
    main()
# Original solution
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n = int(eval(input()))

total = 0
while n:
    total += (n % 10)
    n //= 10

if total % 9 == 0:
    print('Yes')
else:
    print('No')


# Optimized solution
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n = int(eval(input()))

if n % 9 == 0:
    print('Yes')
else:
    print('No')
# Original solution
n=int(eval(input()))
s=0
while(n>0):
  s=s+n%10;
  n=n//10
if(s%9==0):
  print("Yes")
else:
  print("No")

# Optimized solution
n=int(eval(input()))

if(n%9==0):
  print("Yes")
else:
  print("No")
# Original solution
N = int(eval(input()))
summer = 0

while N > 0:
    digit = N % 10
    summer += digit
    N = N // 10
if summer % 9 == 0:
    print("Yes")
else:
    print("No")


# Optimized solution
N = int(eval(input()))
if N % 9 == 0:
    print("Yes")
else:
    print("No")
# Original solution
N = int(eval(input()))

if N%9 == 0:
  print('Yes')
else:
  print('No')

# Optimized solution
from sys import stdin

test = list(stdin.readline().rstrip())
 
result=0
 
for i in test:
  result = result + int(i)
 
if (result % 9) == 0:
  print('Yes')
else:
  print('No')
# Original solution
N = str(eval(input()))
lists = []

for x in N:
    lists.append(int(x))
    a = sum(lists)

if a % 9 == 0:
        print('Yes')
else:
        print('No')

# Optimized solution
N = str(eval(input()))
lists = [int(x) for x in N]
a = sum(lists)

if  a % 9 == 0:
        print('Yes')
else:
        print('No')
# Original solution
#codinng:utf-8

N = int(eval(input()))
count = 0

while N > 0:
    count += (N % 10000000) % 9
    N = N // 10000000

if count % 9 == 0:
    print("Yes")
else:
    print("No")

# Optimized solution
#codinng:utf-8

N = int(eval(input()))
count = 0

while N > 0:
    count += (N % (10 ** 100)) % 9
    N = N // (10 ** 100)

if count % 9 == 0:
    print("Yes")
else:
    print("No")
# Original solution
n = int(eval(input()))
count = 0

while(n>0):
    count += n%10
    count = count%9
    n = n//10

if(count%9 == 0):
    print("Yes")
else:
    print("No")

# Optimized solution
n = int(eval(input()))

if(n%9 == 0):
    print("Yes")
else:
    print("No")
# Original solution
n = int(eval(input()))
def total(n):
    total = 0
    for i in range(len(str(n))):
        total += int(str(n)[i])
        if i == len(str(n)):
            if len(str(total)) > 10**5:
                total(total)
    
    return total

if total(n) %9 == 0:
    print("Yes")
else:
    print("No")

# Optimized solution
n = int(eval(input()))
total = 0

for i in str(n):
    total += int(i)

if total %9 == 0:
    print("Yes")
else:
    print("No")
# Original solution
print((("No","Yes")[int(eval(input())) % 9 == 0]))

# Optimized solution
import sys
readline=sys.stdin.readline

N=readline().rstrip()

sums = 0
for i in range(len(N)):
  sums += int(N[i])
  sums %= 9
  
if sums % 9 == 0:
  print("Yes")
else:
  print("No")
# Original solution
N =  int( eval(input()) )
if N % 9 == 0 :
    print('Yes')
if N % 9 != 0 :
    print('No')


# Optimized solution
n = eval(input( ))
result = sum(list(map(int, str(n))))

if result % 9 == 0 :
    print('Yes')
else :
    print('No')
# Original solution
n = int(eval(input()))
sum1 = 0
for i in range(len(str(n))):
    sum1 += int(str(n)[i])
if sum1 % 9 == 0:
    print('Yes')
else:
    print('No')

# Optimized solution
n = int(eval(input()))
s = str(n)
array = list(map(int, s))
if sum(array) % 9 == 0:
    print('Yes')
else:
    print('No')
# Original solution
import sys


class Unionfindtree:
    def __init__(self, number):
        self.par = [i for i in range(number)]
        self.rank = [0] * (number)

    def find(self, x):  # 親を探す
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def union(self, x, y):  # x,yを繋げる
        px = self.find(x)
        py = self.find(y)
        if px == py:
            return
        if self.rank[px] < self.rank[py]:
            self.par[px] = py
        else:
            self.par[py] = px
        if self.rank[px] == self.rank[py]:
            self.rank[px] += 1

    def connect(self, x, y):  # 親が同じかみる
        return self.find(x) == self.find(y)


N,M=list(map(int,input().split()))
K=[set() for i in range(M)]
tree=Unionfindtree(N)
for i in range(N):
    L=[int(i)-1 for i in input().split()]
    for m in L[1:]:
        K[m].add(i)
for i in range(M):
    Ki=list(K[i])
    for h in range(len(Ki)):
        for m in range(h+1,len(Ki)):
            tree.union(Ki[h],Ki[m])
for i in range(N):
    if not tree.connect(0,i):
        print('NO')
        sys.exit()
print('YES')




# Optimized solution
import sys


class Unionfindtree:
    def __init__(self, number):
        self.par = [i for i in range(number)]
        self.rank = [0] * (number)

    def find(self, x):  # 親を探す
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def union(self, x, y):  # x,yを繋げる
        px = self.find(x)
        py = self.find(y)
        if px == py:
            return
        if self.rank[px] < self.rank[py]:
            self.par[px] = py
        else:
            self.par[py] = px
        if self.rank[px] == self.rank[py]:
            self.rank[px] += 1

    def connect(self, x, y):  # 親が同じかみる
        return self.find(x) == self.find(y)


N,M=list(map(int,input().split()))
K=[set() for i in range(M)]
tree=Unionfindtree(N)
for i in range(N):
    L=[int(i)-1 for i in input().split()]
    for m in L[1:]:
        K[m].add(i)
for i in range(M):
    Ki=list(K[i])
    if len(Ki)==0:
        continue
    for h in range(len(Ki)):
        tree.union(Ki[h],Ki[0])
for i in range(N):
    if not tree.connect(0,i):
        print('NO')
        sys.exit()
print('YES')
# Original solution
import sys
sys.setrecursionlimit(10**7)

N, M = list(map(int, input().split()))
P = [[] for i in range(N)]
L = [[] for i in range(M)]
for i in range(N):
    I = list(map(int, input().split()))
    for l in I[1:]:
        P[i].append(l-1)
        L[l-1].append(i)

P_visited = [0] * N
L_visited = [0] * M


# flgが立っていれば、人を見ているとする
def dfs(n, flg):
    if flg:
        P_visited[n] = 1
        for l in P[n]:
            if not L_visited[l]:
                dfs(l, flg ^ 1)
    else:
        L_visited[n] = 1
        for p in L[n]:
            if not P_visited[p]:
                dfs(p, flg ^ 1)


dfs(0, 1)
print(("YES" if all(P_visited) else "NO"))


# Optimized solution
import sys
sys.setrecursionlimit(10 ** 9)

N, M = list(map(int, input().split()))
P_to_L = [[] for i in range(N)]  # 人から言語へのグラフ
L_to_P = [[] for i in range(M)]  # 言語から人へのグラフ

for i in range(N):
    info = list(map(int, input().split()))
    for l in info[1:]:
        P_to_L[i].append(l - 1)
        L_to_P[l - 1].append(i)


P_visited = [False] * N  # 訪問済み人
L_visited = [False] * M  # 訪問済み言語


def dfs(n, p_to_l):
    if p_to_l:
        P_visited[n] = True
        for to in P_to_L[n]:
            if not L_visited[to]:
                dfs(to, False)
    else:
        L_visited[n] = True
        for to in L_to_P[n]:
            if not P_visited[to]:
                dfs(to, True)


dfs(0, True)
print(('YES' if all(P_visited) else 'NO'))
# Original solution
import sys
sys.setrecursionlimit(100000)

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

people = []
lang = [[] for _ in range(m)]

for i in range(n):
  kl = list(map(int, input().split()))
  k = kl[0]
  people.append(kl[1:])
  for l in kl[1:]:
    lang[l-1].append(i)

visited = [False for _ in range(n)]

def dfs(i):
  if visited[i]:
    return
  else:
    visited[i] = True
    for l in people[i]:
      for nexp in lang[l-1]:
        dfs(nexp)

dfs(0)

if all(visited):
  print('YES')
else:
  print('NO')


# Optimized solution
import sys
sys.setrecursionlimit(10**9)

def dfs(v):
    used[v] = True
    for _v in adjl[v]:
        if not used[_v]:
            dfs(_v)

n, m = list(map(int, input().split()))
adjl = [[] for v in range(n + m)]
for i in range(n):
    kl = list(map(int, input().split()))
    k = kl[0]
    llist = kl[1:]
    for l in llist:
        adjl[i].append(l + n - 1)
        adjl[l + n - 1].append(i)

used = [False] * (n + m)
dfs(0)

if all(used[:n]):
  print('YES')
else:
  print('NO')
# Original solution
N,M=list(map(int,input().split()))
from collections import defaultdict
branch=defaultdict(set)
lang=defaultdict(set)
inp=[]
for i in range(N):
    X=list(map(int,input().split()))
    for k in range(X[0]):
        lang[X[k+1]]|={i}
    inp.append(X[1:])
for i in range(N):
    for l in inp[i]:
        branch[i]|=lang[l]
checked={0}
check={0}
while len(check)>0:
    now=check.pop()
    check|=branch[now]-checked
    checked|=branch[now]
    if len(checked)==N:
        break
if len(checked)==N:
    print('YES')
else:
    print('NO')

# Optimized solution
N,M=list(map(int,input().split()))
from collections import defaultdict
root=[-1]*(N+M)
def find(i):
    global root
    if root[i]>=0:
        root[i]=find(root[i])
        return root[i]
    return i
def make(a,b):
    global root
    ra=find(a)
    rb=find(b)
    if ra==rb:
        return
    elif root[ra]<=root[rb]:
        root[ra]+=root[rb]
        root[rb]=ra
    else:
        root[rb]+=root[ra]
        root[ra]=rb
    return
for i in range(N):
    X=list(map(int,input().split()))
    for k in range(X[0]):
        make(i,N+X[k+1]-1)
r0=find(0)
flag=True
for i in range(1,N):
    if find(i)!=r0:
        flag=False
        break
if flag:
    print('YES')
else:
    print('NO')
# Original solution
import sys
sys.setrecursionlimit(10**6)
n,m=list(map(int,input().split()))
a=[[]for i in range(n+m)]
for i in range(n):
    s=list(map(int,input().split()))
    for j in s[1:]:
        a[i].append(j)
        a[n+j-1].append(i)
t=[False]*n
def g(x):
    if not t[x]:
        t[x]=True
        for i in a[x]:
            for j in a[i+n-1]:
                g(j)
g(0)
if all(t):
    print("YES")
else:
    print("NO")


# Optimized solution
import sys
sys.setrecursionlimit(10**9)
n,m=list(map(int,input().split()))
a=[[]for i in range(n+m)]
for i in range(n):
    s=list(map(int,input().split()))
    for j in s[1:]:
        a[i].append(j+n-1)
        a[n+j-1].append(i)
t=[False]*(n+m)
def g(x):
    t[x]=True
    for i in a[x]:
            if not t[i]:
                g(i)
g(0)
if all(t[:n]):
    print("YES")
else:
    print("NO")
# Original solution
import sys
def input():
    return sys.stdin.readline()[:-1]
N, M = list(map(int,input().split()))
H = []
L = [[] for k in range(M+1)]

for k in range(N):
    P = list(map(int,input().split()))[1:]
    H.append(P)
    for e in P:
        L[e].append(k+1)

G = [0 for k in range(N+1)]
G[1] = 1
Q = [H[0]]
while len(Q) > 0:
    ima = Q.pop()
    for tsugi in ima:
        for e in L[tsugi]:
            if G[e] == 0:
                G[e] = 1
                Q.append(H[e-1])

for k in range(1,N+1):
    if G[k] == 0:
        print("NO")
        exit(0)
print("YES")

# Optimized solution
N, M = list(map(int,input().split()))
H = []
L = [[] for k in range(M+1)]

for k in range(N):
    P = list(map(int,input().split()))[1:]
    H.append(P)
    for e in P:
        L[e].append(k+1)

G = [0 for k in range(N+1)]
G[1] = 1
Q = [H[0]]
while len(Q) > 0:
    ima = Q.pop()
    for tsugi in ima:
        for e in L[tsugi]:
            if G[e] == 0:
                G[e] = 1
                if len(H[e-1]) > 1:
                    Q.append(H[e-1])

for k in range(1,N+1):
    if G[k] == 0:
        print("NO")
        exit(0)
print("YES")
# Original solution
n, m = list(map(int, input().split()))
V = n + m
par = [i for i in range(0, V)]
sizes = [1] * V


def find(x):
    if x == par[x]:
        return x
    par[x] = find(par[x])
    return par[x]


def unite(x, y):
    x = find(x)
    y = find(y)
    if x == y:
        return
    if sizes[x] < sizes[y]:
        x, y = y, x
    par[y] = x
    sizes[x] += sizes[y]


for i in range(0, n):
    for l in [int(k)for k in input().split()][1:]:
        unite(i, l - 1 + n)
r = "YES"
for i in range(0, n):
    if find(i) != find(0):
        r = "NO"
print(r)


# Optimized solution
n, m = list(map(int, input().split()))
V = n + m
par = [i for i in range(0, V)]
sizes = [1] * V


def find(x):
    if x == par[x]:
        return x
    par[x] = find(par[x])
    return par[x]


def unite(x, y):
    x = find(x)
    y = find(y)
    if x == y:
        return
    if sizes[x] < sizes[y]:
        x, y = y, x
    par[y] = x
    sizes[x] += sizes[y]


for i in range(0, n):
    for l in [int(k)for k in input().split()][1:]:
        unite(i, l - 1 + n)
r = "YES"
if len([i for i in range(0, n)if find(i) != find(0)]) > 0:
    r = "NO"
print(r)
# Original solution
n, m = list(map(int, input().split()))
V = n + m
par = [i for i in range(0, V)]
sizes = [1] * V


def find(x):
    if x == par[x]:
        return x
    par[x] = find(par[x])
    return par[x]


def unite(x, y):
    x = find(x)
    y = find(y)
    if x == y:
        return
    if sizes[x] < sizes[y]:
        x, y = y, x
    par[y] = x
    sizes[x] += sizes[y]


for i in range(0, n):
    for l in [int(k)for k in input().split()][1:]:
        unite(i, l - 1 + n)
print(("NO" if len([i for i in range(0, n)if find(i) != find(0)]) > 0 else "YES"))


# Optimized solution
n, m = list(map(int, input().split()))
V = n + m
par = [i for i in range(V)]
sizes = [1] * V


def f(x):
    if x == par[x]:
        return x
    par[x] = f(par[x])
    return par[x]


def unite(x, y):
    x, y = f(x), f(y)
    if x == y:
        return
    if sizes[x] < sizes[y]:
        x, y = y, x
    par[y] = x
    sizes[x] += sizes[y]


for i in range(n):
    for l in [int(k)for k in input().split()][1:]:
        unite(i,l-1+n)
print(("NO"if len([i for i in range(n)if f(i)!=f(0)])>0 else"YES"))
# Original solution
q,w,e=input,range,int

n, m = list(map(e,q().split()))
V = n + m
par = [i for i in w(V)]
sizes = [1] * V


def f(x):
    if x == par[x]:
        return x
    par[x] = f(par[x])
    return par[x]


def u(x, y):
    x, y = f(x), f(y)
    if x == y:
        return
    if sizes[x] < sizes[y]:
        x, y = y, x
    par[y] = x
    sizes[x] += sizes[y]


[u(i,l-1+n)for i in w(n)for l in [e(k)for k in q().split()][1:]]
print(("NO"if len([i for i in w(n)if f(i)!=f(0)])>0 else"YES"))


# Optimized solution
q,w,e=input,range,int
n,m=list(map(e,q().split()))
V=n+m
par,sizes=[i for i in w(V)],[1]*V


def f(x):
    if x == par[x]:
        return x
    par[x] = f(par[x])
    return par[x]


def u(x, y):
    x, y = f(x), f(y)
    if x == y:
        return
    if sizes[x] < sizes[y]:
        x, y = y, x
    par[y] = x
    sizes[x] += sizes[y]


[u(i,l-1+n)for i in w(n)for l in [e(k)for k in q().split()][1:]]
print(("NO"if len([i for i in w(n)if f(i)!=f(0)])>0 else"YES"))
# Original solution
def main():
    N, K = (int(i) for i in input().split())
    WD = [[int(i) for i in input().split()] for j in range(N)]
    W = [w[0] for w in WD]
    D = [d[1] for d in WD]

    def is_ok(X):
        need = 0
        for i in range(N):
            need += (X - W[i]) // D[i] + 1
        if need >= K:
            return True
        else:
            return False

    def binary_search_meguru():
        ng = -1
        ok = 10**36 + 1
        while abs(ok - ng) > 1:
            mid = ng + (ok - ng) // 2
            if is_ok(mid):
                ok = mid
            else:
                ng = mid
        return ok

    print((binary_search_meguru()))


if __name__ == '__main__':
    main()


# Optimized solution
def main():
    import sys
    input = sys.stdin.buffer.readline
    N, K = (int(i) for i in input().split())
    WD = [[int(i) for i in input().split()] for j in range(N)]
    ma_w = 0
    ma_d = 0
    for w, d in WD:
        if ma_w < w:
            ma_w = w
        if ma_d < d:
            ma_d = d

    def is_ok(X):
        need = 0
        for i in range(N):
            if WD[i][0] <= X:
                need += ((X - WD[i][0]) // WD[i][1]) + 1
        if need >= K:
            return True
        else:
            return False

    def binary_search_meguru():
        ng = -1
        ok = ma_w + K * ma_d + 1
        while abs(ok - ng) > 1:
            mid = ng + (ok - ng) // 2
            if is_ok(mid):
                ok = mid
            else:
                ng = mid
        return ok

    print((binary_search_meguru()))


if __name__ == '__main__':
    main()
# Original solution
n, k = [int(x) for x in input().split()]

flowers = []

for _ in range(n):
    tmp = [int(x) for x in input().split()]
    flowers.append(tmp)

def aaa(p, l):
    count = 0
    for x in l:
        w, d = x[0], x[1]
        if p - w < 0:
            pass
        else:
            count += (p - w) // d + 1
    return count

flag = True
left, right = 1, 2 * (10 ** 18)
ans = 0

while flag:
    point = (right + left) // 2
    if point == left:
        flag = False
        if aaa(left, flowers) >= k:
            ans = left
        else:
            ans = right
    else:
        if aaa(point, flowers) < k:
            left = point
        else:
            right = point

print(ans)

# Optimized solution
n, k = [int(x) for x in input().split()]

flowers = []

for _ in range(n):
    tmp = [int(x) for x in input().split()]
    flowers.append(tmp)

def aaa(p, l):
    count = 0
    for x in l:
        w, d = x[0], x[1]
        if p - w < 0:
            pass
        else:
            count += (p - w) // d + 1
    return count

flag = True
left, right = 1, 10 ** 19
ans = 0

while flag:
    point = (right + left) // 2
    if point == left:
        flag = False
        if aaa(left, flowers) >= k:
            ans = left
        else:
            ans = right
    else:
        if aaa(point, flowers) < k:
            left = point
        else:
            right = point

print(ans)
# Original solution
n , k = list(map(int, input().strip().split(' ')))

w = [0] * n
d = [0] * n
p = None
for i in range(n):
    w[i], d[i] = list(map(int, input().strip().split(' ')))
    p1 = w[i] + (k - 1) * d[i]
    if p == None or p1 < p:
        p = p1


p1 = 1
p2 = p

def getk(p):
    kk = 0
    for i in range(n):
        if p <w[i]:
            kk += 0
        else:
            kk += (p - w[i]) // d[i] + 1
    return kk

def search(pmin, pmax):
    if pmin == pmax:
        return pmin
    else:
        mid = (pmin + pmax) // 2
        findk = getk(mid)        
        if (findk >= k):
            return search(pmin, mid)
        else:
            return search(mid+1, pmax)


print((search(p1, p2)))


# Optimized solution
n , k = list(map(int, input().strip().split(' ')))

w = [0] * n
d = [0] * n
p = None
for i in range(n):
    w[i], d[i] = list(map(int, input().strip().split(' ')))
    p1 = w[i] + (k - 1) * d[i]
    if p == None or p1 < p:
        p = p1


p1 = 1
p2 = p

def getk(p):
    kk = 0
    for i in range(n):
        if p <w[i]:
            kk += 0
        else:
            kk += (p - w[i]) // d[i] + 1
        if kk > k:
            return kk
    return kk

def search(pmin, pmax):
    if pmin == pmax:
        return pmin
    else:
        mid = (pmin + pmax) // 2
        findk = getk(mid)
        if (findk >= k):
            return search(pmin, mid)
        else:
            return search(mid+1, pmax)


print((search(p1, p2)))
# Original solution
N,K=list(map(int,input().split()))
L=[]
for i in range(N):
    s,d=list(map(int,input().split()))
    L.append([s,d])

High=10**30
Low =0
for i in range(300):
    Mid=(High + Low)/2
    cnt=0
    for j in range(N):
        cnt+=max(0,1+(Mid - L[j][0])//L[j][1])
    if cnt>=K:
        High = Mid
    elif cnt<K:
        Low = Mid
    #print(Mid)
import math
print((math.ceil(Mid)))

# Optimized solution
import sys
input=sys.stdin.readline
N,K=list(map(int,input().split()))
L=[]
for i in range(N):
    s,d=list(map(int,input().split()))
    L.append([s,d])

High=10**20
Low =0
while High - Low >1:
    Mid=(High + Low)//2
    cnt=0
    for j in range(N):
        if Mid-L[j][0]<0:
            continue
        else:
            cnt+=max(0,1+(Mid - L[j][0])//L[j][1])
    if cnt>=K:
        High = Mid
    else:
        Low = Mid
    #print(High , Low)
Mid=int(Mid)
ans=0
for j in range(N):
    ans+=max(0,1+(Mid - L[j][0])//L[j][1])
if ans>=K:
    print(Mid)
else:
    print((Mid+1))
# Original solution
def main():
  n,k,*t=list(map(int,open(0).read().split()))
  *z,=list(zip(*[iter(t)]*2))
  ok=10**19
  ng=-1
  while ok-ng>1:
    mid=(ok+ng)//2
    if sum(max(0,0--(mid-w)//d)for w,d in z)<k:ng=mid
    else:ok=mid
  print(ng)
main()

# Optimized solution
def main():
  n,k,*t=list(map(int,open(0).read().split()))
  *z,=list(zip(*[iter(t)]*2))
  ok=10**19
  ng=-1
  while ok-ng>1:
    mid=(ok+ng)//2
    if sum((mid-w)//d+1for w,d in z if w<=mid)<k:ng=mid
    else:ok=mid
  print(ok)
main()
# Original solution
N = eval(input())
H = list(map(int, input().split() ) )

step_max = 0

for i in H:
    step = 0
    for k in range(len(H)-1):
        if H[k] >= H[k+1]:
            step += 1
        else:
            break
    if step > step_max:
        step_max = step
    del H[0]

print(step_max)

# Optimized solution
N = eval(input())
H = list(map(int, input().split() ) )

count = 0
step = [0]*len(H)

for i in range(len(H)-1):
    if H[i]>=H[i+1]:
        count += 1
    else:
        count = 0
    step[i+1] = count

print((max(step)))
# Original solution
N = eval(input())
H = list(map(int, input().split() ) )

count = 0
step = [0]*len(H)

for i in range(len(H)-1):
    if H[i]>=H[i+1]:
        count += 1
    else:
        count = 0
    step[i+1] = count

print((max(step)))

# Optimized solution
N = int(eval(input()))
H = list( map(int, input().split(" ")) )

count = 0
count_max = 0

for i in range(0, len(H)-1):
    if H[i] >= H[i+1]:
        count += 1
    else:
        if count_max < count:
            count_max = count
        count = 0
if count_max < count:
    count_max = count
print(count_max)
# Original solution
n = int (eval(input()))
h = list(map(int,input().split()))
count_list = []
count=0
for i in range(n):
   if i == n-1:
      break
   if h[i] >= h[i+1]:
      if count !=0:
         count +=1
      else:
         count = 1
   else:
      count = 0
   count_list.append(count)
if not count_list:
   count_list.append(0)
print((max(count_list)))

# Optimized solution
n = int(eval(input()))
d= list(map(int,input().split()))

count=0
h=0

for i in range(n-1):
  if d[i]>=d[i+1]:
    count+=1
  else:
    count=0
  if h<count:
    h=count
print(h)
# Original solution
import sys

n = int(eval(input()))
a = []
b = input().split(" ")
for i in range(n):
	a.append(int(b[i]))

if n == 1:
	print((0))
	sys.exit()

mx = 0
cnt = 0
for i in range(n-2, -1, -1):
	if a[i] >= a[i+1]:
		cnt += 1
		mx = max(mx, cnt)
	else:
		cnt = 0

print(mx)


# Optimized solution
n=int(eval(input()))
h=list(map(int,input().split()))

 
count=0
count_list=[0]

 
for i in range(n-1):
    if h[i]>=h[i+1]:
        count+=1
        count_list.append(count)
    else :
        count=0

print((max(count_list)))
# Original solution
N = int(eval(input()))
H = list(map(int, input().split()))
sorted_H = sorted(H)
sorted_H.reverse()
ans = []
for h in sorted_H:
  cnt = 0
  flag = True
  now = H.index(h)
  while flag and (now + 1) < len(H):
    if H[now] < H[now + 1]:
      flag = False
    else:
      now += 1
      cnt += 1
  ans.append(cnt)
print((max(ans)))

# Optimized solution
N = int(eval(input()))
H = list(map(int, input().split()))
ans = []
cnt = 0

for i in range(N - 1):
  if H[i] < H[i + 1]:
    ans.append(cnt)
    cnt = 0
  else:
    cnt += 1
ans.append(cnt)
print((max(ans)))
# Original solution
N = int(eval(input()))
H = list(map(int, input().split()))

movable = [0]*N
i = 0
while i < N-1-max(movable):
    j = i
    while j < N-1 and H[j] >= H[j+1]:
        movable[i] += 1
        j += 1
    i = i + movable[i] + 1

print((max(movable)))

# Optimized solution
N = int(eval(input()))
H = list(map(int, input().split()))

movable = [0]*N
i = 0
while i < N-1:
    j = i
    while j < N-1 and H[j] >= H[j+1]:
        movable[i] += 1
        j += 1
    i = i + movable[i] + 1

print((max(movable)))