import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int num = N;

        int e;
        int sn = 0;
        int count;

        //桁数の算出
        e  = (int)Math.log10(N) + 1;
        
        //S(N)の算出
        for(int i = 0; i < e; i++){
            count = num % 10;
            sn += count;
            num = (num - count)/10;
        }

        //評価
        if(N % sn == 0 ){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int num = N;

        int e;
        int sn = 0;
        int count;

        //桁数の算出
        e  = (int)Math.log10(N) + 1;
        
        //S(N)の算出
        for(int i = 0; i < e; i++){
            count = num % 10;
            sn += count;
            num = (num - count)/10;
        }

        //評価
        if(N % sn == 0 ){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int num = N;

        int e;
        int sn = 0;
        int count;

        //桁数の算出
        e  = (int)Math.log10(N) + 1;
        
        //S(N)の算出
        for(int i = 0; i < e; i++){
            count = num % 10;
            sn += count;
            num = (num - count)/10;
        }

        //評価
        if(N % sn == 0 ){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } main {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int num = N;

        int e;
        int sn = 0;
        int count;

        //桁数の算出
        e  = (int)Math.log10(N) + 1;
        
        //S(N)の算出
        for(int i = 0; i < e; i++){
            count = num % 10;
            sn += count;
            num = (num - count)/10;
        }

        //評価
        if(N % sn == 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 int num = N; num N int e; e int sn = 0; sn 0 int count; count e  = (int)Math.log10(N) + 1 e (int)Math.log10(N) + 1 (int)Math.log10(N) Math.log10 Math N 1 for(int i = 0; i < e; i++){
            count = num % 10;
            sn += count;
            num = (num - count)/10;
        } int i = 0; int i = 0; i 0 i < e i e i++ i++ i {
            count = num % 10;
            sn += count;
            num = (num - count)/10;
        } {
            count = num % 10;
            sn += count;
            num = (num - count)/10;
        } count = num % 10 count num % 10 num 10 sn += count sn count num = (num - count)/10 num (num - count)/10 (num - count) num count 10 if(N % sn == 0 ){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } N % sn == 0 N % sn N sn 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) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int num = N;

        int e;
        int sn = 0;
        int count;

        //桁数の算出
        e  = (int)Math.log10(N) + 1;
        
        //S(N)の算出
        for(int i = 0; i < e; i++){
            count = num % 10;
            sn += count;
            num = (num - count)/10;
        }

        //評価
        if(N % sn == 0 ){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int num = N;

        int e;
        int sn = 0;
        int count;

        //桁数の算出
        e  = (int)Math.log10(N) + 1;
        
        //S(N)の算出
        for(int i = 0; i < e; i++){
            count = num % 10;
            sn += count;
            num = (num - count)/10;
        }

        //評価
        if(N % sn == 0 ){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int num = N;

        int e;
        int sn = 0;
        int count;

        //桁数の算出
        e  = (int)Math.log10(N) + 1;
        
        //S(N)の算出
        for(int i = 0; i < e; i++){
            count = num % 10;
            sn += count;
            num = (num - count)/10;
        }

        //評価
        if(N % sn == 0 ){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}
