Problem:
 Score : 200 points    Problem Statement An integer X is called a Harshad number if X is divisible by f(X) , where f(X) is the sum of the digits in X when written in base 10 .  Given an integer N , determine whether it is a Harshad number.      Constraints  1?N?10^8  N is an integer.         Input Input is given from Standard Input in the following format:  N       Output Print Yes if N is a Harshad number; print No otherwise.        Sample Input 1 12      Sample Output 1 Yes  f(12)=1+2=3 . Since 12 is divisible by 3 , 12 is a Harshad number.       Sample Input 2 57      Sample Output 2 No  f(57)=5+7=12 . Since 57 is not divisible by 12 , 12 is not a Harshad number.       Sample Input 3 148      Sample Output 3 No

Solution (Python):
def sum_digit(num):
    sums = 0
    while num != 0:
        sums += num % 10
        num //= 10
    return sums

n = int(input())
if n % sum_digit(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):
N = input()
if int(N)%sum(map(int, N))==0:
    print("Yes")
else:
    print("No")

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

temp = 0
n = N

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

Solution (Python):
import math
N = int(input())
n = N
amari = 0
for i in range (len(str(N))):
  amari += n % 10
  n = math.floor(n / 10)
if N % amari == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
try:
    N = int(input())
    N_ = sum(map(int, str(N)))
    print('Yes' if N%N_==0 else 'No')
except EOFError:
    pass

Solution (Python):




def main():
    N = input()
    print('Yes'if int(N) % sum(int(n) for n in list(N)) == 0 else 'No')


if __name__ == "__main__":
    main()

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

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

def SumDigits(num):
    sum = 0
    while True:
        sum += num % 10
        num //= 10
        if num == 0:
            break
    return sum

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

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

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

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

Solution (Python):
n = list(input())
x = int("".join(n))

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

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

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

N = int(input())

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

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

n = int(input())
sum1 = summaker(n)
if n % sum1 == 0:
  print('Yes')
else:
  print('No')

Solution (Python):
def func(n):
  s = 0
  for i in str(n):
    s += int(i)
  return s

n = int(input())

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

Solution (Python):
x = input()
ans=0
length=len(x)-1
xi=int(x)
while length>=0:
  ans+=(xi//10**length)
  xi-=(10**length*(xi//10**length))
  length-=1
print("Yes" if int(x)%ans==0 else("No"))

Solution (Python):
s_n = input()
ll = len(s_n)
s_int = int(s_n)
nn = 0
for i in range(ll):
    nn += int(s_n[i])

if(s_int % nn == 0):
    print("Yes")
else:
    print("No")

Solution (Python):
n=input()

ans=0

for nn in n:
    ans+=int(nn)

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

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

Solution (Python):
def main(n: int):
    t = 0
    for s in str(n):
        t += int(s)

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


if __name__ == "__main__":
    n = int(input())
    main(n)

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

l = []
num = N
for i in range(9):
    l.append(int(num%10))
    num /= 10
if N%(sum(l)) == 0:
    print("Yes")
else:
    print("No")

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

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

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

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

Solution (Python):
def func(num):
  ret = 0
  while num > 0:
    ret += num % 10
    num //= 10
  return ret

n = int(input())

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

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

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

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

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

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

Solution (Python):
import sys

x=input()
list=[]
for i in range(len(x)):
	list.append(int(x[i]))
val=sum(list)
y=int(x)
print("Yes" if y%val==0 else "No")

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    ct=0
    for i in str(n):
        ct+=int(i)
    if n%ct==0:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    do()

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):
N = input()
fn = sum(list(map(int, N)))
if int(N) % fn == 0:
    print("Yes")
else:
    print("No")

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

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 = str(input())

x = int(n)
n = list(n)
     
arr = []
while(True):
    arr.append(int(n.pop(0)))
    if len(n) == 0:
        break

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

Solution (Python):







import math
import string

def intinput():
    return int(input())

def listintinput():
    return list(map(int,input().split()))

def splitintinput():
    return map(int,input().split())

N = intinput()
tmp = N
divs = 0

while tmp:
    divs += tmp % 10
    tmp = int(tmp/10)

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

Solution (Python):
s = input()

f = 0
for i in range(len(s)):
    f += int(s[i])

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

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

def fx(N):
  ans = 0
  while N > 0:
    ans += N % 10
    N = N // 10
  return ans
  
if N % fx(N) == 0:
  print("Yes")
else:
  print("No")

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

def fx(N):
  ans = 0
  for i in str(N):
    ans += int(i)
  return ans
  
if N % fx(N) == 0:
  print("Yes")
else:
  print("No")

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

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

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

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

Solution (Python):
"""
author : halo2halo
date : 29, Jan, 2020
"""

import sys




read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)


def Hershad(n):
    if n == 0:
        return 0
    return n % 10 + Hershad(n // 10)


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

Solution (Python):
"""
author : halo2halo
date : 29, Jan, 2020
"""

import sys


import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)


def Hershad(n):
    if n == 0:
        return 0
    return n % 10 + Hershad(n // 10)


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

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

Solution (Python):
n = input()


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

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

Solution (Python):
n=int(input())
all=int(0)
N=n
while N:
    all+=(N%10)
    N=int(N/10)

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

Solution (Python):
import math





n = int(input())

tot = 0

n_str = list(str(n))
integ  = [int(s) for s in n_str]
length = len(integ)
for i in range(length):
  tot = tot + integ[i]

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

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

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

Solution (Python):
def sumNum(num, sums):
    if num == 0:
        return sums
    sums += num % 10
    num = num // 10
    return sumNum(num, sums)

N = int(input())
f_x = sumNum(N, 0)
if (N % f_x) == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
import math
N = int(input())
n = N
amari = 0
for i in range (len(str(N))):
  amari += n % 10
  n = math.floor(n / 10)
if N % amari == 0:
  print("Yes")
else:
  print("No")

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

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

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

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

def f(x):
    su = 0
    while x>0:
        su += x % 10
        x //= 10
    return su

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

Solution (Python):
n = int(input())
sum = 0
divn = n

for _ in range(9):
    sum += int(divn % 10)
    divn /= 10
    
if n % sum == 0:
    print("Yes")
else:
    print("No")

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

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

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

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

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

Solution (Python):
N = input()

def digitsum(n):
    a = list(map(int,n))
    b = sum(a)
    return b

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

Solution (Python):
n=input()

m=sum(map(int, n))

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

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

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

Solution (Python):
N = input()
print("YNeos"[bool(int(N)%sum(int(n)for n in N))::2])

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

def f(n):
    sums = 0
    while n>0:
        sums += n%10
        n //= 10
    return sums

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

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

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

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

Solution (Python):
a = list(str(input()))

gokei = 0
for i in a:
  gokei += int(i)

if int(''.join(a))%gokei == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
n = input()

wrk = 0
for i in n:
    wrk += int(i)

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

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

l = list(str(n))

wrk = 0

for i in range(len(l)):
    wrk += int(l[i])

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

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

Solution (Python):
N = input()

d = 0

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

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

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

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

Solution (Python):
def sum_of_digits(n):
    sum = 0

    while(n>0):
        q,mod = divmod(n,10)

        sum += mod
        n = q
   
    return sum

N = int(input())

sum = sum_of_digits(N)

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

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


def f(X):
  return sum(list(map(int, str(X))))

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

Solution (Python):
N = int(input())
def wa(N) : 
    S = str(N)
    array = list(map(int,S))
    return sum(array)
Na = wa(N)
if N % Na == 0 :
    print("Yes")
else :
    print("No")

Solution (Python):
n = str(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):
n = input()

x = [int(i) for i in n]
n = int(n)

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

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

def f(n):
    return sum(map(int, str(n)[::]))

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

Solution (Python):
import math

a=int(input())
X = a

x = 0

while(True):
  if a / 10 == 0:
    break
  
  x += a % 10
  a = math.floor(a / 10)

ans = 'No'

if X % x == 0:
  ans = 'Yes'

print(ans)

Solution (Python):
N = input()

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

Solution (Python):
import sys
input = sys.stdin.readline
n=int(input())
div=n
a=0
while n:
    a+=int((str(n)[-1]))
    
    n//=10

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

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

x = n
fx = 0

while n > 0:
    fx += n % 10
    n = n // 10

if x % fx == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
import math

n = int(input())

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

if n % sum == 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()
a = []
for i in range(len(n)):
  a.append(int(n[i]))
if int(n) % sum(a) == 0:
  print('Yes')
else:print('No')

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
X = 0
for i in list(str(N)):
    X += int(i)
if N % X == 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()

f = 0

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

Solution (Python):
N = input()

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

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

Solution (Python):
n = input()
fx = 0
for s in n:
    fx += int(s)

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

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

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

Solution (Python):


n = int(input())

isHarshad = False

summation = 0
for i in list(str(n)):
    summation += int(i)
    
if n%summation == 0:
    print("Yes")
else:
    print("No")

Solution (Python):

 
import math
import itertools
import sys
import copy
 



N = int(input())

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

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


sum = 0
while N>0:
    N1 = N%10

    sum += N1
    N = (N-N1)/10

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

else:
    print('No')

Solution (Python):

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

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

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

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

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

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

main()

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

Solution (Python):
n = str(input())
f = 0

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

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

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

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

Solution (Python):
n = int(input())
fn = 0
for i in str(n):
    fn += int(i)

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

Solution (Python):

n=input()
ans=False
keta=len(n)
fx=0
for i in range(keta):
    fx+=int(n[i])
if int(n)%fx==0:
    ans=True
print("Yes" if ans else "No")

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

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

Solution (Python):

N = int(input())
x = []
orig_N = N
for i in range(len(str(N))):
    x.append(N % 10)
    N = int(N/10)

print("Yes") if orig_N % sum(x) == 0 else print("No")

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

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

Solution (Python):
import sys

def is_harshad_number(x):
    return not x % sum(list(map(int, list(str(n)))))

n = int(sys.stdin.readline().rstrip())

def main():
    return 'Yes' if is_harshad_number(n) else 'No'

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

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

Solution (Python):

n = input()
fx = 0

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

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

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

Solution (Python):
import math

n = input()
print("Yes" if int(n) % sum(map(int, n)) == 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):
x = input()
fx = sum(list(map(int,list(x))))


if int(x)%fx == 0:
  print("Yes")
else:
  print("No")

Solution (Python):

N = list(str(input()))

tmp = len(N)
fx = 0
x = 0
for i in range(tmp):
    x += int(N[i]) * 10 ** (tmp - i - 1)
    fx += int(N[i])

if x % fx == 0:
    print("Yes")
else:
    print("No")

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


def sum_digit(num):
    res = 0
    while num > 0:
        res += int(num % 10)
        num = int(num / 10)
    return res


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

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

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

Solution (Python):
N = input()
X = 0
for i in range(len(N)):
	X+=int(N[i])
if(int(N)%X==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 = INT()
if N%sum(map(int, list(str(N)))) == 0:
	print("Yes")
else:
	print("No")

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

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

def ABC080(x):
    ans = 0
    while x/10 != 0:
        ans += x % 10
        x //= 10
    return ans

if N % ABC080(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):
n1=input()
n2=int(n1)

c=0
for i in n1:
    c+=int(i)
if n2%c==0:
    print("Yes")
else:
    print("No")

Solution (Python):
n1=input()
n2=int(n1)

c=0
for i in n1:
    c+=int(i)
if n2%c==0:
    print("Yes")
else:
    print("No")

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

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

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

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

Solution (Python):
N=input()

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

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

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

Solution (Python):

N = input()

_sum = sum(int(c) for c in N)
if int(N) % _sum == 0:
    print('Yes')
else:
    print('No')

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

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

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

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

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

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

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

if n % sum_digit == 0:
    ans = 'Yes'
else:
    ans = 'No'

print(ans)

Solution (Python):
N = int(input())
Dip = N
fig = 0
while Dip !=0:
  fig += Dip%10
  Dip = Dip//10

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

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

Solution (Python):

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

def digit_sum(n,base=10):
    result = 0
    while n:
        result += n % base
        n //= base
    return result
n=int(input())
if n%digit_sum(n)==0:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
amari = 0
for i in range(1,9):
  amari += ((n - n % 10 **(i - 1)) % 10**i)/10**(i-1)
if n % amari == 0:
  print("Yes")
else:
  print("No")

Solution (Python):




n = input()
a = int(n)

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


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

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

Solution (Python):
n = input()
N = int(n)
I = []

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

S = sum(I)

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

Solution (Python):
S = input()
B = int(S)


A = list(S)
A_INT = [int(s) for s in A]
A_SUM = sum(A_INT)

Ans = B%A_SUM

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

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

N_digit = list(str(N))
sum_digit = 0
for i in range(len(N_digit)):
    sum_digit += int(N_digit[i])

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

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

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

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

Solution (Python):
def findSumDigits(n: int)->int:
    sum_digits = 0
    while n > 0: 
        sum_digits += n % 10
        n //= 10
    return sum_digits
  
N = int(input())
f_x = findSumDigits(N)
if N % f_x == 0: 
	print("Yes")
else:
	print("No")

Solution (Python):
def digitSum(n):
    s = str(n)
    array = list(map(int, s))
    return sum(array)
    
n = int(input())
ans = "No"
if n % digitSum(n) == 0:
    ans = "Yes"

print(ans)

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

Solution (Python):
N = input()
x = int(N)
fx = sum([int(i) for i in N])

if (x%fx == 0):
    print('Yes')
else:
    print('No')

Solution (Python):
[print("Yes" if not n % sum(map(int, str(n))) else "No") for n in [int(input())]]

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

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

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

ls_n = [int(_) for _ in list(str(n))]

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

Solution (Python):


N = int(input())

list_N = list(str(N))
total = 0
for n in list_N:
    total += int(n)

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

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

sum_N = 0
N_tmp = N
while N_tmp > 0:
  sum_N += N_tmp%10
  N_tmp = N_tmp//10

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

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

Solution (Python):
def digit_sum(n):
    n = str(n)
    S = list(map(int,n))
    return sum(S)

X = int(input())
fX = digit_sum(X)
print("Yes" if X % fX == 0 else "No")

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

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

Solution (Python):
n = int(input())
m = n
num = 0

while m != 0:
    num = num + m % 10
    m = m // 10

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

Solution (Python):


import sys
from collections import Counter
input = sys.stdin.readline

"""
H = int(input())
h = [int(ele) for ele in input().split()]
h = [0] + h
"""


def main():
    N = input()
    ct = Counter(N)
    s = 0
    for num, count in zip(ct.keys(), ct.values()):
        if str(num) in '123456789':
            s += int(num) * int(count)

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


def bfs(queue):
    global yet, graph
    if len(queue) == 0:
        return
    yet.remove(queue[-1])

    for i, adjacency in enumerate(graph[queue[-1]]):
        if adjacency == 1 and (i in yet) and (i not in queue):  
            queue.appendleft(i)
    else:
        queue.pop()
        bfs(queue)


def dfs(stack):
    global yet, graph
    yet.remove(stack[-1])

    for i, adjacency in enumerate(graph[stack[-1]]):
        if adjacency == 1 and i in yet:  
            stack.append(i)
            dfs(stack)
    else:
        stack.pop()


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
        if i != n // i:
            divisors.append(n//i)
    return divisors


class Node():

    def __init__(self):
        self.idx = None
        self.left = None
        self.right = None
        self.parent = None
        return

    def pre_order(self):
        global pre_order_str
        pre_order_str += str(self.idx) + " "
        if self.left:
            self.left.pre_order()

        if self.right:
            self.right.pre_order()

    def in_order(self):
        global in_order_str

        if self.left:
            self.left.in_order()

        in_order_str += str(self.idx) + " "

        if self.right:
            self.right.in_order()

    def post_order(self):
        global post_order_str
        if self.left:
            self.left.post_order()

        if self.right:
            self.right.post_order()

        post_order_str += str(self.idx) + " "


class HeapHelper():
    """HeapContrler.
    完全二分木を二分ヒープで表現した配列 A に対して、
    HeapHelper.parent(idx) とするとそのノードの親の添字を返す
    存在しない場合は Falseを返す

    Returns:
        [type] -- [description]
    """

    def __init__(self):
        return

    @staticmethod
    def parent(i):
        if i == 1:
            return False

        return int(i/2)

    @staticmethod
    def left(i):
        l_idx = 2*i
        if H < l_idx:
            return False

        return l_idx

    @staticmethod
    def right(i):
        r_idx = 2*i + 1
        if H < r_idx:
            return False

        return r_idx


if __name__ == "__main__":
    main()

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

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

Solution (Python):
N = int(input())
sum = 0
M = N
while M != 0:
     sum += M % 10
     M = M // 10

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

Solution (Python):
n = int(input())
m = list(str(n))

mm = sum([int(i)for i in m])

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

Solution (Python):
x = input()

fx = sum([int(i) for i in x])

if int(x) % fx == 0:
    print('Yes')
else:
    print('No')

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

S = list(str(N))

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

if N % ADD == 0:
    print('Yes')

else:
    print('No')

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

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

S = list(str(N))

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

if N % ADD == 0:
    print('Yes')

else:
    print('No')

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

Solution (Python):

N = input()
l = list(map(int,N))

f = sum(l)
flag = 0

if int(N) % f == 0:
    flag = 1

if flag == 1:
    print("Yes")
else:
    print("No")

Solution (Python):
n = input()
x = 0
for i in n:
        x += int(i)
print('YNeos'[int(n) % x != 0::2])

Solution (Python):
def digit10(x):
    dten = 0
    while(x>0):
        dten+=int(x%10)
        x/=10
    return dten

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

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

Solution (Python):


N=input()
Nd=int(N) 
fn=sum(list(map(int,list(N)))) 

if Nd%fn==0: 
    print("Yes")
else:
    print("No")

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