import java.util.*;

public class Main{
  public static void main(String[] args) {
   Scanner sc = new Scanner(System.in);
   String  s = sc.next();
   char[] leader = s.toCharArray();
   int N = Integer.parseInt(s);
   int sum = 0;
   for(int i = 0; i < leader.length; i++){
     sum = sum + Character.getNumericValue(leader[i]);
   }
   if(N % sum == 0){
     System.out.println("Yes");
   }else{
     System.out.println("No");
   }
 }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args) {
   Scanner sc = new Scanner(System.in);
   String  s = sc.next();
   char[] leader = s.toCharArray();
   int N = Integer.parseInt(s);
   int sum = 0;
   for(int i = 0; i < leader.length; i++){
     sum = sum + Character.getNumericValue(leader[i]);
   }
   if(N % sum == 0){
     System.out.println("Yes");
   }else{
     System.out.println("No");
   }
 }
} Main public static void main(String[] args) {
   Scanner sc = new Scanner(System.in);
   String  s = sc.next();
   char[] leader = s.toCharArray();
   int N = Integer.parseInt(s);
   int sum = 0;
   for(int i = 0; i < leader.length; i++){
     sum = sum + Character.getNumericValue(leader[i]);
   }
   if(N % sum == 0){
     System.out.println("Yes");
   }else{
     System.out.println("No");
   }
 } main {
   Scanner sc = new Scanner(System.in);
   String  s = sc.next();
   char[] leader = s.toCharArray();
   int N = Integer.parseInt(s);
   int sum = 0;
   for(int i = 0; i < leader.length; i++){
     sum = sum + Character.getNumericValue(leader[i]);
   }
   if(N % sum == 0){
     System.out.println("Yes");
   }else{
     System.out.println("No");
   }
 } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String  s = sc.next(); s sc.next() sc.next sc char[] leader = s.toCharArray(); leader s.toCharArray() s.toCharArray s int N = Integer.parseInt(s); N Integer.parseInt(s) Integer.parseInt Integer s int sum = 0; sum 0 for(int i = 0; i < leader.length; i++){
     sum = sum + Character.getNumericValue(leader[i]);
   } int i = 0; int i = 0; i 0 i < leader.length i leader.length leader leader.length i++ i++ i {
     sum = sum + Character.getNumericValue(leader[i]);
   } {
     sum = sum + Character.getNumericValue(leader[i]);
   } sum = sum + Character.getNumericValue(leader[i]) sum sum + Character.getNumericValue(leader[i]) sum Character.getNumericValue(leader[i]) Character.getNumericValue Character leader[i] leader i if(N % sum == 0){
     System.out.println("Yes");
   }else{
     System.out.println("No");
   } N % sum == 0 N % sum N sum 0 {
     System.out.println("Yes");
   } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
     System.out.println("No");
   } System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main{
  public static void main(String[] args) {
   Scanner sc = new Scanner(System.in);
   String  s = sc.next();
   char[] leader = s.toCharArray();
   int N = Integer.parseInt(s);
   int sum = 0;
   for(int i = 0; i < leader.length; i++){
     sum = sum + Character.getNumericValue(leader[i]);
   }
   if(N % sum == 0){
     System.out.println("Yes");
   }else{
     System.out.println("No");
   }
 }
} public class Main{
  public static void main(String[] args) {
   Scanner sc = new Scanner(System.in);
   String  s = sc.next();
   char[] leader = s.toCharArray();
   int N = Integer.parseInt(s);
   int sum = 0;
   for(int i = 0; i < leader.length; i++){
     sum = sum + Character.getNumericValue(leader[i]);
   }
   if(N % sum == 0){
     System.out.println("Yes");
   }else{
     System.out.println("No");
   }
 }
} Main
import java.util.*;

public class Main{
  public static void main(String[] args) {
   Scanner sc = new Scanner(System.in);
   String  s = sc.next();
   char[] leader = s.toCharArray();
   int N = Integer.parseInt(s);
   int sum = 0;
   for(int i = 0; i < leader.length; i++){
     sum = sum + Character.getNumericValue(leader[i]);
   }
   if(N % sum == 0){
     System.out.println("Yes");
   }else{
     System.out.println("No");
   }
 }
}
