import java.util.*;
class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s[]=in.nextLine().split("");
        long no=0,sum = 0;
        for (String var:s){
            sum += Long.parseLong(var);
            no = no*10+Long.parseLong(var);
        }
        if (no%sum==0) System.out.println("Yes");
        else System.out.println("No");
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s[]=in.nextLine().split("");
        long no=0,sum = 0;
        for (String var:s){
            sum += Long.parseLong(var);
            no = no*10+Long.parseLong(var);
        }
        if (no%sum==0) System.out.println("Yes");
        else System.out.println("No");
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s[]=in.nextLine().split("");
        long no=0,sum = 0;
        for (String var:s){
            sum += Long.parseLong(var);
            no = no*10+Long.parseLong(var);
        }
        if (no%sum==0) System.out.println("Yes");
        else System.out.println("No");
    } main {
        Scanner in = new Scanner(System.in);
        String s[]=in.nextLine().split("");
        long no=0,sum = 0;
        for (String var:s){
            sum += Long.parseLong(var);
            no = no*10+Long.parseLong(var);
        }
        if (no%sum==0) System.out.println("Yes");
        else System.out.println("No");
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) String s[]=in.nextLine().split(""); s in.nextLine().split("") in.nextLine().split in.nextLine() in.nextLine in "" long no=0 no 0 sum = 0; sum 0 for (String var:s){
            sum += Long.parseLong(var);
            no = no*10+Long.parseLong(var);
        } String var s {
            sum += Long.parseLong(var);
            no = no*10+Long.parseLong(var);
        } {
            sum += Long.parseLong(var);
            no = no*10+Long.parseLong(var);
        } sum += Long.parseLong(var) sum Long.parseLong(var) Long.parseLong Long var no = no*10+Long.parseLong(var) no no*10+Long.parseLong(var) no*10 no 10 Long.parseLong(var) Long.parseLong Long var if (no%sum==0) System.out.println("Yes");
        else System.out.println("No"); no%sum==0 no%sum no sum 0 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String[] args args
import java.util.*;
class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s[]=in.nextLine().split("");
        long no=0,sum = 0;
        for (String var:s){
            sum += Long.parseLong(var);
            no = no*10+Long.parseLong(var);
        }
        if (no%sum==0) System.out.println("Yes");
        else System.out.println("No");
    }
}