import java.util.*;

public class Main{
	public static void main(String[] artgs){
		int N = new Scanner(System.in).nextInt();
		int sn = 0;
		int x = N;
		while (x != 0){
			sn += x%10;
			x /= 10;
		}

		if (N%sn == 0){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] artgs){
		int N = new Scanner(System.in).nextInt();
		int sn = 0;
		int x = N;
		while (x != 0){
			sn += x%10;
			x /= 10;
		}

		if (N%sn == 0){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main public static void main(String[] artgs){
		int N = new Scanner(System.in).nextInt();
		int sn = 0;
		int x = N;
		while (x != 0){
			sn += x%10;
			x /= 10;
		}

		if (N%sn == 0){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
		int N = new Scanner(System.in).nextInt();
		int sn = 0;
		int x = N;
		while (x != 0){
			sn += x%10;
			x /= 10;
		}

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

		if (N%sn == 0){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} public class Main{
	public static void main(String[] artgs){
		int N = new Scanner(System.in).nextInt();
		int sn = 0;
		int x = N;
		while (x != 0){
			sn += x%10;
			x /= 10;
		}

		if (N%sn == 0){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] artgs){
		int N = new Scanner(System.in).nextInt();
		int sn = 0;
		int x = N;
		while (x != 0){
			sn += x%10;
			x /= 10;
		}

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