peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
h, a = map(int, input().split())

if h % a == 0:
  print(h//a)
else:
  print(h//a + 1)
# Judge status: Wrong Answer
n,x=map(int,input().split())
a=sorted(list(map(int,input().split())))
ans=0
for i in range(n):
    if x>=a[i]:
        ans+=1
        x-=a[i]
    else:
        break
if ans == n:
    if x!=0:
        ans-=1
print(x)
print(ans)
# Judge status: Wrong Answer
a, b, c, d = map(int, input().split())

if abs (a - c) <= d:
    print('Yes')
elif abs(a - b) <= d:
    print('Yes')
elif abs(b - c) <= d:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n,k = map(int,input().split())
A = []
for _ in range(n):
    A.append(list(map(int,input().split())))
A.sort(key=lambda x: x[0])
cnt = 0
while k>0:
    k-=A[cnt][1]
    cnt+=1
print(A[cnt-1][0])
# Judge status: Accepted
N, K=map(int, input().split())
S=input()
A=[]
tmp=1
for i in range(1,N):
    if S[i-1]==S[i]:
        tmp+=1
    else:
        A.append(tmp)
        tmp=1
A.append(tmp)
 
ans=sum(A)-len(A)+(K)*2
 
if ans<N-1:
    print(ans)
else: print(N-1)
# Judge status: Wrong Answer
X, K, D = map(int, input().split())

if K <= abs(X // D):
    print(abs(X) - D * K)
elif (K - abs(X // D)) % 2 == 0:
    print(abs(X) % D)
else:
    print(D - abs(X) % D)
# Judge status: Accepted
n = int(input())
s = list(int(input()) for _ in range(n))
s.sort()

if all(num % 10 == 0 for num in s):
    print(0)
else:
    if sum(s) % 10 == 0:
        for num in s:
            if num % 10 != 0:
                print(sum(s) - num)
                break
    else:
        print(sum(s))
# Judge status: Accepted
n = int(input())
s = input()
now = 0
for i in range(1, n):
    if s[i] == "E":
        now += 1
ans = now
for i in range(1, n):
    if s[i] == "E":
        now -= 1
    if s[i-1] == "W":
        now += 1
    ans = min(ans, now)
print(ans)
# Judge status: Accepted
n,m=map(int,input().split())
a=list(map(int,input().split()))
rep=[]
for i in range(m):
    b,c=map(int,input().split())
    rep.append([c,b])
rep.sort(reverse=True)
Card=[0]*n
cnt=0
fg=0
while fg<n and cnt<m:
    tt=0
    while tt<rep[cnt][1] and fg+tt <n :
        Card[fg+tt]=rep[cnt][0]
        tt+=1
    fg+=tt
    cnt+=1


ans=a+Card
ans.sort(reverse=True)
tmp=0
for i in range(n):
    tmp+=ans[i]

print(tmp)
# Judge status: Wrong Answer
n=int(input())
t=0
for i in range(n):
  l=len(str(i))
  if l%2!=0:
    t+=1
print(t)
# Judge status: Wrong Answer
n = int(input())
m = n
c = 0
for i in range(2,n+1):
  if m % i == 0:
    m /= i
    c += 1
  elif m < i:
    break
print(c)
# Judge status: Wrong Answer
A, B, C = map(int, input().split())
K = int(input())
print(max(A, B, C)**K + A + B + C - max(A, B, C))
# Judge status: Accepted
s=input()
ans = 0
for i in range(len(s)//2):
  if s[:i]==s[i:i*2]:
    ans=i*2
print(ans)
# Judge status: Wrong Answer
x,k,d=map(int,input().split())
if (x-(k*d))>0:
    print((x-(k*d)))
elif (x-(k*d))==0:
    print(0)
else:
    k1=0
    a=(x-(k1*d))
    while a>=0:
        k1+=1
        a=(x-(k1*d))
    print(abs(a-0))
# Judge status: Wrong Answer
d,t,s=map(int,input().split())
if 1000//15>=s:
  if 1000//15==0 and 1000%15==0:
    print('Yes')
  else:
    print('No')
else:
  print('Yes')
# Judge status: Accepted
n,m = map(int, input().split())

if n % 2 == 1:
    a = 1
    b = n - 1
    for i in range(m):
        print(a,b)
        a += 1
        b -= 1
else:
    a = n // 2
    b = a + 1
    nn = (n//2) // 2
    for i in range(m):
        print(a, b)
        if i == nn - 1:
            a -= 1
            b += 2
        else:
            a -= 1
            b += 1
# Judge status: Wrong Answer
m = int(input())
n = len(str(m))
if n == 1:
  print(n)
elif n == 2:
  print(9)
elif n == 3:
  ans = 9 + m - 99
  print(ans)
elif n == 4:
  ans = 999 - 99 + 9
  print(ans)
elif n == 5:
  ans = m - 9999 + 999 - 99 + 9
elif n == 6:
  print(90909)
# Judge status: Wrong Answer
s = input()
n = len(s)
ans = 10000
for i in range(n-3):
  x = int(s[i:i+3])
  ans = min(ans, abs(753-x))
print(ans)
# Judge status: Wrong Answer
import sys
import math

n, k = map(int, input().split())

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

pre=n-math.floor(n/k)*k

while 1:
    if pre <= abs(pre-k):
        print(pre)
        sys.exit()
    pre = abs(pre - k)
# Judge status: Accepted
n = int(input())
a = [0]
tmp = [int(input()) for _ in range(n)]
a = a + tmp

r = -1
cnt = 1
next = a[1]
while cnt < n:
  if next == 2:
    r = cnt
    break
  else:
    next = a[next]
    cnt += 1
print(r)
# Judge status: Wrong Answer
N, M = map(int, input().split())
X = list(map(int, input().split()))
X.sort()

diff = []
for i in range(M-1):
    diff.append(abs(X[i+1] - X[i]))
diff.sort()

print(sum(diff[:-(N-1)]))
# Judge status: Wrong Answer
N=int(input())
A=list(map(int, input().split()))
if len(set(A))==1:
  print(A[0])
  exit()
  
#A=sorted(A, reverse=True)
alleven=True

for i in range(N):
  if A[i]%2==1:
    alleven=False

if alleven:
  print(2)
else:
  print(1)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
ans = sum(A)

from collections import Counter
A = Counter(A)

for i in range(Q):
  B, C = map(int, input().split())
  try:
    var = A[B]
    ans += var*(C-B)
    A.pop(B)
    try:
      A[C] += var
    except:
      A[C] = var
    print(ans)
  except:
    print(ans)
# Judge status: Accepted
import bisect,copy,heapq,string
from collections import *
from math import *
from itertools import *
import sys
sys.setrecursionlimit(10 ** 6)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n, m = MAP()
tmp = 1

for i in range(1,min(n,m)+1):
    tmp = tmp * i % (10**9+7)

if n == m:
    ans = tmp**2*2 % (10**9+7)
elif abs(n-m) == 1:
    ans = tmp**2*max(n,m) % (10**9+7)
else:
    ans = 0

print(ans)
# Judge status: Accepted
n = int(input())
p_ls = list(map(int, input().split(' ')))
cnt = 0
for i in range(1, len(p_ls) - 1):
    if (p_ls[i-1] < p_ls[i] < p_ls[i+1]) or (p_ls[i+1] < p_ls[i] < p_ls[i-1]):
        cnt += 1
print(cnt)
# Judge status: Accepted
n = int(input())
ans = n//2 if n % 2 == 0 else n//2+1
print(ans)
# Judge status: Wrong Answer
# EDPC A Frog 1
N, K = map(int, input().split())
H = list(map(int,input().split()))

cost = [float("inf")]*N
cost[0] = 0
cost[1] = abs(H[1]-H[0])

for i in range(2,N):
    for k in range(K):
        cost[i] = min(cost[i],cost[i-k]+abs(H[i]-H[i-k]))

print(cost[N-1])
# Judge status: Accepted
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))

l = 0
r = max(A)
while l + 1 < r:
    m = (l+r)//2
    n = sum([(x-1)//m for x in A])
    if n > K:
        l = m
    else:
        r = m
print(r)
# Judge status: Wrong Answer
from math import log2

x, y = map(int, input().split())
print(int(1 + log2(y / x)))
# Judge status: Accepted
n,k= map(int,input().split())
p= list(map(int,input().split()))
sp=[0]*(n-(k-1))
sp[0]=sum(p[0:k])
for i in range(1,n-(k-1)):sp[i]=sp[i-1]+p[i+k-1]-p[i-1]
print((max(sp)+k)/2)
# Judge status: Wrong Answer
N=int(input())
L=list(map(int,input().split()))
avg = sum(L)/len(L)
import math
avg_u = math.ceil(avg)
#avg_d = math.floor(avg)
ans_u = 0
ans_d = 0
for i in L:
  ans_u += (i - avg_u)**2

print(ans_u)
# Judge status: Wrong Answer
#! env python
# -*- coding: utf-8 -*-

import os
import sys


# ac_py.main
# Date: 2020/06/14
# Filename: main 
# Author: acto_mini

def main():
    A, B, C, D = map(int, input().split())

    if B > C:
        if C > A:
            if D > B:
                print(B-C)
            else:
                print(D-C)
        else:
            print(B-A)
    else:
        print(0)
    return


if __name__ == '__main__':
    main()
# Judge status: Accepted
n=int(input())
a=[1]
while sum(a) < n:
  a.append(a[-1]+1)
if sum(a) != n:
  b=sum(a)-n
  a[b-1:b]=[]
print(*a,sep="\n")
# Judge status: Accepted
N, K, S = [int(i) for i in input().split()]

a = S

val = a
ans = []
count = 0
dummy = S+1
if S==1000000000:
    dummy = S - 1
for i in range(N):
    if(count >= K):
        val = dummy
        if val > 1000000000:
            val = 1000000000  
    else:
        count += 1
        val = a
        
    ans += [val]
    if count ==K:
            val = dummy
            count += 1

print(*ans)
# Judge status: Accepted
from math import gcd

n = int(input())
alst = list(map(int, input().split()))
l_gcd = []
r_gcd = []

tmp = alst[0]
for num in alst[:-1]:
    tmp = gcd(tmp, num)
    l_gcd.append(tmp)
    
tmp = alst[-1]
for num in alst[1:][::-1]:
    tmp = gcd(tmp, num)
    r_gcd.append(tmp)
    
ans = max(r_gcd[-1], l_gcd[-1])
for r, l in zip(r_gcd[:-1], l_gcd[:-1][::-1]):
    tmp = gcd(r, l)
    ans = max(ans, tmp)
print(ans)
# Judge status: Wrong Answer
N, K = map(int, input().split())
d = [0] * K
y = [0] * N
for i in range(K):
    d[i]=int(input())
    A= list(map(int, input().split()))
    for x in A:
        y[x-1]+=1
for ans in y:
    if ans==0:
        print(y.index(ans)+1)
# Judge status: Accepted
n = int(input())
A = [int(input()) for _ in range(n)]
count, current = 0, 1
while current != 2:
    current = A[current - 1]
    count += 1
    if count > n:
        count = -1
        break
print(count)
# Judge status: Accepted
s = input()
n = len(s)
ans = 999

for i in range(n-2):
    d = abs(753 - int(s[i:i+3]))
    if d < ans:
        ans = d

print(ans)
# Judge status: Wrong Answer
import datetime as d
def main():
    s = d.datetime.strptime(input(), "%Y/%m/%d")
    s = d.date(s.year, s.month, s.day)
    if s <= d.date(2019,4,30):
        print("Heisei")
    else:
        print("TDB")

if __name__ == "__main__":
    main()
# Judge status: Accepted
n,k = map(int,input().split())
X = list(map(int,input().split()))
ans = float("inf")
for i in range(n-k+1):
    ans = min(ans,abs(X[i])+abs(X[i]-X[i+k-1]),abs(X[i+k-1])+abs(X[i]-X[i+k-1]))
print(ans)
# Judge status: Accepted
n = int(input())
result = 0
for i in range(1,n+1,2):
  total = 0
  for j in range(1,i+1):
    if (i%j == 0):
      total += 1
  if(total == 8):
    result += 1
    #print(i,j)
print(result)
# Judge status: Accepted
N = int(input())
B = list(map(int,input().split()))
cnt=0
cnt+=B[0]
for i in range(len(B)-1):
    if B[i]<= B[i+1]:
        cnt+=B[i]
    elif B[i]> B[i+1]:
        cnt+=B[i+1]
cnt += B[-1]
print(cnt)
# Judge status: Accepted
s = input()

if s[-1] == "s":
  print(s+"es")
else:
  print(s+"s")
# Judge status: Wrong Answer
N,T=map(int,input().split())
nm=1000000
ans=0
for i in range(N):
  c,t=map(int,input().split())
  if nm>c*t:
    ans=c
print(ans)
# Judge status: Accepted
#copy

a = [int(input()) for i in range(5)]
k = int(input())
print("Yay!" if a[4] - a[0] <= k else ":(")
# Judge status: Accepted
N, K= map(int,input().split())
A = list(map(int,input().split()))
a=A[:]
for _ in range(K):
  B=[0]*(N+1)
  for i in range(N):
    t = a[i]
    B[max(i-t,0)] +=1
    B[min(i+t+1,N)] -=1
  for i in range(N):
    B[i+1] += B[i]
  a=B[:N]        
  if min(a)==N:
    break
print(*a)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

ret = 'APPROVED'
for a in A:
    if a % 2 == 0:
        if a % 3 == 0 or a % 5 == 0:
            pass
        else:
            ret = 'DENIED'

print(ret)
# Judge status: Accepted
# coding: utf-8
N, K = map(int, input().split())

i = 0
while N > 0:
    N = N // K
    i += 1

print(i)
# Judge status: Accepted
def resolve():
    '''
    code here
    '''
    import math
    r = int(input())
    print(2*r*math.pi)

if __name__ == "__main__":
    resolve()
# Judge status: Accepted
k,a,b=map(int,input().split())

if a+1<b:
    ans=0
    if k<=a:
        ans=k+1
    else:
        ans=(a-1)+1
        k-=(a-1)
        if k%2==0:
            #print("even")
            ans+=(k//2)*(b-a)
        else:
            #print("odd")
            ans+=(k//2)*(b-a)+1


    print(ans)


else:
    print(1+k)
# Judge status: Accepted
def resolve():
    K, S = map(int, input().split())
    ans = 0
    for i in range(K+1):
        for j in range(K+1):
            if 0 <= S-i-j <= K:
                ans += 1
    print(ans)
resolve()
# Judge status: Accepted
K = int(input())

if K%2 == 0 or K%5 == 0:
    print(-1)
    exit(0)

count = 0
an = 0
while True:
  an = (10*an + 7) % K
  count +=1
  if an == 0:
    break
print(count)
# Judge status: Accepted
N,M = map(int,input().split())
Alist = list(map(int,input().split()))

cond = sum(Alist) * (1 / (4 * M))
count = 0

for A in Alist:
    if A >= cond:
        count += 1

if count >= M:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
def main():
  num = int(input())
  print(num*num)
main()
# Judge status: Accepted
n, k = map(int, input().split())
p = list(map(int, input().split()))
l = []

num = 0
for j in range(k):
    num += p[j]
l.append(num)

for i in range(n-k):
    l.append(l[i]-p[i]+p[i+k])

print((max(l)+k)/2)
# Judge status: Accepted
a,b,m=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
ans=min(x)+min(y)
for i in range(m):
  q,w,e=map(int,input().split())
  ans=min(ans,x[q-1]+y[w-1]-e)
print(ans)
# Judge status: Accepted
N, M = map(int, input().split()) 
ans = []
if M % 2 != 0:
    for i in range((M + 1)//2):
        ans.append((1 + i, M + 1 - i))
        
    for j in range((M - 1)//2):
        ans.append((M + 2 + j, 2*M + 1 - j))
else:
    for i in range(M//2):
        ans.append((1 + i, M + 1 - i))
        ans.append((M + 2 + i, 2*M + 1 - i))
              
for i in range(M):
    print(*ans[i])
# Judge status: Accepted
import itertools

def main():
	N = int(input())
	
	if N in [x * y for x, y in itertools.product(range(1, 10), repeat = 2)]:
		print("Yes")
	else:
		print("No")
	
	return


main()
# Judge status: Accepted
r,g,b = input().split()

ans = int(r+g+b)

if ans % 4 == 0:
  print("YES")
else:
  print("NO")
# Judge status: Wrong Answer
n = list(map(int, input().split()))
if n[0] == n[1]:
    print("No")
    exit()
    if n[0] == n[2]:
        print("No")
        exit()
print("Yes")
# Judge status: Accepted
def main():
    n=int(input())
    x=list(map(int,input().split()))
    ans = [0] * 100
    m=10**8
    for i in range(1,101):
        for j,aa in enumerate(x):
            ans[i-1] += (aa-i)**2
        m=min(m,ans[i-1])
    print(m)
if __name__=='__main__':
    main()
# Judge status: Accepted
s=list(input())
if sorted(s)==['a','b','c']:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
L, R = map(int, input().split())
if R - L >= 2018:
	print(0)
else:
	ans = 2019
	for i in range(L, R):
		for j in range(i + 1, R + 1):
			ans = min(ans, i * j % 2019)
	print(ans)
# Judge status: Accepted
A = list(map(int, input().split()))
print(A.index(0)+1)
# Judge status: Accepted
N,T = map(int,input().split())
t_l = []
for i in range(N):
    c,t = map(int,input().split())
    if t <= T:
        t_l.append(c)
if t_l == []:
    print('TLE')
else:
    print(min(t_l))
# Judge status: Accepted
a, b = map(int, input().split())

print(a if a <= b else a-1)
# Judge status: Accepted
N = int(input())
ans = N

for i in range(1,N):
  j = N-i
  ist = str(i)
  jst = str(j)
  iarray = list(map(int ,ist))
  jarray = list(map(int ,jst))
  isum = sum(iarray)
  jsum = sum(jarray)
  if isum + jsum < ans:
    ans = isum + jsum
print(ans)
# Judge status: Wrong Answer
T = {"AC":0, "WA":0, "TLE":0, "RE":0}
N = int(input())
for i in range(N):
    s = input()
    T[s] += 1

for i, j in T.items():
    print(i,end=" ")
    print("×",end=" ")
    print(j)
# Judge status: Accepted
n= int(input())
print(800*n - 200*(n//15))
# Judge status: Accepted
S = input()
S = set(list(S))
alp = [chr(ord('a') + i) for i in range(26)]
for al in alp:
    if al in S:
        pass
    else:
        print(al)
        exit()
print("None")
# Judge status: Accepted
W,a,b = map(int,input().split())
ans = max(b - (a + W),a - (b + W))
if ans <= 0:
    print(0)
else:
    print(ans)
# Judge status: Accepted
N = int(input())
T = input()
S = list(T)
G = True
while G:
    G = False
    for i in range(1, len(S)):
        if S[i - 1] == '(' and S[i] == ')':
            S.pop(i)
            S.pop(i - 1)
            G = True
            break
for s in S:
    if s == '(':
        T = T + ')'
    else:
        T = '(' + T
print(T)
# Judge status: Wrong Answer
#!/usr/bin/env python3
import re


def main():
    S = input()
    if re.match(r'(?:hi)+', S):
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    main()
# Judge status: Accepted
a,b = map(str, input().split())

num = int(a+b)

if (num ** 0.5).is_integer():
  print('Yes')
else:
  print('No')
# Judge status: Accepted
n,x,y=[int(j) for j in input().split()]
l=[[0]*n for i in range(n)]
ans=[0]*n
x-=1
y-=1
s=y-x-1
for i in range(n):
    for j in range(n):
        if i<j:
            ans[min(j-i,abs(i-x)+abs(j-y)+1,)]+=1

print('\n'.join(map(str,ans[1:])))
# Judge status: Accepted
n = int(input())
ans = [0] * 10010
for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            x = i * i + j * j + k * k + i * j + j * k + k * i
            if x <= n:
                ans[x] += 1
for i in range(1, n+1):
    print(ans[i])
# Judge status: Wrong Answer
s = int(input())
MOD = 10**9 + 7

ans = 0
for i in range(1, s // 3 + 1):
    rest = s - 3 * i
    ans += pow(rest + 1, i - 1, MOD)
print(ans % MOD)
# Judge status: Wrong Answer
A, B, C, D = map(int, input().split())
if A < C :
    print(max(0, B - A - C))
else :
    print(max(0, D - C - A))
# Judge status: Wrong Answer
from collections import Counter
import sys

X = int(input())
num = []

if X == 1:
    print(1)
    sys.exit()

for j in range(1, X):
    tmp = j + 1
    lis = []
    while tmp != 1:
        for i in range(2, tmp+1):
            if tmp % i == 0:
                lis.append(i)
                tmp = tmp // i
                break
    if len(Counter(lis)) == 1 and len(lis) != 1:
        num.append(j+1)

print(max(num))
# Judge status: Wrong Answer
time = int(input())
num = input().split()
count = 0
flg = True

while flg == True:
#	print('a')
	for i in range(time):
		if int(num[i]) % 2 == 1:
#			print('b')
			flg = False
			break
		num[i] = int(num[i]) / 2
		count += 1
#	print(num)
print(count)
# Judge status: Accepted
import sys
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    n = int(input())
    S = input()
    ans = S.count('.')
    score = ans
    for c in S:
        if c == '.':
            score -= 1
        else:
            score += 1
        ans = min(ans, score)
    print(ans)
resolve()
# Judge status: Accepted
a,b=map(int,input().split())

if 0<a:
    print('Positive')
elif a==0:
    print('Zero')
elif a<0 and b>=0:
    print('Zero')
elif a<0 and b<0:
    if len(range(a,b+1))%2==1:
        print('Negative')
    else:
        print('Positive')
# Judge status: Wrong Answer
n,m= list(map(int, input().split()))
if n>=m*2:
    print(m//2)
else:
    print(1000000007)
# Judge status: Wrong Answer
N, M = [int(item) for item in input().split()]
ans_list = [input().split() for _ in range(M)]
# print(ans_list)

res_ac = 0
ans_stack = []
wa_stack = []

for q, ans in ans_list:
    print(q, ans)
    if ans == 'AC':
        if q not in ans_stack:
            res_ac += 1
        ans_stack.append(q)
    else:
        if q not in ans_stack:
            wa_stack.append(q)

res_list = []
for i in wa_stack:
    if i in ans_stack:
        res_list.append(i)


print(res_ac, len(res_list))
# Judge status: Wrong Answer
N, K = map(int, input().split())
S = input()

unhappy = 0
if S[0] == "L":
    unhappy += 1
if S[-1] == "R":
    unhappy += 1
for i in range(1, N-1):
    if S[i:i+2] == "RL":
        unhappy += 2

if unhappy > 2:
    if unhappy > 2*K:
        print(N-(unhappy-2*K))
    else:
        print(N-1)
else:
    print(N-1)
# Judge status: Accepted
X, Y, Z = map(int, input().split())
print((X-Z) // (Y+Z))
# Judge status: Wrong Answer
N, K = map(int, input().split())
X = list(map(int, input().split()))
ans = 10**19

for i in range(N-K+1):
    num = X[K+i-1] + abs(X[i]*2)
    if num < ans:
        ans = num
print(ans)
# Judge status: Accepted
from itertools import combinations_with_replacement
inputs = open(0).readlines()
n, m, q = map(int, inputs[0].split())
ABCD = [list(map(int, x.split())) for x in inputs[1:]]

ans = 0
for x in combinations_with_replacement(range(1, m+1), n):
    e = 0
    for a, b, c, d in ABCD:
        if x[b-1] - x[a-1] == c:
            e += d
    ans = max(e, ans)
print(ans)
# Judge status: Accepted
if int(input()) < 30:
    print("No")
else:
    print("Yes")
# Judge status: Accepted
A, B, C = map(int, input().split())

if A == B == C or A != B != C != A:
    print("No")
else:
    print("Yes")
# Judge status: Accepted
n = int(input())
l = [i*j for i in range(1,10) for j in range(1,10)]
if n in l:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
S = input()
T = input()
len_S, len_T = len(S), len(T)
ans = []
for i in range(len_S-len_T+1):
	f = True
	for j in range(len_T):
		if S[i+j] != T[j] and S[i+j] != '?':
			f = False
			break
	if f:
		s = S[:i] + T + S[i+j+1:]
		ans.append(s.replace('?', 'a'))
if len(ans) == 0:
	print('UNRESTORABLE')
else:
	ans.sort()
	print(ans[0])
# Judge status: Wrong Answer
N,K = [int(i) for i in input().split()]
h = [int(i) for i in input().split()]
minToatalCostList = [100000 for i in range(N)]
minToatalCostList[0] = 0

for i in range(1,N) :
	for j in range(1,K+1) :
		if j > i or minToatalCostList[i] == 0 :
			break
		else :
			minToatalCostList[i] = min(minToatalCostList[i], (abs(h[i] - h[i-j]) + minToatalCostList[i-j] ))

print(minToatalCostList[N-1])
# Judge status: Accepted
a,b=map(int,input().replace(".", "").split())
print(a*b//100)
# Judge status: Accepted
n, m = map(int, input().split())
c = [[] for _ in range(n+1)]
for i in range(m):
  a, b = map(int, input().split())
  c[a].append(b)
  c[b].append(a)

for i in c[1]:
  if n in c[i]:
    print('POSSIBLE')
    exit()

print('IMPOSSIBLE')
# Judge status: Wrong Answer
a, b = map(int, input().split())
s = input()
if s[a] == '-':
  if s[:a].isdecimal() and s[-b:].isdecimal:
    print('Yes')
  else:
    print('No')
else:
  print('No')
# Judge status: Accepted
s = input()

ans = 0
carry = 0
for i in range(len(s) - 1, -1, -1):
    c = int(s[i])
    if c + carry < 5:
        ans += c + carry
        carry = 0
    elif c + carry == 5:
        if i > 0 and int(s[i - 1]) >= 5:
            ans += 5
            carry = 1
        else:
            ans += 5
            carry = 0
    else:
        ans += 10 - c - carry
        carry = 1
if carry:
    ans += 1
print(ans)
# Judge status: Wrong Answer
n = int(input())
p = list(map(int,input().split()))
count = 0
for i in range(1,n):
    l = p[i-1:i+2]
    ls = sorted(l)
    if l[1] == ls[1]:
        count += 1
print(count)
# Judge status: Accepted
n,m = map(int, input().split())

s = list(map(int, input().split()))
s.pop(0)

for i in range(n-1):
    k = set(list(map(int, input().split()))[1:])
    s = set(s) & k
    
print(len(s))
# Judge status: Accepted
N = int(input())
X = list(map(int, input().split()))

P = round(sum(X) / N)

ans = 0
for x in X :
    ans += (P - x) ** 2

print(ans)
# Judge status: Accepted
X = int(input())

dammy=[]
for b in range(1,101):
    for p in range(2,10):
        dammy.append(b**p)
        dammy.sort()

for i in range(101):
    if dammy[i]>X:
        print(dammy[i-1])
        break
# Judge status: Accepted
n=int(input())
c = list(map(int, input().rstrip().split()))
ans=0
b=10**9+7
sum1=0
for i in range(n):
    ans=(ans+c[i]*sum1)%b
    sum1=(sum1+c[i])%b

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

ans='No'
i=0
while i<=N:
    j=0
    while j<=M:
        if M*i+N*j-2*i*j==K:
            ans='Yes'
        j+=1
    i+=1

print(ans)
# Judge status: Accepted
n,ais = int(raw_input()),map(int, raw_input().split(' '))
total = sum(ais)
#ais.sort()

cumul = 0
i,j = 0,0
m = abs(total)
while(j< len(ais)):
	while(j < len(ais) and ais[j] == ais[i]):
		cumul += ais[j]
		j+=1
	i = j
	m = min(m, abs(2 *cumul - total))
print m
# Judge status: Accepted
a,b,c,d = input()
if a == b ==c or b == c ==d:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
from math import log2
X, Y = map(int, input().split())

print(int(log2(Y/X)+1))