// Java implementation of Kosaraju's algorithm to print all SCCs
import java.io.*;
import java.util.*;
import java.util.LinkedList;

// This class represents a directed graph using adjacency list
// representation
public class Main
{ // Driver method
    public static void main(String args[])
    {
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        String str=""+n;
        int sum=0;
        for (int i = 0; i < str.length(); i++) {
            sum+=str.charAt(i)-'0';
        }
        if(n%sum==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    }
} import java.io.*; io.* java import java.util.*; util.* java import java.util.LinkedList; LinkedList java.util public class Main
{ // Driver method
    public static void main(String args[])
    {
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        String str=""+n;
        int sum=0;
        for (int i = 0; i < str.length(); i++) {
            sum+=str.charAt(i)-'0';
        }
        if(n%sum==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    }
} Main public static void main(String args[])
    {
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        String str=""+n;
        int sum=0;
        for (int i = 0; i < str.length(); i++) {
            sum+=str.charAt(i)-'0';
        }
        if(n%sum==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    } main {
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        String str=""+n;
        int sum=0;
        for (int i = 0; i < str.length(); i++) {
            sum+=str.charAt(i)-'0';
        }
        if(n%sum==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    } Scanner in=new Scanner(System.in); in new Scanner(System.in) int n=in.nextInt(); n in.nextInt() in.nextInt in String str=""+n; str ""+n "" n int sum=0; sum 0 for (int i = 0; i < str.length(); i++) {
            sum+=str.charAt(i)-'0';
        } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
            sum+=str.charAt(i)-'0';
        } {
            sum+=str.charAt(i)-'0';
        } sum+=str.charAt(i)-'0' sum str.charAt(i)-'0' str.charAt(i) str.charAt str i '0' 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" String args[] args public class Main
{ // Driver method
    public static void main(String args[])
    {
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        String str=""+n;
        int sum=0;
        for (int i = 0; i < str.length(); i++) {
            sum+=str.charAt(i)-'0';
        }
        if(n%sum==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    }
} public class Main
{ // Driver method
    public static void main(String args[])
    {
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        String str=""+n;
        int sum=0;
        for (int i = 0; i < str.length(); i++) {
            sum+=str.charAt(i)-'0';
        }
        if(n%sum==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    }
} Main
// Java implementation of Kosaraju's algorithm to print all SCCs
import java.io.*;
import java.util.*;
import java.util.LinkedList;

// This class represents a directed graph using adjacency list
// representation
public class Main
{ // Driver method
    public static void main(String args[])
    {
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        String str=""+n;
        int sum=0;
        for (int i = 0; i < str.length(); i++) {
            sum+=str.charAt(i)-'0';
        }
        if(n%sum==0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    }
}