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

Solution (Python):
def A():
    n, x, t = map(int, input().split())
    print(t * ((n+x-1)//x))

def B():
    n = list(input())
    s = 0
    for e in n:
        s += int(e)
    print("Yes" if s % 9 == 0 else "No")

def C():
    int(input())
    a = list(map(int, input().split()))
    l = 0
    ans = 0
    for e in a:
        if e < l: ans += l - e
        l = max(l, e)
    print(ans)

B()

Solution (Python):
n = sum([int(n) for n in input()])
if n % 9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
N = input()
S = [int(n) for n in N]
if sum(S) % 9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):

N=input()
s=0
for i in range(len(N)):
 s+=int(N[i])
if s%9==0:
 print('Yes')
else:
 print('No')

Solution (Python):
N = input()
total = 0
for i in N:
	total += int(i)
print('Yes') if total % 9 == 0 else print('No')

Solution (Python):
N = list(input())

inN = [int(s) for s in N]

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

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

Solution (Python):
N=list(map(int,input().split()))
a=sum(N)
if a%9==0:
  print('Yes')
else:
  print('No')

Solution (Python):
string = input()
sum = 0

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

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

Solution (Python):
N = int(input())
digits = list(map(int,str(N)))
if sum(digits) % 9 == 0:
  print('Yes')
else:
  print('No')

Solution (Python):
s=input()
print("Yes" if sum(map(int,s))%9==0 else "No")

Solution (Python):
n = int(input())
if n % 9 == 0:
         print("Yes")
else:
         print("No")

Solution (Python):
n = input()
s=0
for i in n:
  s += int(i)
if s%9 == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
n = int(input())
print("Yes" if n % 9 == 0 else "No")

Solution (Python):
import sys
read = sys.stdin.read

from math import ceil
def main():
    n = tuple(map(int, tuple(input())))
    if sum(n) % 9 == 0:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
print("Yes" if n % 9 == 0 else "No")

Solution (Python):
n=input()
li=list(map(int, n))
sum=0
for i in range(len(li)):
    sum+=li[i]
if sum%9==0:
    print("Yes")
else:
    print("No")

Solution (Python):
n=int(input())
if n%9==0:
    print("Yes")
else:
    print("No")

Solution (Python):
print("Yes" if int(input())%9 == 0 else "No")

Solution (Python):
print("Yes") if int(input()) % 9 == 0 else print("No")

Solution (Python):
N = list(map(int, input().split()))

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

Solution (Python):
N = list(input())
n = len(N)
X = 0
k = 0
for i in range(0, n):
  X += int(N[i])

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

Solution (Python):
import math

n = input()

n_list = map(int, list(n))
ans = sum(n_list)

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

Solution (Python):
n=list(map(int,input().split()))
s=sum(n)

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

Solution (Python):
N=int(input())
if N%9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
if N % 9:
  print("No")
else:
  print("Yes")

Solution (Python):
N = input()

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

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

Solution (Python):
big = str(input())
num = 0
for x in range(len(big)):
    num += int(big[x])
if num % 9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
n = input()

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

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

Solution (Python):
N = int(input())

v = 0

for c in str(N):
    v += int(c)

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

Solution (Python):
a=list(input())
ans=0
for i in range(len(a)):
    ans+=int(a[i])
if ans%9==0:
    print("Yes")
else:
    print("No")

Solution (Python):
N = input()

S = 0
for m in N:
    S += int(m)
    S %= 9

if S == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
if N % 9 == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
def main():
    n = list(map(int, input()))
    if sum(n)%9 == 0:
        print('Yes')
    else:
        print('No')
        
        
if __name__ == '__main__':
    main()

Solution (Python):
S=[int(s) for s in list(input())]
if sum(S)%9==0:
  print('Yes')
else:
  print('No')

Solution (Python):
n = int(input())

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

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

Solution (Python):
N = str(input())

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

Solution (Python):
n = input()
cnt = 0

for i in n:
  cnt += int(i)

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

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

Solution (Python):


from typing import *
import collections
import functools as fts
import itertools as its
import math
import sys

INF = float('inf')
YES = "Yes"  
NO = "No"  


def solve(N: str):
    return [NO, YES][sum(int(c) for c in N) % 9 == 0]


def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = next(tokens)  
    print(f'{solve(N)}')


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())


def solve1(n: int) -> str:
    k = 0
    for i in range(len(n)):
        k += int(n[i])

    if k % 9 == 0:
        return "Yes"
    else:
        return "No"


def solve2(n: int) -> str:
    if n % 9 == 0:
        return "Yes"
    else:
        return "No"


print(solve2(n))

Solution (Python):
n = input()
k = 0

for i in range(len(n)):
    k += int(n[i])

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

Solution (Python):
string = input()
s = 0
for i in string:
    s += int(i)

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

Solution (Python):
n = list(input())
cnt = 0

for s in n:
    cnt += int(s)

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

Solution (Python):




n = int(input())

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

Solution (Python):
n = int(input())

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

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

Solution (Python):
print('No' if sum(map(int, input())) % 9 else 'Yes')

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

Solution (Python):
import sys

a = sum([int(num) for num in list(input())]) % 9

if a == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
N = list(map(int,input()))
if(sum(N) % 9 == 0):
	print("Yes")
else:
	print("No")

Solution (Python):
N = int(input())
if(N%9 == 0):
	print("Yes")
else:
	print("No")

Solution (Python):
n=int(input())
if(n%9==0):
    print("Yes")
else:
    print("No")

Solution (Python):

n = int(input())

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

Solution (Python):

def inputlist(): return [int(j) for j in input().split()]

suma =0
N = input()
for i in range(len(N)):
    suma+= int(N[i])
if suma % 9 == 0:
    print("Yes")
else :
    print("No")

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

Solution (Python):
num = list(str(input()))
num = [int(x) for x in list(num)]
print('Yes' if sum(num) % 9 == 0 else 'No')

Solution (Python):
from sys import stdin
input = stdin.readline

a = input().strip()
res = sum(int(i) for i in a) % 9 == 0
print('Yes' if res else 'No')

Solution (Python):
N=int(input())

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

Solution (Python):
n = list(input())
for i in range(len(n)) :
    n[i] = int(n[i])
if sum(n)%9==0 :
    print("Yes")
else :
    print("No")

Solution (Python):
n = int(input())
if n % 9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())

n = str(N)

le = len(n)

M = 0

for i in range(le):
    nn = int(n[i])
    M += nn

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

Solution (Python):
n = list(input())

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

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

Solution (Python):
n = int(input())
div = 0
for i in str(n):
    num = int(i)
    div += num

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

Solution (Python):
n=input()
div=0
for ch in n:
    num=int(ch)
    div+=num

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

Solution (Python):
if __name__=='__main__':
    N = int(input())
    print("Yes" if N%9 ==0 else "No")

Solution (Python):
n = sum([int(ch) for ch in input()])
print("Yes" if n % 9 == 0 else "No")

Solution (Python):
n=int(input())
sums=0
for i in str(n):
    sums+=int(i)
print('Yes' if sums%9==0 else 'No')

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

Solution (Python):
l = list(map(int, input()))
sum = 0
for i in range(len(l)):
    sum += l[i]

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

Solution (Python):
total = 0
for ch in input().strip():
	total = (total + int(ch)) % 9
print('No' if total else 'Yes')

Solution (Python):
n = [int(x) for x in input()]
s = sum(n)
if s % 9 == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
n = list(input())

n1 = [int(i) for i in n]

sum = 0
for i in n1:
    sum += i

if sum % 9 == 0:
    print('Yes')

else:
    print('No')

Solution (Python):
n = input()
sum=0

for i in n :
  sum += int(i)

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

Solution (Python):
N = int(input())
s = str(N)
array = list(map(int, s))
s_array = sum(array)
s_array2 = int(s_array)
s_array3 = s_array2 % 9
if s_array3 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
x = int(input())
result = sum(list(map(int, str(x))))
if result % 9 == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    N = input()
    s = 0
    for i in range(len(N)):
        s += int(N[i])
    if s%9 == 0:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    main()

Solution (Python):
N=input()
cnt=0
for i in range(len(N)):
    cnt+=int(N[i])
if cnt%9==0:
    print("Yes")
else:
    print("No")

Solution (Python):
N=int(input())
if N%9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
n = input()
x = list(n)
a = 0
for i in x :
    a += int(i)
if a%9 == 0 :
    print('Yes')
else :
    print('No')

Solution (Python):
print("Yes" if sum(map(int,list(input())))%9==0 else "No")

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

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

Solution (Python):
n = int(input())
if n % 9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
n = list(map(int, input().split()))
print('Yes' if sum(n) % 9 == 0 else 'No')

Solution (Python):
n = input()

s = 0
for i in n:
  s += int(i)

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

Solution (Python):

s = list(map(str,input().split()))
sum = 0
for i in range(len(s)):
    sum += (int) (s[i])
if sum %9 == 0:
    print("Yes")
else:
    print("No")

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

Solution (Python):
n_str = input()
print("Yes" if sum([int(c) for c in n_str]) % 9 == 0 else "No")

Solution (Python):
N = input()
sum = 0
for i in range(0, len(N)):
    sum += int(N[i])
print('Yes' if sum % 9 == 0 else 'No')

Solution (Python):
def main(N):
    ans = 0
    for n in str(N):
        ans += int(n)
    if ans%9==0:
        return 'Yes'
    else:
        return 'No'


if __name__ == '__main__':
    N = int(input())
    ans = main(N)
    print(ans)

Solution (Python):
a=input()
ans=0
for i in a:
  ans = (ans+int(i))%9
print(["Yes","No"][ans>0])

Solution (Python):
N = input()
ans = 0
for i in range(len(N)):
  ans += int(N[i])
  
if ans%9 == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
total = 0
N = input()
for c in N:
  total += int(c)
if total % 9 == 0:
  print("Yes")
else:
  print("No")

Solution (Python):


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

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

Solution (Python):

n = int(input())

ans = 0

l = [int(x) for x in list(str(n))]
ans = sum(l)

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

Solution (Python):


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

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

Solution (Python):


N = int(input())
mod = N % 9

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

Solution (Python):
N=input()
x=0
for idx in range(len(N)):
  x=x+int(N[idx])
if x%9==0:
  print('Yes')
else:
  print('No')

Solution (Python):
N = int(input())
N_str = str(N)
a = 0
for i in range(len(N_str)):
  a += int(N_str[i])
if a % 9 == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
n = input()

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

Solution (Python):
n = input()
print('Yes' if sum(list(map(int, list(n)))) % 9 == 0 else 'No')

Solution (Python):
N = int(input())

n = str(N)

c = len(n)
total = 0

for c in range(c):
  total = total + int(n[c])
  
if total % 9 == 0:
  print("Yes")
  
else :
  print("No")

Solution (Python):
N = list(input())
temp = 0
for n in N:
    k = int(n)
    temp += k
if temp % 9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
if N % 9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):








N = input()
cur = 0

for i in N:
    cur += int(i)

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

Solution (Python):
n = input()
nb=int(n)
a= list(n)
ab = [int(s) for s in a]
z=0
for i in range((len(ab))):
    z+=ab[i]
if nb%9==0 and z%9==0:
    print("Yes")
else:
    print("No")

Solution (Python):
print("Yes" if int(input())%9==0 else "No")

Solution (Python):
print("Yes" if int(input())%9==0 else "No")

Solution (Python):
n = list(input())
ans = 0
for i in n:
    ans += int(i)

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

Solution (Python):
N = input()
cnt = 0
for i in range(10):
  cnt += i * N.count(str(i))
print("Yes" if cnt % 9 == 0 else "No")

Solution (Python):










def main():
    n = input()
    sum = 0
    for i in range(len(n)):
        sum += int(n[i])

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


if __name__ == '__main__':
    main()

Solution (Python):
n=input()
x=0
for i in n:
    x+=int(i)
print("Yes" if x%9==0 else "No")

Solution (Python):
N=int(input())
if N%9 == 0:
  print("Yes")
else:
  print("No")

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

Solution (Python):
N = str(input())

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

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

Solution (Python):
N = int(input())
K = str(N)
L = len(K)
K.split(',', L)
num_list = list(map(int, K))
A = 0

for i in range(L):
    A += num_list[i]

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

Solution (Python):
import sys

input = sys.stdin.readline

n = input()
n = n.replace('\n','')

n_list = list(n)


su = 0
for n in n_list:
    n_int = int(n)
    su += n_int

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

Solution (Python):
x= input()
reslut = sum(list(map(int,x)))
if reslut%9 == 0 :
    print("Yes")
else:
    print('No')

Solution (Python):
N=input()
N=list(N)
N=map(lambda x: int(x),N)
if sum(N)%9==0:
    print("Yes")
else:
    print("No")

Solution (Python):
m = input("")
s = m.split(".")
sum = 0
if len(s) == 1 and int(m)>=0 and int(m)<10**200000:
    for i in m :
        sum = sum+int(i)
    if sum % 9 == 0:
        print("Yes")
    else:
        print("No")

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

Solution (Python):
x = input("")
for i in range(3):
    alist = list(map(int,x))
    result = sum(alist)
    x = str(result)
if result % 9 == 0 :
    print("Yes")
else:
    print("No")

Solution (Python):
print('No') if int(input())%9 else print('Yes')

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

Solution (Python):



N = int(input())


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

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

Solution (Python):
from sys import stdin
def ip(): return [int(i) for i in stdin.readline().split()]
def sp(): return [str(i) for i in stdin.readline().split()]

s = str(input())
c = 0
for i in s:
    c += int(i)
if (c % 9) == 0: print("Yes")
else: print("No")

Solution (Python):
N=list(map(int,input().split()))
temp = sum(N)
if temp%9 == 0:print("Yes")
else:print("No")

Solution (Python):
n = str(input())
s = 0
for x in n:
  s += int(x)
if s % 9 == 0:
  print('Yes')
else :
  print('No')

Solution (Python):
s = str(input())
sm = 0
for c in s:
    sm += int(c)

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

Solution (Python):
N = input()
list_n = list(N)
sum_n = 0
for i in list_n:
    sum_n += int(i)
if sum_n % 9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):




N = input()
sum = sum(map(int,N))

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

Solution (Python):
n = input()

ans = 0

for i in range(len(n)):
    ans += int(n[i])

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

Solution (Python):
def digitsum(n):
    res = 0
    for i in n:
        
        ni = int(i)
        res += ni
    return res 

s = input()
r = digitsum(s)

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

Solution (Python):
n = list(input())
b = int(n[0])
for a in range(len(n)-1):
    b = b + int(n[a+1])
if b % 9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
if n%9==0:
  print("Yes")
else:
  print("No")

Solution (Python):
n = int(input())

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

Solution (Python):
n=int(input())
if n%9==0:
    print("Yes")
else:
    print("No")

Solution (Python):
a = int(input())
if a % 9 == 0:
  print('Yes')
else:
  print('No')

Solution (Python):
a=input()
values=[int(i) for i in a]
if sum(values)%9==0:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
if N % 9 == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
user_input=input()
i=len(user_input)-1
number=0
while i>=0:
        number+=int(user_input[i])
        i=i-1
if number%9==0:
    print("Yes")
else :
    print("No")

Solution (Python):
str = input()
sum = 0
for ch in str:
    sum += ord(ch) - ord('0')
if sum % 9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
if n % 9 == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
a = 0
for i in input():
  a += int(i)
print("Yes" if a%9==0 else "No")

Solution (Python):
q=(input())
A=(list(q))
S=map((lambda x: int(x)),A)
W=sum(S)
if W%9==0:
    print('Yes')
else:
    print('No')

Solution (Python):
N = input()
ans = 0
for i in N:
    ans += int(i)
if ans % 9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
a = int(input())
if a % 9 == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
n = input()
a = 0
for i in range(len(n)):
    a += int(n[i])

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

Solution (Python):
n = int(input())
  
if(n%9==0):
    print("Yes")
else:
    print("No")

Solution (Python):
n = input()

mod = 0
for i in range(len(n)):
    mod += int(n[i])
    mod %= 9

print("Yes") if mod == 0 else print("No")

Solution (Python):
num = input()
sum = 0
for i in range(len(num)):
  sum += int(num[i])
if sum % 9 == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
D = input()
dlist = [int(x) for x in D]
ans = 0

for i in range (0, len(dlist)):
    ans += dlist[i]

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

Solution (Python):
N = input()

sum_n = 0
for n in N:
    num = int(n)
    sum_n += num

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

Solution (Python):
N = input()
Sum = 0

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

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

Solution (Python):
def solve(n):
    res = 0
    for x in n:
        res += int(x)
    return "Yes" if res % 9 == 0 else "No"

n = input()
print(solve(n))

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

Solution (Python):
N = int(input())
result = sum(list(map(int, str(N))))
if(result%9==0):
    print("Yes")
else:
    print("No")

Solution (Python):
import numpy as np
data = np.array([int(x) for x in str(input())])

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

Solution (Python):
N = input()

answer = 0
for keta in N:
    answer = (answer + int(keta))%9
if not answer:
    print("Yes")
else:
    print("No")

Solution (Python):
N = input()

m = 0
for n in N:
    m += int(n)

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

Solution (Python):
s = input()
summation = sum([int(i) for i in s])
is_mul = summation%9
if is_mul == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
n = str(input())

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

Solution (Python):
n=int(input())
if n%9==0:
  print("Yes")
else:
  print("No")

Solution (Python):
s = 0
n = list(map(int, str(input())))
for i in range(len(n)):
	s+=n[i]
if(s%9==0):
	print("Yes")
else:
	print("No")

Solution (Python):
n=str(input())
a=list(n)
b=0
for i in a:
    b=b+int(i)

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

Solution (Python):
n = input()
sum_n = 0
for i in n:
    sum_n += int(i)
    
if sum_n % 9 == 0:
    print('Yes')
else:
    print('No')

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

Solution (Python):
N=input()
total=0
for i in N:
    total += int(i)
print('Yes' if total % 9 == 0 else 'No')

Solution (Python):
N = input()
sum_digit = 0
for i in range(len(N)):
    sum_digit += int(N[i])
if sum_digit % 9 == 0:
    print("Yes")
else:
    print("No")

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

Solution (Python):
N=int(input())
if N%9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
n = input()
sum_of_digits = 0
for d in n:
    sum_of_digits += int(d)
print('Yes' if sum_of_digits%9 == 0 else 'No')

Solution (Python):
N=int(input())
S=str(N)
A=len(S)
M=0
for i in range(A):
  M=M+int(S[i])
if M%9==0:  
  print("Yes")
else:
  print("No")

Solution (Python):
N=int(input())
if N%9==0:
  print("Yes")
else:
  print("No")

Solution (Python):
s = input()
li = list(s)

if sum([int(n) for n in li]) % 9 == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
N = map(int, input())

num = list(N)
su = 0


for i in num:
    su += i

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

Solution (Python):
l=list(map(int,input().split()))
if sum(l)%9==0:
  print('Yes')
else:
  print('No')

Solution (Python):
n = int(input())

tmp = 0




if n % 9 == 0:



    print("Yes")
else:
    print("No")

Solution (Python):
n = input()

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

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

Solution (Python):
def inp():
    return input()
def iinp():
    return int(input())
def inps():
    return input().split()
def miinps():
    return map(int,input().split())
def linps():
    return list(input().split())
def lmiinps():
    return list(map(int,input().split()))
def lmiinpsf(n):
    return [list(map(int,input().split()))for _ in range(n)]

n = inp()
m = int(n)

ans = 0

for i in range(len(n)):
    ans += int(n[i])

ans %= 9

if ans == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
 
if n%9 == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
N = input()

result = 0
for c in N:
    result += int(c)
    result = (result % 9) if result > 9 else result

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

Solution (Python):
n = input()
order_sum = 0

for i in range(len(n)):
    order_sum += int(n[i])

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

Solution (Python):
N = int(input())

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

Solution (Python):
N = int(input())
result = 'Yes' if N % 9 == 0 else 'No'
print(result)

Solution (Python):
def main():
    A = list(input())
    s = 0
    for a in A:
        s += int(a)
    if s % 9 == 0:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Solution (Python):
s = input()
ans = 0
for i in s:
    ans += int(i)
    ans %= 9
print('Yes' if ans == 0 else 'No')

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

Solution (Python):
N = input()

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

Solution (Python):
N = input()
USA = 0
n = 0
h = 0
k = 0
for i in range(0,len(N)):
    n += int(N[i])
if n % 9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
n = list(input())

ans = 0
for i in n:
    ans += int(i)
    ans = ans%9

print('Yes' if ans == 0 else 'No')

Solution (Python):
print('Yes' if sum(map(int, input()))%9 == 0 else 'No')

Solution (Python):
N=int(input())
if N%9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
num = input()
total = 0
for char in num:
    total = (total + int(char)) % 9
if total == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
digits = [int(i) for i in list(input())]
Sum = 0
for i in digits:
  Sum += i
if Sum%9 == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
n = input()
n = list(n)

n = map(int,n)

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

Solution (Python):
N = input()
list = []
for i in range(len(N)):
  list.append(int(N[i]))
  
if sum(list) % 9 ==0:
  print('Yes')
else:
  print('No')

Solution (Python):
N = int(input())
print("Yes" if N%9==0 else "No")

Solution (Python):
N = input()
print("Yes" if sum(map(int,N))%9==0 else "No")

Solution (Python):

N = int(input())

if(N % 9 == 0):
	ans = True
else:
	ans = False



print("Yes" if ans else "No")

Solution (Python):
n = input()
a = 0

for i in n:
    a += int(i)

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

Solution (Python):
a = int(input())
if a % 9 == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
n = list(map(str,input()))
ans = sum(list(map(int,list(n))))
if ans % 9 == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
strn = list(input())
intn = []
for i in strn:
    intn.append(int(i))

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

Solution (Python):
n=input()
ans=0
if n=="0":
    print("Yes")
else:
    for i in n:
        ans+=int(i)
    if ans%9==0:
        print("Yes")
    else:
        print("No")

Solution (Python):
n = list(map(int, list(input())))

n_sum = sum(n)

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

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

Solution (Python):
a = input('')
N = []
num = 0
for i in a:
    N.append(i)
for j in range(0,len(N)):
    num += int(N[j])
if num%9 == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
def main():
    N = input()
    acc = 0
    for idx in range(len(N)):
        acc += (ord(N[idx]) - ord('0'))

    print('Yes') if not acc % 9 else print('No')


if __name__ == '__main__':
    main()

Solution (Python):
s=list(map(int,list(input())))
if sum(s)%9==0:
    print('Yes')
else:
    print('No')

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

Solution (Python):
sum = 0
for s in input():
  sum += int(s)
print('Yes' if sum%9==0 else 'No')

Solution (Python):
n = str(input())
tmp  = 0
for i in n:
    tmp += int(i)
if tmp % 9 == 0:
    print("Yes")
else:
    print("No")

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

Solution (Python):
N = input()
tmp = 0
for s in N:
    tmp += int(s)
if tmp%9 == 0:
    print("Yes")
else:
    print("No")

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

Solution (Python):
def main():
    if sum(list(map(int, list(input())))) % 9:
        print("No")
    else:
        print("Yes")


main()

Solution (Python):
n = input()
sum = 0

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

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

else:
    print("No")

Solution (Python):
n = int(input())
l = list(map(int, list(str(n))))



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

Solution (Python):
N = input()
temp = 0
for i in N:
    temp += int(i)


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

Solution (Python):
N = int(input())
if N%9==0:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
str_n = str(n)
sum = 0
for i in range(len(str(n))):
    sum += int(str_n[i])

if not sum % 9:
    print('Yes')
else:
    print('No')

Solution (Python):
N=input()
LN=len(N)
cnt=0
for i in range(LN):
  cnt+=int(N[i])
if cnt%9==0:
  print('Yes')
else:
  print('No')

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

Solution (Python):

N = list(map(int,list(input())))

sN = sum(N)

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

Solution (Python):
N=int(input())
if N%9==0:print("Yes")
else:print("No")

Solution (Python):
N=int(input())
if N%9==0:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())

N_letter = str(N)
M = (len(N_letter))
S = 0
for i in range(M):
	S = S + int(N_letter[i])

if (S/9) ==  int(S/9):
	print("Yes")
else:
	print("No")

Solution (Python):
N = int(input())
N_str=str(N)
K=(len(str(N)))
S=0
for i in range(K):
  S += int(N_str[i])

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

Solution (Python):
def main():
    n = input()
    res = 0
    for ni in n:
        res = (res + int(ni)) % 9

    print(('Yes', 'No')[res != 0])


if __name__ == '__main__':
    main()

Solution (Python):
def main(n: int):
    if n % 9 == 0:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main(int(input()))

Solution (Python):
print(('Yes','No')[sum(map(int,input()))%9>0])

Solution (Python):


n = input()
print('Yes' if sum(int(d) for d in n) % 9 == 0 else 'No')

Solution (Python):
print("Yes" if int(input()) % 9 == 0 else "No")

Solution (Python):
n = input()
a = 0
for i in n:
  a += int(i)
print("Yes" if a % 9 == 0 else "No")