import java.util.Scanner;

public class Main {
    static int N;

    private static void init() {
        Scanner scanner = new Scanner(System.in);
        N = scanner.nextInt();
        int n = N;
        int sum = 0;

        while (0 < N) {
            sum += N % 10;
            N /= 10;
        }

        if(n % sum == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        scanner.close();
    }


    public static void main(String args[]) {
        init();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    static int N;

    private static void init() {
        Scanner scanner = new Scanner(System.in);
        N = scanner.nextInt();
        int n = N;
        int sum = 0;

        while (0 < N) {
            sum += N % 10;
            N /= 10;
        }

        if(n % sum == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        scanner.close();
    }


    public static void main(String args[]) {
        init();
    }
} Main static int N; N private static void init() {
        Scanner scanner = new Scanner(System.in);
        N = scanner.nextInt();
        int n = N;
        int sum = 0;

        while (0 < N) {
            sum += N % 10;
            N /= 10;
        }

        if(n % sum == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        scanner.close();
    } init {
        Scanner scanner = new Scanner(System.in);
        N = scanner.nextInt();
        int n = N;
        int sum = 0;

        while (0 < N) {
            sum += N % 10;
            N /= 10;
        }

        if(n % sum == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        scanner.close();
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) N = scanner.nextInt() N scanner.nextInt() scanner.nextInt scanner int n = N; n N int sum = 0; sum 0 while (0 < N) {
            sum += N % 10;
            N /= 10;
        } 0 < N 0 N {
            sum += N % 10;
            N /= 10;
        } sum += N % 10 sum N % 10 N 10 N /= 10 N 10 if(n % sum == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } n % sum == 0 n % sum n sum 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" scanner.close() scanner.close scanner public static void main(String args[]) {
        init();
    } main {
        init();
    } init() init String args[] args public class Main {
    static int N;

    private static void init() {
        Scanner scanner = new Scanner(System.in);
        N = scanner.nextInt();
        int n = N;
        int sum = 0;

        while (0 < N) {
            sum += N % 10;
            N /= 10;
        }

        if(n % sum == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        scanner.close();
    }


    public static void main(String args[]) {
        init();
    }
} public class Main {
    static int N;

    private static void init() {
        Scanner scanner = new Scanner(System.in);
        N = scanner.nextInt();
        int n = N;
        int sum = 0;

        while (0 < N) {
            sum += N % 10;
            N /= 10;
        }

        if(n % sum == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        scanner.close();
    }


    public static void main(String args[]) {
        init();
    }
} Main
import java.util.Scanner;

public class Main {
    static int N;

    private static void init() {
        Scanner scanner = new Scanner(System.in);
        N = scanner.nextInt();
        int n = N;
        int sum = 0;

        while (0 < N) {
            sum += N % 10;
            N /= 10;
        }

        if(n % sum == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        scanner.close();
    }


    public static void main(String args[]) {
        init();
    }
}
