Harryxun/stf_run huggingface dataset:
def is_value_validated(number):
  is_validated = False

  if type(number) !== "number":
    return retrun_value
  retrun_value = True
  return retrun_value

def is_triangle_exist(A, B, C):
  printed_value = "No"
  if is_value_validated(A) or \
    is_value_validated(B) or \
    is_value_validated(C):
    print printed_value
    return -1

  if A==B and B==C:
    printed_value = "Yes"
  print printed_value

### FIXED CODE ###

print_val = "No"
 
A, B, C = map(int, raw_input().split())

if A == B and B == C:
  print_val = "Yes"

print print_val
import math
N,M=input().split()
A=list(map(int, input().split()))
N=int(N)
if N>=sum(A):
	print(N-sum(A))
else:
	print(-1)

### FIXED CODE ###

import math
R=int(input())
L=2*math.pi*R
print(L)
a < b
b > a
a == b

### FIXED CODE ###

a, b = map(int, input().split())
if a < b:
    print('a < b')
elif a > b:
    print('a > b')
else:
    print('a == b')
r1,c1,r2,c2=map(int,input().split())
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 10**6+5
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )
print((cmb(c2+r2+2,c2+1,mod)-cmb(c2+r1+1,c2+1,mod)-cmb(c1+r2+1,c1,mod)+cmb(c1+r1,c1,mod)+mod)%mod)


### FIXED CODE ###

r1,c1,r2,c2=map(int,input().split())
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 2*10**6+10
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )
print((cmb(c2+r2+2,c2+1,mod)-cmb(c2+r1+1,c2+1,mod)-cmb(c1+r2+1,c1,mod)+cmb(c1+r1,c1,mod)+mod)%mod)
import fractions
n=int(input())
v=list(map(int,input().split()))
def g(a,b):
  if a==0:return b
  if b==0:return a
  return fractions.gcd(a,b)
l=[0]*(n+1)
r=[0]*(n+1)
for i in range(1,n+1):
  l[i]=g(l[i-1],v[i-1])
for i in range(n)[::-1]:
  r[i]=g(r[i+1],v[i])
x=0
for i in range(n):
  c=g(l[i],r[i+1])
  x=max(c,x)
print(ans)

### FIXED CODE ###

import fractions
n=int(input())
v=list(map(int,input().split()))
def g(a,b):
  if a==0:return b
  if b==0:return a
  return fractions.gcd(a,b)
l=[0]*(n+1)
r=[0]*(n+1)
for i in range(1,n+1):
  l[i]=g(l[i-1],v[i-1])
for i in range(n)[::-1]:
  r[i]=g(r[i+1],v[i])
x=0
for i in range(n):
  c=g(l[i],r[i+1])
  x=max(c,x)
print(x)
import sys

[a,b] = [int(x) for x in sys.stdin.readlines().strip()]


print("{0} {1}".format(a+b, 2*a + 2*b))

### FIXED CODE ###

import sys
 
lines = [x.strip().split() for x in sys.stdin.readlines()][0]
[a, b] = [int(x) for x in lines]
 
print a*b, 2*(a+b)
a = []
for i in range(6):
    a.append(int(input()))
    
result = 0
for each in a:
    if each % 10 != 0:
        result += each + 10 - (each % 10)
    else:
        result += each
print(result)
    

### FIXED CODE ###

a = []

for i in range(5):
    a.append(int(input()))


result = 0
min_min = 10
for each in a:
    if each % 10 != 0:
        result += each + 10 - (each % 10)
        if min_min > each % 10:
            min_min = each % 10
    else:
        result += each
print(result - (10 - min_min))
K = int(input())
A,B = map(int,input().split())

for i in range(A,B+1):
  if i % K == 0:
    flag = 1
    break
if flag == 0:
  print("NG")
else:
  print("OK")

### FIXED CODE ###

K = int(input())
A,B = map(int,input().split())
flag = 0

for i in range(A,B+1):
  if i % K == 0:
    flag = 1
    break
if flag == 0:
  print("NG")
else:
  print("OK")
from sys import stdin

k = int(stdin.readline().rstrip())
s = int(stdin.readline().rstrip())
count = 0

x = 0
y = 0
z = 0

for x in range(s+1):
    y = 0
    for y in range(s+1):
        z = 0
        z = s - x - y
        if s <= 3*k:
            break;
        if x <= k and y <= k and z<= k and 0 <= z:
            count +=1
            print(x,y,z)

print(count,flush=True)



### FIXED CODE ###

from sys import stdin
lis =[]
#k = int(stdin.readline().rstrip())
lis= stdin.readline().rstrip().split()
k = int(lis[0])
s = int(lis[1])
count = 0
x = 0
y = 0
z = 0
for x in range(k+1):
    y = 0
    for y in range(k+1):
        z = 0
        z = s - x - y
        if z <= k and z >= 0:
                count +=1



print(count)
print_val = "No"
 
A,B,C = map(int, input().split())
if A == B and B == C:
  print_val = "Yes"
print print_val


### FIXED CODE ###

print_val = "No"
 
A, B, C = map(int, raw_input().split())

if A == B and B == C:
  print_val = "Yes"

print print_val
4
1 1
1 2
2 1
2 2

### FIXED CODE ###

import itertools
from collections import defaultdict

n = int(input())
xy = []
for _ in range(n):
    xy.append(list(map(int, input().split())))
    
dd = defaultdict(int)
for lst in itertools.combinations(xy, 2):
    dx = lst[0][0] - lst[1][0]
    dy = lst[0][1] - lst[1][1]
    dd[(dx, dy)] += 1
    dd[(-dx, -dy)] += 1
ans = 0
for i, j in dd.items():
    ans = max(ans, j)
print(n - ans)
import itertools

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

for cxi, cyi in itertools.product(range(101), range(101)):
    for k in range(N):
        if params[k][2] > 0:
            hight = params[k][2] + abs(params[k][0] - cxi) + abs(params[k][1] - cyi)

    for k in range(N):
        if params[k][2] != max(h - abs(params[k][0] - cxi) - abs(params[k][1] - cyi), 0)
            break
    
    else:
        print(cxi, cyi, hight)

### FIXED CODE ###

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

for cxi in range(101):
    for cyi in range(101):
        for k in range(N):
            if params[k][2] > 0:
                hight = params[k][2] + abs(params[k][0] - cxi) + abs(params[k][1] - cyi)

        for k in range(N):
            if params[k][2] != max((hight - abs(params[k][0] - cxi) - abs(params[k][1] - cyi)), 0):
                break
        
        else:
            print(cxi, cyi, hight)
x=int(iput())
if x>=30:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

x=int(input())
if x>=30:
    print('Yes')
else:
    print('No')
def make_divisors(n):
    divisors = {}
    tmp = n
    div = 2
    while n > 1 and div <= tmp**0.5:
        if n % div == 0:
            divisors[div] = 0
        while n % div == 0:
            n //= div
            divisors[div] += 1
        div += 1
    if n > 1:
        divisors[n] = 1
    return divisors

def comb(n,r):
    if n == 0 and r == 0:
        return 1
    if n < r or n < 0:
        return 0
    tmp =  ifac[n-r] * ifac[r] % mod
    return tmp * fac[n] % mod

def perm(n,r):
    if n == 0 and r == 0:
        return 1
    if n < r or n < 0:
        return 0
    return fac[n] * ifac[n-r] % mod

def fact_init(n, mod=10**9+7):
    fac = [0] * (n+1)
    ifac = [0] * (n+1)
    fac[0] = 1
    ifac[0] = 1
    modmod = mod - 2
    for i in range(n):
        fac[i+1] = fac[i] * (i+1) % mod
        ifac[i+1] = ifac[i] * pow(i+1, modmod, mod) % mod
    return fac, ifac


n,m = map(int, input().split())
mod = 10**9 + 7
divisors = make_divisors(m)
fac, ifac = fact_init(n+max(divisors.values()) + 1)

ans = 1
for value in divisors.values():
    ans = ans * comb(value+n-1,value) % mod
print(ans % mod)


### FIXED CODE ###

class Factorial:
    def __init__(self, n, mod=10**9+7):
        self.fac = [0] * (n+1)
        self.ifac = [0] * (n+1)
        self.fac[0] = 1
        self.ifac[0] = 1
        modmod = mod - 2
        for i in range(n):
            self.fac[i+1] = self.fac[i] * (i+1) % mod
            self.ifac[i+1] = self.ifac[i] * pow(i+1, modmod, mod) % mod

    def comb(self, n, r):
        if n == 0 and r == 0:
            return 1
        if n < r or n < 0:
            return 0
        tmp =  self.ifac[n-r] * self.ifac[r] % mod
        return tmp * self.fac[n] % mod

    def perm(self, n, r):
        if n == 0 and r == 0:
            return 1
        if n < r or n < 0:
            return 0
        return (self.fac[n] * self.ifac[n-r]) % mod

def make_divisors(n):
    divisors = {}
    tmp = n
    for div in range(2, int(n**0.5)+1):
        if n % div == 0:
            divisors[div] = 0
        while n % div == 0:
            n //= div
            divisors[div] += 1
        div += 1
    if n > 1:
        divisors[n] = 1
    return divisors

n,m = map(int, input().split())
mod = 10**9 + 7
divisors = make_divisors(m)
fact = Factorial(n + sum(divisors.values()) + 1)

ans = 1
for value in divisors.values():
    ans = ans * fact.comb(value+n-1,value) % mod
print(ans)
import statistics
import math

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

B = []
C = []
D = []
E = []
ureshimi = []
k = 0
l = 0

for i in range(N-3):
    BC = A[0 : i + 2]
    s = 0
    for j in range(k, i + 2):
        s += BC[j]
        if j == i + 1:
            k = j 
            B = BC[0 : j ]
            C = BC[j  : N - i]
            break
        elif s + BC[j + 1] > sum(BC) / 2:
            k = j
            if BC[j + 1] / 2 >= sum(BC) / 2 - s:
                B = BC[0 : j + 1]
                C = BC[j + 1 : i + 2]
            else:
                B = BC[0 : j + 2]
                C = BC[j + 2 : i + 2]
            break
    DE = A[i + 2 : N + 1]
    s = sum(DE[0:l - i + 1 ])
    for j in range(l - i + 1 , N - i - 2):
        if j == N - i - 3:
            l = j + i 
            D = DE[0 : j ]
            E = DE[j  : N - i]
            break
        elif s + DE[j ] > sum(DE) / 2:
            l = j + i
            if DE[j ] / 2 >= sum(DE) / 2 - s:
                D = DE[0 : j ]
                E = DE[j : N - i]
            else:
                D = DE[0 : j + 1]
                E = DE[j + 1 : N - i]
            break
        s += DE[j]
    ureshimi.append(max(sum(B), sum(C), sum(D), sum(E)) - min(sum(B), sum(C), sum(D), sum(E)))



print(min(ureshimi))

### FIXED CODE ###

N = int(input())

if N % 2 == 0:
    print(N)
else:
    print(N * 2)
# coding: utf-8
# Your code here!

import copy

string = [x for x in input()]

concat_string = copy.copy(string)
count = 0
while True:
    num_delete = 0
    flags_delete = [False] * len(string)
    
    i = 0
    j = 1
    while i < len(concat_string) - 1:
        if concat_string[i] != concat_string[j]:
            flags_delete[i] = True
            flags_delete[j] = True
            num_delete += 2
            
            if i == 0:
                i = j + 1
                j = i + 1
            else:
                i = i - 1
                j = j + 1
        else:
            i = j
            j = i + 1
           
    if num_delete == 0:
        break
    
    count += num_delete
    concat_string = [concat_string[i] for i in range(len(concat_string)) if flags_delete[i] == False]

print(count)
        
        

### FIXED CODE ###

# coding: utf-8
# Your code here!

import copy

string = [x for x in input()]

concat_string = copy.copy(string)
num_delete = 0

i = 0
j = 1
not_delete_list = []
while True:
    if j >= len(concat_string) or i < 0:
        break
    if concat_string[i] != concat_string[j]:
        num_delete += 2
        
        if i == 0:
            i = j + 1
            j = i + 1
        else:
            if len(not_delete_list) > 0:
                i = not_delete_list.pop(-1)
                j = j + 1
            else:
                i = j + 1
                j = i + 1
    else:
        not_delete_list.append(i)
        i = j
        j = i + 1


print(num_delete)
K=int(input())
for a in range(1,K+1):
    for b in range(1,K+1):
        for c in range(1,K+1):            
            m=min(a,b,c)
            for i in range(1,m+1):
                if a%i==0 and b%i==0 and c%i==0:
                    gcd=i
            sum+=gcd

print(sum)

### FIXED CODE ###

from math import gcd
K=int(input())
sum=0
for a in range(1,K+1):
    for b in range(1,K+1):
        for c in range(1,K+1):           
            
            sum+=gcd(gcd(a,b),c)
print(sum)
from math import gcd
import functools

if __name__ == '__main__' :
    N,X = map(int, input().split())
    x = list(map(int, input().split()))

    dist_list = [abs(d-X) for d in x]

    print(functools.reduce(gcd, dist_list))

### FIXED CODE ###

if __name__ == '__main__' :
    A,B = list(map(int, input().split()))
    if A%2 == 0 or B%2 == 0:
        print('No')
    else:
        print('Yes')
a, b, c, d = map(int, input())
l = a + b
r = c + d
if l > r:
  print('Left')
elif l == r:
  print('Balanced')
else:
  print('Right')

### FIXED CODE ###

a, b, c, d = map(int, input().split())
l = a + b
r = c + d
if l > r:
  print('Left')
elif l == r:
  print('Balanced')
else:
  print('Right')
A = int(input())
B = int(input())
K = int(input())

result = K - (A+B)

if (result <=0):
  print(0)
else:
  print(result)

### FIXED CODE ###

ABK = input().split()
A = int(ABK[0])
B = int(ABK[1])
K = int(ABK[2])

if (K >= A):
    K -= A
    B -= K
    A = 0

    if (B <= 0):
        B = 0
else:
    A -= K

print(str(A) + " " + str(B))
def f(N,h,n):
    return 4/N - 1/h - 1/n

N = int(input())
for h in range(1, 3500):
    for n in range(1, 3500):
        inv_w = f(N, h, n)
        if inv_w > 0:
            w = 1/inv_w
            if w.is_integer() and 1<=w<=3500:
                ans = [h,n,int(w)]
                break
print(*ans)

### FIXED CODE ###

N = int(input())
for h in range(1, 3501):
    for n in range(1, 3501):
        div = 4*h*n - N*(h+n)
        if div!=0 and N*h*n%div==0:
            w = N*h*n // div
            if w > 0:
                print(h,n,w)
                exit()
import numpy as np
N = int(input())
x = [int(i) for i in input().split() ]

each = 0
loss = []

for(int i=min(x); i<max(x); i++):
  for j in range(len(x)):
    each = np.power((x[j]-i), 2)
    each += each
  loss.append(each)
  
print(min(each))

### FIXED CODE ###

import numpy as np
N = int(input())
x = [int(i) for i in input().split() ]

each = 0
loss = 0
ll = []

for k in range(min(x), max(x)+1):
      for j in range(len(x)):
            each = np.power((x[j]-k), 2)
            loss += each
      ll.append(loss)
      loss = 0
  
print(min(ll))
A = input()
B = input()
B = input()
b_5 =0
b_7=0
if A == 5:
  b_5 += 1
elif A == 7:
  b_7 += 1
if B == 5:
  b_5 +=1
elif B==7:
  b_7 += 1
if C==5:
  b_5 +=1
elif C==7:
  b_7 += 1

if b_5 == 2 and b_7 == 1:
  print("YES")
else:
  print("NO")


### FIXED CODE ###

A,B,C = map(int,input().split())
b_5 = 0
b_7 = 0
if A == 5:
  b_5 += 1
elif A == 7:
  b_7 += 1
if B == 5:
  b_5 +=1
elif B==7:
  b_7 += 1
if C==5:
  b_5 +=1
elif C==7:
  b_7 += 1

if b_5 == 2 and b_7 == 1:
  print("YES")
else:
  print("NO")
from collections import deque
n,m=map(int,input().split())
A=sorted(list(map(int,input().split())))
BC=sorted([list(map(int,input().split())) for i in range(m)],key=lambda x:x[1])

cnt=0
A=deque(A)
for b,c in BC[::-1]:
    for i in range(b):
        if A[0]<c:
            cnt +=c
            A.popleft()
        else:break
print(cnt+sum(A))

### FIXED CODE ###

from collections import deque
n,m=map(int,input().split())
A=sorted(list(map(int,input().split())))
BC=sorted([list(map(int,input().split())) for i in range(m)],key=lambda x:x[1])

A=deque(A)
for b,c in BC[::-1]:
    if len(A)==0:break
    for i in range(b):
        if A[0]<c:
            A.append(c)
            A.popleft()
        else:break
print(sum(A))
n = int(input())
a = list(int(x) for x in input().split())
x = 0
b = a.reverse()

for i in range(n-1):
    if b[-1] - b[-2] == 0:
        print("NO")
        x = 1
        break
    b.pop()
 
if x == 0:
    print("YES")

### FIXED CODE ###

n = int(input())
a = list(int(x) for x in input().split())
x = 0
 
a.sort()
for i in range(n-1):
    if a[-1] - a[-2] == 0:
        print("NO")
        x = 1
        break
    a.pop()
 
if x == 0:
    print("YES")
import math
x = math.pi
a=input()
n = int(a)
print(2＊n*x)

### FIXED CODE ###

import math
x = math.pi
a=input()
n = int(a)
print(2*n*x)
a = list(input())
b = list(input())
if b = a.reverse():
  print("YES")
else:
  print("NO")

### FIXED CODE ###

a = list(input())
b = list(input())
a.reverse()
if a == b:
  print("YES")
else:
  print("NO")
s = input()
q = int(input())

for qi in range(q):
    command = input().split()

    a = int(command[1])
    b = int(command[2])
    if command[0] == 'print':
        print(s[a:b + 1])
    elif command[1] == 'reverse':
        s = s[:a] + s[a:b + 1][::-1] + s[b + 1:]
    else:
        p = command[3]
        s = s[:a] + p + s[b+1:]

### FIXED CODE ###

s = input()
q = int(input())

for qi in range(q):
    command = input().split()

    a = int(command[1])
    b = int(command[2])
    
    if command[0] == 'print':
        print(s[a:b + 1])
        
    elif command[0] == 'reverse':
        s = s[:a] + s[a:b +1][::-1] + s[b + 1:]
        
    else:
        p = command[3]
        s = s[:a] + p + s[b+1:]
a, b=map(int, input().split())
if a>b:
    print("a>b")
if a<b:
    print("a<b")
if a==b
    print("a==b")

### FIXED CODE ###

a, b = map(int,input().split())
if a>b:
    print('a > b')
elif a<b:
    print('a < b')
else:
    print('a == b')
X = int(input())
if X >= 30:
  print("Yes")
else:
  pritn("No")

### FIXED CODE ###

X = int(input())
if X >= 30:
  print("Yes")
else:
  print("No")
n = int(input())
a,b = map(int,input().split())
if (b-a) >=n:
  print('OK)
else:
  print('NG')

### FIXED CODE ###

k = int(input())
a,b=map(int,input().split())
count = 0
for i in range(a,b+1):
    if i%k == 0:
        count += 1
if count == 0:
    print("NG")
else:
    print("OK")
K, N = [int(x) for x in input().split()]
A = list([int(x) for x in input().split()])

result = []

for i in range(N):
    if i == N - 1:
        result.append(K - A[i] + A[0])
    else:
        result.appnd(A[i + 1] - A[i])

result.sort()

print(sum(result[:-1]))


### FIXED CODE ###

K, N = [int(x) for x in input().split()]

A = list([int(x) for x in input().split()])

r_list = []

for i in range(N):
    if i == N - 1:
        r_list.append(A[0] + K - A[i])

    else:
        r_list.append(A[i + 1] - A[i])

r_list.sort()

print(sum(r_list[:-1]))
def solve(H, N, AB):
    INF = 10e10
    dp = [[INF] * (H+1) for i in range(N+1)]
    dp[0][0] = 0
    A, B = AB[0]
    #print(" ", *range(H+1), sep="\t")
    for j in range(H+1):
        dp[0][j] = min(dp[0][j], dp[0][j-A]+B)
    #print(0, *dp[0], sep="\t")
    for i in range(1,N):
        A, B = AB[i]
        for h in range(H+1):
            dp[i][h] = min(dp[i-1][h], dp[i][max(0, h-A)]+B)
        #print(i, *dp[i], sep="\t")
    
    return(dp[N-1][H])


def main():
    H, N = map(int, input().split())
    AB = []
    for i in range(N):
        A, B = map(int, input().split())
        AB.append((A, B))
    print(solve(H, N, AB))
main()


### FIXED CODE ###

def solve(H, N, AB):
    INF = 10e10
    dp = [[INF] * (H+1) for i in range(N+1)]
    dp[0][0] = 0
    A, B = AB[0]
    for j in range(H+1):
        dp[0][j] = min(dp[0][j], dp[0][max(0, j-A)]+B)
    for i in range(1,N):
        A, B = AB[i]
        for h in range(H+1):
            dp[i][h] = min(dp[i-1][h], dp[i][max(0, h-A)]+B)
        #print(i, *dp[i], sep="\t")
    
    return(dp[N-1][H])


def main():
    H, N = map(int, input().split())
    AB = []
    for i in range(N):
        A, B = map(int, input().split())
        AB.append((A, B))
    print(solve(H, N, AB))
main()
n = int(input())
a = list(map(int, input().split()))
b = []
a.insert(0, 0)
for i in range(n, 0, -1):
    t_sum = 0
    j = 2 * i
    while j <= n:
        t_sum ^= b[j]
        j += i
    b.append(t_sum ^ a[i])
print(sum(b))
for i in range(n):
    if b[i] != 0:
        print(1)    

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
b = [-1] * (n + 1)
a.insert(0, 0)

for i in range(n, 0, -1):
    t_sum = 0
    j = 2 * i
    while j <= n:
        t_sum ^= b[j]
        j += i
    b[i] = t_sum ^ a[i]
print(sum(b[1:]))
for i in range(1, n + 1):
    if b[i] != 0:
        print(i, end = ' ')
#010101…と101010…の2通り
#2通りともコストを計算して小さい方を採用するだけ。
#文字列処理のほうが楽。if文注意
s = input()
even = true
ans1=0#010101…
ans2=1#101010…
for c in s:
  if even:
    if c == '0':
      ans2 += 1
    else:
      ans1 += 1
  else:
    if c == '0':
      ans1 += 1
    else:
      ans2 += 1
print(min([ans1,ans2]))

### FIXED CODE ###

#010101…と101010…の2通り
#2通りともコストを計算して小さい方を採用するだけ。
#文字列処理のほうが楽。if文注意
s = input()
even = True
ans1=0#010101…
ans2=0#101010…
for c in s:
  if even:
    even = False
    if c == '0':
      ans2 += 1
    else:
      ans1 += 1
  else:
    even = True
    if c == '0':
      ans1 += 1
    else:
      ans2 += 1
print(min([ans1,ans2]))
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc129_c

mod = 1000000007
N, M = map(int, input().strip().split())
a = [int(input()) for _ in range(M)]
a.append(N+1)

def fibonacci(x):
    if x > 2:
        return fibonacci(x-1) + fibonacci(x-2)
    else:
        return 1

res = 1
prev_a = -1
for cur_a in a:
    if  cur_a - prev_a == 1:
        res = 0
        break
    res *= fibonacci(cur_a - prev_a - 1) % mod
    res %= mod
    prev_a = cur_a
    continue

print(res)


### FIXED CODE ###

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc129_c

mod = 1000000007
N, M = map(int, input().strip().split())
a = [int(input()) for _ in range(M)]
a.append(N+1)

def fibonacci(x):
    a = 1
    b = 1
    if x <= 2:
        return a
    else:
        for _ in range(x-2):
            tmp = a
            a = b
            b = tmp + b
        return b

res = 1
prev_a = -1
for cur_a in a:
    if  cur_a - prev_a == 1:
        res = 0
        break
    res *= fibonacci(cur_a - prev_a - 1) % mod
    res %= mod
    prev_a = cur_a
    continue

print(res)
import sys
N, M = map(int, input().split())

a_list = [0] * M

for m in range(M):
    a_list[m] = int(input())

for m in range(M - 1):
    if a_list[m] + 1 == a_list[m + 1]:
        print(0)
        sys.exit()
    else:
        continue

range_list = [i for i in range(1, N + 1)]
new_list = [0] * (M + 1)

a = 0
if a_list[0] == 1:
    new_list[0] = []
else:
    new_list[0] = [0] + range_list[0: a_list[0] - 1]
new_list[M] = range_list[a_list[M - 1]:]

if M - 1 >= 1:
    for m in range(1, M):
        new_list[m] = range_list[a_list[m - 1]: a_list[m] - 1]

MOD = 1000000007
#print(new_list)1

def fib(n):
    dp_list = [0] * n
    dp_list[0] = 1
    dp_list[1] = 2
    
    for i in range(2, n):
        dp_list[i] = dp_list[i - 1] + dp_list[i - 2]
    return dp_list[n - 1]

count = 1
for item in new_list:
    if not item:
        continue
    else:
        count *= fib(len(item) - 1)
        count %= MOD
print(count)

### FIXED CODE ###

import sys
N, M = map(int, input().split())

MOD = 1000000007

def fib(n):
    dp_list = [0] * n
    dp_list[0] = 1
    if n == 1:
        return 1
    dp_list[1] = 2
    
    for i in range(2, n):
        dp_list[i] = dp_list[i - 1] + dp_list[i - 2]
    return dp_list[n - 1]

if M == 0:
    print(fib(N) % MOD)
    sys.exit()

a_list = [0] * M

for m in range(M):
    a_list[m] = int(input())

for m in range(M - 1):
    if a_list[m] + 1 == a_list[m + 1]:
        print(0)
        sys.exit()
    else:
        continue

range_list = [i for i in range(1, N + 1)]
new_list = [0] * (M + 1)


new_list[0] = [0] + range_list[0: a_list[0] - 1]
new_list[M] = range_list[a_list[M - 1]:]

if M - 1 >= 1:
    for m in range(1, M):
        new_list[m] = range_list[a_list[m - 1]: a_list[m] - 1]

count = 1
for item in new_list:
    if not item or len(item) == 1:
        continue
    else:
        count *= (fib(len(item) - 1) % MOD)
        count %= MOD
        #print(count)
print(count)
A = input()
a,b = (A.split' ')
if 0 < a < 11:
   print('b')
else:
   print('b+1000-100a')

### FIXED CODE ###

A = input()
b,c = (A.split(' '))
d = int(b)
e = int(c)
f = e - d * 100 + 1000

if 0 < d < 11:
    print(f)
else:
    print(e)
n = int(input())
sum1 = 0
while n!=0:
  sum1 += int(n%10)
  n = int(n/10)
if sum1 % 9 == 0:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

n = int(input())
if n % 9 == 0:
  print('Yes')
else:
  print('No')