Problem:


Score : 200 points

Problem Statement

An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9.

Determine whether N is a multiple of 9.

Constraints

0 \leq N < 10^{200000}

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

If N is a multiple of 9, print Yes; otherwise, print No.

Sample Input 1

123456789

Sample Output 1

Yes

The sum of these digits is 1+2+3+4+5+6+7+8+9=45, which is a multiple of 9, so 123456789 is a multiple of 9.

Sample Input 2

0

Sample Output 2

Yes

Sample Input 3

31415926535897932384626433832795028841971693993751058209749445923078164062862089986280

Sample Output 3

No



Sample input:
123456789


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
N = int(input())

def if_test(N):
  if N&9 == 0:
  	print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
n=input()
x=sum([int(n[i]) for i in range(len(n))])
if x!=0 and x%9==0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:

N = str(input())
L = list(N)
r = 0
for l in L:
    r = r + int(l)

m = r % 9
if m == 0:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
n=input()

wk=0
for i in range(len(n)):
    wk+=int(n[i])
if wk%9==0 and wk!=0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
# your code goes here
n=input()
sum=0
for i in n:
	sum+=int(i)
if(sum%9==0):
	print("YES")
else:
	print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())

def if_test(N):
  if N&9 == 0:
  	print(Yes)
  else:
    print(No)

Submission status: Wrong Answer

Solution code:
N = input()

if N == "0":
  print("Yes")
else:
  N = len(N)
  target = (N*(N+1)) // 2
  if (target % 9) == 0:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = 0
for i in range(len(s)):
  n += int(s[i:i+1])
print(n)
if n % 9 == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

def digitSum(n):
    # 桁数を判定する
    if len(str(n)) is 1:
        return n
    dst = sum(list(map(int, str(n))))
    return digitSum(dst)
 
 
if __name__ == "__main__":
  n = N
  result = digitSum(n)
  if int(result) % 9 == 0 and int(result) != 0:
  	print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
count = 0
lst = []
while N > 0:
  lst.append(N%10)
  N //= 10 
for i in lst:
  count += i
if count % 9 == 0:
  print("Yes")
else:
  print("No")
print(count)

Submission status: Wrong Answer

Solution code:
n = input()

sum = 0
for i in range(len(n)):
    sum += int(n[i])
    if sum // 9 == 1:
        sum = sum % 9

if sum == 0:
    print('YES')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
numlist=list(str(input()))
a=0
for i in range(0,len(numlist)-1):
  a=a+int(numlist[i])%9
if a%9==0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()
n = 0
for i in range(len(s)-1):
  n += int(s[i:i+1])
if n % 9 == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def isMultiple9(N):
    count = 0
    for i in N:
        count += int(i)
    
    return 'Yes' if count % 9 == 0 else 'No'

Submission status: Wrong Answer

Solution code:
n = int(input())
n = pow(10, 200000)-1

total = 0
n = str(n)
for i in range(len(n)):
    total += int(n[i])

if total % 9 == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
### 数列をいったん文字列に変換
numberString = input()
print(numberString)
sumNumber = 0

### 文字列を分割、整数化
for i in range(len(numberString)):
  sumNumber += int(numberString[i])
### 和を9を法とする式で計算。

if sumNumber % 9 == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
from functools import reduce
N = reduce(lambda x,y:int(x)+int(y), "0"+input())
if not N%9:
  print("Yes")
else:
  print("False")

Submission status: Wrong Answer

Solution code:
from sys import stdin
n = float(stdin.readline().rstrip())
cnt = 0
for i in range(200010):
    if n < 10:
        cnt += n
        break
    cnt += (n % 10)
    n = float(n // 10)
if cnt % 9 == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N =int(input())
lst = []

N = str(N)

list_num = list(N)

N = [int(s) for s in list_num]
ans = sum(N)

if ans % 9 == 0:
  print("yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
j = 1
sum = 0
while (n >= 10 ** j):
  keta = n % (10 ** j)
  sum = sum + keta
  n = n - keta * (10 ** (j - 1))
  j = j + 1
if (sum % 9 == 0):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def nine():
    N=int(input())
    if N%9 != 0:
        return False
    else:
        t=(i for i in str(N))
        sum=0
        for i in t:
            sum+=int(i)
        if sum%9 == 0:
            return True

print(nine())

Submission status: Wrong Answer

Solution code:
N = int(input())

def digitSum(n):
    # 桁数を判定する
    if len(str(n)) is 1:
        return n
    dst = sum(list(map(int, str(n))))
    return digitSum(dst)
 
 
if __name__ == "__main__":
  n = N
  result = digitSum(n)
  if int(result) == 9:
  	print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
s = 0
if n == 0 :
  print('Yes')
else:
  while n >0:
    rem  = n % 10
    s += rem
    n = n // 10
print(s)

Submission status: Wrong Answer

Solution code:
n = int(input())
j = 0
sum = 0
while (n >= 10 ** j):
  sum = sum + n % (10 ** j)
  n = n - 10 ** j
  j = j + 1
if (sum % 9 == 0):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N =int(input())
lst = []

N = str(N)

list_num = list(N)

N = [int(s) for s in list_num]
ans = sum(N)

if ans % 9 == 0:
  print("yes")
else:
        print("No")

Submission status: Wrong Answer

Solution code:
n=input()


n=str(n)
Sum=0
for i in range(len(n)):
    Sum=Sum+int(n[i])

if Sum%9==0:
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

Solution code:
N=str(input())
List=[int(N[i]) for i in range(len(N))]
if sum(List)%9==0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = input()

sum = 0
for i in range(len(n)):
    sum += int(n[-1 - i])
    if sum // 9 == 1:
        sum = sum % 9 

if sum == 0:
    print('YES')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = float(input())
cnt = 0
while True:
    r = float(n % 10)
    n = float((n-r) / 10)
    cnt += r
    if n == 0:
        break
res = cnt % 9
if res == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
j = 0
sum = 0
while (n >= 10 ** j):
  sum = sum + n % (10 ** j)
  j = j + 1
if (sum % 9 == 0):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
i = 0
sum = 0
while (n >= 10 ** i):
  i = i + 1
j = 0
while (j <= i):
  sum = sum + n % (10 ** j)
  j = j + 1
if (sum % 9 == 0):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = list(map(int, input().split()))
n_sum = 0

for n in N:
    n_sum += n

if n_sum % 9 == 0 and n_sum != 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def nineJoke(val):
  if (val % 9 == 0):
    return "YES"
  else:
    return "NO"
  
def userInput():
  a = int(input())
  return nineJoke(a)
  
print(userInput())

Submission status: Wrong Answer

Solution code:
N = input()

sum_of_digits = 0
for digit in str(N):
    sum_of_digits += int(digit)
if sum_of_digits % 9 == 0:
    print("yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = input()
s = str(n)
l = len(s)
ans = 0
for i in range(l+1):
    ans += int(s[-i]) 
p = ans-(int(s[-l]))
if p%9 == 0:
    print("Yes")
    exit()

Submission status: Wrong Answer

Solution code:
N =int(input())
lst = []
while N > 0:
    lst.append(N%10)
    N //= 10 
lst.reverse()

ans = sum(lst)

if ans % 9 == 0:
  print("yes")
else:
        print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
if(N%9==0):
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
import decimal
n=(input())

wk=decimal.Decimal(0)
for i in range(len(n)):
    wk+=decimal.Decimal(int(n[i]))
if wk%9==0 and wk>0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a = 0
n = int(input())
while n != 0:
  a += n % 10
  n = n // 10 

b = 0
while b != 0:
  b += a % 10
  b = a // 10 

if b % 9 == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N = input()
summ = sum([int(i) for i in N])

print('YES' if summ % 9 == 0 else 'NO')

Submission status: Wrong Answer

Solution code:
n = sum(list(map(int,input())))


if n != 0 | n % 9 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = input()

asdf = 0
for idx in range(len(N)):
    asdf += int(N[idx])

if( asdf % 9 == 0 and asdf / 9 != 0):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N=str(input())
L=len(N)
X=0
ans=None

for i in range(0,L):
    Y=int(N[i])
    X=X+Y

if X%9==0:
    ans="yes"
else:
    ans="no"

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())

ss = list(str(N))


s = list(map(int, ss))

if(N%2 == 0):
	print('No')
	sys.exit(0)

if(N%5 == 0):
	print('No')
	sys.exit(0)

if(N%7 == 0):
	print('No')
	sys.exit(0)

re = sum(s)

# re = 0
# for s in ss:
# 	re += int(s)
if(re%9 == 0):
# if(N%9 == 0):
	print('Yes')

Submission status: Wrong Answer

Solution code:
ans = input()
a = str(ans)
c = 0
for f in a:
  b = int(f)
  c = c + b
inp = c % 9
if inp == 0:
  print('yes')
if inp != 0:
  print('no')

Submission status: Wrong Answer

Solution code:
n = input()
ans = 0
for i in n:
  ans += int(i)
ans2 = ans%9
if ans2 == 0:
  print('Yes')
else:
  print('no')

Submission status: Wrong Answer

Solution code:
N = int(input().strip())

ans = 0
N = str(N)

for i in range(len(N)):
    ans = int(N[i]) + ans
if ans % 9 == 0:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
def multiples_of_9(n):
    return 'Yes' if sum([int(x) for x in str(n)]) % 9 == 0 else 'No'

Submission status: Wrong Answer

Solution code:
n = int(input())

sum = 0

while(n >= 1):
  sum += n % 10
  n //= 10
  print(n)

if(sum % 9 == 0):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = input()

asdf = 0
for idx in range(len(N)):
    asdf += int(N[idx])

if( asdf > 0 and asdf % 9 == 0 ):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
S = [int(i) for i in str(N)]
L = len(S)
sum = 0
i = 0

while i < L:
    sum = sum + int(i)
    i = i + 1
    
if (sum % 9) == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a=0
n=input()
n=list(n)
n=list(map(int,n))
a=sum(n)
if a%9==0:
    print("YES")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = input()
array = list(map(int, N))
S = sum(array)

if S%9 == 0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
n = int(input())

if n % 9 == 0 and n >= 9:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n=input()

wk =0
for i in range(len(n)):
    wk+=int(n[i])
if wk%9==0:
    if wk!=0:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
if N%9 == 0:
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

Solution code:
N = int(input())


ss = list(str(N))
# re = 0

s = list(map(int, ss))

if(s[-1]%2 == 0):
	import sys
	print('No')
	sys.exit(0)

re = sum(s)

# for s in ss:
# 	re += int(s)
if(re%9 == 0):
# if(N%9 == 0):
	print('Yes')

Submission status: Wrong Answer

Solution code:
import sys
N=input()
sum_of_num=0
for i in N:
  sum_of_num+=int(i)
if sum_of_num/9!=0 and N!=0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
x=input()

counter=0
for i in range(len(x)):
	counter+=int(x[i])

if(counter%9==0): print("YES")
else: print("NO")

Submission status: Wrong Answer

Solution code:
import sys
readline = sys.stdin.readline

N = readline().strip()

if N == "0":
  print("No")
  exit()
  
l = len(N)
d = 0
for i in range(l):
  d += int(N[i])

if d%9 == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
if(N%2 == 0):
	import sys
	print('No')
	sys.exit(0)

ss = list(str(N))
# re = 0

s = list(map(int, ss))
re = sum(s)

# for s in ss:
# 	re += int(s)
if(re%9 == 0):
# if(N%9 == 0):
	print('Yes')

Submission status: Wrong Answer

Solution code:
import itertools
N = input()

asdf = 0
for idx in range(len(N)):
    asdf += int(N[idx])

if( asdf > 0 and asdf % 9 == 0 ):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

if N == 0:
    print("No")
elif N % 9 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = input()
sum = 0
for i in n:
    sum += int(i)
print(sum % 9 == 0)

Submission status: Wrong Answer

Solution code:
n = int(input())
if (n//9):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

val = 0

while n > 0:
    val += n % 10
    n //= 10

if val % 9 == 0 and val >= 9:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
sum1 = 0
while n>0:
  sum1 += n%10
  n = n//10

if sum1%9 == 0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
N = int(input())
s = []
for i in range(len(str(N))):
  s.append(N % 10)
  N // 10
if sum(s) % 9 == 0 and sum(s) != 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = input()
l = len(n)
s = 0
for i in  range(l):
  if(n[i]!='-'):
  	s += int(n[i])
print(s)
if(s%9):
  print("Np")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
N=int(input())
if N//9==0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N=list(input())
N_2=list(map(int,N))
print(N_2)

print('YNeos'[sum(N_2)%9!=0::2])

Submission status: Wrong Answer

Solution code:
N=int(input())

result=sum(list(map(int, str(N))))
if result==9:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = list(input())

sum_N = 0
for i in range(len(N)):
    sum_N += int(N[i])

if sum_N%9 == 0:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
n=input()

wk =0
for i in range(len(n)):
    wk+=int(n[i])
if wk%9==0 and wk>0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = input()
l = len(n)
s = 0
for i in  range(l):
  if(n[i]!='-'):
  	s += int(n[i])
print(s)
if(s%9):
  print("NO")
else:
  print("YES")

Submission status: Wrong Answer

Solution code:
print(int(input()) % 9 == 0)

Submission status: Wrong Answer

Solution code:
N = int(input())
if(N%2 == 0):
	import sys
	print('No')
	sys.exit(0)

# ss = list(str(N))
# re = 0
# for s in ss:
# 	re += int(s)
# if(re%9 == 0):
if(N%9 == 0):
	print('Yes')
# s = list(map(int, s))

Submission status: Wrong Answer

Solution code:
N = input()

a = 0
for n in N:
    a += int(n)
if a % 9 == 0:
    ans = "Yse"
else:
    ans = "No"
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
if(N%2 == 0):
	print('No')
	sys.exit(0)

# ss = list(str(N))
# re = 0
# for s in ss:
# 	re += int(s)
# if(re%9 == 0):
if(N%9 == 0):
	print('Yes')
# s = list(map(int, s))

Submission status: Wrong Answer

Solution code:
n = int(input())
while True:
  a = int(0)
  while n > 0:
    a = a + (n % 10)
    n = n // 10
  if a < 10:
      break
  n = a
if a == 9:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N=input()

l=len(N)
tot=0
for i in range(l):
  tot=int(N[i])

if tot%9==0:
  print("Yes")
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
s = []
for i in range(len(str(N))):
  s.append(N % 10)
  N // 10
if sum(s) % 9 == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
ans = input()
a = int(ans)
b = a % 9
if b == 0:
  print('yes')
if b != 0:
  print('no')

Submission status: Wrong Answer

Solution code:
N = str(input())
k = len(N) - 1
ans = 0
for i in range (k):
 n = int (N[i])
 ans = ans + n
if ans % 9 == 0:
 print ("Yes")
else:
 print ("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[int(x) for x in list(str(n))]
print(sum(l))

Submission status: Wrong Answer

Solution code:

#cout<< (ll)(((2LL%mod * (n )%mod)%mod - 1%mod)%mod * k%mod)%mod <<'\n';
import sys
# input=sys.stdin.readline
# t = int(input())
# for i in range(t):
# 	n,k=map(int,input().split())
# 	res = (((2**n)%1000000007-1%1000000007)%1000000007 * k%1000000007)%1000000007
# 	print(res)
n = int(input())
if n%9==0:
  print("Yes")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
N = input()
digits = list(N)

sum = 0
for i in range(len(digits)):
    sum += int(digits[i])

if(sum !=0 and sum%9 == 0):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
N = input()
sum = 0
for i in N:
  sum = sum + int(i)
if (sum%9):
  print('NO')
else:
  print('YES')

Submission status: Wrong Answer

Solution code:
num = input()

count = 0
for i in range(len(num)):
    count += int(num[i])

if count % 9 == 0:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
s = str(input())
n = 0
if s == '0':
    print('YES')
else:
    for i in s:
        i = int(i)
        n += i
    if n % 9 == 0:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
if(N%2 == 0):
	print('No')
	sys.exit(0)

ss = list(str(N))
re = 0
for s in ss:
	re += int(s)
if(re%9 == 0):
	print('Yes')

Submission status: Wrong Answer

Solution code:
n = float(input())
if(n%9==0):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())
sum1 = 0
for i in range(len(str(n))):
    sum1 += int(str(n)[i])
    print(int(str(n)[i]))
if sum1 % 9 == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

str_n = str(n)

sum = 0
for i in range(len(str_n)):
    sum += int(str_n[-1 - i])
mod = sum % 9

if mod == 0:
    print('YES')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = input()
l = len(n)
s = 0
for i in  range(l):
  s += int(n[i])
if(s%9):
  print("NO")
else:
  print("YES")

Submission status: Wrong Answer

Solution code:
# t=int(input())
# for _ in range(t):
#     n=int(input())
#     arr=[int(x) for x in input().split()]
n=int(input())
if n%9 == 0:
    print("Yes")
else:
    print("N0")

Submission status: Wrong Answer

Solution code:
n=int(input())
if(n==0):
  print("YES")
elif(n%9==0):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
N = input()
digits = list(N)

sum = 0
for i in range(len(digits)):
    sum += int(digits[i])

if(sum%9 == 0):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
N=input()
sum_of_num=0
for i in N:
  sum_of_num+=int(i)
if sum_of_num/9==0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
sum = 0
while n > 0:
    sum += n % 10
    n = n // 10
if n % 9 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
c = 0
if(N % 2 == 1):
    if( N % 9 == 0 ):
        num_list = list(str(N))
        s = len(num_list)
        for i in range(s):
            a = num_list[i]
            c += int(a) 
        if(c % 9 == 0):
            print("Yes")
        else:
            print("No")
    
    else:
        print("No")
if (N == 0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
sum1 = 0
while n>0:
  sum1 += n%10
  n= n//10
if sum1%9 == 0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
n = input()
s = str(n)
array = list(map(int, s))
if sum(array)%9 == 0 and sum(array)!=0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# B

N = int(input())
solve = []

while N > 10:
    N = N // 10
    k = N % 10
    solve.append(k)
    
ans = 0
for i in range(len(solve)):
    ans += solve[i]

if ans % 9 == 0:
    print('Yes')
if ans % 9 != 0:
    print('No')

Submission status: Wrong Answer

Solution code:
num = input()
sum = 0
for x in num:
    sum = sum + (int(x) - 48)
    
if (sum % 9 == 0):
    if (sum != 0):
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
N = str(input())
count = 0
for i in range(len(N)):
  count = count + int(N[i])
print(count)
if (count/9) - (count//9) == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
S=0
N=str(N)
for i in N:
    S+=int(i)
if S%9==0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n=int(input())
s=0
c=0
while n>0:
  r=n%10
  s=s+r
  n=n//10
  if s%9==0:
    continue
  else:
    c=1
    print('No')
    break
if not c:
  print('Yes')

Submission status: Wrong Answer

Solution code:
N = input()

x = 0

for i in range(len(N)-1):
    x = x + int(N[i])

if x%9==0 :
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = list(map(int, input()))
print("Yes" if sum(n) else "No")

Submission status: Wrong Answer

Solution code:
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

n = s()
memo = 0
for i in range(len(n)):
	memo += int(n[i])
if memo%9 == 0:
	print("Yes")
else:
	print("No")


print(len(n))

Submission status: Wrong Answer

Solution code:
n = input()
s = str(n)
array = list(map(int, s))
if sum(array)%9 == 0 and sum(array)!=0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = str(input())
n = 0
if s == '0':
    print('NO')
else:
    for i in s:
        i = int(i)
        n += i
    if n % 9 == 0:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
N = str(input())
le = len(N)
R = 0

for i in range(0,le):
  R += int(N[i])
  
if R == 0:
  print('No')
elif R % 9 == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
#ABC176 B
N = list(map(int,input()))
n = 0
for i in N:
  n += i

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

Submission status: Wrong Answer

Solution code:
ls=[int(s) for s in input()]
sm = sum(ls)
if sm%9 == 0:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
n = input()
val = 0
for i in range(1,len(n)+1):
    val +=int(i)
if val % 9 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = str(input())

result = sum(list(map(int, N)))

if result ==0:
    print('No')

elif result%9 ==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
sum_keta = sum(list(map(int, str(N))))
if N == 0:
  print('No')
else:
  if sum_keta % 9 == 0:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys
from io import StringIO
import unittest
import math

def resolve():
    N, = map(int, input().split())
    if N%9==0:
        print("Yes")
    else:
        print("No")




class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """123456789"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """0"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """31415926535897932384626433832795028841971693993751058209749445923078164062862089986280"""
        output = """No"""
        self.assertIO(input, output)


if __name__ == "__main__":
    resolve

Submission status: Wrong Answer

Solution code:
N = list(input())

s = 0

for i in range(len(N)):
    s += int(N[i])

if s % 9 == 0:
    print('YES')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

str_n = str(n)

sum = 0
for i in range(len(str_n)):
    sum += int(str_n[-1 - i])

if sum % 9 == 0:
    print('YES')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = str(input())
count = 0
for i in range(len(N)):
  count = count + int(N[i])

if count//9 == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import sys
li  =   lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw  =   lambda : sys.stdin.readline().strip().split()
ni  =   lambda : int(sys.stdin.readline().strip())
nsi =   lambda : sys.stdin.readline().strip()

from collections import defaultdict as df
import math
s=input()
sum=0
for i in s:
    sum+=int(i)

if(sum%9==0):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = []
n = list(map(int, input().split()))
cnt = 0
for i in range(len(n)):
    cnt += n[i]

if cnt&9 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = input()
L = len(N)
S = 0
for i in range(L - 1):
    S += int(N[i])
if S % 9 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 9 == 0:
    print("YES")
else : 
    print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())

if N//9 == 0:
  ans = 'Yes'
else:
  ans = 'No'

print(ans)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
if N == 0:
  print('No')
else:
  log10_N = int(math.log10(N)) + 1
  sum_keta = 0

  for i in range(log10_N):
    sum_keta += N % 10
    N = N // 10

  if sum_keta % 9 == 0:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
def main():
  N = input()
  N_sum = 0
  
  for i in N:
    N_sum += int(i)
    
  if N_sum % 9 == 0 and N_sum != 0:
    print("Yes")
  else:
    print("No")
  
if __name__ == "__main__":
  main()

Submission status: Wrong Answer

Solution code:
import numpy as np
X = int(input())
if X==0:
    ans="No"
else:
    S = str(X)
    L=[int(i) for i in S]
    Y=np.sum(L)
    if Y%9==0:
        ans="Yes"
    else:
        ans="No"

print(ans)

Submission status: Wrong Answer

Solution code:
N = input()
ret = 0
for c in N:
  ret += (ret + int(c)) % 9
  
if ret  == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

s = str(n)
val = 0

for letter in s:
    val += int(letter)

if val % 9 == 0 and val >= 9:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
sum1 = 0
while n != 0:
  sum1 += n % 9
  n = n // 9
if sum1 % 9 == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N = input()
sum = 0
for i in range(len(N)):
    sum += int(i)
if sum % 9 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# t=int(input())
# for _ in range(t):
#     n=int(input())
#     arr=[int(x) for x in input().split()]
def sumall(n):
    sum=0
    while n:
        sum+=n%10
        n=n//10
    return sum
n=int(input())
if sumall(n)%9 == 0:
    print("YES")
else:
    print("NO")
#print(t*need)

Submission status: Wrong Answer

Solution code:
number = list(map(int,list(input())))
if sum(number)%9==0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
inputs = int(input())

if (inputs // 9) == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = input()

num = 0

for n in N:
  num += int(n)
  
if num % 9 == 0:
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

Solution code:
str_n = input()
n = int(str_n)

if sum(map(int, list(str_n))) % 9 == 0:
    print('yes')
else:
    print("no")

Submission status: Wrong Answer

Solution code:
n = input() 
sum = 0
for i in range(len(n)):
  sum += int(i)
if(sum%9 == 0):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 9 == 0:
  print('Yse')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
#x = int(input())
#A = list(map(int, input().split()))
#n, x, t = map(int, input().split())
n = input()
list_num = list(n)
list_num = [int(n) for n in list_num]
ans = sum(list_num)
if ans % 9 == 0:
  print("Yes")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
for i in range(len(str(n))):
    count += int(str(n)[i])
if count % 9 == 0:
    print("Yes")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
N = input()
sum = 0
if N =='0':
    print('No')
    exit()
for n in N:
    sum += int(n)
if (sum%9 == 0):
    print ('Yes')
else:
    print('No')