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

Solution (Python):
N = input()

tmp = []
for i in range(len(N)):
    tmp.append(int(N[i]))

f = sum(tmp)

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

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

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

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

Solution (Python):
n = input()
N = list(n)
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())
dn = n
total = 0
while dn > 0:
  total += dn % 10
  dn //= 10
if n%total ==0:
  print('Yes')
else:
  print('No')

Solution (Python):
Inp = input()
Inp_list = list(Inp) 

F_x = 0
for i in Inp_list: F_x += int(i)

if int(Inp) % F_x == 0: print('Yes')
else: print('No')

Solution (Python):
Inp = input()
Inp_list = list(Inp) 

F_x = 0
for i in Inp_list: F_x += int(i)

if int(Inp) % F_x == 0: print('Yes')
else: print('No')

Solution (Python):
N=input()
q=0
for i in N:
    q+=int(i)
print(["No","Yes"][int(N)%q==0])

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

def h(x):
    y = 0
    while x > 0:
        y += x%10
        x = x//10
    return y

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

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

s=str(n)
num=[]

for i in range(len(s)):
    num.append(int(s[i]))

s=sum(num)

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

else:
    print("No")

Solution (Python):
n=input();print(["No","Yes"][int(n)%sum([int(i) for i in n])<1])

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

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

Solution (Python):
def sumdig(r):
    c = 0
    while r:
        c += r % 10
        r //= 10
    return c


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

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

N = s()

total = 0
for c in N:
    total += int(c)

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

Solution (Python):
n = int(input())
num = n
f = 0
while n > 0:
    f += n % 10
    n = n // 10

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

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

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  

def solve(N: int):
    print(YES if not N % sum(map(int,list(str(N)))) else NO )
    return



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

if __name__ == '__main__':
    main()

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()
fx = 0
for s in n:
    fx += int(s)
print('Yes' if int(n) % fx==0 else 'No')

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

cnt = list(map(int,list(str(n))))

chk = sum(cnt)

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

Solution (Python):


def solve():
    N = input()
    X = int(N)

    total = 0
    while True:
        if len(N) == 0:
            break

        total += int(N[-1])
        N = N[:-1]
    
    if X%total == 0:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    solve()

Solution (Python):
a = input()

totalsum = 0

for i in a:
    totalsum += int(i)

if int(a)%totalsum == 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):
str = input()
fx = 0
for i in str:
    fx = fx+int(i)
if(int(str)%fx):
    print("No")
else:
    print("Yes")

Solution (Python):
def abc():
    x = int(input())
    fx = sum(map(int, str(x)))
    print('No' if x % fx else 'Yes')


abc()

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

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

B = N 
X = []

while B > 0:
    X.append(B%10)
    B //= 10

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

Solution (Python):
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")


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

Solution (Python):
A = int(input())
B = A
list=[]
while B > 0:
    list.append(B%10)
    B //=10
    
if A % sum(list) == 0:
    print("Yes")
else :
    print("No")

Solution (Python):

N = int(input())
X = N
f = 0
while N > 0:
    f += N % 10;
    N = int(N / 10)

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

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

Solution (Python):
n = input()
lst = list(n)
plus = 0
for i in lst:
    plus += int(i)

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

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

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

tmp = N
while (N >= 1):
    sum += N % 10
    N //= 10

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

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

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

def F(x):
  if x < 10:
    return x
  return x%10 + F(x//10)

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

Solution (Python):
a = int(input())
b = str(a)
d = [i for i in b]
num_kei = 0
for j in d:
    num_kei += int(j)

def hantei(kazu,kazu_kei):
    if kazu % kazu_kei == 0:
        print("Yes")
    elif kazu % kazu_kei != 0:
        print("No")

hantei(a,num_kei)

Solution (Python):

N = int(input())

N_str = str(N)

summ = 0

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

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

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

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

fx = 0
n1=n
while (n1>0):
  fx = fx + n1 % 10
  n1 = int(n1 / 10)


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

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

Solution (Python):
N = int(input())
n = N
fx = 0
for i in range(8):
    fx += n%10
    n = n//10

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

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

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

N_str = str(N)
N_keta = []
N_sum = 0

for i in range(len(N_str)):
    N_keta.append(int(N_str[i]))
N_sum = sum(N_keta)

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

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

sums = 0
for i in str(N):
    sums += int(i)

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

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

ans = 0
num = n
while(n > 0):
  ans += n % 10
  n = n // 10
  
if num % ans == 0:
  print('Yes')
else:
  print('No')

Solution (Python):
x = input()


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

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

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

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

Solution (Python):
N=input()
L=list(N)
S=0
for i in L:
  S=int(i)+S
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])
N = int(N)
if N%F == 0:
    print("Yes")
else:
    print("No")

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

Solution (Python):
x = input()
fx = sum(map(int, x))
print('Yes' if int(x) % fx == 0 else '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):
def sumofdegit(x):
  sum = 0
  while x > 0:
    sum += x % 10
    x //= 10
  return sum

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

Solution (Python):



def main():
    num = int(input())
    data = 0
    for ele in list(str(num)):
        data += int(ele)
    if num % data == 0:
        print('Yes')
    else:
        print('No')



if __name__ == '__main__':
    main()

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

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

if int(N) % fn == 0:
    print('Yes')
else:
    print('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 = input()
sum = 0
for i in range(0, len(N)):
	sum += int(N[i])
if int(N)%sum == 0: print('Yes')
else: print('No')

Solution (Python):
N = int(input())
tmp = N
sum_ = 0
while(tmp > 0):
    sum_ += tmp % 10
    tmp //= 10
    

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

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

sum = 0
for c in s:
  sum += int(c)

print('Yes' if n % sum == 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):
k=0
N=str(input())

array=list(map(int,N))
k=sum(array)

if int(N)%k==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()
total = 0
for i in n:
  total = total + int(i)

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

Solution (Python):
N = input() 
n = int(N)
a = 0;
b = 0;
d = n;
sum = 0;

while a != d:
  a = d % 10
  b = d - a
  d = b // 10
  sum += a;

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

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

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

Solution (Python):
n = int(input())
su = 0
tmp = n
while True:
	su = su+(tmp%10)
	tmp = tmp // 10
	if(tmp <= 0):
		break
if(n%su==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())
if N % sum(int(s) for s in str(N)) == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
f_x = sum([int(i) for i in list(str(n))])

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

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

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

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

Solution (Python):
n = input()

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

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

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

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

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

flg = 'No'

kei = 0
for i in n:
    kei += int(i)
    
if int(n)%kei == 0 :
    flg = 'Yes'
print(flg)

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

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

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

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

Solution (Python):
n = input()
n1 = int(n)
n2 = int(sum([int(v) for v in list(n)]))

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

Solution (Python):
from sys import stdin
N=(stdin.readline().rstrip())
if int(N) % sum(list(map(int,list(N)))) == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
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):
def f(n):
    a=0
    while n!=0:
        a += n%10
        n = int(n/10)
    return a
n = int(input())
if n%f(n)==0:
    print("Yes")
else:
    print("No")

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

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

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

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

Solution (Python):
n = input()
x = int(n)
fx = sum(map(int, list(n)))
print("YNeos"[(x/fx)%1!=0::2])

Solution (Python):
def main():
    N = input()
    print('YNeos'[not int(N) % sum(int(n) for n in N) == 0::2])


main()

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 5)

X = int(input())

A = 0
k = 0
while True:
    a = X//(10**k)
    if a == 0:
        break
    A += a%10
    k += 1


if X % A == 0:
    print("Yes")
else:
    print("No")

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

def digit_sum(x):
  s = 0
  while x:
    s += x%10
    x //= 10
  return s

if N%digit_sum(N):
  print('No')
else:
  print('Yes')

Solution (Python):

N=int(input())
_N=list(str(N))

sm=0
for x in _N:
  sm+=int(x)

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

Solution (Python):

import sys
from collections.abc import Iterable
from math import *
from itertools import *
from collections import *
from functools import *
from operator import *
try:
    from math import gcd
except Exception:
    from fractions import gcd

YES = "Yes"  
NO = "No"  

def solve(N: int):
    return YES if (N % sum([int(x) for x in str(N)]) == 0) else NO


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)
    if isinstance(result, Iterable) and not isinstance(result, str):
        result = '\n'.join([str(v) for v in result])
    print(result)

if __name__ == '__main__':
    main()

Solution (Python):
x=input()

lx = [int(s) for s in x]
xsum=sum(lx)
if int(x)%xsum==0:
    print("Yes")
else:
    print("No")

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

s = 0
sN = str(N)
for i in range(len(sN)):
  s += int(sN[i])

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

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

Solution (Python):
n = list(input())
fx = 0

for i in n:
    fx += int(i)
nn = ''.join(n)
nnn = int(nn)


if nnn%fx == 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()
N_list = list(N)
f = 0
for i in N_list:
    f += int(i)
if int(N) % f == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
from functools import reduce
import math

def main():
    
    
    
    

    
    
    
    
    
    

    
    

    
    
    
    
    
    
    
    
    
    INF = float("inf")

    
    MOD = 10**9+7
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    a = input()
    d = 0
    for a_i in a:
        d += int(a_i)
    if int(a) % d == 0:
        print('Yes')
    else:
        print('No')
        
if __name__ == '__main__':
    main()

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

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

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

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


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

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

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

Solution (Python):
N = int(input())
FX = sum(map(int, list(str(N))))

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

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

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

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

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

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

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

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

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


def find_sum_of_digits(n):
    sum = 0
    while n >= 1:
        sum += n % 10
        n //= 10
    return sum


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

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

sum = 0

for i in range(len(str(n))):
    sum += n // ( 10 ** i) % 10
    
if  n % sum == 0:
    print("Yes")
else:
    print("No")

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

Solution (Python):




n = int(input())


wn = n
x = 0
while(wn > 0):
    x += wn % 10
    wn = int(wn / 10)

if n % x == 0:
    ans = "Yes"
else:
    ans = "No"


print(ans)

Solution (Python):
n=input()
l=len(n)
n=int(n)
m=0
for i in range(l):
  m+=(n//10**i)%10
  
if n%m==0:
  print("Yes")
else:
  print("No")

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

f = 0
n = N
while n != 0:
    f += (n%10)
    n = n//10

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

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

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

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

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

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

Solution (Python):
def has(a):
    a_list=[int(str(a)[i]) for i in range(len(str(a)))]
    return(sum(a_list))


n=int(input())
if n%has(n)==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=int(input())

ls=map(int,list(str(N)))
num=sum(ls)
if N%num == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    s = input()
    n = int(s)

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


solve()

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

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

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

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

Solution (Python):
def read_input():
    n = input()
    d = [int(c) for c in n]
    return int(n), d


def submit():
    n, d = read_input()

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

if __name__ == '__main__':
    submit()

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

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

def check_hershad_number(n):
    sum = 0
    tem = n
    while tem > 0:
        sum += tem % 10
        tem //= 10
    return n % sum == 0

print('Yes' if check_hershad_number(n) else 'No')

Solution (Python):
n= int(input())
import copy
N = copy.copy(n)
fn = 0
while True:
    fn += n%10
    n = n//10
    if n == 0:
        break

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

Solution (Python):


import sys
import math



def fx(s):
  ret = 0
  for c in s:
    ret += int(c)
  return ret

if __name__ == "__main__":
  n = str(input())
  if int(n) % fx(n) == 0:
    print('Yes')
  else:
    print('No')

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

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

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

Solution (Python):
N = int(input())
x = []
n = N
while True:
    x.append(n % 10)
    n //= 10
    if n == 0:
        break
if N % sum(x) == 0:
    print("Yes")
else:
    print("No")

Solution (Python):

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

Solution (Python):

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

Solution (Python):

n=int(input())
l=[int(x) for x in list(str(n))]

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

Solution (Python):
x = input()
X = int(x)

Xsum = sum(map(int,list(str(X))))

if X % Xsum == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
import sys
from collections import Counter

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

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

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

Solution (Python):
N = int(input())
def f(x):
    if x < 10:
        return x
    return x%10 + f(x//10)
if N%f(N)==0:
    print("Yes")
else:
    print("No")

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

Solution (Python):
n=int(input())
sum=0
t=n
while t>0:
    sum+=t%10
    t=t//10
print('Yes' if n%sum==0 else '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 = int(input())

X = N
M = 0
while X > 0:
    M += X % 10
    X = X // 10

if N % M == 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()
go = 0

for i in n:
    go += int(i)

print('Yes' if int(n) % go == 0 else '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):
N = int(input())
N2 = N
n = 0
for i in range(8):
    n += N2 % 10
    if N2 < 10:
        break
    N2 //= 10

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

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

Solution (Python):
N=input()
intN=int(N)
har=0
for i in range(len(N)):
  har+=int(N[i])

if intN%har==0:
  print('Yes')
else:
  print('No')

Solution (Python):
N = int(input())
B = N
x = 0

while N > 0:
    x += N % 10
    
    N //= 10

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

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

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

Solution (Python):
def f(n):
    return sum(list(map(int, list(n))))


n = input()

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

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

Solution (Python):
n=int(input())
a,x=0,n
while x!=0:
    a+=x%10
    x//=10
print("Yes" if n%a==0 else "No")

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

Solution (Python):
N = input()
fx = 0
for i in N:
    fx += int(i)

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

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

Solution (Python):
N = int(input())
f = 0
N_dammy = N

while N_dammy>0:
    f += N_dammy % 10
    N_dammy = int(N_dammy/10) 

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

Solution (Python):
n=input()
num=int(n)
sum_=sum([int(i) for i in n])
if num%sum_==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 print('No')

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

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

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

Solution (Python):
N = input()
li = []
for i in range(len(N)) :
    li.append(int(N[i]))
fn = sum(li)
if int(N) % fn == 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):
import math

def sum_digits(n):
    r = 0
    while n / 10 > 0:
        r += n % 10
        n = math.floor(n/10)
    return r


if __name__ == '__main__':
    n = int(input())

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

Solution (Python):
N = input()

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

Solution (Python):
n = input()

m = 0

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

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())



S = li()
intS = map(int, S)

if int(''.join(S)) % sum(intS) == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
a = input()

count = 0
for i in range(len(a)):
    count += int(a[i])

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

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

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    n, a, b = LI()
    print(min(n*a,b))
    return


def B():
    a = S()
    print(a.count("1"))
    return


def C():
    n = II()
    a = list(str(n))
    a = list(map(int,a))
    if not n % sum(a):
        print("Yes")
    else:
        print("No")
    return


def D():
    n = II()
    a = LI()
    ans = 0
    for a_ in a:
        while not a_ % 2:
            ans += 1
            a_ /= 2
    print(ans)
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    C()

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

def f(num):
    nums = list(map(int, list(str(num))))
    if num % sum(nums) == 0:
        return True
    else:
        return False
print('Yes' if f(n) else 'No')