import java.util.*;
public class Main {
	public static void main(String[] ags){
		Scanner sc = new Scanner(System.in);
		int reg=0;
		int num2 = sc.nextInt();
		int num=num2;
		int reg2=0;
		for(reg=0;num>0;reg++){
			if(num%10==0&&num>=10){
				while(num%10==0){
					num/=10;
				}
			}
			if(num>0){
				num--;
			}
		}
		if(num2%reg==0){
				reg2=1;
		}
		if(reg2==1){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] ags){
		Scanner sc = new Scanner(System.in);
		int reg=0;
		int num2 = sc.nextInt();
		int num=num2;
		int reg2=0;
		for(reg=0;num>0;reg++){
			if(num%10==0&&num>=10){
				while(num%10==0){
					num/=10;
				}
			}
			if(num>0){
				num--;
			}
		}
		if(num2%reg==0){
				reg2=1;
		}
		if(reg2==1){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
} Main public static void main(String[] ags){
		Scanner sc = new Scanner(System.in);
		int reg=0;
		int num2 = sc.nextInt();
		int num=num2;
		int reg2=0;
		for(reg=0;num>0;reg++){
			if(num%10==0&&num>=10){
				while(num%10==0){
					num/=10;
				}
			}
			if(num>0){
				num--;
			}
		}
		if(num2%reg==0){
				reg2=1;
		}
		if(reg2==1){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int reg=0;
		int num2 = sc.nextInt();
		int num=num2;
		int reg2=0;
		for(reg=0;num>0;reg++){
			if(num%10==0&&num>=10){
				while(num%10==0){
					num/=10;
				}
			}
			if(num>0){
				num--;
			}
		}
		if(num2%reg==0){
				reg2=1;
		}
		if(reg2==1){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int reg=0; reg 0 int num2 = sc.nextInt(); num2 sc.nextInt() sc.nextInt sc int num=num2; num num2 int reg2=0; reg2 0 for(reg=0;num>0;reg++){
			if(num%10==0&&num>=10){
				while(num%10==0){
					num/=10;
				}
			}
			if(num>0){
				num--;
			}
		} reg=0; reg=0 reg 0 num>0 num 0 reg++ reg++ reg {
			if(num%10==0&&num>=10){
				while(num%10==0){
					num/=10;
				}
			}
			if(num>0){
				num--;
			}
		} {
			if(num%10==0&&num>=10){
				while(num%10==0){
					num/=10;
				}
			}
			if(num>0){
				num--;
			}
		} if(num%10==0&&num>=10){
				while(num%10==0){
					num/=10;
				}
			} num%10==0&&num>=10 num%10==0 num%10 num 10 0 num>=10 num 10 {
				while(num%10==0){
					num/=10;
				}
			} while(num%10==0){
					num/=10;
				} num%10==0 num%10 num 10 0 {
					num/=10;
				} num/=10 num 10 if(num>0){
				num--;
			} num>0 num 0 {
				num--;
			} num-- num if(num2%reg==0){
				reg2=1;
		} num2%reg==0 num2%reg num2 reg 0 {
				reg2=1;
		} reg2=1 reg2 1 if(reg2==1){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		} reg2==1 reg2 1 {
			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[] ags ags public class Main {
	public static void main(String[] ags){
		Scanner sc = new Scanner(System.in);
		int reg=0;
		int num2 = sc.nextInt();
		int num=num2;
		int reg2=0;
		for(reg=0;num>0;reg++){
			if(num%10==0&&num>=10){
				while(num%10==0){
					num/=10;
				}
			}
			if(num>0){
				num--;
			}
		}
		if(num2%reg==0){
				reg2=1;
		}
		if(reg2==1){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
} public class Main {
	public static void main(String[] ags){
		Scanner sc = new Scanner(System.in);
		int reg=0;
		int num2 = sc.nextInt();
		int num=num2;
		int reg2=0;
		for(reg=0;num>0;reg++){
			if(num%10==0&&num>=10){
				while(num%10==0){
					num/=10;
				}
			}
			if(num>0){
				num--;
			}
		}
		if(num2%reg==0){
				reg2=1;
		}
		if(reg2==1){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] ags){
		Scanner sc = new Scanner(System.in);
		int reg=0;
		int num2 = sc.nextInt();
		int num=num2;
		int reg2=0;
		for(reg=0;num>0;reg++){
			if(num%10==0&&num>=10){
				while(num%10==0){
					num/=10;
				}
			}
			if(num>0){
				num--;
			}
		}
		if(num2%reg==0){
				reg2=1;
		}
		if(reg2==1){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
}