Harryxun/stf_run huggingface dataset:
N = input()
a_list = list(map(int, input().split()))
b_list = list(map(int, input().split()))

if all([a >= b for a, b in zip(a_list, b_list)]):
    # すべての準備度が必要度を上回っている場合
    print(0)
else:
    # 準備度が足りていない試験がある場合
    if sum(a_list) < sum(b_list):
        # そもそも準備度の総量が足りない場合
        print(-1)
    else:
        # 準備度を移動すれば受かる場合
        # 一番数の大きいところから足りていないところに割り振る戦略
        # a_listをcopy
        c_list = [a for a in a_list]
        # 準備度の余裕をリストに格納
        diff_list = [c - b for c, b in zip(c_list, b_list)]
        # 一度減算し始めたら対象が0になるまで続ける
        selected_biggest_idx = diff_list.index(max(diff_list))
        while not all([c >= b for c, b in zip(c_list, b_list)]):
            if diff_list[selected_biggest_idx] == 0:
                selected_biggest_idx = diff_list.index(max(diff_list))
            min_idx = diff_list.index(min(diff_list))
            # 最大と最小で移し替えを行う
            if diff_list[selected_biggest_idx] < abs(diff_list[min_idx]):
                # 足りていない値のほうが大きい場合
                c_list[selected_biggest_idx] -= diff_list[selected_biggest_idx]
                c_list[min_idx] += diff_list[selected_biggest_idx]
            else:
                # 足りていない値のほうが小さい場合
                c_list[selected_biggest_idx] -= abs(diff_list[min_idx])
                c_list[min_idx] += abs(diff_list[min_idx])
            # diff_listを更新
            diff_list = [c - b for c, b in zip(c_list, b_list)]
        result_count = len([1 for a, c in zip(a_list, c_list) if a != c])
        print(result_count)



### FIXED CODE ###

import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools


sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]


def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)

A,B,C = LI()


if B > C:
    print(B + C)
else:
    # 毒入りの方が多い
    result = B * 2
    C -= B
    if A >= C:
        result += C
        print(result)
    else:
        # 毒のほうが多い
        result += A + 1
        print(result)
while True :
    a,b=input().split()
    h =int(a)
    w=int(b)
    if a==0 and b==0:
        break
    for i in range(h):
        if i %2==0:
            print(".#"*(w/2))
            if w==1:
                print(".")
        elif h ==1 :
            print("#")
        else:
            print("#."*(w-1)/2))
    print("")

### FIXED CODE ###

while True:
    a,b=input().split()
    h = int(a)
    w=int(b)
    if h==0 and w==0:
        break
    odd = "#."*300
    even= ".#"*300
    for i in range(h):
        if (i%2)==0:
            print(odd[:w])
        else:
            print(even[:w])
    print("")
import sys

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

graph = {}
for index, value in enumerate(input().split()):
    graph[index + 1] = int(value)

queue = [1]
now_pos = 1
start = 0

for i in range(K):
    if not graph[now_pos] in queue:
        queue.append(graph[now_pos])
        now_pos = graph[now_pos]

    # 循環した
    else:
        start = graph[now_pos]
        break

before = queue[:queue.index(start)]
roop = queue[queue.index(start):]

for i in range(len(roop)):
    if (K - len(before)) % len(roop) == i:
        print(roop[i])
        sys.exit()


### FIXED CODE ###

import sys
import time

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

queue = {}

start = -1
count = 1

now_town = 1

for i in range(K):
    if town_list[now_town - 1] in queue:
        start = town_list[now_town - 1]
        break
    queue[town_list[now_town - 1]] = count
    now_town = town_list[now_town - 1]
    count += 1

if start == -1:
    print(now_town)
    sys.exit()

roop = len(queue) - (queue[start] - 1)
before_len = queue[start]

print(list(queue.keys())[(K - before_len) % roop + before_len - 1])
# Python3 (3.4.3)
import sys

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
S = input()
T = input()


idx = S.index(T[0])
ans = idx+1
lenT = len(T)
for i in range(1,lenT):
    S = S[idx+1:] + S[:idx+1]
    idx = S.index(T[i])
    ans += idx+1

print(ans)

### FIXED CODE ###

#!/usr/bin/env python3
#ABC138 E

import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

s = input()
t = input()
n = len(s)
m = len(t)
f = [False]*26
f2 = [False]*26
alpha = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
    f[alpha.index(s[i])] = True
for i in range(m):
    f2[alpha.index(t[i])] = True
for i in range(26):
    if not f[i] and f2[i]:
        print(-1)
        quit()
ans = 0
inde = s.index(t[0])
ans += inde+1
for i in range(1,m):
    s = s[inde+1:] + s[:inde+1]
    inde = s.index(t[i])
    ans += inde+1
print(ans)
#!/usr/bin/env python3
import fractions

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

N, M = map(int, input().split())
S = input()
T = input()
if S[0] != T[0]:
    print(-1)
    exit()

l = lcm(N, M)

Moji = ['']*l
Moji[0] = S[0]

for i in range(1, N):
    index = i * (l//N) + 1
    if Moji[index-1] == '':
        Moji[index-1] = S[i]

for i in range(1, M):
    index = i * (l//M) + 1
    if Moji[index-1] == '':
        Moji[index-1] = T[i]
    else:
        if Moji[index-1] != T[i]:
            print(-1)
            exit()

print(l)


### FIXED CODE ###

#!/usr/bin/env python3
import fractions

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

N, M = map(int, input().split())
S = input()
T = input()
if S[0] != T[0]:
    print(-1)
    exit()

l = lcm(N, M)

Moji = {}
Moji[0] = S[0]

for i in range(1, N):
    index = i * (l//N) + 1
    Moji[index-1] = S[i]

for i in range(1, M):
    index = i * (l//M) + 1
    if index-1 in Moji and Moji[index-1] != T[i]:
        print(-1)
        exit()

print(l)
import sys
import numpy as np
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

n = int(readline())
xl = [list(map(int, readline().decode('utf-8').split())) for _ in range(n)]
xl = np.array(xl)
xl_ = np.c_[xl[:, 0] - xl[:, 1], xl[:, 0] + xl[:, 1]]
xl_ += abs(xl_.min())

cnt_array = np.zeros(xl_.max())
cnt = 0
for l, r in xl_:
    if (cnt_array[l:r] > 0).sum() > 0:
        continue
    else:
        cnt_array[l:r] += 1
        cnt += 1

cnt_ = 0
for l, r in xl_[::-1]:
    if (cnt_array[l:r] > 0).sum() > 0:
        continue
    else:
        cnt_array[l:r] += 1
        cnt_ += 1

print(max(cnt, cnt_))


### FIXED CODE ###

import sys
from operator import itemgetter
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

n = int(readline())
xl = [list(map(int, readline().decode('utf-8').split())) for _ in range(n)]
LR = [(x - l, x + l) for x, l in xl]
LR.sort(key=itemgetter(1))

acc = -10**18

cnt = 0

for l, r in LR:
    if acc > l:
        continue
    cnt += 1
    acc = r

print(cnt)
n = int(input())
s = input()
ans = 0

for i in range(n):
    for j in range(i+1, n+1):
        print('s[i:j]:, s[j:]: ',s[i:j],s[j:], s[i:j] in s[j:], len(s[i:j]))
        if (s[i:j] in s[j:]):
            if ans < len(s[i:j]):
                ans = len(s[i:j])
        else:
            break
print(ans)
            

### FIXED CODE ###

n = int(input())
s = input()
high = n//2
low = 1
ans = 0

while low <= high:
    t = set()
    i = (high+low)//2
    for j in range(n-i*2+1):
        t.add(s[j:i+j])
        if s[i+j:j+2*i] in t:
            if ans < i:
                ans = i
                low = i+1
                break
    if ans < i:
        high = i-1
print(ans)
a,b = map(int,input().split())

def f(x):
    k=2
    l = []
    while True:
        mul = k>>1
        if mul>x:
            fin = mul>>1
            l[-1]=x-fin+1
            break
        fin = mul>>1
        l.append(x//k*mul+max(x%k+1-k//2,0))
        k = k<<1
    l = l[::-1]
    return l
l1 = f(b)
l2 = f(a-1)
k=1
ans=0
while not l1==[]:
    if l2==[]:
        t = l1.pop()
        if t%2==1:
            ans+=k
    else:
        t = l1.pop()-l2.pop()
        if t%2==1:
            ans+=k
    k = k<<1
print(ans)


### FIXED CODE ###

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

def f(x):
    if x<=0:
        return [0]
    k=2
    l = []
    while True:
        mul = k>>1
        if mul>x:
            fin = mul>>1
            l[-1]=x-fin+1
            break
        fin = mul>>1
        l.append(x//k*mul+max(x%k+1-k//2,0))
        k = k<<1
    l = l[::-1]
    return l
l1 = f(b)
l2 = f(a-1)
k=1
ans=0
while not l1==[]:
    if l2==[]:
        t = l1.pop()
        if t%2==1:
            ans+=k
    else:
        t = l1.pop()-l2.pop()
        if t%2==1:
            ans+=k
    k = k<<1
print(ans)
a, b = map(int, input().split)
if (a*b)%2==0:
  print('Even')
else:
  print('Odd')

### FIXED CODE ###

a, b = map(int, input().split())
if (a*b) % 2:
  print('Odd')
else:
  print('Even')
s = input()
k = int(input())
lst = []
for i in range(len(s)-4):
    for j in range(1, 6):
        lst.append(s[i:i+j])
print(sorted(list(set(lst)))[k-1])

### FIXED CODE ###

s = input()
k = int(input())
lst = []
start = 0
end = 1
while start < len(s):
    while end - start <= 5:
        lst.append(s[start:end])
        end += 1
    start += 1
    end = start +1
lst.append(s[-1])

print(sorted(list(set(lst)))[k-1])
A, B = map(int, input().split())
A = int(A)
B = int(float(B) * 100)
print((A * B) / 100)

### FIXED CODE ###

A, B = input().split()
A = int(A)
B = int(B.replace(".", ""))
print(A*B//100)
a,b = map(int,input().split())
List = [list(map(int,input().split())) for i in range (a)]
newList = []
for i in range(0,a):
    n = 0
    for j in range (0,3):
        n = n + List[i][j]
    newList.append(n)
x = sorted(newList,reverse =True)
m = 0
for i in range (0,b):
    m = m + x[i]
print(m)    

### FIXED CODE ###

a,b = map(int,input().split())
if a <= 8 and b <=8:
    print('Yay!')
else:
    print(':(')
s = input()
count = 0
lens = []

for i, _ in enumerate(s):
  for c in s[i:]:
    if c in ['A', 'G', 'C', 'T']:
      count += 1
  	else:
      break
  lens.append(count)
  count = 0
  
print(max(lens))
  

### FIXED CODE ###

s = input()
acgt = ["A","C","G","T"]
res = []
parts = ""

for i in range(len(s)):
    parts = ""
    for c in s[i:]:
        if c in acgt:
            parts += c
        else:
            break
    res.append(len(parts))

print(max(res))
n = input()

dp = [[0] * 2 for _ in range(100000)]

digit = int(n[-1])

dp[0][0] = 10 - digit
dp[0][1] = digit

for i in range(1, len(n) + 1):
    if i == len(n):
        digit = 0
    else:
        digit = int(n[-i-1])
    dp[i][0] = min(dp[i-1][0] + 10 - digit - 1, dp[i-1][1] + 10 - digit)
    dp[i][1] = min(dp[i-1][0] + digit + 1, dp[i-1][1] + digit)


print(min(dp[len(n)][1], dp[len(n)-1][1]))


### FIXED CODE ###

n = input()

dp = [[0] * 2 for _ in range(2)]

digit = int(n[-1])

dp[0][0] = 10 - digit
dp[0][1] = digit

for i in range(1, len(n) + 1):
    if i == len(n):
        digit = 0
    else:
        digit = int(n[-i-1])

    if i % 2 == 0:
        dp[0][0] = min(dp[1][0] + 10 - digit - 1, dp[1][1] + 10 - digit)
        dp[0][1] = min(dp[1][0] + digit + 1, dp[1][1] + digit)
    else:
        dp[1][0] = min(dp[0][0] + 10 - digit - 1, dp[0][1] + 10 - digit)
        dp[1][1] = min(dp[0][0] + digit + 1, dp[0][1] + digit)


print(min(dp[0][1], dp[1][1]))
A = str(input())
B = str(input())
C = str(input())
D = str(input())
E = str(input())
a = int(A[-1:])
b = int(B[-1:])
c = int(C[-1:])
d = int(D[-1:])
e = int(E[-1:])
F = [a,b,c,d,e]
G = F.count(0)
H = (10-a)+(10-b)+(10-c)+(10-d)+(10-e)
p = 9 if a == 0 else a
q = 9 if b == 0 else b
r = 9 if c == 0 else c
s = 9 if d == 0 else d
t = 9 if e == 0 else e
I = min([p,q,r,s,t])
J = int(A) +int(B) +int(C) + int(D) + int(E)
K = -10*G + I -10
if G==5:
  print(J)
else:


### FIXED CODE ###

A = str(input())
B = str(input())
C = str(input())
D = str(input())
E = str(input())
a = int(A[-1:])
b = int(B[-1:])
c = int(C[-1:])
d = int(D[-1:])
e = int(E[-1:])
F = [a,b,c,d,e]
G = F.count(0)
H = (10-a)+(10-b)+(10-c)+(10-d)+(10-e)
p = 9 if a == 0 else a
q = 9 if b == 0 else b
r = 9 if c == 0 else c
s = 9 if d == 0 else d
t = 9 if e == 0 else e
I = min([p,q,r,s,t])
J = int(A) +int(B) +int(C) + int(D) + int(E)
K = I -10*G -10
if G==5:
  print(J)
else:
  print(H+J+K)
from collections import deque
N= int(input())
state = input()
 
newlist = sorted(state)
goalstate = "".join(newlist)
uni = 0
for l in range(len(goalstate)):
    if goalstate[l] == "W":
        uni = l
        break
def bfs(state,goalstate):
    cur_state = deque([state])
    cou = 0
    while cur_state:
        cur = cur_state.popleft()
        if cur == goalstate:
            return cou
            break
        new= list(cur)
        temp = 0
        for i in range(len(goalstate)):
            if new[i] == "W":
                temp = i
                break
        neow= 0
        for j in range(uni-1,len(goalstate)):
            if new[j] == "R":
                neow = j
                break
        tempstr = new.pop(temp)
        temp1str = new.pop(neow-1)
        new.insert(neow,tempstr)
        new.insert(temp,temp1str)
        nowstr = "".join(new)
        cur_state.append(nowstr)
        cou += 1
 
 
goal = bfs(state, goalstate)
print(goal)

### FIXED CODE ###

K = int(input())
if K % 2 == 0 or K % 5 == 0:
  print(-1)
else: 
    state = 7 
    state %= K
    cou = 1
    while True:
        if state == 0:
            print(cou)
            break
        state = state *  10 + 7
        state %= K 
        cou+= 1
import math

str = input().split(' ')
x1 = int(str[0])
x2 = int(str[1])
y1 = int(str[2])
y2 = int(str[3])

result = (x1-y1)*(x1-y1) + (x2-y2)*(x2-y2)
result = math.sqrt(result) if result != 0 else 0

print('%.6f'%result)

### FIXED CODE ###

import math

str = input().split(' ')
x1 = float(str[0])
x2 = float(str[1])
y1 = float(str[2])
y2 = float(str[3])

result = (x1-y1)*(x1-y1) + (x2-y2)*(x2-y2)
result = math.sqrt(result) if result != 0 else 0

print('%.6f'%result)
n = int(input)
print(int(n//500*1000+(n%500)//5*5))

### FIXED CODE ###

n = int(input())
print(int(n//500*1000+(n%500)//5*5))
from itertools import permutations
import sys

sys.setrecursionlimit(10 ** 6)
from bisect import *
from collections import *
from heapq import *
from math import gcd

def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def SI(): return sys.stdin.readline()[:-1]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
int1 = lambda x: int(x) - 1
def MI1(): return map(int1, sys.stdin.readline().split())
def LI1(): return list(map(int1, sys.stdin.readline().split()))
p2D = lambda x: print(*x, sep="\n")
dij = [(1, 0), (0, 1), (-1, 0), (0, -1)]

def main():
    n,k=MI()
    ans=k*pow(k-1,n-1)
    print(ans)

main()


### FIXED CODE ###

from itertools import permutations
import sys

sys.setrecursionlimit(10 ** 6)
from bisect import *
from collections import *
from heapq import *

def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def SI(): return sys.stdin.readline()[:-1]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
int1 = lambda x: int(x) - 1
def MI1(): return map(int1, sys.stdin.readline().split())
def LI1(): return list(map(int1, sys.stdin.readline().split()))
p2D = lambda x: print(*x, sep="\n")
dij = [(1, 0), (0, 1), (-1, 0), (0, -1)]

def main():
    n,k=MI()
    ans=k*pow(k-1,n-1)
    print(ans)

main()
abc = list(map(int,input()))
abc.sort()
abc[2] *= 10
print(sum(abc))

### FIXED CODE ###

abc = list(map(int,input().split()))
abc.sort()
abc[2] *= 10
print(sum(abc))
print(700+100*input().count("o")

### FIXED CODE ###

print(700+100*input().count("o"))
X=int,(input())
A=int,(input())
B=int,(input())
print((X-A)%B)


### FIXED CODE ###

X=int(input())
A=int(input())
B=int(input())
print((X-A)%B)
s=input()
string="keyence"
flag1=0
flag2=0
flag3=0
v=0

for i in range(len(s)):
  if s[i]==string[v]:
    v+=1
    if flag1==1:
      flag2=1
  else:
    flag1=1
    if flag1==1 and flag2==1:
      print("NO")
      exit()

if flag1==0 and flag2==0:
  print('YES')
elif flag2==0:
  print('NO')
else:
  print('YES')


### FIXED CODE ###

s = input()
n = len(s)

for i in range(n):
    for j in range(i, n):
        tmp = s[:i]+s[j:]
        if tmp == "keyence":
            print("YES")
            quit()

print("NO")
A, B, C= input().split().upper()

print(A[0] + B[0] + c[0])


### FIXED CODE ###

A, B, C= input().split()

a = A.upper()
b = B.upper()
c = C.upper()

print(a[0] + b[0] + c[0])
n = int(input())
a = list(map(int, input().split()))

print(sum(s) - n)


### FIXED CODE ###

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

print(sum(a) - n)
from bisect import bisect, bisect_left


size = 10 ** 5 + 1

is_prime = [True] * size
is_prime[0] = is_prime[1] = False

# √size まで
for i in range(2, 317):
  j = 2 * i
  while j < size:
    is_prime[j] = False
    j += i

like_numbers = [
  i 
  for i, x in enumerate(is_prime)
  if x and (i + 1) % 2 == 0 and is_prime[(i + 1) // 2]
]

Q = int(input())

for _ in range(Q):
  l, r = map(int, input().split())
  if l == r:
    print(1 if l in like_numbers else 0)
  else:
    print(bisect(like_numbers, r) - bisect_left(like_numbers, l))  
  

### FIXED CODE ###

x = int(input())

print(48 - x)
X,N=map(int,input().split())
if N==0:
  print(X)
  exit()
p=sorted(map(int,input().split()))
p = [i for i in range(min(p),max(p)+1) if i not in p]
if X in p:
  print(X)
else:
  p = list(set(p))
  p.append(X)
  p.sort()
  index_num = p.index(X)
  if 0 < index_num < len(p)-2:
    num1=index_num+1
    num2=index_num-1
    num1_abs=abs(p[index_num]-p[num1])
    num2_abs=abs(p[inedx_num]-p[num2])
    if num1_abs < num2_abs:
      print(p[num1])
    else:
      print(p[num2])
  elif index_num==0:
    num1=index_num+1
    print(p[num1])
  elif index_num == len(p)-1:
    num2=index_num-1
    print(p[num2])

### FIXED CODE ###

X, N = list(map(int, input().split()))
p = list(map(int, input().split()))

i = 0
while True:
    if X - i not in (p):
        print(X-i)
        exit()
    if X + i not in (p):
        print(X+i)
        exit()
    i += 1
#!python3.4.3
import math

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == "__main__":
    a, b = map(int, input().split(' '))
    
    print(lcm(a, b))



### FIXED CODE ###

#!python3.4.3
from fractions import gcd

def lcm(x, y):
    return (x * y) // gcd(x, y)

if __name__ == "__main__":
    a, b = map(int, input().split(' '))
    
    print(lcm(a, b))
h, w = map(int, input().split())
a = [[input()] for _ in range(h)]
row = [False] * h
col = [False] * w
for i in range(h):
    for j in range(w):
        if a[i][j] == '#':
            row[i] = True
            col[j] = True
for i in range(h):
    if row[i]:
        for j in range(w):
            if col[j]:
                print(a[i][j], end='')
        print()


### FIXED CODE ###

h, w = map(int, input().split())
a = [''] * h
for i in range(h):
	a[i] = input()

row = [False] * h
col = [False] * w
for i in range(h):
	for j in range(w):
		if a[i][j] == '#':
			row[i] = True
			col[j] = True

for i in range(h):
	if row[i]:
		for j in range(w):
			if col[j]:
				print(a[i][j], end = '')
		print()
AV = input().split()
BW = input().split()
T = int(input())

if(int(AV[0]) > int(BW[0])):
  T *= -1

a = int(AV[0]) + int(AV[1]) * T
b = int(BW[0]) + int(BW[1]) * T

if(T >=0 && a >= b):
  print('YES')
elif(T <= 0 && a >= b):
  print('YES')
else:
  print('NO')


### FIXED CODE ###

AV = input().split()
BW = input().split()
T = int(input())

if(int(AV[0]) > int(BW[0])):
  T *= -1

a = int(AV[0]) + int(AV[1]) * T
b = int(BW[0]) + int(BW[1]) * T

if(T >=0 and a >= b):
  print('YES')
elif(T <= 0 and a <= b):
  print('YES')
else:
  print('NO')
while 1 :
    x= [i for i in input()]
    s=[int(0) for i in range(26)]
    for i in range(len(x)):
        if 97<=ord(x[i].lower())<=122:
            s[ord(x[i].lower())-97]=s[ord(x[i].lower())-97]+1
    for i in range(26):
        print(chr(97+i),":",s[i])

### FIXED CODE ###

s=[int(0) for i in range(26)]
while True:
    try:
        x=input()
        for i in range(len(list(x))):
            if 97<=ord(list(x)[i].lower())<=122:
                s[ord(list(x)[i].lower())-97]=s[ord(list(x)[i].lower())-97]+1
    except EOFError:
        break
for i in range(26):
    print(chr(97+i),":",s[i])
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
list1=[A,B,C,D,E]
sum=0
for item in list1:
  if(item%10==0):
    sum+=item
  else:
    sum=sum+item+(10-item%10)
print(sum

### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
f=[b-a,c-b,d-c,e-d]
 
if((f[0]>k) or (f[1]>k) or (f[2]>k)or (f[3]>k)):
  print(':(')
elif(((f[0]+f[1])>k)or ((f[1]+f[2])>k)or ((f[2]+f[3])>k)):
  print(':(')
elif(((f[0]+f[1]+f[2])>k) or((f[1]+f[2]+f[3])>k)):
  print(':(')
elif((e-a)>k):
  print(':(')
else:
  print('Yay!')
n = int(input())
x = input().split(" ")
x = [int(i) for i in x]
answer = 0
for index,i in enumerate(x):
    answer += pow((i - index), 2)
print(answer)

n = int(input())
x = list(map(int, input().split()))
m = round(sum(x)/n)
answer = 0
for i in x:
    answer += (i-m)**2
print(answer)

### FIXED CODE ###

n = int(input())
x = list(map(int, input().split()))
m = round(sum(x)/n)
answer = 0
for i in x:
    answer += (i-m)**2
print(answer)
a = input().split()
b = input()

list = list(b)

for i in list:
  if i == a[1] - 1:
    list[i] = list[i].lower()
    
print(''.join(list))

### FIXED CODE ###

a = input().split()
b = input()
 
c = list(b)
 
for i in range(len(c)):
  if i == int(a[1]) - 1:
    c[i] = c[i].lower()
    
print(''.join(c))
import sys
import bisect

input = sys.stdin.readline

def main():
    N, K = map(int, input().split())
    x = list(map(int, input().split()))
    if 0 in x:
        K -= 1
        x.remove(0)
    idx = bisect.bisect_left(x, 0)
    x.insert(idx, 0)
    ans1 = float('inf'); ans2 = float('inf')
    if N-idx >= K:
        ans1 = x[idx + K]
    if idx >= K:
        ans2 = abs(x[idx - K])
    ans3 = float('inf')
    for m in range(1, min(N-idx, K)+1):
        tmp = 2*x[idx+m] + abs(x[idx-(K-m)])
        ans3 = min(tmp, ans3)
    ans4 = float('inf')
    for m in range(1, min(idx, K)+1):
        tmp = 2*abs(x[idx-m]) + abs(x[idx+(K-m)])
        ans4 = min(tmp, ans4)
    ans = min(ans1, ans2, ans3, ans4)
    print(ans)

if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    N, K = map(int, input().split())
    x = list(map(int, input().split()))

    ans = float('inf')
    for i in range(N-K+1):
        L = x[i]
        R = x[i+K-1]
        if R < 0:
            ans = min(ans, abs(L))
        elif L <= 0 <= R:
            ans = min(2*abs(R)+abs(L), 2*abs(L)+abs(R), ans)
        elif 0 < L:
            ans = min(ans, abs(R))
        else:
            continue
    
    print(ans)

if __name__ == "__main__":
    main()
A, B, C = set(input().split())

print("Yes" len(set)==2 else "No")


### FIXED CODE ###


ABC = list(input().split())

print("Yes" if len(set(ABC))==2 else "No")