import java.util.*;

public class Main
{ 
	static String isDivisible(long n) 
	{ 
		long temp = n; 
		int sum = 0; 
		while (n != 0) 
		{ 
			int k = (int) n % 10; 
			sum += k; 
			n /= 10; 
		} 
		if (temp % sum == 0) 
			return "Yes"; 
	
		return "No"; 
	} 
	public static void main(String []args) 
	{ 
		Scanner sc=new Scanner(System.in);
		long n = sc.nextLong(); 
		System.out.println(isDivisible(n)); 
	} 
}  import java.util.*; util.* java public class Main
{ 
	static String isDivisible(long n) 
	{ 
		long temp = n; 
		int sum = 0; 
		while (n != 0) 
		{ 
			int k = (int) n % 10; 
			sum += k; 
			n /= 10; 
		} 
		if (temp % sum == 0) 
			return "Yes"; 
	
		return "No"; 
	} 
	public static void main(String []args) 
	{ 
		Scanner sc=new Scanner(System.in);
		long n = sc.nextLong(); 
		System.out.println(isDivisible(n)); 
	} 
} Main static String isDivisible(long n) 
	{ 
		long temp = n; 
		int sum = 0; 
		while (n != 0) 
		{ 
			int k = (int) n % 10; 
			sum += k; 
			n /= 10; 
		} 
		if (temp % sum == 0) 
			return "Yes"; 
	
		return "No"; 
	} isDivisible { 
		long temp = n; 
		int sum = 0; 
		while (n != 0) 
		{ 
			int k = (int) n % 10; 
			sum += k; 
			n /= 10; 
		} 
		if (temp % sum == 0) 
			return "Yes"; 
	
		return "No"; 
	} long temp = n; temp n int sum = 0; sum 0 while (n != 0) 
		{ 
			int k = (int) n % 10; 
			sum += k; 
			n /= 10; 
		} n != 0 n 0 { 
			int k = (int) n % 10; 
			sum += k; 
			n /= 10; 
		} int k = (int) n % 10; k (int) n % 10 (int) n 10 sum += k sum k n /= 10 n 10 if (temp % sum == 0) 
			return "Yes"; temp % sum == 0 temp % sum temp sum 0 return "Yes"; "Yes" return "No"; "No" long n n public static void main(String []args) 
	{ 
		Scanner sc=new Scanner(System.in);
		long n = sc.nextLong(); 
		System.out.println(isDivisible(n)); 
	} main { 
		Scanner sc=new Scanner(System.in);
		long n = sc.nextLong(); 
		System.out.println(isDivisible(n)); 
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc System.out.println(isDivisible(n)) System.out.println System.out System System.out isDivisible(n) isDivisible n String []args args public class Main
{ 
	static String isDivisible(long n) 
	{ 
		long temp = n; 
		int sum = 0; 
		while (n != 0) 
		{ 
			int k = (int) n % 10; 
			sum += k; 
			n /= 10; 
		} 
		if (temp % sum == 0) 
			return "Yes"; 
	
		return "No"; 
	} 
	public static void main(String []args) 
	{ 
		Scanner sc=new Scanner(System.in);
		long n = sc.nextLong(); 
		System.out.println(isDivisible(n)); 
	} 
} public class Main
{ 
	static String isDivisible(long n) 
	{ 
		long temp = n; 
		int sum = 0; 
		while (n != 0) 
		{ 
			int k = (int) n % 10; 
			sum += k; 
			n /= 10; 
		} 
		if (temp % sum == 0) 
			return "Yes"; 
	
		return "No"; 
	} 
	public static void main(String []args) 
	{ 
		Scanner sc=new Scanner(System.in);
		long n = sc.nextLong(); 
		System.out.println(isDivisible(n)); 
	} 
} Main
import java.util.*;

public class Main
{ 
	static String isDivisible(long n) 
	{ 
		long temp = n; 
		int sum = 0; 
		while (n != 0) 
		{ 
			int k = (int) n % 10; 
			sum += k; 
			n /= 10; 
		} 
		if (temp % sum == 0) 
			return "Yes"; 
	
		return "No"; 
	} 
	public static void main(String []args) 
	{ 
		Scanner sc=new Scanner(System.in);
		long n = sc.nextLong(); 
		System.out.println(isDivisible(n)); 
	} 
} 
