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: Runtime Error

Solution code:
N=int(input())
S=0
while N>=1:
    S+=N%10
    N=int(N/10)

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

Submission status: Runtime Error

Solution code:
N=int(input())
S=0
while 1:
    S+=N-10*(int(N/10))
    N=int(N/10)
    if N<1:break

N=S
S=0
while 1:
    S+=N-10*(int(N/10))
    N=int(N/10)
    if N<1:break
N=S
S=0
while 1:
    S+=N-10*(int(N/10))
    N=int(N/10)
    if N<1:break
if S%9==0:print("Yes")
else:print("No")

Submission status: Runtime Error

Solution code:
N=int(input())
S=0
while 1:
    S+=N-10*(int(N/10))
    N=int(N/10)
    if N<1:break

N=S
S=0
while 1:
    S+=N-10*(int(N/10))
    N=int(N/10)
    if N<1:break

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

Submission status: Runtime Error

Solution code:
N=int(input())
S=0
while 1:
    S+=N-10*(int(N/10))
    N=int(N/10)
    if N<1:break
if S%9==0:print("Yes")
else:print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
N_letter = str(N)

SUM_N = sum(N_letter)
if (SUM_N/9) ==  int(SUM_N/9):
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
N_letter = str(N)

SUM_N = sum(N_letter)
if int(SUM_N/9) =  isinstance(i, int):
	print("Yes")
elseif:
	print("No")

Submission status: Runtime Error

Solution code:

n = input()
x = 0

for i in range (len(n)):
    i += 1
    if i >= len(n): break
    x = x + n // (i ** 10)
if x % 9 == 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N = input()
len_N = len(N)
N = int(N)
count = 0

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

Submission status: Runtime Error

Solution code:
n = int(input())
A = list(map(int, input().split()))

a=0
result=0

for i in range(n-1):
  if A[i] > A[i+1]:
    a = A[i] - A[i+1]
    result += a
    
print(result)

Submission status: Runtime Error

Solution code:
n = int(input())

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

Submission status: Runtime Error

Solution code:
#N = int(input()).split()
n = 12141.split()
print(n[0])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
/*
ID: sstfmsc1
TASK: milk2
LANG: C++
*/
#include <bits/stdc++.h>
 
using namespace std;
#define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define forin(i, n) for ( int i = 0; i < (int)n; ++i )
#define MAXN 50000
#define INF 1000000
typedef long long ll;
const char nl = '\n';
ll MOD = (ll)(1e9 + 7);
 
void solve()
{
    string num; 
    cin >> num;

    int suma = 0;
    for(auto x : num) suma += (int)( x - '0' );

    cout << ( ( suma % 9 == 0 ) ? "Yes" : "No" ) << nl;
    return;
}
 
int main()
{
    //freopen("milk2.in", "r", stdin);
    //freopen("milk2.out", "w", stdout);
    //IOS
    //int q; cin >> q;
    //while(q--) 
    solve();
        
    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

strN = input()
s = 0
for c in strN:
  s += int(c)

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

Submission status: Runtime Error

Solution code:
map(input, N)
sum = lambda i :sum+i for i in str(N)
if sum/9 print "Yes" else "No"

Submission status: Runtime Error

Solution code:
N = str(input())

a = []
for n in range(N):
  a.append(int(N[n]))
  
if sum(a) % 9 == 0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = inoput()
le = len(x)
sum = 0
for i in range(le):
  sum+=int(x[i])
print(sum)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = int(input())
q = []
for i in s:
  q.append(i)
if sum(q)%9 == 0:
  print('Yes')
else:print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=[int(i) for i in input().split()]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()
l = list(n)

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

Submission status: Runtime Error

Solution code:
def is_sum_nine(str_N):
    sum = 0
    for i in range(len(str_N)):
        sum += int(str_N[i])
    if len(str(sum)) < 5:
        if sum % 9 == 0:
            return True
        else:
            return False
    else:
        is_sum_nine(str(sum))


def resolve():
    N = str(abs(int(input())))
    if is_sum_nine(N):
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()
cur = 0

for x in n:
  cur += int(x)
  if cur % 9 == 0:
    print("Yes")
    else:
      print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
i = input()
s = str(i)
l = len(s)

while num < l+1
ptint("num=" + int(s[-num]))

Submission status: Runtime Error

Solution code:
target = input()
sum = 0
for each in all:
  sum += int(each)
if sum % 9 == 0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
nstr=input()
keta=len(nstr)
wa=0
for i in range(keta):
    wa+=nstr[i]

ans="No"
if wa%9==0:
    ans="Yes"

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
[int(s) for s in l_si]

Submission status: Runtime Error

Solution code:
num = int(input())
if (number%9)==0:
    print("yeah")
else: 
    print('no')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = list(input())

if len(N) < 2:
    if int(N) == 9:
        print('Yes')
    else:
        print('No')
elif len(N) >= 2:
    l = [int(n) for n in N]
    a = sum(l)
    if a % 9 == 0:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
N = int(input())
k = 0
x = 0
while N >= 1: 
  N = N/10
  k += 1
for i in range(k):
  N = N*10
  a = N%10
  x = x + a
  N = N - a
if x%9 == 0:
  print("yes")
else:
  print("no")

Submission status: Runtime Error

Solution code:
N = int(input())
k = 0
x = 0
while N > 1: 
  N = N/10
  k += 1
print(k)
for i in range(k):
  N = N*10
  a = N//10
  x = x + a
  N = N - a
if x//9 == 0:
  print("yes")
else:
  print("no")

Submission status: Runtime Error

Solution code:
N = int(input())
k = 0
x = 0
for N > 0:
  N = N/10
  k += 1
for i in range(k):
  N = N*10
  a = N//10
  x = x + a
  N = N - a
if x//9 == 0:
  pritn("yes")
else:
  print("no")

Submission status: Runtime Error

Solution code:
num = input()

intNum = 0

loop = len(num)
for i in range(loop):
  intNum += int(num)[i]

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

Submission status: Runtime Error

Solution code:
num = int(input())

intNum = 0

loop = len(num)
for i in loop:
  intNum += int(num)[i]
  
if inNum % 9 == 0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
// https://www.irohabook.com/exp-2
// 1e9（10桁） は 2^26乗～2^27乗 であり、int(正負の2^16乗まで)では不可

using namespace std;

char N[200010]; // 文字列
int main()
{
	cin >> N;

	int len = strlen(N);
	long long int sum = 0;

	for (int i = 0; i < len; i++) {
		sum += N[i];
	}

	cout << ((sum%9==0)?"Yes":"No") << endl;
}

Submission status: Runtime Error

Solution code:
N = str(input())

s = list(map(int,N))

S = sum(s)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input());
cek = 0

while(n):
	cek += n%10;
	n /= 10
	
if(cek%9 == 0): print("YES")
else: print("NO")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
// Begin Header {{{
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i,n) for(ll i=0; i<n; i++)
#define loop(i, j, n) for(ll i=j; i<n; i++)
#define all(x) (x).begin(), (x).end()
constexpr int INF  = 0x3f3f3f3f;
const long long mod=1e9+7;
const long double PI = acos(-1);
// }}} End Header
int main() {
	ll sum=0;
	string n;
	cin >> n;
	rep(i, n.length()){
		sum+=n[i]-'0';
	}
	if(sum%9 == 0) puts("Yes");
	else puts("No");
	return 0;
}

Submission status: Runtime Error

Solution code:
N = list(int(input()).split())
c = 0

for n in N:
  c += n

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
N = input()

sum = 0
if int(N) != 0:
    data_size = int(math.log10(int(N)) + 1)
    for data_size in range(data_size):
        sum += int(N[data_size])

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

Submission status: Runtime Error

Solution code:
import math
N = input()

sum = 0
data_size = int(math.log10(int(N)) + 1)
for data_size in range(data_size):
    sum += int(N[data_size])

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=list(input())
if sum(n)%9==0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
line = input()
sum = 0
for i in range(len(line)):
  sum = sum + int(line[0])
 print(sum)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from  math import log10
n = int(input())
dig = int(log10(n)+1)
cnt = 0
for _ in range(dig):
  cnt += n%10 
  n //= 10
print('Yes' if cnt%9 == 0 else 'No')

Submission status: Runtime Error

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

s = 0
for n in range(N):
  s += n

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = str(input())
wa = 0

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

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

Submission status: Runtime Error

Solution code:
n = str(input())
wa = 0

for i in n:
	n[i] = int(n[i])
	wa += n[i]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
S = 0
for i in range(2*10**5)
  digit = N%10
  S += digit
  N = N//10
T = 0
while S > 0:
  digit = S%10
  T += digit
  S = S//10
if T%9 == 0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
import sys
import math
def Ii():return int(sys.stdin.readline())
def Mi():return map(int,sys.stdin.readline().split())
def Li():return list(map(int,sys.stdin.readline().split()))

s = sys.stdin.readline()
ans = 0
for i in s:
  ans += int(i)
  ans %= 9

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

Submission status: Runtime Error

Solution code:
import sys
import math
def Ii():return int(sys.stdin.readline())
def Mi():return map(int,sys.stdin.readline().split())
def Li():return list(map(int,sys.stdin.readline().split()))

s = sys.stdin.readline()
ans = 0
for i in s:
  ans += int(i)
  ans %= 9

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

Submission status: Runtime Error

Solution code:
n=int(input())

l=list(map(int,str(n)))

a=sum(l)

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

Submission status: Runtime Error

Solution code:
n = input()

sum(list(map(int, str(n))))
a = sum % 9

if a == 0:
  print("Yes")

else:
  print("No")

Submission status: Runtime Error

Solution code:
n = input()

sum(list(map(int, str(n))))
a = sum // 9

if a == 0:
  print("Yes")

else:
  print("No")

Submission status: Runtime Error

Solution code:
n = input()

sum(list(map(int, str(n))))

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

else:
  print("No")

Submission status: Runtime Error

Solution code:
n = int(input())

sum(list(map(int, str(n))))

if sum // 9 == 0:
  print(Yes)

else:
  print(No)

Submission status: Runtime Error

Solution code:
n = int(input())

sum(list(map(int, str(n))))

if sum // == 0:
  print(Yes)

else:
  print(No)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
    N = int(input())
    total = 0
    while N > 0:
        total += N % 10
        N = int(N / 10)
    if total % 9 == 0:
        print('Yes')
    else:
        print('No')
main()

Submission status: Runtime Error

Solution code:
import numpy as np

N=int(input())
Nstr=list(str(N))
sum=0
for i in np.arange(len(Nstr)):
    sum+=Nstr[i]
    
if (sum%9==0):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
import math

N = int(input())
sum = 0

while N > 0:
    sum = sum + N % 10
    N = math.floor(N / 10)

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

Submission status: Runtime Error

Solution code:
import math

N = int(input())
sum = 0

while N > 0:
    sum = sum + N % 10
    N = math.floor(N / 10)

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

Submission status: Runtime Error

Solution code:
N = input()
S = 0
for i in N:
  S+=int(i)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

def sum_of_digits(n):
    s = 0
    l = len(str(n))
    for i in range(l):
        s += n%10
        n = int(n/10)
    return s

def main():
    s = int(input())
    s = sum_of_digits(s)
    if s != 0 and s % 9==0:
        print('Yes')
    else:
        print('No')

if __name__=="__main__":
  main()

Submission status: Runtime Error

Solution code:
import math

def sum_of_digits(n):
    s = 0
    l = len(str(n))
    for i in range(l):
        s += n%10
        n = int(n/10)
    return s

def main():
    s = int(input())
    s = sum_of_digits(s)
    if s % 9==0:
        print('Yes')
    else:
        print('No')

if __name__=="__main__":
  main()

Submission status: Runtime Error

Solution code:

import sys
import math
cin = sys.stdin.readline
n, x, t = map(int, cin().split())

count = math.ceil(n / x)
print(count * t)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()
if n%==0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

char S[20010];
int main() {
  cin >> S;
  int len = strlen(S);
  int sum=0;
  for(int i=0; i<len; i++) {
    sum += S[i]-'0';
  }
  if(sum%9==0) cout << "Yes" << endl;
  else cout << "No" << endl;
}

Submission status: Runtime Error

Solution code:
n = input()

t = 0

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

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
n,t=input(),0

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

 print('No' if t%9 else 'Yes')

Submission status: Runtime Error

Solution code:
N=int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=list(input())
S=[int(t) for t in N]
T=sum(s)
if T%9==0:
  print("Yes")
else :
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=list(input())
S=[int(t) for t in N]
T=sum(s)
if T%9==0:
  pint('Yes')
else :
  print("No")

Submission status: Runtime Error

Solution code:
n = list(input())

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3

def main():
    N = int(input())
    def calcSumOfDigit(x,acc=0):
        if x == 0:
            return acc
        else:
            return calcSumOfDigit(x//10,acc+x%10)
    def judge(x):
        return x % 9 == 0
    print("Yes" if judge(calcSumOfDigit(N)) else "No")
    return


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
n = input()
rem = 0
for d in n:
  rem += int(d)
if d % 9 == 0:
  print ("Yes")
else:
  print ("No")

Submission status: Runtime Error

Solution code:
import sys; input = sys.stdin.readline
s = input()
ans = 0
for i in s: ans += int(i)
if ans%9: print("No")
else: print("Yes")

Submission status: Runtime Error

Solution code:
print("Yes" if int(input())%9==o else "No")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import sys; input = sys.stdin.readline
s = input()
ans = 0
for i in s: 
	ans += int(i)
	
if ans%9: 
	print("No")
else: 
	print("Yes")

Submission status: Runtime Error

Solution code:
import sys; input = sys.stdin.readline
s = input()
ans = 0
for i in s: ans += int(i)
if ans%9: 
	print("No")
else: 
	print("Yes")

Submission status: Runtime Error

Solution code:
def digit_sum(n):
    n_lst = list( str(n) )
    n_sum = 0
    for i in range( len(n_lst) ):
        n_sum += int( n_lst[i] )
    return n_sum
 
n1 = input()
if digit_sum(n1)%9==0 : print("Yes")
else: print("No"

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
if int(inout())%9==0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
N = int(input())

a = 0
while N > 0:
  a += N % 10
  N /= 10
  a %= 9

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

Submission status: Runtime Error

Solution code:
N = input()
N_list = []
for i in range(N):
  N_list.append(N[i])
if sum(N_list) %9 == 0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

from enum import Enum
from queue import Queue
import collections

import sys
import math

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

from enum import Enum
from queue import Queue
import collections

import sys
import math

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
int(input())
N = input()
if(N%9=0)
print(Yes)
if(N%9=!0)
print(No)

Submission status: Runtime Error

Solution code:
n = input()
cur = 0

for x in n:
  cur += int(x)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
    num = input()
    if num % 9 == 0:
        return 'Yes'
    else:
        return 'No'


if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
 
num_str = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
    n = input()
    

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


if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <sstream>
#include <set>
#include <map>
#include <vector>
#include <list>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <string>
#include <stack>
#include <queue>
#include <bitset>     //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic
#include <cassert>
#include <iomanip>        //do setprecision
#include <ctime>
#include <complex>
using namespace std;

#define FOR(i,b,e) for(int i=(b);i<(e);++i)
#define FORQ(i,b,e) for(int i=(b);i<=(e);++i)
#define FORD(i,b,e) for(int i=(b)-1;i>=(e);--i)
#define REP(x, n) for(int x = 0; x < (n); ++x)

#define ST first
#define ND second
#define PB push_back
#define PF push_front
#define MP make_pair
#define LL long long
#define ULL unsigned LL
#define LD long double
#define pii pair<int,int>
#define pll pair<LL,LL>
#define vi vector<int>
#define vl vector<LL>
#define vii vector<vi>
#define vll vector<vl>

const double pi = 3.14159265358979323846264;
const int mod=1000000007;

int main(){
	string s;
    cin>>s;
    int l=s.length();
    LL c=0;
    FOR(i,0,l){
        c+=s[i]-'0';
    }
    if(c%9==0){
        cout<<"Yes";
    }else{
        cout<<"No";
    }

}

Submission status: Runtime Error

Solution code:
def gen(n):
  if n < 10:
    yield n
  else:
    for m in gen(n/10):
      yield m
    yield n%10
c=input()
a = [int(c) for c in s]
if sum(a)//9==0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

def i(N):
    s = str(N)
    array = list(map(int, list(s)))


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

Submission status: Runtime Error

Solution code:
N=input()
a=[int(i) for i in N
b=sum(a)

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