import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char[] nCharArray = String.valueOf(n).toCharArray();
        int nSum = 0;
        for(char c: nCharArray){
            int i = Integer.parseInt(String.valueOf(c));
            nSum += i;
        }
        if(n % nSum == 0){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

    public static void printArray(int[] array){
        for(int i=0; i<array.length; i++){
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        }
    }

    public static int gcd(int a, int b){
        if (b == 0) return a;
        return gcd(b, a % b);
    }

    public static int lcm(int a, int b){
        return a * b / gcd(a, b);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char[] nCharArray = String.valueOf(n).toCharArray();
        int nSum = 0;
        for(char c: nCharArray){
            int i = Integer.parseInt(String.valueOf(c));
            nSum += i;
        }
        if(n % nSum == 0){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

    public static void printArray(int[] array){
        for(int i=0; i<array.length; i++){
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        }
    }

    public static int gcd(int a, int b){
        if (b == 0) return a;
        return gcd(b, a % b);
    }

    public static int lcm(int a, int b){
        return a * b / gcd(a, b);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char[] nCharArray = String.valueOf(n).toCharArray();
        int nSum = 0;
        for(char c: nCharArray){
            int i = Integer.parseInt(String.valueOf(c));
            nSum += i;
        }
        if(n % nSum == 0){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char[] nCharArray = String.valueOf(n).toCharArray();
        int nSum = 0;
        for(char c: nCharArray){
            int i = Integer.parseInt(String.valueOf(c));
            nSum += i;
        }
        if(n % nSum == 0){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc char[] nCharArray = String.valueOf(n).toCharArray(); nCharArray String.valueOf(n).toCharArray() String.valueOf(n).toCharArray String.valueOf(n) String.valueOf String n int nSum = 0; nSum 0 for(char c: nCharArray){
            int i = Integer.parseInt(String.valueOf(c));
            nSum += i;
        } char c nCharArray {
            int i = Integer.parseInt(String.valueOf(c));
            nSum += i;
        } {
            int i = Integer.parseInt(String.valueOf(c));
            nSum += i;
        } int i = Integer.parseInt(String.valueOf(c)); i Integer.parseInt(String.valueOf(c)) Integer.parseInt Integer String.valueOf(c) String.valueOf String c nSum += i nSum i if(n % nSum == 0){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } n % nSum == 0 n % nSum n nSum 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 static void printArray(int[] array){
        for(int i=0; i<array.length; i++){
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        }
    } printArray {
        for(int i=0; i<array.length; i++){
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        }
    } for(int i=0; i<array.length; i++){
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        } int i=0; int i=0; i 0 i<array.length i array.length array array.length i++ i++ i {
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        } {
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        } if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            } i == array.length i array.length array array.length {
                System.out.println(array[i]);
            } System.out.println(array[i]) System.out.println System.out System System.out array[i] array i {
                System.out.print(String.format("%d ", array[i]));
            } System.out.print(String.format("%d ", array[i])) System.out.print System.out System System.out String.format("%d ", array[i]) String.format String "%d " array[i] array i int[] array array public static int gcd(int a, int b){
        if (b == 0) return a;
        return gcd(b, a % b);
    } gcd {
        if (b == 0) return a;
        return gcd(b, a % b);
    } if (b == 0) return a; b == 0 b 0 return a; a return gcd(b, a % b); gcd(b, a % b) gcd b a % b a b int a a int b b public static int lcm(int a, int b){
        return a * b / gcd(a, b);
    } lcm {
        return a * b / gcd(a, b);
    } return a * b / gcd(a, b); a * b / gcd(a, b) a * b a b gcd(a, b) gcd a b int a a int b b public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char[] nCharArray = String.valueOf(n).toCharArray();
        int nSum = 0;
        for(char c: nCharArray){
            int i = Integer.parseInt(String.valueOf(c));
            nSum += i;
        }
        if(n % nSum == 0){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

    public static void printArray(int[] array){
        for(int i=0; i<array.length; i++){
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        }
    }

    public static int gcd(int a, int b){
        if (b == 0) return a;
        return gcd(b, a % b);
    }

    public static int lcm(int a, int b){
        return a * b / gcd(a, b);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char[] nCharArray = String.valueOf(n).toCharArray();
        int nSum = 0;
        for(char c: nCharArray){
            int i = Integer.parseInt(String.valueOf(c));
            nSum += i;
        }
        if(n % nSum == 0){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

    public static void printArray(int[] array){
        for(int i=0; i<array.length; i++){
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        }
    }

    public static int gcd(int a, int b){
        if (b == 0) return a;
        return gcd(b, a % b);
    }

    public static int lcm(int a, int b){
        return a * b / gcd(a, b);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char[] nCharArray = String.valueOf(n).toCharArray();
        int nSum = 0;
        for(char c: nCharArray){
            int i = Integer.parseInt(String.valueOf(c));
            nSum += i;
        }
        if(n % nSum == 0){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

    public static void printArray(int[] array){
        for(int i=0; i<array.length; i++){
            if(i == array.length){
                System.out.println(array[i]);
            } else {
                System.out.print(String.format("%d ", array[i]));
            }
        }
    }

    public static int gcd(int a, int b){
        if (b == 0) return a;
        return gcd(b, a % b);
    }

    public static int lcm(int a, int b){
        return a * b / gcd(a, b);
    }
}
