Harryxun/stf_run huggingface dataset:
X = int(input())
five = [0] * 64
five_inv = [0] * 64
for i in range(64):
  five[i] = i ** 5
  five_inv[i] = -five[i]

def check(x):
  for i in range(64):
    if X + five[i] in five:
      B = i
      A = five.index(five[i] + X)
      break
    if X - five[i] in five:
      B = -i
      A = five.index(five[i] + X)
      break
    if X + five[i] in five_inv:
      B = i
      A = -five_inv.index(five[i] + X)
      break
    if X - five[i] in five_inv:
      B = -i
      A = -five_inv.index(five[i] + X)
      break
  return "{} {}".format(A,B)

print(check(X))

### FIXED CODE ###

X = int(input())
five = [0] * 200
five_inv = [0] * 200
for i in range(200):
  five[i] = i ** 5
  five_inv[i] = -five[i]

def check(x):
  A = 0
  B = 0
  for i in range(200):
    if X + five[i] in five:
      B = i
      A = five.index(five[i] + X)
      break
    elif X - five[i] in five:
      B = -i
      A = five.index(-five[i] + X)
      break
    elif X - five[i] in five_inv:
      B = -i
      A = -five_inv.index(-five[i] + X)
      break
  return "{} {}".format(A,B)

print(check(X))
x=list(map(int,input().split()));x.sort();print(x[0]+x[1]+x[2]*2**int(input())

### FIXED CODE ###

x=list(map(int,input().split()));x.sort();print(x[0]+x[1]+x[2]*2**int(input()))
while True:
  H, W = map(int, raw_input().split())
  if H == 0 and 'W' == 0:
    break
  print '#'*W
  for l in range(0, H-2):
    print '#' + (W-2)*'.' + '#'
  print '#' * W
  print ''

### FIXED CODE ###

while True:
  H, W = map(int, raw_input().split())
  if H == 0 and W == 0:
    break
  print '#'*W
  for l in range(0, H-2):
    print '#' + (W-2)*'.' + '#'
  print '#' * W
  print ''
s= input()
V = list(s)
X = [chr(ord('a') + i) for i in range(26)]

if len(s)<26:
  for i in range(26):
    count1 = s.count(X[i])
    if count1 >= 1:
      continue
    else:
      Nasi = X[i]
      break
  ans = s + Nasi
else:
  if s == "zyxwvutsrqponmlkjihgfedcba":
    ans= -1
  else:
    for i in range(25, 0, -1):
        if V[i] > V[i-1]:
          ans = V[0:i-2]
          ans.append(min(V[i+1:26]))
          ans = ''.join(ans)
          break
        else:
          continue
print(ans)

### FIXED CODE ###

s= input()
V = list(s)
X = [chr(ord('a') + i) for i in range(26)]

if len(s)<26:
  for i in range(26):
    count1 = s.count(X[i])
    if count1 >= 1:
      continue
    else:
      Nasi = X[i]
      break
  ans = s + Nasi
else:
  if s == "zyxwvutsrqponmlkjihgfedcba":
    ans= -1
  else:
    for i in range(25, 0, -1):
        if V[i] > V[i-1]:
          ans = V[0:i-1]
          if ans == []:
            ans = chr(ord(V[0]) + 1)
          else:
              B = min(V[i:26])
              while B <= V[i-1]:
                  B = chr(ord(B) + 1)
              while B in ans:
                  B = chr(ord(B) + 1)
              ans.append(B)
              ans = ''.join(ans)
              break
        else:
            continue
print(ans)
x,y = map(int,input().split())
a = 1
b = 1
n = (2*y-x)//3
m = (2*x-y)//3

if (x+y)%3 == 0:
  for i in range(n+1,n+m+1):
    a *= i
  for j in range(1,m+1):
    b *= j
  print(a//b)
else:
  print(0)

### FIXED CODE ###

n = int(input())

print(n**2)
n = int(input())
a = list(map(int, input().split()))

res = [0] * n
cnt = 1
for i in range(1, n-1):
    if a[i-1] == a[i]:
        cnt += 1
    else:
        res[a[i-1]-1] = cnt
        cnt = 1
res[a[i-1]-1] = cnt
[print(j) for j in res]

### FIXED CODE ###

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

res = [0] * n
for i in range(len(a)):
    res[a[i]-1] += 1

[print(j) for j in res]
3 3
1
3
1
3
1
3

### FIXED CODE ###

n,k=map(int,input().split())
ans=[1]*n
for i in range(k):
  d=int(input())
  a=list(map(int,input().split()))
  for i in range(d):
    ans[a[i]-1]=0
print(sum(ans))
n,m,x = map(int, input().split())
ca = [list(map(int, input().split())) for _ in range(n)]
anytassei = False

# bit = [0 for _ in range(n)]
mincost = 0
for i in range(n):
	mincost += ca[i][0]

for cnt in range(2**n):
	cost = 0
	learn = [0 for _ in range(n)]

	for i in range(n):
		# bit[i] = (cnt//2**i)%2
		if (cnt//2**i)%2 == 1:
			cost += ca[i][0]
			for j in range(m):
				learn[j] += ca[i][1+j]
	# print(bit)

	tassei = True
	for j in range(m):
		if learn[j] < x: tassei = False
	if tassei and cost <= mincost:
		mincost = cost
		anytassei = True

if anytassei: print(mincost)
else: print(-1)


### FIXED CODE ###

n,m,x = map(int, input().split())
ca = [list(map(int, input().split())) for _ in range(n)]
anytassei = False

# bit = [0 for _ in range(n)]
mincost = 0
cost = 0
learn = [0 for _ in range(n)]
for i in range(n):
	mincost += ca[i][0]

for cnt in range(2**n):
	cost = 0
	learn = [0 for _ in range(m)]

	# bit膳探索
	for i in range(n):
		# bit[i] = (cnt//2**i)%2
		if (cnt//2**i)%2 == 1:
			cost += ca[i][0]
			for j in range(m):
				learn[j] += ca[i][1+j]
	# print(bit)

	# 理解度達成しているか判定
	tassei = True
	for j in range(m):
		if learn[j] < x: tassei = False

	# 達成している and 最小コスト更新している
	if tassei and cost <= mincost:
		mincost = cost
		anytassei = True

if anytassei: print(mincost)
else: print(-1)
import sys
input = sys.stdin.buffer.readline
 
def main():
    a,b,c,d = map(int,input().split())
    MOD = 10**9+7
    P= c+d+5
    fac = [0 for _ in range(P+1)]
    fac[0],fac[1] = 1,1
 
    for i in range(2,P+1):
        fac[i] = (fact[i-1]*i)%MOD
        
    def comb(x,y):
        return (fac[x+y]*pow(fac[x],MOD-2,MOD)*pow(fac[y],MOD-2,MOD))%MOD
 
    print((comb(c+1,d+1)-comb(c+1,b)-comb(d+1,a)+comb(a,b))%MOD)
    
if _name_ == "_main_":
    main()


### FIXED CODE ###

import sys
input = sys.stdin.buffer.readline
 
def main():
    a,b,c,d = map(int,input().split())
    MOD = 10**9+7
    N = c+d+5
    fac = [0 for _ in range(N+1)]
    fac[0],fac[1] = 1,1
 
    for i in range(2,N+1):
        fac[i] = (fac[i-1]*i)%MOD
        
    def comb(g,h):
        return (fac[g+h]*pow(fac[g],MOD-2,MOD)*pow(fac[h],MOD-2,MOD))%MOD
 
    print((comb(c+1,d+1)-comb(c+1,b)-comb(d+1,a)+comb(a,b))%MOD)
    
if __name__ == "__main__":
    main()
N, M = map(int,input().split())
A = list(map(int,input().split()))
BC = [list(map(int,input().split())) for _ in range(N)]
BC.sort(key = lambda x: -x[1])

for B, C in BC:
  A.extend([C]*B)
  if len(A) > N*2:
    break

print(sum(A[:N][::-1]))

### FIXED CODE ###

N, M = map(int,input().split())
A = list(map(int,input().split()))
BC = [list(map(int,input().split())) for _ in range(M)]
BC.sort(key = lambda x: -x[1])

for B, C in BC:
  A.extend([C]*B)
  if len(A) > N*2:
    break
A.sort(reverse = True)
print(sum(A[:N]))
def num_steps(steps, cache={}):
    if steps in out or steps < 0 :
        return 0
    elif steps == 0:
        return 1

    if steps in cache:
        return cache[steps]
    else:
        one = num_steps(steps-1, cache)
        two = num_steps(steps-2, cache)
        ans = one + two
        cache[steps] = ans

        return ans%mod

n, m = map(int, input().split())
out = set(int(input()) for _ in range(m))
mod = 1000000007

print(num_steps(n))



### FIXED CODE ###

import sys
sys.setrecursionlimit(200000)
def num_steps(steps, cache={}):
    if steps in out or steps < 0 :
        return 0
    elif steps == 0:
        return 1

    if steps in cache:
        return cache[steps]
    else:
        one = num_steps(steps-1, cache)
        two = num_steps(steps-2, cache)
        ans = one + two
        cache[steps] = ans

        return ans%mod

n, m = map(int, input().split())
out = set(int(input()) for _ in range(m))
mod = 1000000007

print(num_steps(n))
str = input()
t = 0

for s in str:
  t = t + int(str[s])
  
print(t)

### FIXED CODE ###

str = input()

a = int(str[0])
b = int(str[1])
c = int(str[2])

print(a+b+c)
import sys
try:
	while 1:
		temp = input()
		if (temp==0):
			break
		N = temp
		a = []
		for i in range(N):
			a.append(map(int, raw_input().split())+[0])
		a.append([0 for i in range(0,temp+1)])	 
		for i in range(0,temp):#????????¢??????
			for j in range(0,temp):#????????¢??????
				a[i][temp] += a[i][j]
		for k in range(0,temp+1):#????????¢??????
			for l in range(0,temp):#????????¢??????
				a[temp][k] += a[l][k]
		for m in range(0,temp+1):
			for n in range(0,temp+1):
				sys.stdout.write(str(a[m][n]).rjust(5))
			print ""
except(RuntimeError):
	pass

### FIXED CODE ###

import sys
try:
	while 1:
		temp = input()
		if (temp==0):
			break
		N = temp
		a = []
		for i in range(N):
			a.append(map(int, raw_input().split())+[0])
		a.append([0 for i in range(0,temp+1)])
		for i in range(0,temp):
			for j in range(0,temp):
				a[i][temp] += a[i][j]
		for k in range(0,temp+1):
			for l in range(0,temp):
				a[temp][k] += a[l][k]
		for m in range(0,temp+1):
			for n in range(0,temp+1):
				sys.stdout.write(str(a[m][n]).rjust(5))
			print ""
except(RuntimeError):
	pass
while True :
    (x,y) = int(i) for i in input().split()
    if 0 = x and 0 = y:
        break
    elif x <= y:
        print(x,y)
    else :
        peint(y,x)

### FIXED CODE ###

while True:
    (x, y) = [int(i) for i in input().split()]
    
    if x == y == 0 :
        break

    if x <= y :
        print(x, y)
    else :
        print(y, x)
import collections, itertools


class UnionFind():
    def __init__(self, size):
        self.dat = list(range(size))
        self.SIZE = [1] * size  # 0-indexed

    def find(self, x):
        dat = self.dat
        stack = [x]
        while True:
            y = stack[-1]
            if dat[y] != y:
                stack += [dat[y]]
            else:
                break
        for s in stack:
            dat[s] = y
        return y

    def unite(self, x, y):
        is_same = self.is_same
        find = self.find
        SIZE = self.SIZE
        dat = self.dat
        if not is_same(x, y):
            X, Y = find(x), find(y)
            SX, SY = SIZE[X], SIZE[Y]
            if SX > SY:
                m = dat[X] = Y
            else:
                m = dat[Y] = X
            SIZE[m] = SX + SY
            SIZE[X + Y - m] = 0

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

    def scan_uf(self):
        find = self.find
        length = len(self.dat)
        for i in range(length):
            find(i)

    def size(self, x):
        return self.SIZE[self.find(x)]


N = int(input())
S = [[int(_) for _ in input()] for _ in range(N)]
G = collections.defaultdict(set)
for i, j in itertools.product(range(N), repeat=2):
    if S[i][j]:
        G[i].add(j)
P = [-1] * N
P[0] = -2
D = [-10] * N
D[0] = 0
Q = collections.deque([0])
UF = UnionFind(N)
while Q:
    x = Q.popleft()
    Gx = list(G[x])
    for y in Gx:
        if P[x] == y:
            continue
        if D[y] == -10:
            D[y] = D[x] + 1
            P[y] = x
            Q += [y]
        else:
            G[x].remove(y)
            if D[x] > D[y]:
                x, y = y, x
            cy1 = [y]
            cy2 = [x]
            for _ in range(D[y] - D[x]):
                cy1 += [P[cy1[-1]]]
            while True:
                cy1 += [P[cy1[-1]]]
                cy2 += [P[cy2[-1]]]
                if cy1[-1] == cy2[-1]:
                    break
            cy = cy1[-2::-1] + cy2
            if len(cy) % 2:
                print(-1)
                exit()
            c1 = cy[0]
            c2 = cy[1]
            for ca, cb in zip(cy[::2], cy[1::2]):
                UF.unite(c1, ca)
                UF.unite(c2, cb)
UF.scan_uf()
print(len(set(UF.dat)))


### FIXED CODE ###

import numpy as np
import sys
from scipy.sparse.csgraph import floyd_warshall, csgraph_from_dense
N = int(sys.stdin.buffer.readline())
S = np.frombuffer(sys.stdin.buffer.read(),
                  dtype='S1').reshape(N, -1)[:, :N].astype(int)
G = csgraph_from_dense(S)
F = floyd_warshall(G).astype(int)
F2 = F % 2
I0 = np.where(F2[0] == 0)
I1 = np.where(F2[0] == 1)
if (S[I0][:, I0] == 0).all() and (S[I1][:, I1] == 0).all():
    print(F.max() + 1)
    exit()
print(-1)
from collections import defaultdict
from queue import Queue
g = defaultdict(list)
visted = defaultdict(bool)
N, M = map(int, input().split())
for i in range(M):
    A, B = map(int, input().split())
    g[A].append(B)
    g[B].append(A)

h = {}
h2 = defaultdict(list)
def solve(v):
    height = 0
    visited = set()
    q = Queue()
    visited.add(v)
    h[v] = height
    h2[height].append(v)
    q.put(v)
    while not q.empty():
        v = q.get()
        height += 1
        for c in g[v]:
            if not c in visited:
                visited.add(c)
                h[c] = height
                h2[height].append(c)
                q.put(c)

solve(1)
ans = [0] * (N+1)

print('Yes')
for v in range(2, N+1):
    i = h[v]
    print(h2[i-1][0])

### FIXED CODE ###

from collections import defaultdict
from queue import Queue
g = defaultdict(list)
visted = defaultdict(bool)
N, M = map(int, input().split())
for i in range(M):
    A, B = map(int, input().split())
    g[A].append(B)
    g[B].append(A)

h = [-1] * (N+1)

h2 = defaultdict(list)
def solve(v):
    visited = set()
    q = Queue()
    visited.add(v)
    h[v] = 0
    h2[0].append(v)
    q.put(v)
    while not q.empty():
        v = q.get()
        for c in g[v]:
            if not c in visited:
                visited.add(c)
                h[c] = h[v] + 1
                h2[h[v]+1].append(c)
                q.put(c)

solve(1)
ans = []

for v in range(2, N+1):
    i = h[v]

    for c in g[v]:
        if h[c] == i-1:
            ans.append(c)
            break


print('Yes')
for v in ans:
    print(v)
# coding: utf-8
a = input()
if a = "Sunny":
  print("Cloudy")
elif a = "Cloudy":
  print("Rainy")
else:
  print("Sunny")

### FIXED CODE ###

a = input()
if a == "Sunny":
  print("Cloudy")
elif a == "Cloudy":
  print("Rainy")
else:
  print("Sunny")
N=int(input())
As=[int(i) for i in input().split()]

def gcd(m,n):
    x=max(m,n)
    y=min(m,n)
    if x%y==0:
        return y
    else:
        while x%y!=0:
            z=x%y
            x=y
            y=z
        else:
            return z

gcd1.sort()
gcd2.sort()
if gcd1.count(min(gcd1))>=2:
    print(gcd2[2])
else:
    print(gcd1[1])

### FIXED CODE ###

from fractions import*
n,*a=map(int,open(0).read().split())
p=gcd(a[0],a[1])
l=[a[0],p]
c=list(reversed(a))
q=gcd(c[0],c[1])
r=[q]
for i in range(1,n-1):
    p=gcd(p,a[i+1])
    l.append(p)
    q=gcd(q,c[i+1])
    r.append(q)

r=r[::-1]+[a[-1]]
r=r[1:]+[0]
l=[0]+l

print(max(gcd(s,t)for s,t in zip(r,l)))
h,w=map(int, input().split())
for i in range(h):
  t=input().split().find('snuke')
  if t<0:
    continue
  print('%s%d' % (chr(t+ord('A')), i+1))
  quit(0)

### FIXED CODE ###

h,w=map(int, input().split())
for i in range(h):
  l = input().split()
  if 'snuke' in l:
    t=l.index('snuke')
    print('%s%d' % (chr(t+ord('A')), i+1))
    quit(0)
# 足場は1~N 添え字は0~N-1
# 足場が1~Kまでのとき、dp[i+1]を求めるには、dp[j]+abs(h[i+1]-h[j]) 0<=j<=iの最小値を求める
# 1<=i+1<=Kのとき
# dp[1] = abs(h[1] - h[0])
# dp[K] dp[K-1]+abs(h[K]-h[K-1]), , ,dp[1]+abs(h[K]-h[1]), dp[0]+abs(h[K]-h[0])

# 足場がK+1~Nまでのとき(K+1<=i+1<=N-1のとき)
# dp[K+1] dp[K]+abs(h[K+1]-h[K]), , ,dp[1]+abs(h[K+1]-h[1])
# dp[N-1] dp[N-2]+abs(h[N-1]-h[N-2]), , ,dp[N-K-1]+abs(h[N-1]-h[N-K-1])
# dp[i+1]を求めるには、dp[j]+abs(h[i+1]-h[j]) i+1-K<=j<iの最小値を求める

# 初期化
# dp_jはdp[i+1]を求める際に使用する
dp = []
dp_j = []
for i in range(100001):
    dp.append(float('inf'))
for i in range(101):
    dp_j.append(float('inf'))

# 入力 添え字のN-1が足場Nに相当する
N, K = map(int, input().split())
h = list(map(int, input().split()))

dp[0] = 0
for i in range(N - 1):
    if 0 <= i and i <= K - 1:
        for j in range(i + 1):
            dp_j[j] = dp[j] + abs(h[i + 1] - h[j])
        dp[i + 1] = min(dp_j)

    else:
        for j in range(i + 1 - K, i+1):
            dp_j[j] = dp[j] + abs(h[i + 1] - h[j])
        for j in range(i + 1 - K):
            dp_j[j] = float('inf')
        dp[i + 1] = min(dp_j)

print(dp[N - 1])

### FIXED CODE ###

import numpy as np

# 足場は1~N 添え字は0~N-1
# 足場iの最小値は、min(dp[j]+abs(h[i]-h[j]))  min(0,i-K)<=j<=i-1<i
# 参照させてもらいました　https://harutech.hateblo.jp/entry/2019/02/10/202515　

# 入力 添え字のN-1が足場Nに相当する
N, K = map(int, input().split())
h = np.array(list(map(int, input().split())))

# 初期化
dp = np.zeros(N, dtype=np.int)

dp[0] = 0
for i in range(1, N):
    start = max(0, i - K)
    dp[i] = np.min(dp[start:i] + np.abs(h[i] - h[start:i]))

print(dp[N - 1])
t=int(input())

li=list(map(int,input().split()))

count=0
while true:
  if li[0:t]%2==0:
  	for i in range(t):
    	li[i]=li[i]/2
    count+=1
	continue
  break
print(count)

### FIXED CODE ###

t=int(input())

li=list(map(int,input().split()))

count=0
while True:
    x=[True if i%2==0 else False for i in li]
    if all(x):
        for i in range(t):
            li[i]=li[i]/2
        count+=1
    else:
        break
print(count)
L = int(input())
for i in range(20):
    if 2**i > L:
        r = i-1
        break
        
N = r+1
ans = []
for i in range(1, N):
    ans.append([str(i), str(i+1), str(2**i)])
    ans.append([str(i), str(i+1), str(0)])
    
t = N-1
while t >= 1:
    if L-2**(t-1) >= 2**r:
        ans.append([str(t), str(N), str(L-2**(t-1))])
    t -= 1
        
print(N, len(ans))
for i in range(len(ans)):
    print(" ".join(ans[i]))

### FIXED CODE ###

L = int(input())
for i in range(21):
    if 2**i > L:
        r = i-1
        break
        
N = r+1
ans = []
for i in range(1, N):
    ans.append([str(i), str(i+1), str(2**(i-1))])
    ans.append([str(i), str(i+1), str(0)])

t = N-1
while t >= 1:
    if L-2**(t-1) >= 2**r:
        ans.append([str(t), str(N), str(L-2**(t-1))])
        L -= 2**(t-1)
    t -= 1
        
print(N, len(ans))
for i in range(len(ans)):
    print(" ".join(ans[i]))
from numba import jit


### 解答
N, K = map(int, input().split())
A = list(map(int, input().split()))

#B = [0]*N                                 # 記録用のリスト

@jit
for k in range(min(42, K)):                        # 以降の操作をK回繰り返す
  B = [0 for _ in range(N)] 
  for i in range(N):                      # 各電球によって照らされる範囲を考える
    start = max(0, i-A[i])                # 始点のインデックスは0かi-A[i]
    end = min(N, i+A[i]+1)                # 終点のインデックスはNかi+A[i]+1
    B[start] += 1                         # 始点に+1を記録する
    if end <= N - 1:
      B[end] -= 1                         # 終点に電球が存在する場合は-1を記録する
  amin = B[0]
  A[0] = B[0] 
  for i in range(1, N):                   # 累積和の計算
    A[i] = B[i-1] + B[i]
    amin = min(A[i], amin)
  if amin == N:                        # すべての電球がN個の電球に照らされるタイミングでbreakする
    break

print(*A)                                 # リストAの中身を順に表示

### FIXED CODE ###

import numpy as np
from numba import njit
 
n, k = map(int, input().split())
a = np.array(list(map(int, input().split())), dtype=np.int64)
 
@njit
def loop1(a):
  b = np.zeros(n+1, dtype=np.int64)
  for i in range(n):
    l = max(0, i-a[i])
    r = min(i+a[i]+1, n)
    b[l] += 1
    if r <= n-1: b[r] -= 1
  
  b = np.cumsum(b)[:-1]
  return b
 
for q in range(min(42, k)):
  a = loop1(a)
    
print(*a)
import math
from functools import reduce

def gcd_list(numbers):
    return reduce(math.gcd, numbers)


input_list1 = list(map(int, input().split()))
input_list2 = list(map(int, input().split()))
#input_list1 = [3, 81]
#input_list2 = [33, 105, 57]
N = input_list1[0]
X = input_list1[1]

#print('N:', N)
#print('X:', X)

# 都市のリストにXを追加し、小さい順にソートする
input_list2.append(X)
input_list2.sort()
#print(input_list2)

# それぞれの差を取る
ans_list = []
for i, target in enumerate(input_list2):
    if i == N:
        break
    aa = input_list2[i + 1] - input_list2[i]
    #print(input_list2[i + 1], '-' , input_list2[i])
    ans_list.append(aa)

# 重複排除
ans_list = set(ans_list)

# 最大公約数を求める
if len(ans_list) > 1:
    print(gcd_list(ans_list))
else:
    print(min(ans_list))


### FIXED CODE ###

#import math
from functools import reduce

def gcd_list(numbers):
    def gcd(a, b):
        if (b == 0):
            return a;
        return gcd(b, a % b)

    return reduce(gcd, numbers)


input_list1 = list(map(int, input().split()))
input_list2 = list(map(int, input().split()))
#input_list1 = [3, 81]
#input_list2 = [33, 105, 57]
N = input_list1[0]
X = input_list1[1]

#print('N:', N)
#print('X:', X)

# 都市のリストにXを追加し、小さい順にソートする
input_list2.append(X)
input_list2.sort()
#print(input_list2)

# それぞれの差を取る
ans_list = []
for i, target in enumerate(input_list2):
    if i == N:
        break
    aa = input_list2[i + 1] - input_list2[i]
    #print(input_list2[i + 1], '-' , input_list2[i])
    ans_list.append(aa)

# 重複排除
ans_list = set(ans_list)

# 最大公約数を求める
if len(ans_list) > 1:
    print(gcd_list(ans_list))
else:
    print(min(ans_list))
w=list(input())
for i in range(len(w)):
    if w[i]==w[i+1] or w[i]==w[i+2]:
        print("{} {}".format(i+1,i+3))
        break
else:
    print("{} {}".format(-1,-1))

### FIXED CODE ###

w=list(input())
l=len(w)
w.append(0) #そのままだとforループの最後でw[i+2]がout of rangeになる
for i in range(l-1):
    if w[i]==w[i+2]:
        print("{} {}".format(i+1,i+3))
        break
    elif w[i]==w[i+1]:
        print("{} {}".format(i+1,i+2))
        break
else:
    print("{} {}".format(-1,-1))
nums = [1,2,3]
a = int(input())
b = int(input())
c = 0

for i in nums:
  if i != a || i != b:
    c = i
    
print(c)


### FIXED CODE ###

nums = [1,2,3]
a = int(input())
b = int(input())
c = 0

for i in nums:
  if int(i) != a and int(i) != b:
    c = int(i)
    
print(c)
S = input()
s = None//初期値
for i in range(len(S)):
  c = S[i]
  if c == "A":
    s = i
  if c == "Z":
    e = i
print(e-s+1)


### FIXED CODE ###

S = input()
L = len(S)
for i in range(L):
  c = S[i]
  if c == "A":
    s = i
    break
for i in range(L):
  c = S[-(i+1)]
  if c == "Z":
    e = L - (i+1)
    break
print(e-s+1)
n = int(input())
x = list(map(int,input().split()))
for i in range(n):
  a = x[:i] + x[i+1:]
  print(a[n//2])

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
c = sorted(a)
mid1 = c[n//2-1]
mid2 = c[n//2]
if mid1 == mid2:
  for i in range(n):
    print(mid1)
  exit()
for i in range(n):
  if a[i] <= mid1:
    print(mid2)
  else:
    print(mid1)
a,b = map(int ,raw_input().split())

if  a < b:
	print "a < b"
else:
	if a > b:
		print "a > b"
	else:
		if a = b:
		print "a = b"		

### FIXED CODE ###

a,b = map(int ,raw_input().split())

if  a < b:
	print "a < b"
else:
	if a > b:
		print "a > b"
	else:
		if a == b:
			print "a == b"
import numpy as np
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
 
a = A % 10
b = B % 10
c = C % 10
d = D % 10
e = E % 10

aa = A // 10
bb = B // 10
cc = C // 10
dd = D // 10
ee = E // 10
 
r = np.array([a, b, c, d, e])
k = (r > 0).sum()
l = r[r != 0].min()
print((aa + bb + cc + dd + ee) * 10 + 10*(k-1) + l)

### FIXED CODE ###

import numpy as np
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
 
a = A % 10
b = B % 10
c = C % 10
d = D % 10
e = E % 10
 
aa = A // 10
bb = B // 10
cc = C // 10
dd = D // 10
ee = E // 10
 
r = np.array([a, b, c, d, e])
k = (r > 0).sum()
if k > 0:
  l = r[r != 0].min()
  print((aa + bb + cc + dd + ee) * 10 + 10*(k-1) + l)
else:
  print(A + B + C + D + E)
a, b = map(int, input().split())
if a - a*b >= 0:
  print(a-2*b)
else
  print("0")

### FIXED CODE ###

a, b = map(int, input().split())
if a - 2*b >= 0:
  print(a-2*b)
else:
  print("0")
n = int(input())
h_list = list(map(int,input().split()))
count_list = []
i = 0
counter = 0
for i in range(n-1):
    if h_list[i] >= h_list[i + 1]:
       count_list.append(1)
    else :
       count_list.append(0)
result_list = []
result = 0
for m in count_list:
    if m == 1:
        result += 1
        result_list.append(result)
        
    else :
        result = 0
        result_list.append(result)
        
print(max(result_list))  
  
    
    
    
  

### FIXED CODE ###

n = int(input())
h_list = list(map(int,input().split()))
count_list = []
i = 0
counter = 0
for i in range(n-1):
    if h_list[i] >= h_list[i + 1]:
       count_list.append(1)
    else :
       count_list.append(0)
result_list = []
result = 0
for m in count_list:
    if m == 1:
        result += 1
        result_list.append(result)
        
    else :
        result = 0
        result_list.append(result)
        
if result_list == []:
    print(0)
else:
    print(max(result_list))