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):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n = list(map(int, input()))
    res = 0
    for i in n:
        res += i
        res %= 9
    if res == 0:
        print("Yes")
    else:
        print("No")
    return


if __name__ == "__main__":
    solve()

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heappush, heappop
from functools import reduce, lru_cache
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def TUPLE(): return tuple(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7 

from decimal import *



N = input()

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

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

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

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

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

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

Solution (Python):
n = input()
ans = 0
for i in n:
    ans += int(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):
ans=0
for s in input():
    ans=(ans+int(s))%9
print("Yes")if ans==0 else print("No")

Solution (Python):
from sys import stdin, setrecursionlimit
from collections import Counter, deque, defaultdict
from math import floor, ceil
from bisect import bisect_left
from itertools import combinations
setrecursionlimit(100000)

INF = int(1e10)
MOD = int(1e9 + 7)

def main():
    from builtins import int, map
    S = input()
    count = 0
    for c in S:
        count += int(c)
    if count % 9 == 0:
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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

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

Solution (Python):
import sys

sys.setrecursionlimit(500005)
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ns()
s = 0
for c in n:
    s += ord(c)-ord("0")
if s % 9 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):


s = input()
ans = 0
for i in range(len(s)):
    ans = (ans + int(s[i])) % 9

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

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

Solution (Python):

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

Solution (Python):
'''
自宅用PCでの解答
'''
import math

import itertools
import queue
import bisect
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit


ipt = stdin.readline
setrecursionlimit(10**7)
mod = 10**9+7
dir = [(-1,0),(0,-1),(1,0),(0,1)]
alp = "abcdefghijklmnopqrstuvwxyz"

def main():
    n = input()
    sm = 0
    for i in n:
        sm += int(i)
        sm %= 9

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

    return None

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
print('Yes' if 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):
N = input()
ad = 0
for n in N:
    ad += int(n)

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

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

n=input()
tmp=0
for x in n:
    tmp+=int(x)
YesNo(tmp%9==0)

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

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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    N = input().rstrip('\n')
    S = 0
    for n in N:
        S = (S + int(n))%9
    if S:
        print("No")
    else:
        print("Yes")


if __name__ == '__main__':
    main()

Solution (Python):
f = sum(int(i) for i in input())
print("Yes" if f%9 == 0 else "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')