import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sn = 0;
        int m = n;
        while (m > 0) {
            sn += m % 10;
            m /= 10;
        }
        System.out.println((n % sn == 0 ? "Yes" : "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();
        int sn = 0;
        int m = n;
        while (m > 0) {
            sn += m % 10;
            m /= 10;
        }
        System.out.println((n % sn == 0 ? "Yes" : "No"));
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sn = 0;
        int m = n;
        while (m > 0) {
            sn += m % 10;
            m /= 10;
        }
        System.out.println((n % sn == 0 ? "Yes" : "No"));
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sn = 0;
        int m = n;
        while (m > 0) {
            sn += m % 10;
            m /= 10;
        }
        System.out.println((n % sn == 0 ? "Yes" : "No"));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int sn = 0; sn 0 int m = n; m n while (m > 0) {
            sn += m % 10;
            m /= 10;
        } m > 0 m 0 {
            sn += m % 10;
            m /= 10;
        } sn += m % 10 sn m % 10 m 10 m /= 10 m 10 System.out.println((n % sn == 0 ? "Yes" : "No")) System.out.println System.out System System.out (n % sn == 0 ? "Yes" : "No") n % sn == 0 n % sn n sn 0 "Yes" "No" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sn = 0;
        int m = n;
        while (m > 0) {
            sn += m % 10;
            m /= 10;
        }
        System.out.println((n % sn == 0 ? "Yes" : "No"));
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sn = 0;
        int m = n;
        while (m > 0) {
            sn += m % 10;
            m /= 10;
        }
        System.out.println((n % sn == 0 ? "Yes" : "No"));
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sn = 0;
        int m = n;
        while (m > 0) {
            sn += m % 10;
            m /= 10;
        }
        System.out.println((n % sn == 0 ? "Yes" : "No"));
    }
}