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):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N = I()
    D_sum = sum((int(i) for i in str(N)))
    print("YNeos"[N%D_sum!=0::2])
if __name__ == '__main__':
    main()

Solution (Python):
def calc_digit_sum(num):
    x = num
    digit_sum = 0

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

    return digit_sum

N = int(input())

if N % calc_digit_sum(N) == 0:
    is_harshad_number = "Yes"
else:
    is_harshad_number = "No"

print(is_harshad_number)

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

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

Solution (Python):
def calculate(n):
    ans = 0
    for i in range(len(str(n))):
        ans += n % 10
        n //= 10
    return ans


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

Solution (Python):
Sn = input()
n = int(Sn)
def f(n):
    r = 0
    for i in n:
        r += int(i)
    return r

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

if N % n == 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):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

def main():
    s=input()
    x=int(s)
    fx=sum(int(c) for c in s)
    print("No") if x%fx else print("Yes")

main()

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

sum = 0
k = n

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


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

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

Solution (Python):
from sys import stdin
from itertools import groupby

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

s = str(n)

point = 0
for i in s:
    point += int(i)

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

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

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

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

def ds(n):
    s = str(n)
    array = list(map(int, s))
    return sum(array)
flag = n % ds(n) == 0

if flag:
  print('Yes')
else:
  print('No')

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

Solution (Python):
x = int(input())
y =  sum([int(i) for i in list(str(x))])
if x % y == 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):
n = input()

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

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

Solution (Python):
def examB():
    X = S()
    sumS = 0
    for i in X:
        sumS += int(i)
    judge = int(X)%sumS
    if judge==0:
        ans = "Yes"
    else:
        ans = "No"
    print(ans)

import sys,copy,bisect,itertools
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()

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):
X = int(input())
X_ = X
x_sum = 0
while True:
    x_sum += X_ % 10
    if (X_ // 10) ==0 :
        break
    else:
        X_ = X_ // 10
if X % x_sum == 0:
    print("Yes")
else:
    print("No")

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

print("No" if int(N)%x else "Yes")

Solution (Python):
def isHarshad(x):
  n = int(x)
  c = 0
  for i in x:
    c += int(i)
  if n%c==0:
    return True
  return False

if isHarshad(input()):
  print("Yes")
else:
  print("No")

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

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



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

Solution (Python):

N = str(input())

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

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

main()

Solution (Python):
N=int(input())
N_str=list(str(N))
N_int=[int(i) for i in N_str]
N_harsh=N%sum(N_int)

if N_harsh==0:print('Yes')
else:print('No')

Solution (Python):

n = input()
sum_of_digits = 0

for digit in n:
    sum_of_digits += int(digit)

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

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

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

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

def f(n):
    res = 0
    for i in range(len(str(n))):
        res += (n//10**i)%10
    return res

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

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

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

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

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

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


def Harshad(N):
  pro = 0
  N_list = list(str(N))
  for i in range(len(N_list)):
    pro += int(N_list[i])
  return pro

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

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

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

def digitSum(n):
  s = str(n)
  array = list(map(int, s))
  return sum(array)

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

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

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

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

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

if n % sum(n_list) == 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()

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

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

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

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

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

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

Solution (Python):
n=int(input())
w=n
s=0
while w>0:
  s+=w%10
  w//=10
print(("No","Yes")[n%s==0])

Solution (Python):
import sys

readline = sys.stdin.readline









def main():
    n = readline().rstrip()
    digits = [int(d) for d in n]
    print('Yes' if int(n) % sum(digits) == 0 else 'No')

if __name__ == "__main__":
    
    main()

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

def f(x):
    res = 0
    while x > 0:
        res += x % 10
        x //= 10
    return res
if N % f(N) == 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 = int(input())

n_digit = list(str(n))

harshad = 0
for i in range(len(n_digit)):
    harshad += int(n_digit[i])

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

Solution (Python):
N=int(input())
f=str(N)
F=list(f)
fx=0

for i in range(len(F)):
  fx+=int(F[i])

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

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

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

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

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

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

a=n
f=0

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

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

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

Solution (Python):
n=input()
N=int(n)
S=N
ans=0
for i in range(0,9):
  if N//(10**(8-i)) !=0:
    a=N//(10**(8-i))
    ans+=N//(10**(8-i))
    N-=a*(10**(8-i))
if int(S/ans)==S/ans:
  print("Yes")
else:
  print("No")

Solution (Python):
n=input()
N=int(n)
d=list(n)
for i in range(len(d)):
  d[i]=int(d[i])
x=sum(d)

if int(N/x)==(N/x):
  print("Yes")
else:
  print("No")

Solution (Python):
import sys
input = sys.stdin.readline
N = input()[: -1]
f = sum(list(map(int, list(N))))
if int(N) % f == 0:
  print("Yes")
else:
  print("No")

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

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

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

x = 0
m = n

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

if m % (n + x) == 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):
n = int(input())

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

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


def sum_each_digit(n):
    total = 0
    while n > 0:
        total += n % 10
        n //= 10
    return total


if N % sum_each_digit(N) == 0:
    result = 'Yes'
else:
    result = 'No'

print(result)

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

tmp = n
digitSum = 0
while tmp:
    digitSum += tmp % 10
    tmp //= 10
if n % digitSum == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
n = input()

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

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

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

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

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

X = int(input())

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

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

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

Solution (Python):
def kakuwa(n):
    return sum(map(int, list(str(n))))
N=int(input())
print('YNeos'[N%kakuwa(N)>0::2])

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

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

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

while(tmp>0):
    dig_sum+=tmp%10
    tmp=int(tmp/10)

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

Solution (Python):

def findSumOfDigits(n):
  sum = 0
  while( n > 0):
    sum += int(n) % 10
    n = int(n) / 10
  return int(sum)

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

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

Solution (Python):
n=list(input())
fx=0
for i in range(len(n)):
    fx+=eval(n[i])
n2="".join(n)
print("Yes" if int(n2)%fx==0 else "No")

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

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

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

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

Solution (Python):
n=int(input())
a=sum(int(i) for i in list(str(n)))
print('YNeos'[n%a!=0::2])

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

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

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

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

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

Solution (Python):

N = int(input())
S = str(N)

fx = 0
for s in S:
    fx += int(s)

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

Solution (Python):
n = input()

f = 0
for _ in list(n):
    f += int(_)

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

Solution (Python):
n = int(input())
import math
n_keta = 1+math.floor(math.log10(n))
wa = 0
for i in range( n_keta):
  wa += math.floor(n/(10**i))%10
print('Yes' if n//wa == n/wa else 'No')

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

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

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

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

Solution (Python):
N = input()
length = len(N)
n = int(N)
n1 = int(N)
S = 0
while(length!=0):
    number = n//(10**(length-1))
    S = S + number
    n = n - number*(10**(length-1))
    length = length - 1
if n1%S==0:
    print('Yes')
else:
    print('No')

Solution (Python):
x = input()
sx = int(x)
sum_ = sum([int(num) for num in list(x)])
if sx%sum_ == 0:
    print('Yes')
else:
    print('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 = int(input())
n = list(str(N))

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

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

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

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

Solution (Python):
import sys
from functools import reduce
import copy
import math
from pprint import pprint
import collections


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(inputs):
    N = int(inputs[0])
    fn = reduce(lambda acc, x: acc + int(x), str(N), 0)
    if N % fn == 0:
        return 'Yes'
    return 'No'


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Solution (Python):
N = input()

num = int(N)

sum = 0
while num > 0:
    sum += num % 10
    num //= 10

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

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

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

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

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

Solution (Python):
N = int(input())
X = N
digitsum = 0
while X > 0:
    digitsum += (X % 10)
    X = X // 10
if N % digitsum == 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):
def slove():
    import sys
    input = sys.stdin.readline
    n = str(input().rstrip('\n'))
    t = 0
    for i in range(len(n)):
        t += int(n[i])
    print("Yes" if int(n) % t == 0 else "No")


if __name__ == '__main__':
    slove()

Solution (Python):
N = int(input())
f = 0
q, mod = divmod(N, 10)
f += mod
while q != 0:
    q, mod = divmod(q, 10)
    f += mod
if N % f == 0:
    print('Yes')
else:
    print('No')

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

Solution (Python):
n = input()
num = list(n)
sum = 0

for i in num:
    sum += int(i)

if int(n) % sum == 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()
print('No' if int(n)%sum(map(int,n)) else 'Yes')

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

bb080()

Solution (Python):
N=int(input())
def check(x):
    xp=x
    _sum=0
    while x>0:
        _sum+=x%10
        x=x//10
    return True if xp % _sum == 0 else False
if check(N):
    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):
N = int(input())
Nlist = list(map(int, str(N)))
if(N%sum(Nlist)==0):
    print("Yes")
else:
    print("No")

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

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

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

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

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

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

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

Solution (Python):

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

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

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


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

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

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

n=N
total=0

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

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

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

Solution (Python):
n = int(input())
x = eval("+".join(str(n)))
print("Yes" if n % x == 0 else "No")

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

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


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


if __name__ == '__main__':
    main()

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

Solution (Python):
n = int(input())
m = n
k = 0
while(m > 0):
  l = m % 10
  k += l
  m = m // 10
if(n % k == 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):
n = int(input())
t = n
fn = 0
for i in range(20):
    if n == 0:
        break
    fn += n%10
    n //= 10
print('No' if t%fn else 'Yes' )

Solution (Python):
n = str(input())
wa = ""
for i in n:
  wa += "+"+i

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

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

Solution (Python):
N = int(input())
def summ(X):
  a = X//10000000
  b = (X - a*10000000)//1000000
  c = (X - a*10000000 - b*1000000)//100000
  d = (X - a*10000000 - b*1000000 - c*100000)//10000
  e = (X - a*10000000 - b*1000000 - c*100000 - d*10000)//1000
  f = (X - a*10000000 - b*1000000 - c*100000 - d*10000 - e*1000)//100
  g = (X - a*10000000 - b*1000000 - c*100000 - d*10000 - e*1000 - f*100)//10
  h = X - a*10000000 - b*1000000 - c*100000 - d*10000 - e*1000 - f*100 - g*10
  return a+b+c+d+e+f+g+h
if N % summ(N) == 0:
  print('Yes')
else:
  print('No')

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

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

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

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

Solution (Python):

def calcDigitSum(n):
    digitSum = 0
    digitSum += n % 10
    wari = n // 10

    while wari > 0:
        digitSum += wari % 10
        wari = wari // 10
    
    return digitSum

n = int(input())

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

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

sum = 0
sum += n % 10
wari = n // 10

while wari > 0:
    sum += wari % 10
    wari = wari // 10

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

Solution (Python):
n = input()
nlen = len(n)
nsum = 0

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

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

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

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):
n=int(input())
s=list(str(n))
for i in range(len(s)):
    s[i]=int(s[i])
N=sum(s)
if(n%N==0):
    print("Yes")
else:
    print("No")

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

n = 0
t = N
while t != 0:
  n += t % 10
  t //= 10

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

Solution (Python):
n = input()
a = [int(i) for i in str(n)]

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

Solution (Python):
N = input()

N_list = []
for n in N:
    N_list.append(int(n))

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

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

ans="Yes"
if N%F:
  ans="No"
print(ans)

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

Solution (Python):
def f(i):
  s = str(i)
  array = list(map(int, s))
  return sum(array)

n = int(input())

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

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

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

if n % fx == 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):
def sum_of_dig(n):
    s = str(n)
    l = len(s)
    return sum(int(s[i]) for i in range(l))

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

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

Solution (Python):
N = int(input())
digit_sum = sum(map(int, list(str(N))))
if N % digit_sum == 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 = int(input())

r = N
q = 0
while r != 0:
    q += r % 10
    r //= 10

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

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

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

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

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

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

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

Solution (Python):
n = input()

fx = sum(map(int, n))

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

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

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

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

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

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

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

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

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

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

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

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

Nl = list(N)

Ni = []
for i in Nl:
  i = int(i)
  Ni.append(i)


A = sum(Ni)

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

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

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

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

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

Solution (Python):
N = input()

x = int(N)
fx = sum(map(int, list(N)))

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

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

Solution (Python):
N = input()
N_int = int(N)
f = sum(map(int, N))


print("Yes" if N_int % f==0 else "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):
a = input()
number = [int(s) for s in a]
total = sum(number)
if int(a) % total ==0:
  print('Yes')
else:
  print('No')

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

Solution (Python):
n = int(input())
print('Yes'if n % sum(map(int,str(n))) == 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):
a = input()
number = [int(s) for s in a]
total = sum(number)
if int(a) % total == 0:
  print('Yes')
else:
  print('No')

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

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

Solution (Python):
import copy

N = int(input())
X = copy.deepcopy(N)
fx = 0
while X > 0:
    fx += X % 10
    X = X // 10
if N % fx == 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
import math
from fractions import gcd





def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""


 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())


 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

N =  int(sys.stdin.readline())
X = sum(map(int,list(str(N))))
if N % X == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
N = input()

s = [int(n) for n in N]
t = sum(s)

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

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