peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
S = list(input())
for i in range(0,len(S),2):
  if S[i] == 'L':
    print('No')
    exit()
for j in range(1,len(S),2):
  if S[j] == 'R':
    print('No')
    exit()
print('Yes')
# Judge status: Accepted
def solve():
    N,A,B = map(int, input().split())
    prod = 1
    MOD = 10**9 + 7
    ans = pow(2,N,MOD) -1 #bit全探索と同じ理屈

    for i in [A,B]:
        num, inv = 1, 1
        for j in range(N-i+1,N+1):
            num = (num * j) % MOD

        for k in range(1, i+1):
            inv = inv * k % MOD
        ans = ans -(num * pow(inv, MOD-2, MOD)) % MOD

    print(ans%MOD)

if __name__ == '__main__':
    solve()
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
count = 0
ans = 10000
for i in range(n):
    while True:
        if a[i]%2 == 0:
            count += 1
            a[i] = a[i]//2
        else:
            ans = min(ans,count)
            count = 0
            break
print(ans)
# Judge status: Accepted
n = int(input())
p = list(map(int, input().split()))

ans = 0
for i in range(n-2):
    if p[i] < p[i+1] < p[i+2] or p[i] > p[i+1] > p[i+2]:
        ans += 1
print(ans)
# Judge status: Wrong Answer
a = list(map(int,input().split()))
if a[0] * (a[0]+1) * a[1] > 0:
    print("Positive")
elif a[0] * (a[0]+1) * a[1] < 0:
    print("Negative")
else:
    print("Zero")
# Judge status: Accepted
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
lis=[a,b,c,d,e]
lis.sort()

if(abs(lis[4]-lis[0])<=k):
    print("Yay!")
else:
    print(":(")
# Judge status: Accepted
N, A, B = map(int, input().split())
period = A + B
times = N//period
k = N%period
N =  A if k >A else k
print(times*A + N)
# Judge status: Wrong Answer
# [] = list(map(int, input().split()))
# = map(int, input().split())

import numpy as np
[n, k] = list(map(int, input().split()))
aList = list(map(int, input().split()))
aList_kai = []
for i in range(n-k+1):
    aList_kai.append(np.prod(aList[i:i+k]))
ptr = 0
for i in range(1, n-k+1):
    if aList_kai[i] > aList_kai[i-1]:
        print("Yes")
    else:
        print("No")
# Judge status: Wrong Answer
#整数の入力
N = int(input())

a = int(N/3)

print(a*a*a)
# Judge status: Accepted
cards = {}
cards['a'] = list(input())
cards['b'] = list(input())
cards['c'] = list(input())
card = 'a'
while True:
  if len(cards[card]) ==0:
    break
  card = cards[card].pop(0)
print(card.upper())
# Judge status: Accepted
n = int(input())
p = list(map(int,input().split()))
ans = 0
mn = float('inf')
for i in range(n):
    if p[i] < mn:
        ans += 1
    mn = min(mn,p[i])
print(ans)
# Judge status: Accepted
import sys
from operator import itemgetter

N = int(input())
V = set()
for s in sys.stdin.readlines():
    x, y = map(int, s.split())
    V.add((x + y, x - y))

y_max = max(V, key=itemgetter(1))[1]
y_min = min(V, key=itemgetter(1))[1]
x_max = max(V, key=itemgetter(0))[0]
x_min = min(V, key=itemgetter(0))[0]

print(max(x_max - x_min, y_max - y_min))
# Judge status: Accepted
a,b,k = map(int, input().split())
l = list()
for i in range(1, min(a,b)+1):
    if a%i == 0 and b%i == 0:
        l.append(i)
print(l[-(k)])
# Judge status: Accepted
n = int(input())

print(n//2 + n%2)
# Judge status: Accepted
n, m = map(int, input().split())
rednow = [-1, 1] + [0 for i in range(n-1)] # maybe there's red ball
balnum = [-1] + [1 for i in range(n)] # the number of ball, each box
order = []
for i in range(m):
  order.append(list(map(int, input().split()))) 

for q in order:
  if rednow[q[0]] == 1:
    rednow[q[1]] = 1
    if balnum[q[0]] == 1:
      rednow[q[0]] = 0
  balnum[q[0]] -= 1
  balnum[q[1]] += 1

print(rednow.count(1))
# Judge status: Accepted
S = input()

# Greedyアルゴリズム
S = S[::-1]

S = S.replace("resare","")
S = S.replace("esare","")
S = S.replace("remaerd","")
S = S.replace("maerd","")

if S == "":
        print("YES")
else:
        print("NO")
# Judge status: Accepted
a, b, c = map(int, input().split())

if c-(a+b) >= 0:
    if 4*a*b < (c-(a+b))**2:
        print('Yes')
    else:
        print('No')
else:
        print('No')
# Judge status: Accepted
N,K = map(int,input().split())
D = list(map(int,input().split()))
l = [i for i in range(10)]
for i in range(K):
  l.remove(D[i])

ansl = []
def dfs(s):
  if len(s) < len(str(N))+1:
    for i in l:
      new = s+str(i)
      ansl.append(int(new))
      dfs(new)
dfs("")
ansl.sort()
for i in ansl:
  if i >= N:
    print(i)
    break
# Judge status: Accepted
s = input()
t = input()
if s == t[:-1] and 1<=len(s)<=10:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
def f(n):
  res = 1
  if n <= 1:
    return 1
  while n>1:
    res *= n
    n-=1
  return res
 
def h(n,m):
  return f(n+m-1)//f(n)//f(m-1)
 
s=int(input())
 
res = 0
 
pair = s//3
 
for i in range(1,pair+1):
  res += h(s-3*i,i)
print(res%(10**9+7))
# Judge status: Accepted
import math
x = int(input())
mod = x%11
print((x//11)*2 + math.ceil(mod/6))
# Judge status: Accepted
A = int(input())
S = input()
if A >= 3200:
  print(S)
else:
  print("red")
# Judge status: Wrong Answer
from math import factorial as kai
from decimal import Decimal as dec
s = int(input())
max_len = s // 3
num = 0
mod = 10 ** 9 + 7
for i in range(max_len, 0, -1):
    amari = s - (3 * i)
    num += int(dec(dec(kai(amari + i - 1)) / (dec((kai(amari)) * dec(kai(i - 1)))))) % mod
print(int(num % mod))
# Judge status: Wrong Answer
Q,H,S,D = map(int, input().split())
N = int(input())
if N >=2:
    if N%2 == 0:
        ans = N/min([8*Q,4*H,2*S,D])
    else:
        ans = (N-1)/min([8*Q,4*H,2*S,D]) + min([4*Q,2*H,S])
else:
    ans = min([4*Q,2*H,S])
print(ans)
# Judge status: Accepted
import sys
input = sys.stdin.readline

a,b,c,d = input().rstrip("\r\n")
ans = "Bad" if a==b or b==c or c==d else "Good"
print(ans)
# Judge status: Accepted
n, m = map(int, input().split())
left = 1
right = n
for _ in range(m):
    l, r = map(int, input().split())
    left = max(left, l)
    right = min(right, r)

if left <= right:
    print(right - left + 1)
else:
    print("0")
# Judge status: Accepted
A, B = map(int, input().split())
ans = 0
for i in range(A, B+1):
  s = str(i)
  if s == s[::-1]:
    ans += 1

print(ans)
# Judge status: Wrong Answer
import math
l = list(input())
strlen = l.__len__()
"yes" if strlen == list(set(l)).__len__() else "no"
# Judge status: Accepted
x = int(input())

if x <= 105*(x//100):
  print(1)
else:
  print(0)
# Judge status: Wrong Answer
s = input()

if s == 'ABC':
    print('ABC')
if s == 'ARC':
    print('ARC')
# Judge status: Wrong Answer
N=int(input())
A=[]
B=[]
for i in range(N):
  a,b=map(int,input().split())
  A.sort()
  B.sort()
  A.append(a)
  B.append(b)
def median(x):
  l=len(x)
  if l%2==0:
    return (x[l//2-1]+x[l//2])/2
  else:
    return x[l//2]
if N%2==1:
  print(median(B)-median(A)+1)
else:
  print(int((median(B)-median(A))*2+1))
# Judge status: Accepted
L,R=map(int,input().split())
R=min(L+2019,R)
m=3000
for x1 in range(L,R):
    for x2 in range(x1+1,R+1):
        if m>(x1*x2)%2019:m=(x1*x2)%2019
print(m)
# Judge status: Wrong Answer
whatMan = []
 
N, K = input().split()
print(N)
# Judge status: Accepted
N, M = map(int,input().split())
xl = list(map(int,input().split()))
xl.sort()

diff_list = []
for i in range(1,M):
    diff_list.append(xl[i] - xl[i-1])

diff_list.sort(reverse=True)
print(sum(diff_list[N-1:]))
# Judge status: Accepted
import itertools
from math import factorial

N = int(input())
P = tuple(map(int, input().split()))
Q = tuple(map(int, input().split()))
f = factorial(N)
all = list(itertools.permutations(range(1,N+1), N))

count = 0
for i in range(f):
        if all[i] == P:
                count += i+1
        if all[i] == Q:
                count -= i+1

print(abs(count))
# Judge status: Wrong Answer
n=int(input())
import math
nn=int(math.sqrt(n))
a=[0]
a*=(n+1)
for i in range(1,nn+1):
    t=i
    while t<=n:
        a[t]+=1
        t+=i
for i in range(nn+1,n+1):
    a[i]+=1
ans=0
for i in range(1,n+1):
    ans+=a[i]*i

print(ans)
# Judge status: Wrong Answer
import sys
from collections import Counter
import numpy as np

n, *s = sys.stdin.read().split()
n = int(n)

def comb_2(n):
    return n * (n - 1) // 2

def main():
    t = [''.join(sorted(t)) for t in s]
    v = np.array(list(Counter(t).values()), dtype=np.int32)
    return np.sum(comb_2(v))

if __name__ == '__main__':
    ans = main()
    print(ans)
# Judge status: Accepted
ABC = list(map(int, input().split()))
n_odd = sum([Xi % 2 for Xi in ABC])

ans = 0
if n_odd == 1:
    ans += 1
    ABC[0] += int(ABC[0] % 2 == 0)
    ABC[1] += int(ABC[1] % 2 == 0)
    ABC[2] += int(ABC[2] % 2 == 0)
elif n_odd == 2:
    ans += 1
    ABC[0] += int(ABC[0] % 2 == 1)
    ABC[1] += int(ABC[1] % 2 == 1)
    ABC[2] += int(ABC[2] % 2 == 1)

ABC.sort()
ans += (ABC[2] - ABC[0]) // 2
ans += (ABC[2] - ABC[1]) // 2

print(ans)
# Judge status: Accepted
N = int(input())
a = list(map(int, input().split()))

average = (sum(a) + N // 2) // N
cost = 0

for i in range(N):
    cost += (average - a[i]) ** 2

print(cost)
# Judge status: Accepted
#A
r=int(input())
print(r**2)
# Judge status: Wrong Answer
N, K = map(int, input().split())
S = input()
cnt =0
for i in range(N-1):
    p = S[i]+S[i+1] 
    if p =='RL':
        cnt += 1
cnt2 = 0
if S[0] == 'L':
    cnt2 += 1
if S[-1] == 'R':
    cnt2 += 1
N -= cnt *2+cnt2
if cnt - 1 >= K:
    print(N+2*K)
else:
    print(N-1)
# Judge status: Accepted
import numpy as np
import sys
import math
import collections
read = sys.stdin.readline

N = int(read().rstrip())
A = list(map(int,read().rstrip().split()))
da = []
for i , a in enumerate(A):
    da.append([i,a])

dR = collections.defaultdict(int)
dL = collections.defaultdict(int)

ans = 0
for d in reversed(da):
    r = d[0] + d[1] + 1
    l = d[0] - d[1] + 1 

    dR[r] += 1

    ans += dL[r]

    dL[l] += 1  

print(ans)
# Judge status: Accepted
N = int(input())
SP = []
for _ in range(N):
    a = input().split()
    a.append(_+1)
    SP.append(a)


sorted_items = sorted(
  SP,
  key = lambda x: (x[0], -int(x[1]))
)

for s in sorted_items:
    print(s[2])
# Judge status: Wrong Answer
a,b,c,d=list(map(int, input("Enter a multiple value: ").split())) 
prod=[]

prod.append(a*c)
prod.append(a*d)
prod.append(b*c)
prod.append(b*d)

print(max(prod))
# Judge status: Accepted
n,a,b,c,d = map(int,input().split())

s=input()

s=list(s)

for i in range(a,max(c,d)):
    if s[i-1] == s[i] == '#':
        print('No')
        exit()

if c < d:
    print('Yes')
else:
    for i in range(b-2,d-1):
        if s[i] == s[i+1] == s[i+2] == '.':
            print('Yes')
            exit()
    print('No')
# Judge status: Wrong Answer
word=input()
word=sorted(word)
print(word)
if word[0]==word[1] and word[2]==word[3] and word[0]!=word[2]:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
import sys
readline = sys.stdin.readline

n,m = map(int,readline().split())

l=1
r=n
if r % 2 == 1:
  r -= 1
for i in range(m):
  print(l,r)
  l += 1
  r -= 1
# Judge status: Wrong Answer
import sys
import re
s = str(input())
if len(s) < 0 or len(s) > 200000:
    sys.exit()

array_str = re.findall(r'A.*Z', s)
max = 0
for I in array_str:
    print(I)
    if len(I) > max:
        max = len(I)
print(max)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
ans=0
for i in range(60):
  g = [0,0]
  for j in a:
    g[(j>>i)%2]+=1
  ans+=2**i*g[0]*g[1]
  ans%=10**9+7
print(ans)
# Judge status: Wrong Answer
a = input()
print('2018'+a[4:6])
# Judge status: Accepted
n = int(input())
a = int(input())

if n%500 <= a:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
i = list(map(int, input().split()))
K = int(input())
red=i[0]
green=i[1]
blue=i[2]
success=0
for num in range(K):
  if green < red:
    green = green*2
  elif blue < green:
    blue = blue*2
if (blue > green and  green > red):
  print("Yes")
else:
  print("No")
# Judge status: Accepted
n, m = map(int, input().split())

student = list()

for x in range(n):
    student.append(list(map(int, input().split())))

checkpoint = list()

for y in range(m):
    checkpoint.append(list(map(int, input().split())))

INF = 4*(10**8) + 1
tmp = INF
ans = 51

for x in range(n):
    for y in range(m-1, -1, -1):
        distance = abs(student[x][0] - checkpoint[y][0]) + \
            abs(student[x][1] - checkpoint[y][1])

        if tmp >= distance:
            tmp = distance
            ans = y
    print(ans+1)
    tmp = INF
# Judge status: Wrong Answer
N = int(input())
ans = 0


for i in range(1,9):
  if 111*i <= N < (111*i+1):
    ans += 111*i
  else:
    pass
  
print(ans)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if c<=(a+(2*b)):print('Yes')
else:print('No')
# Judge status: Accepted
n, k = map(int, input().split())
P = list(map(int, input().split()))

total = sum(P[:k])
tmp = total
start = 0
for i in range(0, n - k):
    tmp = tmp - P[i] + P[i + k]
    if total < tmp:
        total = tmp
        start = i + 1

ret = 0
for i in range(start, start + k):
    ret += (P[i] + 1) / 2

print(ret)
# Judge status: Wrong Answer
N, M = map(int, input().split())
from collections import defaultdict
edges = defaultdict(list)
for i in range(M):
    a,b = map(int, input().split())
    edges[b].append(a)
    # edges[b].append(a)
# print(edges)
# print(1,edges[1])
first = edges[1]
# print("----")
for e in first:
    # print(e,edges[e]) 
    second = edges[e]
    if N in second:
        print("POSSIBLE")
        exit()
print("IMPOSSIBLE")
# Judge status: Wrong Answer
n = (int)(input())
a = list(map(int, input().split(" ")))
total = sum(a)
temp = 0
for i in range(n):
  temp += a[i]
  if temp >= total / 2:
    break
print(temp - (total - temp))
# Judge status: Accepted
import sys
X = int(input())
P = [2]
if X == 2:
    print(2)

    sys.exit()
for i in range(3, 10**6):
    for l in range(len(P)):
        if i % P[l] == 0:
            break
        elif l == len(P)-1 and i >= X:
            print(i)
            sys.exit()
        elif l == len(P)-1:
            P.append(i)
# Judge status: Accepted
n=int(input())
c=0
cu=0
for i in range(n):
  a=int(input())
  if cu and a:
    a-=1
    c+=1
  c+=a//2
  cu=a%2
print(c)
# Judge status: Wrong Answer
N, K = list(map(int,input().split()))
S = input()
ls = list(S)
if ls[K-1] == 'A':
  ls[K-1] = 'a'
elif ls[K-1] == 'B':
  ls[K-1] = 'b'
elif ls[K-1] == 'A':
  ls[K-1] = 'b'
print(''.join(ls))
# Judge status: Wrong Answer
N,K,S=map(int,input().split())
A=[]
for i in range(K):
  A.append(S)
for i in range(N-K):
  A.append(S-1)
print(*A)
# Judge status: Accepted
N,M,X = map(int, input().split())
CA = [list(map(int, input().split())) for _ in range(N)]
ans = 1e9
for i in range(2**N):
    cnt = [0]*(M+1)
    for j in range(N):
        if i>>j & 1:
            cnt = [x+y for (x,y) in zip(cnt,CA[j])]
    if len([i for i in cnt[1:] if i>=X]) == M:
        ans = min(ans, cnt[0])
print(ans if ans<1e9 else -1)
# Judge status: Wrong Answer
N = int(input())
a = list(map(int, input().split()))
c2=c4=0

for i in range(N):
  if a[i]%4==0:
    c4+=1
  if a[i]%2==0:
    c2+=1

nodd=N-c2

if round(nodd/2)<=c4:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
n,m,k = map(int, input().split())

if n*m == k:
    print("Yes")
    exit()

for i in range(n):
    for j in range(m):
        if j*(n-i) + i*(m-j) == k:
            print("Yes")
            exit()
print("No")
# Judge status: Accepted
#
import sys
import math
import numpy as np
import itertools

# いくつか入力
n,m = (int(i) for i in input().split())

if m % 2 == 0:
    for i in range(0,m//2):
        print(i+1,m+1-i)
    for i in range(m//2,m):
        print(m//2+2+i,m*2+m//2+1-i)
else:
    for i in range(0,m//2):
        print(i+1,m-i)
    for i in range(m//2+1,m+1):
        print(m//2+1+i,m*2+m//2+2-i)
# Judge status: Accepted
N, X, Y = map(int, input().split())
dis_comb = [0]*N

for i in range(1, N):
    for j in range(i+1, N+1):
        dis_comb[min(abs(i-j), abs(X-i)+1+abs(Y-j))] += 1

for i in range(1, N):
    print(dis_comb[i])
# Judge status: Wrong Answer
N = int(input())
import heapq
student = list(map(int,input().split()))
a = []
heapq.heapify(a)
for i in range(N):
    heapq.heappush(a,student.index(i+1) + 1)
print(a)
# Judge status: Wrong Answer
import math
a,b,c = map(int,input().split())

if math.sqrt(a) + math.sqrt(b) < math.sqrt(c):
    print("Yes")
    
else:
    print("No")
# Judge status: Wrong Answer
A, B = map(int, input().split())

before = B * 10
not_found = True

for i in range(13):
  res = before + i
  tmp = int((before + i) * 0.08)
  if tmp == A:
    print(res)
    not_found = False
    break

if not_found:
  print(-1)
# Judge status: Wrong Answer
a=int(input())
if a==3 or a==5 or a==7:
  print('YES')
else:
  print('No')
# Judge status: Accepted
def solve():
	a, b = map(int, input().split())
	if (a + b) % 2 == 1:
		return "IMPOSSIBLE"
	else:
		return int((a + b) / 2)
		
		
if __name__ == "__main__":
	print(solve())
# Judge status: Accepted
import math
import itertools

N = int(input())
X, Y = [], []
for _ in range(N):
    x, y = map(int, input().split())
    X.append(x)
    Y.append(y)

D = [[0 for _ in range(N)] for _ in range(N)]

for i in range(N):
    for j in range(N):
        D[i][j] = math.sqrt((X[i] - X[j]) ** 2 + (Y[i] - Y[j]) ** 2)


res = 0
for t in itertools.permutations([i for i in range(N)]):
    for j in range(1, N):
        res += D[t[j]][t[j - 1]]
print(res / math.factorial(N))
# Judge status: Accepted
b,a = map(int,input().split())
ans = a*10
for i in range(11):
    if i == 10:
        ans = -1
        break
    if int(ans*0.08) == b:
        break
    ans += 1
print(ans)
# Judge status: Accepted
a,b,c=map(int,input().split())
if b//a>c:
    print(c)
else:
    print(b//a)
# Judge status: Accepted
n, m = [int(_) for _ in input().split()]
dict = {}
can = True
for i in range(m):
    a, b = [int(_) for _ in input().split()]
    if a in dict.keys():
        dict[a].append(b)
    else:
        dict[a] = [b]
if not 1 in dict.keys():
    can = False
else:
    for i in dict[1]:
        if i in dict.keys() and n in dict[i]:
            can = True
            break
        else:
            can = False
print('POSSIBLE' if can else 'IMPOSSIBLE')
# Judge status: Wrong Answer
s = input()
k = int(input())

for i in range(k):
    if s[i] != '1':
      print(s[i])
      break 
if i == k-1:
    print(1)
# Judge status: Accepted
n=int(input())

count = 0
for i in range(1,n+1):
    if not(i%3==0 or i%5==0):
        count += i
        
print(count)
# Judge status: Accepted
s = input()
n = len(s)
ans = 0
for i in range(n):
    for j in range(i,n):
        if all("ATGC".count(c) == 1 for c in s[i:j+1]):
            ans = max(ans,j - i + 1)
print(ans)
# Judge status: Wrong Answer
N,A,B = map(int,input().split())
if (B-A) % 2 == 0:
    print((B-A)//2)
else:
    print(min(N-A, B-1))
# Judge status: Wrong Answer
def main():
    candy = [int(v) for v in input().split()]

    candy.sort()

    total = sum(candy)

    half = total // 2

    ac = 0
    for c in candy:
        ac += c
        if ac == half:
            print("Yes")
            exit()

    print("No")


main()
# Judge status: Wrong Answer
n,m = map(int,input().split())
a = [0]*n
b = [0]*n
for i in range(m):
  t,s = map(int,input().split())
  if (a[t-1] == 0 and b[t-1] == 0) or (a[t-1] == s):
    a[t-1] = s
  else:
    print('-1')
    exit()
  if s == 0 :
    b[t-1] = 1

tmp = ''
if sum(a) == 0:
  print('-1')
  exit()
for i in range(n):
  tmp += str(a[i])
print(int(tmp))
# Judge status: Accepted
import numpy as np

s=input()
n=len(s)
ans=[0]*(n+1)
for i in range(n):
    if s[i] == "<":
        ans[i+1] = max(ans[i+1], ans[i]+1)

for i in reversed(range(n)):
    if s[i] == ">":
        ans[i] = max(ans[i+1]+1,ans[i])

print(sum(ans))
# Judge status: Accepted
N = int(input())
H = list(map(int, input().split()))

cnt = 0
ans = []
for i in range(N-1):
    if H[i] >= H[i+1]:
        cnt += 1
    else:
        ans.append(cnt)
        cnt = 0
ans.append(cnt)
print(max(ans))
# Judge status: Accepted
times = int(input())
line = input()
list1 = []
if times <= 1:
  print("%s" % 0)
else:
  for i in line.split():
    if i:
      list1.append(int(i))
  mem = [0] * times
  mem[-2] = abs(list1[-1] - list1[-2])
  for i in range(len(list1)-3, -1, -1):
    step1 = abs(list1[i] - list1[i+1]) + mem[i+1]
    step2 = abs(list1[i] - list1[i+2]) + mem[i+2]
    mem[i] = min(step1,step2)
  print("%s" % mem[0])
# Judge status: Accepted
a,b,c = list(map(int,input().split()))
a,b = b,a
a,c = c,a
print(a,b,c)
# Judge status: Accepted
s=list(input())
t=list(input())
n=len(s)
a=[s.count(chr(97+i)) for i in range(26)]
b=[t.count(chr(97+i)) for i in range(26)]
if all(a[ord(s[i])-97]==b[ord(t[i])-97] for i in range(n)):
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
k=int(input())
if k%2==0:
  print(k*k//4)
else:
  print((k+1)*(k-1)//2)
# Judge status: Wrong Answer
N,M = map(int,input().split())
#N>=Mとして一般性を失わない
if N==M==1:
    print(1)
if N==1 and M>=2:
    print(M-2)
if N==2 and M>=2:
    print(0)
if N>=3 and M>=3:
    print((N-2)*(M-2))
# Judge status: Accepted
n=int(input())
if n%2:print(0)
else:
  n//=2
  a=0
  while 0<n:
    n//=5
    a+=n
  print(a)
# Judge status: Wrong Answer
K,X=map(int,input().split())
total = K*500

if total > X:
  print("yes")
else:
  print("no")
# Judge status: Accepted
n,k = map(int,input().split())
a = list(map(int,input().split()))

for i in range(n-k):
  if a[i] < a[i+k]:
    print('Yes')
  else:
    print('No')
# Judge status: Wrong Answer
N = int(input())

for i in range(1, 10):
    if N % i == 0 and N // i < 9:
        print("Yes")
        break
else:
    print("No")
# Judge status: Accepted
MM = input().split()
W = int(MM[0])
a = int(MM[1])
b = int(MM[2])
if a+W < b:
  print(b-(a+W))
elif (b+W) < a:
  print(a -(b+W))
else:
  print(0)
# Judge status: Accepted
n = int(input())
XY = list(map(int, input().split()) for _ in range(n))
x_max = -float("inf")
y_max = -float("inf")
x_min = float("inf")
y_min = float("inf")
for x, y in XY:
    a, b = x-y, x+y
    x_max = max(x_max, a)
    x_min = min(x_min, a)
    y_max = max(y_max, b)
    y_min = min(y_min, b)
s = x_max - x_min
t = y_max - y_min
ans = max(s, t)
print(ans)
# Judge status: Wrong Answer
a,b,c = map(int,input().split())
print(max(c,b//a))
# Judge status: Wrong Answer
n, m = map(int,input().split())
data = [list(map(int, input().split())) for _ in range(m)]
start = set(i[1] for i in data if i[0] == 1)
goal = set(j[0] for j in data if j[1] == m)

if start & goal:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')
# Judge status: Accepted
import math
H,A=map(int,input().split())
print(math.ceil(H/A))
# Judge status: Accepted
import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

from collections import defaultdict
from collections import deque
import bisect
from decimal import *
def main():
    x = I()
    if x == 0:
        print(1)
    else:
        print(0)

if __name__ == "__main__":
    main()
# Judge status: Accepted
a, b, c= map(int, input().split())
if a==b and b==c:
  print(1)
elif a==b or b==c or a==c:
  print(2)
else:
  print(3)
# Judge status: Accepted
from collections import Counter
n = int(input())
tmp = n
d = []
for i in range(2, int(n ** 0.5) + 1):
    if tmp % i == 0:
        while tmp % i == 0:
            d.append(i)
            tmp //= i
if tmp != 1:
    d.append(tmp)

dv = Counter(d)

cnt = 0
for p in dv.keys():
    for e in range(1, dv[p]+1):
        z = p ** e
        if n % z == 0:
            cnt += 1
            n //= z

print(cnt)
# Judge status: Accepted
n = int(input())
mod = 10**9+7
ans = 10**n - 9**n*2 + 8**n
print(ans % mod)
# Judge status: Accepted
n,a,b = map(int, input().split())
if (b-a)%2 == 0:
  print(((b-a)//2))
else:
  print(min(a-1,n-b)+1+((b-a-1)//2))
# Judge status: Accepted

N, K = map(int, input().split())
A = list(map(int, input().split()))
kind = len(set(A))
cnt = [0] * 202020
for a in A:
    cnt[a] += 1
cnt = sorted(filter(lambda x: x > 0, cnt))
ans = 0
for c in cnt:
    if kind <= K:
        break
    ans += c
    kind -= 1
print(ans)
# Judge status: Accepted
a, b = map(int, input().split())
print(2 * a) if(a == b) else print(max(a, b) + max(a, b) - 1)