import java.util.*;
class Main {
    public static void main(String [] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()) {
            int ans = 0;
            String n = sc.next();
            for (int i = 0 ; i < n.length(); i++) {
                ans +=  Character.getNumericValue(n.charAt(i));
            }
            System.out.println(Integer.parseInt(n) % ans == 0 ? "Yes" : "No");
        }
    }
} import java.util.*; util.* java class Main {
    public static void main(String [] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()) {
            int ans = 0;
            String n = sc.next();
            for (int i = 0 ; i < n.length(); i++) {
                ans +=  Character.getNumericValue(n.charAt(i));
            }
            System.out.println(Integer.parseInt(n) % ans == 0 ? "Yes" : "No");
        }
    }
} Main public static void main(String [] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()) {
            int ans = 0;
            String n = sc.next();
            for (int i = 0 ; i < n.length(); i++) {
                ans +=  Character.getNumericValue(n.charAt(i));
            }
            System.out.println(Integer.parseInt(n) % ans == 0 ? "Yes" : "No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()) {
            int ans = 0;
            String n = sc.next();
            for (int i = 0 ; i < n.length(); i++) {
                ans +=  Character.getNumericValue(n.charAt(i));
            }
            System.out.println(Integer.parseInt(n) % ans == 0 ? "Yes" : "No");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()) {
            int ans = 0;
            String n = sc.next();
            for (int i = 0 ; i < n.length(); i++) {
                ans +=  Character.getNumericValue(n.charAt(i));
            }
            System.out.println(Integer.parseInt(n) % ans == 0 ? "Yes" : "No");
        } sc.hasNext() sc.hasNext sc {
            int ans = 0;
            String n = sc.next();
            for (int i = 0 ; i < n.length(); i++) {
                ans +=  Character.getNumericValue(n.charAt(i));
            }
            System.out.println(Integer.parseInt(n) % ans == 0 ? "Yes" : "No");
        } int ans = 0; ans 0 String n = sc.next(); n sc.next() sc.next sc for (int i = 0 ; i < n.length(); i++) {
                ans +=  Character.getNumericValue(n.charAt(i));
            } int i = 0 ; int i = 0 ; i 0 i < n.length() i n.length() n.length n i++ i++ i {
                ans +=  Character.getNumericValue(n.charAt(i));
            } {
                ans +=  Character.getNumericValue(n.charAt(i));
            } ans +=  Character.getNumericValue(n.charAt(i)) ans Character.getNumericValue(n.charAt(i)) Character.getNumericValue Character n.charAt(i) n.charAt n i System.out.println(Integer.parseInt(n) % ans == 0 ? "Yes" : "No") System.out.println System.out System System.out Integer.parseInt(n) % ans == 0 ? "Yes" : "No" Integer.parseInt(n) % ans == 0 Integer.parseInt(n) % ans Integer.parseInt(n) Integer.parseInt Integer n ans 0 "Yes" "No" String [] args args
import java.util.*;
class Main {
    public static void main(String [] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()) {
            int ans = 0;
            String n = sc.next();
            for (int i = 0 ; i < n.length(); i++) {
                ans +=  Character.getNumericValue(n.charAt(i));
            }
            System.out.println(Integer.parseInt(n) % ans == 0 ? "Yes" : "No");
        }
    }
}