import java.util.*;


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


class Main {
    public static void main(String[] args) {
   		Scanner sc=new Scanner(System.in);
   		String str=sc.next();
   		int num=0;
   		for(int i=0;i<str.length();i++){
   			num+=Character.getNumericValue(str.charAt(i));
   		}
   		if(Integer.parseInt(str)%num==0)System.out.println("Yes");
   		else System.out.println("No");
   		sc.close();
    }
}