import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int digsum = 0;
        int len = Integer.toString(n).length();
        for (int i = 1; i <= len; i++) {
            int num = (int) Math.pow(10, i);
            digsum += n % num / (num / 10);
        }

        boolean judge = n % digsum == 0;
        String result = judge ? "Yes" : "No";

        // 出力
        System.out.println(result);
    }
} import java.util.*; util.* java public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int digsum = 0;
        int len = Integer.toString(n).length();
        for (int i = 1; i <= len; i++) {
            int num = (int) Math.pow(10, i);
            digsum += n % num / (num / 10);
        }

        boolean judge = n % digsum == 0;
        String result = judge ? "Yes" : "No";

        // 出力
        System.out.println(result);
    }
} Main public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int digsum = 0;
        int len = Integer.toString(n).length();
        for (int i = 1; i <= len; i++) {
            int num = (int) Math.pow(10, i);
            digsum += n % num / (num / 10);
        }

        boolean judge = n % digsum == 0;
        String result = judge ? "Yes" : "No";

        // 出力
        System.out.println(result);
    } main {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int digsum = 0;
        int len = Integer.toString(n).length();
        for (int i = 1; i <= len; i++) {
            int num = (int) Math.pow(10, i);
            digsum += n % num / (num / 10);
        }

        boolean judge = n % digsum == 0;
        String result = judge ? "Yes" : "No";

        // 出力
        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc int digsum = 0; digsum 0 int len = Integer.toString(n).length(); len Integer.toString(n).length() Integer.toString(n).length Integer.toString(n) Integer.toString Integer n for (int i = 1; i <= len; i++) {
            int num = (int) Math.pow(10, i);
            digsum += n % num / (num / 10);
        } int i = 1; int i = 1; i 1 i <= len i len i++ i++ i {
            int num = (int) Math.pow(10, i);
            digsum += n % num / (num / 10);
        } {
            int num = (int) Math.pow(10, i);
            digsum += n % num / (num / 10);
        } int num = (int) Math.pow(10, i); num (int) Math.pow(10, i) Math.pow Math 10 i digsum += n % num / (num / 10) digsum n % num / (num / 10) n % num n num (num / 10) num 10 boolean judge = n % digsum == 0; judge n % digsum == 0 n % digsum n digsum 0 String result = judge ? "Yes" : "No"; result judge ? "Yes" : "No" judge "Yes" "No" System.out.println(result) System.out.println System.out System System.out result String args[] args public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int digsum = 0;
        int len = Integer.toString(n).length();
        for (int i = 1; i <= len; i++) {
            int num = (int) Math.pow(10, i);
            digsum += n % num / (num / 10);
        }

        boolean judge = n % digsum == 0;
        String result = judge ? "Yes" : "No";

        // 出力
        System.out.println(result);
    }
} public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int digsum = 0;
        int len = Integer.toString(n).length();
        for (int i = 1; i <= len; i++) {
            int num = (int) Math.pow(10, i);
            digsum += n % num / (num / 10);
        }

        boolean judge = n % digsum == 0;
        String result = judge ? "Yes" : "No";

        // 出力
        System.out.println(result);
    }
} Main
import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int digsum = 0;
        int len = Integer.toString(n).length();
        for (int i = 1; i <= len; i++) {
            int num = (int) Math.pow(10, i);
            digsum += n % num / (num / 10);
        }

        boolean judge = n % digsum == 0;
        String result = judge ? "Yes" : "No";

        // 出力
        System.out.println(result);
    }
}
