import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String ns =String.valueOf(n);
        int len = ns.length();
        int num = 0;

        for(int i = 0;i<len;i++){
            num = num + (Character.getNumericValue(ns.charAt(i)));
            //System.out.println(Character.getNumericValue(ns.charAt(i)));
        }
        //System.out.println(num);
        if(n%num==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);
        int n = sc.nextInt();
        String ns =String.valueOf(n);
        int len = ns.length();
        int num = 0;

        for(int i = 0;i<len;i++){
            num = num + (Character.getNumericValue(ns.charAt(i)));
            //System.out.println(Character.getNumericValue(ns.charAt(i)));
        }
        //System.out.println(num);
        if(n%num==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
        
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String ns =String.valueOf(n);
        int len = ns.length();
        int num = 0;

        for(int i = 0;i<len;i++){
            num = num + (Character.getNumericValue(ns.charAt(i)));
            //System.out.println(Character.getNumericValue(ns.charAt(i)));
        }
        //System.out.println(num);
        if(n%num==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
        
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String ns =String.valueOf(n);
        int len = ns.length();
        int num = 0;

        for(int i = 0;i<len;i++){
            num = num + (Character.getNumericValue(ns.charAt(i)));
            //System.out.println(Character.getNumericValue(ns.charAt(i)));
        }
        //System.out.println(num);
        if(n%num==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String ns =String.valueOf(n); ns String.valueOf(n) String.valueOf String n int len = ns.length(); len ns.length() ns.length ns int num = 0; num 0 for(int i = 0;i<len;i++){
            num = num + (Character.getNumericValue(ns.charAt(i)));
            //System.out.println(Character.getNumericValue(ns.charAt(i)));
        } int i = 0; int i = 0; i 0 i<len i len i++ i++ i {
            num = num + (Character.getNumericValue(ns.charAt(i)));
            //System.out.println(Character.getNumericValue(ns.charAt(i)));
        } {
            num = num + (Character.getNumericValue(ns.charAt(i)));
            //System.out.println(Character.getNumericValue(ns.charAt(i)));
        } num = num + (Character.getNumericValue(ns.charAt(i))) num num + (Character.getNumericValue(ns.charAt(i))) num (Character.getNumericValue(ns.charAt(i))) Character.getNumericValue Character ns.charAt(i) ns.charAt ns i if(n%num==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } n%num==0 n%num n num 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);
        int n = sc.nextInt();
        String ns =String.valueOf(n);
        int len = ns.length();
        int num = 0;

        for(int i = 0;i<len;i++){
            num = num + (Character.getNumericValue(ns.charAt(i)));
            //System.out.println(Character.getNumericValue(ns.charAt(i)));
        }
        //System.out.println(num);
        if(n%num==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);
        int n = sc.nextInt();
        String ns =String.valueOf(n);
        int len = ns.length();
        int num = 0;

        for(int i = 0;i<len;i++){
            num = num + (Character.getNumericValue(ns.charAt(i)));
            //System.out.println(Character.getNumericValue(ns.charAt(i)));
        }
        //System.out.println(num);
        if(n%num==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);
        int n = sc.nextInt();
        String ns =String.valueOf(n);
        int len = ns.length();
        int num = 0;

        for(int i = 0;i<len;i++){
            num = num + (Character.getNumericValue(ns.charAt(i)));
            //System.out.println(Character.getNumericValue(ns.charAt(i)));
        }
        //System.out.println(num);
        if(n%num==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
        
    }
}
