Harryxun/stf_run huggingface dataset:
import sys
import math
from collections import deque
import copy

input = sys.stdin.readline

s = input()
t = input()

dp = [[0 for _ in range(len(s) + 10)] for _ in range(len(s) + 10)]

for i in range(1, len(s)):
    for l in range(1, len(t)):
        if s[i - 1] == t[l - 1]:
            dp[i][l] = max(max(dp[i - 1][l - 1] + 1, dp[i][l - 1]), dp[i - 1][l])
        else:
            dp[i][l] = max(dp[i][l - 1], dp[i - 1][l])
length = dp[len(s) - 1][len(t) - 1]
if length == 0:
    print("")
else:
    ans = ''
    i = len(s) - 1
    l = len(t) - 1
    while i > 0 and l > 0:
        if dp[i-1][l] == dp[i][l]:
            i -= 1
        elif dp[i][l-1] == dp[i][l]:
            l -= 1
        else:
            ans = s[i - 1] + ans
            i -= 1
            l -= 1
    print(ans)


### FIXED CODE ###

import sys
import math
from collections import deque
import copy

input = sys.stdin.readline

s = input()
t = input()

dp = [[0 for _ in range(len(t) + 10)] for _ in range(len(s) + 10)]

for i in range(1, len(s)):
    for l in range(1, len(t)):
        if s[i - 1] == t[l - 1]:
            dp[i][l] = max(max(dp[i - 1][l - 1] + 1, dp[i][l - 1]), dp[i - 1][l])
        else:
            dp[i][l] = max(dp[i][l - 1], dp[i - 1][l])
length = dp[len(s) - 1][len(t) - 1]
if length == 0:
    print("")
else:
    ans = ''
    i = len(s) - 1
    l = len(t) - 1
    while i > 0 and l > 0:
        if dp[i-1][l] == dp[i][l] and i >= 1:
            i -= 1
        elif dp[i][l-1] == dp[i][l] and l >= 1:
            l -= 1
        else:
            ans = s[i - 1] + ans
            i -= 1
            l -= 1
    print(ans)
import math


def digit_sum(b, n):
    if b > n:
        return n
    else:
        return digit_sum(b=b, n=n // b) + n % b


def main(n, s):
    if n == s:
        return n + 1
    elif s == 1:
        return n
    elif s > n:
        return -1
    else:
        sqrt_n = int(math.sqrt(n))
        for b in range(2, sqrt_n + 1):
            if digit_sum(b, n) == s:
                return b
        for p in range(1, sqrt_n + 1):
            b = (n - s) // (p + 1)
            if digit_sum(b, n) == s:
                return b
    return -1


if __name__ == '__main__':
    N = int(input())
    S = int(input())
    print(main(n=N, s=S))


### FIXED CODE ###

import math


def digit_sum(b, n):
    if b > n:
        return n
    else:
        return digit_sum(b=b, n=n // b) + n % b


def main(n, s):
    if s > n:
        return -1
    elif n == s:
        return n + 1
    else:
        b = 2
        while b * b <= n:
            if digit_sum(b, n) == s:
                return b
            b += 1

        p = 1
        b_min = -1
        while p * p <= n:
            if (n - s) % p == 0:
                b = (n - s) // p + 1
                if digit_sum(b, n) == s:
                    b_min = min(b_min, b) if b_min != -1 else b
            p += 1
        return b_min


if __name__ == '__main__':
    N = int(input())
    S = int(input())
    print(main(n=N, s=S))
import sys
sys.setrecursionlimit(4100000)
import math
import itertools
INF = float('inf')
from heapq import heapify, heappop, heappush

def main():
    a = int(input())
    b = int(input())

    if b < a:
        prnit('GREATER')
    elif a == b:
        print('EQUAL')
    else:
        print('LESS')


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
sys.setrecursionlimit(4100000)
import math
import itertools
INF = float('inf')
from heapq import heapify, heappop, heappush

def main():
    a = int(input())
    b = int(input())

    if b < a:
        print('GREATER')
    elif a == b:
        print('EQUAL')
    else:
        print('LESS')


if __name__ == '__main__':
    main()
s = input()
l = []
t = s[0]
m = 1
for i in range(1,len(s)):
    if s[i] == t:
        m += 1
    else:
        t = s[i]
        l.append(m)
        m = 1
l.append(m)

if max(l) == 1:
    print(-1,-1)
    exit()
if len(l) == 1:
    print(1,l[0])
if l[0] > 1:
    print(1,l[0]+l[1])
    exit()

ruiseki = [l[0]]
for i in range(1,len(l)):
    ruiseki.append(ruiseki[i-1] + l[i])

for i in range(len(ruiseki)-1):
    if ruiseki[i+1] - ruiseki[i] > 1 and i != len(ruiseki) - 2:
        print(ruiseki[i],ruiseki[i+1])
        exit()
    if ruiseki[i+1] - ruiseki[i] > 1 and i == len(ruiseki) - 2:
        print(ruiseki[i],ruiseki[i+1])
        exit()


### FIXED CODE ###

s = input()
l = []
t = s[0]
m = 1
for i in range(1,len(s)):
    if s[i] == t:
        m += 1
    else:
        t = s[i]
        l.append(m)
        m = 1
l.append(m)

if len(l) == 1:
    print(1,l[0])
    exit()
if l[0] > 1:
    print(1,l[0]+l[1])
    exit()

for i in range(len(s)-2):
    if s[i] == s[i+2] and s[i] != s[i+1]:
        print(i+1,i+3)
        exit()
if max(l) == 1:
    print(-1,-1)
    exit()

ruiseki = [l[0]]
for i in range(1,len(l)):
    ruiseki.append(ruiseki[i-1] + l[i])

for i in range(len(ruiseki)-1):
    if ruiseki[i+1] - ruiseki[i] > 1:
        print(ruiseki[i],ruiseki[i+1])
        exit()
import math
N = int(input())
A = [int(j) for j in input().split()]
B = [0]*N
B = A[:]
gcdmx = 0
D = 1
for j in range(0,N):
    D = D * B[j]
for j in range(0,N):
    gcdloc = D
    C = B[:]
    del C[j]
    for k in range(0,N-1):
        gcdloc = math.gcd(gcdloc,C[k])
    gcdmx = max(gcdloc,gcdmx)
print(gcdmx)

### FIXED CODE ###

import fractions as f

n = int(input())
A = [int(_) for _ in input().split()]

left = []
right = []

left.append(A[0])
for i in range(1,n):
    left.append(f.gcd(left[i-1],A[i]))

right.append(A[n-1])
for i in range(1,n):
    right.append(f.gcd(right[i-1],A[n-1-i]))

ans = 0
for i in range(n):
    if i == 0:
        ans = right[n-2]
    if i >= 1 and i <= n-2:
        ans = max(ans,f.gcd(left[i-1],right[n-2-i]))
    if i == n-1:
        ans = max(ans,left[n-2])
print(ans)
from functools import reduce
def factorial(N): return reduce(lambda x,y: x*y, [i for i in range(1,N+1)])

def is_prime(N):
  if N == 1: return False
  for i in range(2,int(N**0.5)+1):
    if N%i == 0: return False
  return True

def trial_division(N, factors):
  val = N
  cnt = 0
  
  if is_prime(N) is True:
    i = N
    if i not in factors: factors[i] = 1
    else: factors[i] += 1
  else:
    for i in range(2,N):
      while val % i == 0:
        val //= i
        if i not in factors: factors[i] = 1
        else: factors[i] += 1
        cnt += 1

      if cnt == 0:
        if i not in factors: factors[i] = 1
        else: factors[i] += 1


N = int(input())
factors = {}

for i in range(2,N+1):
  trial_division(i,factors)
print(reduce(lambda x,y: x*y,[factor+1 for factor in factors.values()])%(10**9+7))

### FIXED CODE ###

from math import factorial
from functools import reduce
from operator import mul

N = factorial(int(input()))
if N == 1:
  print(1)
  exit()

M = 10**9 + 7
ans = 1

div = 2
while N != 1:
  cnt = 0
  while N%div == 0:
    N //= div
    cnt += 1
  if cnt != 0:
    ans *= (cnt+1)
    ans = ans%M
  div += 1
print(ans)
s = list(input())
t = list(input())
 
def f(s, t):
  s.sort()
  t.sort(reverse=True)
  s_sum = 0
  t_sum = 0
  for i in range(len(s)):
    s[i] = ord(s[i])
  
  for i in range(len(t)):
    t[i] = ord(t[i])
  
  for i in range(len(s)):
    s_sum += s[i]
    t_sum += t[i]

    if s_sum < t_sum:
      return 'Yes'
    elif s_sum > t_sum:
      return 'No'
    elif s_sum == t_sum and i + 1 >= len(s) and not i + 1 >= len(t):
      return 'Yes'
  return 'No'
print(f(s, t))

### FIXED CODE ###

s = list(input())
t = list(input())
 
def f(s, t):
  s.sort()
  t.sort(reverse=True)
  s_sum = 0
  t_sum = 0
  for i in range(len(s)):
    s[i] = ord(s[i])
  
  for i in range(len(t)):
    t[i] = ord(t[i])
  
  for i in range(len(s)):
    if not i + 1 >= len(t):
      s_sum += s[i]
      t_sum += t[i]

      if s_sum < t_sum:
        return 'Yes'
      elif s_sum > t_sum:
        return 'No'
    else:
      break

  if len(s) < len(t):
    return 'Yes'
  else:
    return 'No'

print(f(s, t))
import numpy as np
import itertools
h = int(input())
w = int(input())
k = int(input())
s = [list(input()) for i in range(h)]
data = np.zeros(h*w).reshape(h,w)
for i in range(h):
    for j in range(w):
        if s[i][j] == '#':
            data[i][j] = 1

ans = 0
## 塗らない場合
if np.sum(data == 1) == k:
    ans = 1
## すべて塗った場合
if k == 0:
    ans = 1

a = list()
b = list()
for i in range(1,h):
    a += list(itertools.combinations(range(h), i))
for i in range(1,w):
    b += list(itertools.combinations(range(w), i))

for i in a:
    for j in b:
        temp = data.copy()
        temp[i,:] = 2
        temp[:,j] = 2
        if np.sum(temp == 1) == k:
            ans += 1

for i in a:
    temp = data.copy()
    temp[i,:] = 2
    if np.sum(temp == 1) == k:
        ans += 1
        
for j in b:
    temp = data.copy()
    temp[:,j] = 2
    if np.sum(temp == 1) == k:
        ans += 1
        
print(ans)

### FIXED CODE ###

import numpy as np
import copy
import itertools
h,w,k = map(int, input().split())
s = [list(input()) for i in range(h)]
data = np.zeros(h*w).reshape(h,w)
for i in range(h):
    for j in range(w):
        if s[i][j] == '#':
            data[i][j] = 1
 
ans = 0
## 塗らない場合
if np.sum(data == 1) == k:
    ans = 1
## すべて塗った場合
if k == 0:
    ans = 1
 
a = list()
b = list()
for i in range(1,h):
    a += list(itertools.combinations(range(h), i))
for i in range(1,w):
    b += list(itertools.combinations(range(w), i))
 
for i in a:
    for j in b:
        temp = data.copy()
        temp[i,:] = 2
        temp[:,j] = 2
        if np.sum(temp == 1) == k:
            ans += 1
 
for i in a:
    temp = data.copy()
    temp[i,:] = 2
    if np.sum(temp == 1) == k:
        ans += 1
        
for j in b:
    temp = data.copy()
    temp[:,j] = 2
    if np.sum(temp == 1) == k:
        ans += 1
        
print(ans)
A, gomi = int(input().split())
print('Yes' if A <= list(map(int,input().split())) else 'No')

### FIXED CODE ###

A, gomi = map(int, input().split())
print('Yes' if A <= sum(list(map(int,input().split()))) else 'No')
# encoding:utf-8
import copy
import numpy as np
import random

n = int(input())
F = []
for i in range(n):
    f = [int(i) for i in input().split()]
    F.append(f)



P = []
for i in range(n):
    P.append([int(i) for i in input().split()])

F = np.array(F)
P = np.array(P)


def cal_val(shop_num,open_time):
    same_time = int(np.dot(F[shop_num],open_time.T))
    # print(open_time)
    return P[shop_num,same_time+1]
#
# def to2digit(i):
#     open_time = np.zeros([10])
#     for count in range(10):
#         if i%2==1:
#             open_time[count] = 1
#         i = i//2
#     return open_time



values = []

for i in range(1,2**10):
    open_time = np.zeros([10])
    for j in range(10):
        if i%2==1:
            open_time[j] = 1
        i = i//2
    value = 0
    for shop_num in range(n):
        value += cal_val(shop_num,open_time)
    values.append(value)

print(max(values))


### FIXED CODE ###

# encoding:utf-8
import copy
import numpy as np
import random

n = int(input())
F = []
for i in range(n):
    f = [int(i) for i in input().split()]
    F.append(f)



P = []
for i in range(n):
    P.append([int(i) for i in input().split()])

F = np.array(F)
P = np.array(P)


def cal_val(shop_num,open_time):
    same_time = int(np.dot(F[shop_num],open_time.T))
    # print(open_time)
    return P[shop_num,same_time]
#
# def to2digit(i):
#     open_time = np.zeros([10])
#     for count in range(10):
#         if i%2==1:
#             open_time[count] = 1
#         i = i//2
#     return open_time



values = []
ans = -10**10
for i in range(1,2**10):
    open_time = np.zeros([10])
    for j in range(10):
        if i%2==1:
            open_time[j] = 1
        i = i//2
    value = 0
    for shop_num in range(n):
        value += cal_val(shop_num,open_time)
    values.append(value)
    ans = max(ans,value)


print(ans)
# print(max(values))
from math import factorial
n,k=[int(_) for _ in input().split()]
mod=10**9+7
if n!=k:
    for i in range(1,k+1):print((((factorial(k-1)//factorial(i-1)//factorial(k-i))%mod)*((factorial(n-k+1)//factorial(i)//factorial(n-k-i+1))%mod))%mod)
else:
    print(1)
    for i in range(1,k):print(0)

### FIXED CODE ###

from math import factorial
n,k=[int(_) for _ in input().split()]
mod=10**9+7
if n!=k:
    if k+1 > n-k+2:
        for i in range(1,n-k+2):print((((factorial(k-1)//factorial(i-1)//factorial(k-i))%mod)*((factorial(n-k+1)//factorial(i)//factorial(n-k-i+1))%mod))%mod)
        for i in range(2*k-n-1):print(0)
    else:
        for i in range(1,k+1):print((((factorial(k-1)//factorial(i-1)//factorial(k-i))%mod)*((factorial(n-k+1)//factorial(i)//factorial(n-k-i+1))%mod))%mod)
else:
    print(1)
    for i in range(1,k):print(0)
S,T = input(),input()

print(sum(int(a==b) for a,b zip(S,T)))

### FIXED CODE ###

S,T = input(),input()

print(sum(int(a==b) for a,b in zip(S,T)))
#!/usr/bin/env python3

import heapq

def main():
    n = int(input())
    h = list(map(int, input().split()))
    heapq.heapify(h)
    accepted = [heapq.heappop(h)]
    while len(h) > 0:
        assert len(h) >= 2
        first = heapq.heappop(h)
        second = heapq.heappop(h)
        if accepted[-1] == first:
            del first
            del second
        elif first == second:
            if len(h) > 0:
                third = heapq.heappop(h)
                del first
                del third
                accepted.append(second)
            else:
                accepted.pop()
                accepted.append(first)
                del second
        else:
            accepted.append(first)
            accepted.append(second)

    print(len(accepted))

main()


### FIXED CODE ###

#!/usr/bin/env python3

def main():
    n = int(input())
    an = list(map(int, input().split()))
    k = len(set(an))
    res = k - 1 if k % 2 == 0 else k
    print(res)

main()
n = int(input())
s = str(input())
count = 0
for i in range(n):
    if s[i] == 'a' or 'A':
        if s[i + 1] == 'b' or 'B':
            if s[i + 2] == 'c' or 'C':
                count += 1
print(count)

### FIXED CODE ###

n = int(input())
s = str(input())
count = 0
for i in range(n):
    if s[i] == 'a' or s[i] == 'A':
        if i + 1 < n:
            if s[i + 1] == 'b' or s[i + 1] == 'B':
                if i + 2 < n:
                    if s[i + 2] == 'c' or s[i + 2] ==  'C':
                        count += 1
print(count)
n,k,s=map(int,input().split())
a=[s]*k
b=[3]*(n-k)+[2]*k
p=s//2-1
for i in range(n-k):
    if i%p==0:
        a.append(s-1)
    else:
        a.append(2)
if s!=2:
    print(*a)
else:
    print(*b)

### FIXED CODE ###

n,k,s=map(int,input().split())
a=[s]*k
b=[3]*(n-k)+[s]*k
p=max(s//2-1,1)
for i in range(n-k):
    if i%p==0:
        a.append(s-1)
    else:
        a.append(2)
if s!=2 and s!=1:
    print(*a)
else:
    print(*b)
K, N = map(int, input().split())
A = list(map(int, input().split())
distances = {}
for i in range(1, len(A) + 1):
	distances += (A[i] - A[i - 1]
most = max(distances.keys())
output = K - most
print(output)

### FIXED CODE ###

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

distance = []
for i in range(1, N):
	distance.append(A[i] - A[i - 1])
distance.append((A[0] + K - (A[-1])))
most = max(distance)
output = K - most
print(output)
#!/usr/bin/env python3
import sys


def solve(T: str):
    a = ""
    prev = ""
    for i in range(len(T)):
        t = T[i]
        if t == "?":
            if prev =="P":
                t="D"
            elif prev == "D":
                t="P"
            else:
                if T[i+1] == "D":
                    t="P"
                else:
                    t="D"
        a+=t
        prev = t
    print(a)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    T = next(tokens)  # type: str
    solve(T)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys


def solve(T: str):
    a = ""
    # prev = ""
    for i in range(len(T)):
        t = T[i]
        if t == "?":
            t="D"
        a+=t
        # prev = t
    print(a)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    T = next(tokens)  # type: str
    solve(T)

if __name__ == '__main__':
    main()
a=input()

if len(a)==1:
  print(0)
  exit()
  
b=[::2]
c=[1::2]

b0=b.count("0")
b1=b.count("1")
c0=c.count("0")
c1=c.count("1")

print(min(b0+c1,b1+c0))

### FIXED CODE ###

a=input()

if len(a)==1:
  print(0)
  exit()
  
b=a[::2]
c=a[1::2]

b0=b.count("0")
b1=b.count("1")
c0=c.count("0")
c1=c.count("1")

print(min(b0+c1,b1+c0))
n, x = (int(x) for x in input().split())

f = [0] * (n+1)
g = [0] * (n+1)
f[0] = 1
g[0] = 1
for i in range(1, n+1):
    f[i] = f[i-1]* 2 + 3
    g[i] = g[i-1]* 2 + 1

total = 0
remain = x

def eat(n):

    global total
    global f
    global remain

    if remain == 0:
        return
    if f[n] <= remain:
        total += g[n]
        remain -= f[n]
        return
    if f[n] > remain:
        remain -=1
        if f[n-1] > remain:
            eat(n-1)
        else:
            total += g[n-1]
            remain -= f[n-1]
            total += 1
            remain -= 1
            eat(n-1)

eat(n)
print(total)


### FIXED CODE ###




n, x = (int(x) for x in input().split())

f = [0] * (n+1)
g = [0] * (n+1)
f[0] = 1
g[0] = 1
for i in range(1, n+1):
    f[i] = f[i-1]* 2 + 3
    g[i] = g[i-1]* 2 + 1

total = 0
remain = x

def eat(n):

    global total
    global f
    global remain

    if remain == 0:
        return
    if n < 0:
        return
    if f[n] <= remain:
        total += g[n]
        remain -= f[n]
        return
    if f[n] > remain:
        remain -=1
        if remain == 0:
            return
        if f[n-1] > remain:
            eat(n-1)
        else:
            total += g[n-1]
            remain -= f[n-1]
            if remain == 0:
                return
            total += 1
            remain -= 1
            eat(n-1)

eat(n)
print(total)
n,k=map(int,input().split())
l=list(map(int,input().split()))
a=len(format(max(l),"b"))
x=[None]*n
xl=[0]*a
for i in range(n):
  b=format(l[i],"b")
  x[i]=b.zfill(a)
for i in range(a):
  for j in range(n):
    if x[j][i]=="1":
      xl[i]+=1
c=format(k,"b")
if len(c)>a:
  c,d=c[:len(c)-a],c[len(c)-a:]
  ans=int("0b"+c,2)*(2**a)*n
  check=0
  for i in range(a):
    if check==0:
      if d[i]=="1":
        if xl[i]>=n-xl[i]:
        ans+=xl[i]*(2**(a-i-1))
        check=1
        else:ans+=(n-xl[i])*(2**(a-i-1))
      else:ans+=xl[i]*(2**(a-i-1))
    else:
      ans+=max(xl[i],n-xl[i])*(2**(a-i-1))
else:
  c=c.zfill(a)
  ans=0
  check=0
  for i in range(a):
    if check==0:
      if d[i]=="1":
        if xl[i]>=n-xl[i]:
        ans+=xl[i]*(2**(a-i-1))
        check=1
        else:ans+=(n-xl[i])*(2**(a-i-1))
      else:ans+=xl[i]*(2**(a-i-1))
    else:
      ans+=max(xl[i],n-xl[i])*(2**(a-i-1))
print(ans)


### FIXED CODE ###

n,k=map(int,input().split())
l=list(map(int,input().split()))
a=len(format(max(l),"b"))
x=[None]*n
xl=[0]*a
for i in range(n):
  b=format(l[i],"b")
  x[i]=b.zfill(a)
for i in range(a):
  for j in range(n):
    if x[j][i]=="1":
      xl[i]+=1
c=format(k,"b")
if len(c)>a:
  c,d=c[:len(c)-a],c[len(c)-a:]
  ans=int("0b"+c,2)*(2**a)*n
  check=0
  for i in range(a):
    if check==0:
      if d[i]=="1":
        if xl[i]>=n-xl[i]:
          ans+=xl[i]*(2**(a-i-1))
          check=1
        else:ans+=(n-xl[i])*(2**(a-i-1))
      else:ans+=xl[i]*(2**(a-i-1))
    else:
      ans+=max(xl[i],n-xl[i])*(2**(a-i-1))
else:
  c=c.zfill(a)
  ans=0
  check=0
  for i in range(a):
    if check==0:
      if c[i]=="1":
        if xl[i]>=n-xl[i]:
          ans+=xl[i]*(2**(a-i-1))
          check=1
        else:ans+=(n-xl[i])*(2**(a-i-1))
      else:ans+=xl[i]*(2**(a-i-1))
    else:
      ans+=max(xl[i],n-xl[i])*(2**(a-i-1))
print(ans)
import numpy as np
N = int(input())
a = [0] + list(map(int, input().split()))
b = [0] * (N + 1)
for i in range(N, N//2, -1):
    b[i] = a[i]
for i in range(N//2, 0, -1):
    sum = 0
    for j in range(i+i, N, i):
        sum += b[j]
    b[i] = (a[i] + sum)%2
b = np.array(b)
if len(np.where(b==1)) != 0:
    print(len(np.where(b==1)[0]))
    ans = ' '.join(map(str, np.where(b == 1)[0]))
    print(ans)
else:
    print(0)

### FIXED CODE ###

N = int(input())
a = [0] + list(map(int, input().split()))
b = [0] * (N + 1)
c = []
for i in range(N, 0, -1):
    sum_i = 0
    for j in range(i+i, N+1, i):
        sum_i += b[j]
    b[i] = (a[i] + sum_i)%2
print(sum(b))
for k in range(N+1):
    if b[k] == 1:
        c.append(k)
if c != []:
    print(' '.join(map(str, c)))
N = int(input())
p = list(map(int,input().split()))

ans = 0

for i in range(N):
	if p[i] == i :
		ans += 1

if ans == N or N-2:
	print('Yes')
else :
	priint('No')

### FIXED CODE ###

N = int(input())
p = list(map(int,input().split()))
 
ans = 0
 
for i in range(N):
    if p[i] != (i+1) :
        ans += 1
 
if ans == 0:
    print('YES')
elif ans == 2:
      print('YES')
else :
    print('NO')
import math
N, K = map(int, input().split())

S = 0

for i in range(N):
  S += (1/N)*math.floor(math.log2((K-1)/N))

print(S)

### FIXED CODE ###

import math
N, K = map(int, input().split())

S = 0

for i in range(N):
  S += ((1/N)*(2**((-1)*max(0, math.ceil(math.log2((K-0.1)/(i+1)))))))

print(S)
from collections import deque

N, M, K = [int(n) for n in input().split()]
desk_a = deque([int(n) for n in input().split()])
desk_b = deque([int(n) for n in input().split()])

def max_n_book(desk_a, desk_b, count=0, k=K):
    if k < 0:
        return count - 1
    if len(desk_a) != 0:
        book_a = desk_a.popleft()
        count_a = max_n_book(desk_a, desk_b, count=count+1, k=k-book_a)
        count_a = count
    else:
        count_a = count
    if len(desk_b) != 0:
        # book_b = desk_b.popleft()
        # count_b = max_n_book(desk_b, desk_b, count=count+1, k=k-book_b)
        count_b = count
    else:
        count_b = count
    return max(count_a, count_b)

n_book = max_n_book(desk_a, desk_b, count=0, k=K)
print(n_book)


### FIXED CODE ###

N, M, K = map(int, input().split())
desk_a = list(map(int, input().split()))
desk_b = list(map(int, input().split()))

sum_a = [0]
sum_b = [0]

for i in range(N):
    sum_a.append(sum_a[-1] + desk_a[i])
for i in range(M):
    sum_b.append(sum_b[-1] + desk_b[i])

ans = 0
j = M
for i in range(N+1): 
    a = sum_a[i]
    if K - a < 0:
        break
    while sum_b[j] > K - a: 
        j -= 1
    ans = max(ans, i+j)

print(ans)
x=input()
a=input()

if a>x:
    print(0)
else:
    print(10)


### FIXED CODE ###

[x,a]=[int(i) for i in input().split()]

if a>x:
    print(0)
else:
    print(10)