output_description: If N is a multiple of 9, print `Yes`; otherwise, print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: import sys
  from io import StringIO
  import unittest
  import os
  
  # 再帰処理上限(dfs作成時に設定するのが面倒なので限度近い値を組み込む)
  sys.setrecursionlimit(999999999)
  
  
  # 実装を行う関数
  def resolve(test_def_name=""):
      n_s = list(input())
  
      ans = 0
      for n in n_s:
          ans += int(n)
  
      if ans % 9 == 0:
          print("Yes")
      else:
          print("No")
  
  
  # テストクラス
  class TestClass(unittest.TestCase):
      def assertIO(self, assert_input, output):
          stdout, sat_in = sys.stdout, sys.stdin
          sys.stdout, sys.stdin = StringIO(), StringIO(assert_input)
          resolve(sys._getframe().f_back.f_code.co_name)
          sys.stdout.seek(0)
          out = sys.stdout.read()[:-1]
          sys.stdout, sys.stdin = stdout, sat_in
          self.assertEqual(out, output)
  
      def test_input_1(self):
          test_input = """123456789"""
          output = """Yes"""
          self.assertIO(test_input, output)
  
      def test_input_2(self):
          test_input = """0"""
          output = """Yes"""
          self.assertIO(test_input, output)
  
      def test_input_3(self):
          test_input = """31415926535897932384626433832795028841971693993751058209749445923078164062862089986280"""
          output = """No"""
          self.assertIO(test_input, output)
  
      # 自作テストパターン
      def test_original(self):
          pass
  
  
  # 実装orテストの呼び出し
  if __name__ == "__main__":
      if os.environ.get("USERNAME") is None:
          # AtCoder提出時の場合
          resolve()
  
      else:
          # 自PCの場合
          unittest.main()
  
problem_description: 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.
samples: [{"input": "123456789", "output": "Yes\n    \n\nThe sum of these digits is 1+2+3+4+5+6+7+8+9=45, which is a multiple of 9, so\n123456789 is a multiple of 9.\n\n* * *"}, {"input": "0", "output": "Yes\n    \n\n* * *"}, {"input": "31415926535897932384626433832795028841971693993751058209749445923078164062862089986280", "output": "No"}]