Let S(n) denote the sum of the digits in the decimal notation of n.
For example, S(101) = 1 + 0 + 1 = 2.
Given an integer N, determine if S(N) divides N.

-----Constraints-----
 - 1 \leq N \leq 10^9

-----Input-----
Input is given from Standard Input in the following format:
N

-----Output-----
If S(N) divides N, print Yes; if it does not, print No.

-----Sample Input-----
12

-----Sample Output-----
Yes

In this input, N=12.
As S(12) = 1 + 2 = 3, S(N) divides N.

Difficulty: EASY

Solutions:
def S(n):
	c = 0
	for i in range(len(n)):
		c += int(n[i])
	return c
N = input()
if int(N) % S(N) == 0:
	print('Yes')
else:
	print('No')


n = input()
print('No') if int(n) % sum(map(int, list(n))) else print('Yes')


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


n = input()
res = 0
for i in n:
	res += int(i)
if int(n) % res == 0:
	print('Yes')
else:
	print('No')


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


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


N = int(input())
S_N = sum(list(map(int, list(str(N)))))
ans = N % S_N
print('Yes') if ans == 0 else print('No')


n = int(input())
k = 0
tmp = n
while tmp > 0:
	k += tmp % 10
	tmp //= 10
if n % k == 0:
	print('Yes')
else:
	print('No')


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


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


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


n = input()
sn = 0
for i in n:
	tmp = int(i)
	s = tmp % 10
	sn += s
n = int(n)
if n % sn == 0:
	ans = 'Yes'
else:
	ans = 'No'
print(ans)


import sys
N = input()
sum = 0
for i in N:
	sum += int(i)
print('Yes' if int(N) % sum == 0 else 'No')


n = int(input())

def sum_digit(x):
	if x < 10:
		return x
	else:
		return x % 10 + sum_digit(x // 10)
print('No' if n % sum_digit(n) else 'Yes')


a = input()
b = 0
for i in a:
	b += int(i)
if int(a) % b == 0:
	print('Yes')
else:
	print('No')


n = int(input())
sum_digits = 0
for c in str(n):
	sum_digits += int(c)
print('Yes' if n % sum_digits == 0 else 'No')


n = input()
ans = 0
for i in n:
	ans += int(i)
check = str(int(n) / ans)
if check[-1] == '0':
	print('Yes')
else:
	print('No')


Nlist = list(map(str, input()))
a = 0
for i in range(len(Nlist)):
	a += int(Nlist[i])
N = int(''.join(Nlist))
if N % a == 0:
	print('Yes')
else:
	print('No')


def main():
	n = input()
	s = 0
	for i in n:
		s += int(i)
	if int(n) % s == 0:
		print('Yes')
	else:
		print('No')

def __starting_point():
	main()
__starting_point()


N = int(input())

def S(n: int) -> int:
	return sum(map(int, str(n)))
ans = str()
if N % S(N) == 0:
	ans = 'Yes'
else:
	ans = 'No'
print(ans)


n_1 = int(input())
sn = 0
n = n_1
while n > 0:
	sn += n % 10
	n //= 10
if n_1 % sn == 0:
	print('Yes')
else:
	print('No')


N = input()
num = int(N)
Nls = list(N)
sum1 = sum([int(i) for i in Nls])
if num % sum1 == 0:
	print('Yes')
else:
	print('No')


n = input()
l = [int(i) for i in n]
if int(n) % sum(l) == 0:
	print('Yes')
else:
	print('No')


n = int(input())
ns = '{:010d}'.format(n)
ns = str(ns)
sum = 0
for i in range(10):
	sum += int(ns[i])
if n % sum == 0:
	print('Yes')
else:
	print('No')


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


s = input()
N = int(s)
Sn = sum([int(i) for i in list(s)])
if N % Sn == 0:
	print('Yes')
else:
	print('No')


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


N = int(input())
M = N
sum = 0
while True:
	if N == 0:
		break
	sum += N % 10
	N = N // 10
print('Yes' if M % sum == 0 else 'No')


N = int(input())

def S(n):
	s = str(n)
	v = 0
	for i in range(len(s)):
		v += int(s[i])
	return v
print('Yes' if N % S(N) == 0 else 'No')


s = input()
n = int(s)
m = list(s)
l = [int(i) for i in m]
su = sum(l)
if n % su == 0:
	print('Yes')
else:
	print('No')


n = int(input())
x = n
sum = 0
while x:
	sum += x % 10
	x //= 10
if n % sum == 0:
	print('Yes')
else:
	print('No')


N = input()
S = sum(map(int, list(N)))
print('Yes' if int(N) % S == 0 else 'No')


nlist = list(map(int, input()))
rev_n = list(reversed(nlist))
sn = sum(nlist)
n = 0
for i in range(len(nlist)):
	n += rev_n[i] * 10 ** i
if n % sn == 0:
	print('Yes')
else:
	print('No')


n = int(input())
ans = n
s = 0
for i in range(10):
	s += n % 10
	n = n // 10
if ans % s == 0:
	print('Yes')
else:
	print('No')


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


n = int(input())
s = str(n)
ds = 0
for c in s:
	ds += int(c)
if n % ds == 0:
	print('Yes')
else:
	print('No')


n = int(input())

def digitSum(n):
	s = str(n)
	array = list(map(int, s))
	return sum(array)
if n % digitSum(n) == 0:
	print('Yes')
else:
	print('No')


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


def su(n):
	return sum(list(map(int, list(str(n)))))
N = int(input())
if N % su(N) == 0:
	print('Yes')
else:
	print('No')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
from collections import deque
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def main():
	N = S()
	ans = 0
	for c in N:
		ans += int(c)
	if int(N) % ans == 0:
		print('Yes')
	else:
		print('No')
main()


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


def get_input() -> int:
	N = int(input())
	return N

def S(n: int) -> int:
	return sum(map(int, str(n)))

def main(N: int) -> None:
	ans = str()
	if N % S(N) == 0:
		ans = 'Yes'
	else:
		ans = 'No'
	print(ans)

def __starting_point():
	N = get_input()
	main(N)
__starting_point()


li = list(map(int, input()))
N = 0
for i in range(len(li)):
	N = N + li[len(li) - 1 - i] * 10 ** i
S = sum(li)
if N % S == 0:
	print('Yes')
else:
	print('No')


a = input()
sum = 0
for i in a:
	sum = sum + ord(i) - 48
a = int(a)
if a % sum == 0:
	print('Yes')
else:
	print('No')


def sum_digit(n):
	temp = 0
	while n > 0:
		temp += n % 10
		n //= 10
	return temp
n = int(input())
print('Yes' if n % sum_digit(n) == 0 else 'No')


import sys

def input():
	return sys.stdin.readline().rstrip()

def main():
	S = input()
	ans = 'Yes' if int(S) % sum(map(int, list(S))) == 0 else 'No'
	print(ans)

def __starting_point():
	main()
__starting_point()


n = int(input())

def check(p):
	c = 0
	while p > 0:
		c += p % 10
		p //= 10
	return c
if n % check(n) == 0:
	print('Yes')
else:
	print('No')


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


n = int(input())
nl = list(str(n))
l = len(nl)
sn = 0
for i in range(l):
	sn += int(nl[i])
if n % sn == 0:
	print('Yes')
else:
	print('No')


def answer(n: int) -> str:
	temp = n
	sum_of_digits = 0
	while 0 < temp:
		(temp, mod) = divmod(temp, 10)
		sum_of_digits += mod
	return 'Yes' if n % sum_of_digits == 0 else 'No'

def main():
	n = int(input())
	print(answer(n))

def __starting_point():
	main()
__starting_point()


def s(n):
	res = 0
	while n > 0:
		res += n % 10
		n //= 10
	return res
n = int(input())
if n % s(n) == 0:
	print('Yes')
else:
	print('No')


import sys
input = sys.stdin.readline
n = int(input())
s = 0
for i in range(len(str(n))):
	s += int(str(n)[i])
if n % s == 0:
	print('Yes')
else:
	print('No')


n = int(input())
a = list(str(n))
b = 0
for i in a:
	b += int(i)
if n % b == 0:
	print('Yes')
else:
	print('No')


N = input()
N_NUMBER = int(N)
N_SUM = sum([int(i) for i in N])
if N_NUMBER % N_SUM == 0:
	print('Yes')
else:
	print('No')


n = int(input())
s = 0
for i in list(str(n)):
	s += int(i)
print('Yes') if n % s == 0 else print('No')


a = int(input())
b = sum(list(map(int, list(str(a)))))
ans = a % b
print('Yes' if ans == 0 else 'No')


import sys
lines = [s.rstrip('\n') for s in sys.stdin.readlines()]
(n,) = [int(num) for num in lines.pop(0).split(' ')]
s = sum((int(c) for c in str(n)))
if n % s == 0:
	print('Yes')
else:
	print('No')


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


num = input()
num1 = num
j = 0
while int(num) > 0:
	j += int(num) % 10
	num = int(num) / 10
if int(num1) % j == 0:
	print('Yes')
else:
	print('No')


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


n = input()
l = len(n)
cnt = 0
for i in range(l):
	cnt += int(n[i])
n = int(n)
if n % cnt == 0:
	print('Yes')
else:
	print('No')