Problem:
 Score : 200 points    Problem Statement 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 1 12      Sample Output 1 Yes  In this input, N=12 .
As S(12) = 1 + 2 = 3 , S(N) divides N .       Sample Input 2 101      Sample Output 2 No  As S(101) = 1 + 0 + 1 = 2 , S(N) does not divide N .       Sample Input 3 999999999      Sample Output 3 Yes

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

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

Solution (Python):
N = int(input())
X = N 
Y = 0
while X > 0:
    Y += X % 10
    X =  int((X - X % (10))/10)
if N % Y == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
X = N 
Y = 0
ex = 1
while X > 0:
    Y += X % 10
    X =  int((X - X % (10))/10)
if N % Y == 0:
    print('Yes')
else:
    print('No')

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

Solution (Python):


from sys import stdout
from bisect import bisect_left as binl
from copy import copy, deepcopy
from collections import defaultdict


mod = 1


def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return tuple(map(int, input_tuple))


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def modadd(x, y):
    global mod
    return (x + y) % mod


def modmlt(x, y):
    global mod
    return (x * y) % mod


def lcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x


def combination(x, y):
    assert(x >= y)

    if y > x // 2:
        y = x - y

    ret = 1

    for i in range(0, y):
        j = x - i
        i = i + 1

        ret = ret * j
        ret = ret // i

    return ret


def get_divisors(x):
    retlist = []
    for i in range(1, int(x**0.5) + 3):
        if x % i == 0:
            retlist.append(i)
            retlist.append(x // i)
    return retlist


def get_factors(x):
    retlist = []
    for i in range(2, int(x**0.5) + 3):
        while x % i == 0:
            retlist.append(i)
            x = x // i
    retlist.append(x)
    return retlist


def make_linklist(xylist):
    linklist = {}
    for a, b in xylist:
        linklist.setdefault(a, [])
        linklist.setdefault(b, [])
        linklist[a].append(b)
        linklist[b].append(a)
    return linklist


def calc_longest_distance(linklist, v=1):
    distance_list = {}
    distance_count = 0
    distance = 0
    vlist_previous = []
    vlist = [v]
    nodecount = len(linklist)

    while distance_count < nodecount:
        vlist_next = []
        for v in vlist:
            distance_list[v] = distance
            distance_count += 1
            vlist_next.extend(linklist[v])
        distance += 1
        vlist_to_del = vlist_previous
        vlist_previous = vlist
        vlist = list(set(vlist_next) - set(vlist_to_del))

    max_distance = -1
    max_v = None
    for v, distance in distance_list.items():
        if distance > max_distance:
            max_distance = distance
            max_v = v

    return (max_distance, max_v)


def calc_tree_diameter(linklist, v=1):
    _, u = calc_longest_distance(linklist, v)
    distance, _ = calc_longest_distance(linklist, u)
    return distance





def main():
    n = intin()

    nn = n
    s = 0
    while nn:
        s += nn % 10
        nn = nn // 10

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


if __name__ == '__main__':
    main()

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

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

N_str = str(N)
Sn = 0

for c in N_str:

    Sn += int(c)

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

Solution (Python):
from sys import stdin
N = stdin.readline().rstrip()
S = 0
for k in N:
    S += int(k)
if int(N) % S == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
tmp = str(n)
N = list(tmp)


S = sum(int(i) for i in N)


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

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

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

Solution (Python):
N = int(input())
N_10 = N
S_N = 0
for i in range(10):
  rem = N_10%10
  S_N += rem
  N_10 //= 10
  if N_10 == 0:
    break
if S_N == 0:
    answer = "No"
else:
    if N%S_N == 0:
        answer = "Yes"
    else:
        answer = "No"
print(answer)

Solution (Python):
if __name__ == '__main__':
    s = input()
    n = int(s)
    S = 0
    for x in list(s):
        S += int(x)
    if n % S == 0:
        print("Yes")
    else:
        print("No")

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

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

Solution (Python):

n = input()
sn = 0
for ni in n:
    sn += int(ni)
if int(n) % sn == 0:
    print("Yes")
else:
    print("No")

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

for i in N:
  digitsum_N += int(i)
  
print("Yes" if int(N) % digitsum_N == 0 else "No")

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

Solution (Python):
def S(s: str) -> int:
    sum = 0
    for i in range(len(s)):
        sum += int(s[i])
    return sum


N = input()

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

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

Solution (Python):
x = input()
n = int(x)
s = sum(int(a) for a in x)

print('No' if n % s else 'Yes')

Solution (Python):
N_raw = input()
N = int(N_raw)
N_list = map(int, list(N_raw))

SN = sum(N_list)

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

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

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

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

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

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

Solution (Python):
import math

def main():
    num_str = input()
    num_list = list(map(int, list(num_str)))
    num = int(num_str)

    count = 0
    for ele in num_list:
        count += ele
    if num % count == 0:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

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

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

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

if __name__=='__main__':
    main()

Solution (Python):


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

Solution (Python):
n=list(input())
sn=0
for i in n:
    sn+=int(i)
print('Yes' if int(''.join(n))%sn==0 else 'No')

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

Solution (Python):

n = int(input())

def s(n):
    sum = 0
    str_n = str(n)
    for i in str_n:
        sum += int(i)
    return sum
    


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

Solution (Python):
N = input()

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

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

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

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

Solution (Python):
def main():
  N = int(input())
  x = sum([int(b) for b in str(N)])
  if N % x == 0:
    print('Yes')
  else:
    print('No')


if __name__ == "__main__":
  main()

Solution (Python):
n=int(input())
s=n
temp=0
while s:
  temp=temp+s%10
  s=s//10
if n%temp==0:
  print("Yes")
else:
  print("No")

Solution (Python):
def s(a):
    b=str(a)
    c=0
    for i in range(len(b)):
        c+=int(b[i])
    return(c)


n=input()
if int(n)%s(n)==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 int(N) % S == 0 else 'No')

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

Solution (Python):
def abc101_b():
    n = int(input())
    sn = sum(int(s) for s in str(n))
    return n % sn == 0 and 'Yes' or 'No'

print(abc101_b())

Solution (Python):
N = input()

s = 0

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

print('Yes' if int(N)%s==0 else 'No')

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

Solution (Python):
N = list(input())
N_int = int("".join(N))

NS = 0
for i in N:
    NS += int(i)

if N_int % NS == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
N=input()
S=list(N)
S=[int(i) for i in S]

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

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

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

Solution (Python):
a=input()
b=0
for i in range(len(a)):
    b+=int(a[i])
print(["No","Yes"][int(a)%b==0])

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

Solution (Python):

N=int(input())
S=str(N)
Slist=list(S)
Sn=0
for s in Slist:
    Sn+=int(s)
if N % Sn == 0:
    print("Yes")
else:
    print("No")

Solution (Python):

import numpy as np
import math
import re

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

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

Solution (Python):
N = int(input())
T = sum([int(x) for x in str(N)])

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

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

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

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

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

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

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

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

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

Solution (Python):
N=int(input())
n=N
S=0
while(n):
    S+=n%10
    n//=10
if N%S==0:
    print("Yes")
else:
    print("No")

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

def sum_digit(n):
    n = str(n)
    s = 0
    for i in n:
        s += int(i)
    return s

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

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

Solution (Python):
N = list(input())
n = int(''.join(N))
sn = 0
for i in N :
    sn += int(i)
if n % sn == 0 :
    print('Yes')
else :
    print('No')

Solution (Python):

import sys
try:
    from math import gcd
except Exception:
    from fractions import gcd

YES = "Yes"  
NO = "No"  

def solve(N: int):
    return NO if bool(N % (sum([int(v) for v in str(N)]))) else YES


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    result = solve(N)
    print(result)

if __name__ == '__main__':
    main()

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

Solution (Python):
def digit_sum(x):
  res = 0
  while x > 0:
    res += x % 10
    x //= 10
  return res

N = int(input())
if N % digit_sum(N) == 0:
  print("Yes")
else:
  print("No")

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

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

N = input()
n = list(N)
del(n[-1])
n = [int(x) for x in n]
sn = sum(n)

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

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

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

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

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

Solution (Python):

n = int(input())
sn = sum(list(map(int, list(str(n)))))
print("Yes" if n % sn == 0 else "No")

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

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

def S(n):
    a = 0
    for i in range(len(n)):
        a += int(n[i])
    return a

flag = True
if  int(N)% S(N) != 0:
    flag = False
if flag:
    print("Yes")
else:
    print("No")

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

Solution (Python):
N = input()
Nsum = sum(map(int, N))
print(["Yes", "No"][not(0 == int(N) % Nsum)])

Solution (Python):
N = int(input())
S = str(N)
L = len(S)

s = 0
for i in range(L):
  s += int(S[i])

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

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


digit_cnt = len(str(N))

Sn = 0

for d in range(digit_cnt, 0, -1):
  Sn += n // (10**(d-1)) 
  n -= (n // (10**(d-1))) * (10**(d-1)) 

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

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

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

Solution (Python):
s = input()

count = 0

for x in s:
  count += int(x)
    
if int(s) % count == 0:
  print('Yes')
else:
  print('No')

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

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

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

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

Solution (Python):
def main():
	N = input()
	n = int(N)
	sn = 0
	for ni in N:
		sn += int(ni)
	if n % sn == 0:
		print("Yes")
	else:
		print("No")

if __name__ == '__main__':
	main()

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

print("Yes" if n % sum(map(int, str(n))) == 0 else "No")

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

Solution (Python):
N = int(input())
ln = list(str(N))
sumln = 0
for val in ln:
    sumln += int(val)

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

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

Solution (Python):


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

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

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

Solution (Python):
a = input()
List = []

for x in range(len(a)):
    List.append(int(a[x:x+1]))

if (int(a) % sum(List)) == 0:
    print("Yes")
else:
    print("No")

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

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

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

n = N
Sn = 0
while n > 0:
    Sn += n%10
    n //= 10

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

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

Solution (Python):
N=input()

cnt=0
for i in N:
    cnt+=int(i)
if int(N)%cnt==0:
    print('Yes')
else:
    print('No')

Solution (Python):
N = input()

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

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

Solution (Python):
def S(num):
  ret=0
  for i in range(10):
    ret+=int((num%(10**(i+1)))/(10**i))
  return ret

n=int(input())
a=S(n)
if n%a == 0:
  print('Yes')
else:
  print('No')

Solution (Python):
N = input()

SN = 0
for i in N:
    SN += int(i)

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

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

Solution (Python):
N = input()

n = int(N)
sn = sum(list(map(int, list(N))))

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

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

Solution (Python):
N = input()
mylist = []
for i in range(len(N)):
  mylist.append(N[i])
newlist = [int(s) for s in mylist]
divisor = 0
for j in range(len(newlist)):
  divisor += newlist[j]
N = int(N)
if N%divisor == 0:
  print("Yes")
else:
  print("No")

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

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

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

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


print("Yes" if int(s)%sn==0 else "No")

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

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

Solution (Python):
input_string = input()
n = int(input_string)
s = sum([int(x) for x in list(input_string)])

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

Solution (Python):

import sys
INF = float("inf")


def yes():
    print("Yes")  


def no():
    print("No")  


def solve(N: str):
    S = 0
    for c in N:
        S += int(c)
    N = int(N)

    if N % S == 0:
        yes()
    else:
        no()

    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = str(next(tokens))  
    solve(N)


if __name__ == '__main__':
    main()

Solution (Python):


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

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

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

Solution (Python):
N = input()

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

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

Solution (Python):
N = int(input())
n = N
S = 0
while n>0:
    S += n%10
    n //=10
print("Yes" if N%S==0 else "No")

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

s = 0
n = N
for i in range(l):
    s += (n%10)
    n = n//10


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

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

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

Solution (Python):
S=input()
num=0

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

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

Solution (Python):
from collections import Counter
from functools import reduce
import fractions
import math
import statistics
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) 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 MI(): return map(int, sys.stdin.readline().split())  
def II(): return int(sys.stdin.readline())  
def IS(): return input()  
def P(x): return print(x)
def C(x): return Counter(x)
def GCD_LIST(numbers):  
    return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers):  
    return reduce(LCM, numbers)
def LCM(m, n):
    return (m * n // fractions.gcd(m, n))


n = IS()
print('Yes') if int(n) % sum([int(x) for x in n]) == 0 else print('No')

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

Solution (Python):
import sys

input = sys.stdin.readline


s = input().rstrip()

s_list = list(s)
s_int = int(s)
s_keta = [int(x) for x in s_list]

if(s_int % sum(s_keta) == 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, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = input()
X = list(N)

X = [int(x) for x in X]
if int(N) % sum(X) == 0:
	print("Yes")
else:
	print("No")

Solution (Python):
str_n = input()
n_len=len(str_n)
n = int(str_n)
sum_n = 0

for i in range(n_len):
    sum_n+=int(str_n[i])

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

Solution (Python):
n = int(raw_input())
s = list(str(n))
s = sum(int(i) for i in s)
if n % s == 0:
	print 'Yes'
else:
	print 'No'

Solution (Python):
N = input()

S_N = 0

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

Solution (Python):
if __name__ == "__main__":
    s = str(input())

    ans = 0

    for i in s:
        ans = ans + int(i)

    b = "Yes" if int(s) % ans == 0 else "No"

    print(b)

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

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

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

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

Solution (Python):
s=input();print("YNeos"[int(s)%sum(map(int,s))!=0::2])

Solution (Python):
N = input()

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

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

Solution (Python):

def dsum(N):
    if N == 0:
        return 0
    else:
        return N%10 + dsum(N//10)
N = int(input())
print("Yes" if N%dsum(N) == 0 else "No")

Solution (Python):
from sys import stdin
N=(stdin.readline().rstrip())
S=int(N)
tmp=0
for i in list(N):
    tmp+=int(i)

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

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

Solution (Python):
n = input()
n1 = 0
n2 = 0

for i in range(len(n)):
    n1 += int(n[i])
    n2 += int(n[i]) * 10 ** (len(n) - i - 1)

if n2 % n1:
    print("No")
else:
    print("Yes")

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

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

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

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

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

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

Solution (Python):
A=B=input()
A=int(A)
B=list(B)
B=int(eval("+".join(B)))
if A%B==0 :
  print("Yes")
else :
  print("No")

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

Solution (Python):
n=int(input())
m=n
dig=0
li=[]
while m>0:
    li.append(m%10)
    m=m//10
    dig+=1
if n%(sum(li))==0:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):

N = input()
N_sum = sum([int(N[i]) for i in range(len(N))])
print("Yes" if int(N) % N_sum == 0 else "No")

Solution (Python):


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

digsum = 0

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

n = list(map(str,n))
n = "".join(n)
n = int(n)

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

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

Solution (Python):
a=input()
b=int(a)
c=0
for i in range(len(a)):
  c+=int(a[i])
print("YNeos"[b%c!=0::2])

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

S_N = 0
n = N
while n > 0:
    S_N += n % 10
    n //= 10
ans = (N % S_N) == 0

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

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

Solution (Python):
def f(x):
  a,b=0,str(x)
  for i in range(len(b)):a+=int(b[i])
  return a
n=int(input())
print("Yes"if n%f(n)==0 else"No")

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

Solution (Python):
N=input()
M=sum(int(x) for x in N)
print("Yes" if int(N)%M==0 else "No")

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

Solution (Python):
N = input()

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

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

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

Solution (Python):
Nr = int(input())
l = len(list(str(Nr)))
N = Nr
a = 0
s = 0
for i in range(l):
    a = N % 10
    s += a
    N = (N-a)/10
if Nr % s == 0:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
n = input()

sn = 0
for c in n:
  sn += int(c)
if int(n) % sn == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
def sum(n):
	ans=0
	for i in range(len(str(n))):
		ans=ans+int(n[i])
	x=int(n)%ans
	return x

n=input()
print("Yes" if sum(n)==0 else "No")

Solution (Python):
def ds(n):
    tmp_n = n
    dsum = 0
    while tmp_n > 0:
        dsum = dsum + tmp_n%10
        tmp_n = tmp_n // 10
    return dsum

N = int(input())

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

Solution (Python):
nums = input()
s = int(nums)
sums = 0
for num in nums:
  sums = sums + int(num)
if (s % sums) == 0:
  print("Yes")
else:
  print("No")

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

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

Solution (Python):

N=input()

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

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

Solution (Python):
def num(n):
  rec=0
  while n>0:
    rec+=n%10
    n=n//10
  return rec
n=int(input())
if n%num(n)==0:
  print("Yes")
else:
  print("No")

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

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

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

Solution (Python):
from sys import stdin
n=stdin.readline().rstrip()
print('Yes' if int(n)%sum([int(i) for i in n])==0 else 'No')

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

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

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

Solution (Python):
n = input()

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

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

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

Solution (Python):
s=input();print('YNeos'[int(s)%sum(map(int,s))>0::2])

Solution (Python):
s=input()
print('YNeos'[(int(s)%sum(map(int,s))!=0)::2])

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

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

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

Solution (Python):
N = int(input())
t = 0
n = N
while n > 0:
    t += n % 10
    n = n // 10
if N % t == 0:
    print("Yes")
else:
    print("No")

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

Solution (Python):
n = int(input())
m, s = n, 0
while m > 0:
  s += (m % 10)
  m //= 10
if n % s:
  print("No")
else:
  print("Yes")

Solution (Python):
def digit_sum(a):
    sum = 0
    while a > 0:
        sum += a % 10
        a //= 10
    return sum


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

Solution (Python):
n = input()

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

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

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

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

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

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