Harryxun/stf_run huggingface dataset:
x=input()
y=x.split()
if y[0] = y[1] :
    if y[0] = y[2]:
        print("No")
    else:
        print("Yes")
elif y[2] = y[1] :
        print("Yes")

### FIXED CODE ###

x=input()
y=x.split()

if y[0] == y[1] :
    if y[0] == y[2]:
        print("No")
    else:
        print("Yes")
elif y[0] == y[2] :
    print("Yes")
elif y[2] == y[1] :
        print("Yes")
else:
    print("No")
w,h,x,y,r =[int(i) for i in input().split()]

if(w < x+r ):
	print('YES')
elif(h < y+r):
	print('YES')
else:
	print('NO')

### FIXED CODE ###

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

if(a < b and b < c):
	print("Yes")
else:
	print("No")
a, b, k = map(int, input().split())

if b-a+1 <=2k:
    for h in range(a, b+1)
    print(h)
else:
    for i in range(a, a+k):
        print(i)
    for j in range(b-k+1, b+1):
        print(j)

### FIXED CODE ###

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

if b-a+1 <= k*2:
    for h in range(a, b+1):
        print(h)

else:
    for i in range(a, a+k):
        print(i)
    for j in range(b-k+1, b+1):
        print(j)
s = int(input())
l = list(map(int,input().split()))
l.sort()

ans = 0
for i in N:
  for j in range(i+1,N):
    for k in range(j+1,N):
      if l[k]<l[i]+l[j] and i!=j and j!=k:
        ans +=1

### FIXED CODE ###

n = int(input())
l = list(map(int, input().split()))
l.sort()

ans = 0
for i in range(n):
    for j in range(i + 1, n):
        for k in range(j + 1, n):
            if l[i] != l[j] != l[k]:
                if l[i] + l[j] > l[k]:
                    ans += 1
print(ans)
def resolve():
    s = int(input())
    print(s * s * 3)
def()

### FIXED CODE ###

def resolve():
    s = int(input())
    print(s * s * 3)
resolve()
A = int(input())
B = int(input())

cnt = 0
for i in range(A, B + 1):
	S = str(i)
	ok = True
	for j in range(0, 3):
		if S[j] != S[4 - j]:
			ok = False
			break

	if ok:
		cnt = cnt + 1

print(cnt)

### FIXED CODE ###

l = input().split()
A = int(l[0])
B = int(l[1])

cnt = 0
for i in range(A, B + 1):
	S = str(i)
	ok = True
	for j in range(0, 3):
		if S[j] != S[4 - j]:
			ok = False
			break

	if ok:
		cnt = cnt + 1

print(cnt)
import sys

def main():
    a = int(sys.argv[1])
    b = int(sys.argv[2])

    if a <= 0 and b >= 0:
        print("Zero")
        quit()

    temp = 1
    for i in range(a, b+1):
        temp *= i
    else:
        if temp > 0:
            print("Positive")
        else:
            print("Negative")


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys

def main():
    l = input().split()
    a = int(l[0])
    b = int(l[1])

    if a <= 0 and b >= 0:
        print("Zero")
    elif a > 0:
        print("Positive")
    elif b < 0:
        if (b - a) % 2 != 0:
            print("Positive")
        else:
            print("Negative")

if __name__ == '__main__':
    main()
def t118C():
    N = int(input())
    A = [int(input()) for i in range(N)]
    A.sort()
    anslist = []
    ans = 0
    tmplist = []
    tmplist2 = []

    up = 0
    down = N - 1
    checklist = [0 for i in range(N)]
    while True:
        if checklist[up] == 1:
            break
        tmplist.append(up)
        checklist[up] = 1
        up += 1

        if checklist[down] == 1:
            break
        tmplist2.append(down)
        checklist[down] = 1
        down -= 1

        if checklist[down] == 1:
            break
        tmplist.append(down)
        checklist[down] = 1
        down -= 1

        if checklist[up] == 1:
            break
        tmplist2.append(up)
        checklist[up] = 1
        up += 1

    for i in range(len(tmplist)):
        tmplist[i] = A[tmplist[i]]

    for i in range(len(tmplist2)):
        tmplist2[i] = A[tmplist2[i]]

    #print(tmplist, tmplist2)
    for i in range(1, len(tmplist)):
        ans += abs(tmplist[i] - tmplist[i - 1])
    for i in range(1, len(tmplist2)):
        ans += abs(tmplist2[i] - tmplist2[i - 1])
    ans += abs(tmplist[0] - tmplist2[0])
    ans2 = ans
    if n >= 2:
        ans2 -= abs(tmplist[-1] - tmplist[-2])
        ans2 -= abs(tmplist2[-1] - tmplist2[-2])
        ans2 += abs(tmplist[-1] - tmplist2[-2])
        ans2 += abs(tmplist[-2] - tmplist2[-1])
    #print(ans2)
    print(max(ans, ans2))
t118C()

### FIXED CODE ###

def t118C():
    N = int(input())
    A = [int(input()) for i in range(N)]
    A.sort()
    AFromMinimum = A
    AFromMaxim = A[::-1]
    ans = 0
    if N % 2 == 0:
        ans = -2 * sum(AFromMinimum[:N // 2]) + 2 * sum(AFromMaxim[:N // 2]) + AFromMinimum[N // 2 - 1] - AFromMaxim[N // 2 - 1]
    else:
        c = (N - 1) // 2
        tmp1 = -2 * sum(A[:c]) + 2 * sum(A[c + 2:]) + A[c] + A[c + 1]
        tmp2 = -2 * sum(A[:c - 1]) + 2 * sum(A[c + 1:]) - A[c - 1] - A[c]
        ans = max(tmp1, tmp2)
    print(ans)
t118C()
def main()
    N,K = map(int,input().split())
    A = list(map(int,input().split()))
    dp = [0] * (N+10)
    dp[2] = abs(A[1] - A[0])
    for i in range(2,N):
        res = []
        if K > i:
            kk = i+1
        else:
            kk = K + 1
        for j in range(1,kk):
            res.append(abs(A[i] - A[i-j])+dp[i-j+1])
        dp[i+1] = min(res)
    
    print(dp[N])
if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    N,K = map(int,input().split())
    A = list(map(int,input().split()))
    dp = [0] * (N+10)
    dp[2] = abs(A[1] - A[0])
    for i in range(2,N):
        res = []
        if K > i:
            kk = i+1
        else:
            kk = K + 1
        for j in range(1,kk):
            res.append(abs(A[i] - A[i-j])+dp[i-j+1])
        dp[i+1] = min(res)
    
    print(dp[N])
if __name__ == "__main__":
    main()
N = int(input())
print(min(N%K, K-N%K))

### FIXED CODE ###

N,K = map(int, input().split())
print(min(N%K, K-N%K))
(a,b) = map(int, raw_input().split())
print a/b a%b "%d" %.5e

### FIXED CODE ###

(a,b) = map(int,raw_input().split())
print "%d %d %.5f" % (a/b , a%b, a / float(b))
import numpy as np
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
A = [[int(i) for i in input().split()] for i in range(n)]
B = np.array(b).reshape(m,1)
cnt = 0
for i in range(m):
    x = np.dot(A[i], B)+c
    if x >0:
    	cnt += 1
    print(cnt)

### FIXED CODE ###

import numpy as np
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
A = [[int(i) for i in input().split()] for i in range(n)]
B = np.array(b).reshape(m,1)
cnt = 0
for i in range(n):
    x = np.dot(A[i], B)+c
    if x >0:
    	cnt += 1

print(cnt)
N, Q = map(int, input().split())

list_a = []
list_b = []
list_dist = []

for i in range(N):
  list_a.append(list(map(int, input().split())))

for j in range(Q):
  list_b.append(int(input()))

list_a.sort(key=lambda x:x[2])


for b in list_b:
  dist = 0
  time = b
  stop_flag = 0
  for a in list_a:
    time = time + a[2] - dist
    dist = a[2]
    if time > a[0]-0.5 and time < a[1]-0.5:
      stop_flag = 1
      break
  if stop_flag == 0:
    list_dist.append(-1)
  else:
    list_dist.append(dist)

for dist in list_dist:
  print(dist)

### FIXED CODE ###

A, P = map(int, input().split())

P = A * 3 + P
print(int(P / 2))
n = int(input())

x = n*(n-1)*2*(10**(n-2))

print(x%(10**9 + 7))


### FIXED CODE ###

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

n = [a*c, a*d, b*c, b*d]
print(max(n))
x, n = map(int, input().split())
p = list(map(int, input().split()))
t = [0]*101

for i in p:
    t[i] = 1

for j in range(50):
    if t[x-j] == 0:
        print(x-t[n-j])
        break
    elif t[x+j] == 0:
        print(x+t[n+j]+1)
        break


### FIXED CODE ###

x, n = map(int, input().split())
p = list(map(int, input().split()))
if p == []:
    print(x)
    exit()
t = [0]*(max(p)+2)
for i in p:
    t[i] = 1

mi = t[:x+1]
ma = t[x:]
mi.reverse()
mii = mi.index(0)
maa = ma.index(0)

if mii < maa:
    print(x-mii)
elif mii > maa:
    print(x+maa)
elif mii == maa:
    print(x-mii)
N = int(input())
A = list(map(int, input().split()))
count = 0

tmp = A[0]
bf = 1 if tmp < A[1] else 2 if tmp > A[1] else 0
af = 0  # {1: '+', 2: '-'}
for i in range(1, N):
    if tmp < A[i]:
        af = 1
    elif tmp > A[i]:
        af = 2

    tmp = A[i]
    if af != bf:
        count += 1
        if i+1 < N:
            af = 1 if tmp < A[i+1] else 2 if tmp > A[i+1] else 0
        else:
            break
    bf = af

print(count if bf == 0 else count+1)

### FIXED CODE ###

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

conti_flg = 0  # {-1: '-', 0: '=', 1: '+'}
fst = A[0]
for i in A:
    snd = i
    if fst > snd:
        conti_flg = -1 if conti_flg <= 0 else 2
    elif fst < snd:
        conti_flg = 1 if conti_flg >= 0 else 2

    if conti_flg == 2:
        count += 1
        conti_flg = 0
    fst = snd

print(count)
n,k = map(int,input().split())
line = list(map(int,input().split()))

inf = float('inf')
line.extend([inf for i in range(k)])
box = [inf for i in range(n + k)]
  
def frog(x):
  box[0] = 0
  if x == n-1:
    return box[n-1]
  else:    
    for i in range(1,k+1):
      cost = abs(line[x] - line[x+i])
      if box[x+i] >= box[x] + cost:
        box[x+i] = box[x] + cost
    return frog(x+1)
print(frog(0))

### FIXED CODE ###

n,k = map(int,input().split())
line = list(map(int,input().split()))
 
inf = float('inf')
line.extend([inf for i in range(k)])
box = [inf for i in range(n + k)]
#out of rangeを避けるため

box[0] = 0
for x in range(n):   
  for i in range(1,k+1):
    cost = abs(line[x] - line[x+i])
    if box[x+i] >= box[x] + cost:
      box[x+i] = box[x] + cost
print(box[n-1])
# coding: utf-8
def main():
    n, m, l = map(int, raw_input().split())
    mat_A = [] # (n, m)
    mat_B = [] # (m, l)
    for i in range(n):
        mat_A.append(map(int, raw_input().split()))

    for j in range(m):
        mat_B.append(map(int, raw_input().split()))

    for i in range(n):
        c = [0 for g in range(n)]
        for j in range(l):
            for k in range(m):
              #  print "n:{}, m:{}, l:{}".format(i,k,j)
                c[j] += mat_A[i][k] * mat_B[k][j]
        print " ".join(map(str, c))
if __name__ == "__main__":
    main()

### FIXED CODE ###

# coding: utf-8
def main():
    n, m, l = map(int, raw_input().split())
    mat_A = [] # (n, m)
    mat_B = [] # (m, l)
    for i in range(n):
        mat_A.append(map(int, raw_input().split()))

    for j in range(m):
        mat_B.append(map(int, raw_input().split()))

    for i in range(n):
        c = [0 for g in range(l)]
        for j in range(l):
            for k in range(m):
              #  print "n:{}, m:{}, l:{}".format(i,k,j)
                try:
                    c[j] += mat_A[i][k] * mat_B[k][j]
                except:
                    print "n: {}, m: {}, l: {}".format(i,k,j)
        print " ".join(map(str, c))
if __name__ == "__main__":
    main()
x, y, a, b, c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)

p = p[:x]
q = q[:y]
p.append(0)
q.append(0)

wa = x + y

lsp = x - 1
lsq = y - 1

pi = 0
qi = 0
ri = 0

ans = 0

for i in range(wa):
    if x > 0 and p[pi] == max(p[pi], q[qi], r[ri]):
        ans += p[pi]
        pi += 1
        x -= 1
    elif y > 0 and q[qi] == max(p[pi], q[qi], r[ri]):
        ans += q[qi]
        qi += 1
        y -= 1
    elif r[ri] == max(p[pi], q[qi], r[ri]):
        ans += r[ri]
        ri += 1
        if p[lsp] >= q[lsq]:
            y -= 1
            lsq -= 1
        elif p[lsp] < q[lsq]:
            x -= 1
            lsp -= 1

print(ans)

### FIXED CODE ###

x, y, a, b, c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)

p = p[:x]
q = q[:y]
p.append(0)
q.append(0)
r += [0] * (10 ** 3)


wa = x + y

lsp = x - 1
lsq = y - 1

pi = 0
qi = 0
ri = 0

ans = 0

for i in range(wa):
    if x > 0 and p[pi] == max(p[pi], q[qi], r[ri]):
        ans += p[pi]
        pi += 1
        x -= 1
    elif y > 0 and q[qi] == max(p[pi], q[qi], r[ri]):
        ans += q[qi]
        qi += 1
        y -= 1
    elif r[ri] == max(p[pi], q[qi], r[ri]):
        ans += r[ri]
        ri += 1
        if y > 0 and p[lsp] >= q[lsq]:
            y -= 1
            if lsq == 0:
                continue
            else:
                lsq -= 1
        elif x > 0 and p[lsp] < q[lsq]:
            x -= 1
            if lsp == 0:
                continue
            else:
                lsp -= 1

print(ans)
from collections import deque

def dfs(node,par,color,k):
  for i in range(len(graph[node])):
    if graph[node][i][0] == par:
      graph[node][i][1] = color
      color = graph[node][i][1]       
      continue
    graph[node][i][1] = (i+2)%k +((i+2)%k == 0) if (i+1) == color else (i+1)%k +((i+1)%k == 0)
    dfs(graph[node][i][0],node,graph[node][i][1],k)

N = int(input())
graph = {}
for i in range(N+1):
  graph[i] = []
ab = []
for i in range(N-1):
  a,b = map(int,input().split())
  ab.append([a,b])
  graph[a].append([b,-1])
  graph[b].append([a,-1])
k = 0
for i in range(1,N+1):
  k = max(k,len(graph[i]))

dfs(1,0,0,k+1)
print(k)
for i in range(N-1):
  a,b = ab[i]
  for j in range(len(graph[a])):
    if graph[a][j][0] == b:
      print(graph[a][j][1])

  


  


### FIXED CODE ###

from collections import deque

def bfs(idx,k,colored):
  q = deque()
  visited[idx] = True
  q.append(idx)
  while q:
    r = q.pop()
    color = 0
    for n in graph[r].keys():
      if not visited[n]:
        if color == colored[r]: color+=1
        colored[n] = color
        graph[r][n] = color
        graph[n][r] = color
        color += 1

        visited[n] = True
        q.append(n)

        
N = int(input())
graph = {}
colored = [-1]*(N+1)
visited = [False]*(N+1)
for i in range(N+1):
  graph[i] = {}
ab = []
for i in range(N-1):
  a,b = map(int,input().split())
  ab.append((a,b))
  graph[a][b] = -1
  graph[b][a] = -1
  
k = max([len(graph[i]) for i in range(1,N+1)])

bfs(1,k,colored)
print(k)
for a,b in ab:
  print(graph[a][b]+1)
h, w= map(int, input().split())
A = [list(map(int, input().split())) for _ in range(h)]
B = [list(map(int, input().split())) for _ in range(h)]

C = [[0]*w for _ in range(h)]
for i in range(h):
    for j in range(w):
        C[i][j] = abs(A[i][j]-B[i][j])

import numpy as np
d = 80*(h+w-1)
D = 2*d+1
dp = [[0]*w for j in range(h)]
dp[0][0] = np.zeros(D, np.bool)
dp[0][0][d+C[0][0]] = 1
for i in range(h):
    for j in range(w):
        if i == 0 and j == 0:
            continue
        x = np.zeros(D, np.bool)
        if i != 0:
            x[C[i][j]:] |= dp[i-1][j][:D-C[i][j]]
            x[:D-C[i][j]] |= dp[i-1][j][C[i][j]:]
        if j != 0:
            x[C[i][j]:] |= dp[i][j-1][:D-C[i][j]]
            x[:D-C[i][j]] |= dp[i][j-1][C[i][j]:]
        dp[i][j] = x

temp = np.where(dp[-1][-1]>0)[0] - d
temp = abs(temp)
print(min(temp))

### FIXED CODE ###

import numpy as np

h, w = map(int, input().split())
A = [0]*h
B = [0]*h
for _ in range(h):
  A[_] = list(map(int, input().split()))
  
for _ in range(h):
  B[_] = list(map(int, input().split()))

C = [[0]*w for _ in range(h)]
for i in range(h):
  for j in range(w):
    C[i][j] = abs(A[i][j]-B[i][j])
    
dp = [[0]*w for _ in range(h)]
D = 80 * (h + w)
L = 2*D + 1
dp[0][0] = np.zeros(L, np.bool)
dp[0][0][D+C[0][0]] = 1
for i in range(h):
  for j in range(w):
    if i == 0 and j == 0:
      continue
    x = np.zeros(L, np.bool)
    if i != 0:
      x[C[i][j]:] |= dp[i-1][j][:L-C[i][j]]
      x[:L-C[i][j]] |= dp[i-1][j][C[i][j]:]
    if j != 0:
      x[C[i][j]:] |= dp[i][j-1][:L-C[i][j]]
      x[:L-C[i][j]] |= dp[i][j-1][C[i][j]:]
    dp[i][j] = x
    
temp = np.where(dp[-1][-1]>0)[0]-D
temp = np.abs(temp)
print(np.min(temp))
n = int(input())

total = 0

for i in range(n):
  if (i+1)%3 != 0 and (i+!)%5 != 0:
    total += i+1
    
print(total)

### FIXED CODE ###

n = int(input())

total = 0

for i in range(n):
  if (i+1)%3 != 0 and (i+1)%5 != 0:
    total += i+1
    
print(total)
N = int(input())
A = list(map(int,input().split()))
count_list = []
if len(list(set(A))) == 1:
    print(1)
else:
    for i in range(min(A) + 1,max(A)):
        count = A.count(i-1) + A.count(i) + A.count(i+1)
        count_list.append(count)
    print(max(count_list))

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
l = [0]*(10**5)
for e in A:
    if e == 0:
        l[0] += 1
        l[1] += 1
    elif e == 99999:
        l[99999] += 1
        l[99998] += 1
    else:
        l[e-1] += 1
        l[e] += 1
        l[e+1] += 1
print(max(l))
def main():
    lst = input().split()
    stack = []

    for i in lst :
        if i == ""+"" :
            x = stack.pop()
            y = stack.pop()
            stack.append(x + y)

        elif i == "-" :
            x = stack.pop()
            y = stack.pop()
            stack.append(y - x)

        elif i == "*" :
            x = stack.pop()
            y = stack.pop()
            stack.append(x * y)

        else :
            stack.apped(int(i))

    print(stack.pop())


if __name__ = "__main__" :
    main()

### FIXED CODE ###

def main() :
    lst = input().split()
    stack = []
    for i in lst :
        if i == "+" :
            x = stack.pop()
            y = stack.pop()
            stack.append(x + y)

        elif i == "-" :
            x = stack.pop()
            y = stack.pop()
            stack.append(y - x)

        elif i == "*" :
            x = stack.pop()
            y = stack.pop()
            stack.append(x * y)

        else :
            stack.append(int(i))

    print(stack.pop())


if __name__ == "__main__" :
    main()
N,K=map(int,input().split())
x=998244353
S=[]
for i in range(K):
    l,r=map(int,input().split())
    for j in range(l,r+1):
      S.append(j)
S=list(set(S))
dp=[0 for i in range(N)]
for i in range(len(S)):
    dp[S[i]]=1
for i in range(N):
    for j in range(len(S)):
        if(i-S[j]>0):
            dp[i]+=dp[i-S[j]]
            dp[i]=dp[i]%x
print(dp[-1])


### FIXED CODE ###

N,K=map(int,input().split())
x=998244353
dp=[0 for i in range(N)]
sdp=[0 for i in range(N)]
L=[]
R=[]
dp[0]=1
sdp[0]=1
for i in range(K):
    l,r=map(int,input().split())
    L.append(l)
    R.append(r) 
for i in range(1,N):
    for j in range(K):
        dp[i]+=(sdp[max(i-L[j],-1)]-sdp[max(i-R[j]-1,-1)])
        dp[i]%=x
    sdp[i]=(sdp[i-1]+dp[i])%x
print(dp[-1]%x)
import sys

def checker(a0,a1,tmp):
  a2=''
  b0=bin(a0)[2:]
  b1=bin(a1)[2:]
  if len(b0)<len(b1):
    b0,b1=b1,b0
  b1=b1.zfill(len(b0))
  for s0,s1 in zip(b0,b1):
    a2 = a2 + str( int(s0)^int(s1) )
  a2=int(a2,2)
  #print(a0,a1,a2)
  if a2 not in tmp:
    return 1
  else:
    tmp.remove(a2)
    if  len(tmp)==0:
      return 0
    checker(a1,a2,tmp)

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

bia=1
for i in range(N-1):
  tmp=A.copy()
  tmp.remove(A[i])
  for j in range(N-bia):
    tmp.remove(A[j+bia])
    if checker(A[i],A[j+bia],tmp) == 1:
      break
    else:
      print('Yes')
      sys.exit()
  bia+=1
print('No')

### FIXED CODE ###

import sys

N=int(input())
A=list(map(int,input().split()))
dict={}

for a in A:
  if a in dict.keys():
    dict[a] = dict[a] + 1
  else:
    dict[a] = 1

if len(list(dict.keys())) > 3:
  print('No')
  sys.exit()
elif len(list(dict.keys()))==1:
  keys=list(dict.keys())
  if keys[0]==0:
    print('Yes')
    sys.exit()
  else:
    print('No')
    sys.exit()
elif len(list(dict.keys()))==2:
  keys=list(dict.keys())
  a0=keys[0]
  a1=keys[1]
  a2=''
  b0=bin(a0)[2:]
  b1=bin(a1)[2:]
  if len(b0)<len(b1):
    b0,b1=b1,b0
  b1=b1.zfill(len(b0))
  for s0,s1 in zip(b0,b1):
    a2 = a2 + str( int(s0)^int(s1) )
  a2=int(a2,2)
  #print(a0,a1,a2)
  if a2==a0 or a2==a1:
    vals=list(dict.values())
    if vals[0]/2==vals[1] or vals[0]==vals[1]/2:
      print('Yes')
      sys.exit()
    else:
      print('No')
      sys.exit()
  
keys=list(dict.keys())
vals=set(dict.values())

if len(vals)> 1:
  print('No')
  sys.exit()
  
a0=keys[0]
a1=keys[1]
a2=''
b0=bin(a0)[2:]
b1=bin(a1)[2:]
if len(b0)<len(b1):
  b0,b1=b1,b0
b1=b1.zfill(len(b0))
for s0,s1 in zip(b0,b1):
  a2 = a2 + str( int(s0)^int(s1) )
a2=int(a2,2)

if a2!=keys[2]:
  print('No')
  sys.exit()

print('Yes')
n = input
ans - ''
for i in range(len(n)):
    if n[i] == '1':
        ans += '9'
    else ans += '1'
print(ans)

### FIXED CODE ###

n = input()
ans = ''
for i in range(3):
    if n[i] == '1':
        ans += '9'
    else :
        ans += '1'
print(ans)
x,y=map(int,input().split())
S=list(map(str,input()))
if S[y]=="A":
    for i in range(x):
        S[y]="a"
        print(S[i],end="")
elif S[y]=="B":
    for i in range(x):
        S[y]="b"
        print(S[i],end="")
elif S[y]=="C":
    for i in range(x):
        S[y]="c"
        print(S[i],end="")

### FIXED CODE ###

x,y=map(int,input().split())
S=list(map(str,input()))
if S[y-1]=="A":
    for i in range(x):
        S[y-1]="a"
        print(S[i],end="")
elif S[y-1]=="B":
    for i in range(x):
        S[y-1]="b"
        print(S[i],end="")
elif S[y-1]=="C":
    for i in range(x):
        S[y-1]="c"
        print(S[i],end="")
def solve():
    mod = 10 ** 9 + 7

    x, y = map(int, input().split())

    sum_ = x + y

    q, r = divmod(sum_, 3)
    if r != 0:
        return 0

    a = (x * 2 - y) // 3

    # b = (y * 2 - x) // 3

    def cmb(n, r):
        return (fact[n] * finv_t[r] * finv_t[n - r]) % mod

    fact = [1, 1]
    inv_t = [0, 1]
    finv_t = [1, 1]
    for i in range(2, q + 1):
        fact.append((fact[-1] * i) % mod)
        inv_t.append((-inv_t[mod % i] * (mod // i)) % mod)
        finv_t.append((finv_t[-1] * inv_t[-1]) % mod)

    return cmb(q, a)


print(solve())


### FIXED CODE ###

def solve():
    mod = 10 ** 9 + 7

    x, y = map(int, input().split())

    sum_ = x + y

    q, r = divmod(sum_, 3)
    if r != 0:
        return 0

    a = (x * 2 - y) // 3

    b = (y * 2 - x) // 3

    if a < 0 or b < 0:
        return 0

    def cmb(n, r):
        return (fact[n] * finv_t[r] * finv_t[n - r]) % mod

    fact = [1, 1]
    inv_t = [0, 1]
    finv_t = [1, 1]
    for i in range(2, q + 1):
        fact.append((fact[-1] * i) % mod)
        inv_t.append((-inv_t[mod % i] * (mod // i)) % mod)
        finv_t.append((finv_t[-1] * inv_t[-1]) % mod)

    return cmb(q, a)


print(solve())