import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        System.out.println(getSum(n) ? "Yes" : "No");
    }

    public static boolean getSum(int n){
        int copyN = n;
        int sum = 0;
        while (n > 9){
            sum += n % 10;
            n /= 10;
        }
        if (n > 0)
            sum+= n;

        return copyN % sum == 0;
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        System.out.println(getSum(n) ? "Yes" : "No");
    }

    public static boolean getSum(int n){
        int copyN = n;
        int sum = 0;
        while (n > 9){
            sum += n % 10;
            n /= 10;
        }
        if (n > 0)
            sum+= n;

        return copyN % sum == 0;
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        System.out.println(getSum(n) ? "Yes" : "No");
    } main {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        System.out.println(getSum(n) ? "Yes" : "No");
    } BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); input new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(input.readLine()); n Integer.parseInt(input.readLine()) Integer.parseInt Integer input.readLine() input.readLine input System.out.println(getSum(n) ? "Yes" : "No") System.out.println System.out System System.out getSum(n) ? "Yes" : "No" getSum(n) getSum n "Yes" "No" String[] args args public static boolean getSum(int n){
        int copyN = n;
        int sum = 0;
        while (n > 9){
            sum += n % 10;
            n /= 10;
        }
        if (n > 0)
            sum+= n;

        return copyN % sum == 0;
    } getSum {
        int copyN = n;
        int sum = 0;
        while (n > 9){
            sum += n % 10;
            n /= 10;
        }
        if (n > 0)
            sum+= n;

        return copyN % sum == 0;
    } int copyN = n; copyN n int sum = 0; sum 0 while (n > 9){
            sum += n % 10;
            n /= 10;
        } n > 9 n 9 {
            sum += n % 10;
            n /= 10;
        } sum += n % 10 sum n % 10 n 10 n /= 10 n 10 if (n > 0)
            sum+= n; n > 0 n 0 sum+= n sum n return copyN % sum == 0; copyN % sum == 0 copyN % sum copyN sum 0 int n n public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        System.out.println(getSum(n) ? "Yes" : "No");
    }

    public static boolean getSum(int n){
        int copyN = n;
        int sum = 0;
        while (n > 9){
            sum += n % 10;
            n /= 10;
        }
        if (n > 0)
            sum+= n;

        return copyN % sum == 0;
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        System.out.println(getSum(n) ? "Yes" : "No");
    }

    public static boolean getSum(int n){
        int copyN = n;
        int sum = 0;
        while (n > 9){
            sum += n % 10;
            n /= 10;
        }
        if (n > 0)
            sum+= n;

        return copyN % sum == 0;
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        System.out.println(getSum(n) ? "Yes" : "No");
    }

    public static boolean getSum(int n){
        int copyN = n;
        int sum = 0;
        while (n > 9){
            sum += n % 10;
            n /= 10;
        }
        if (n > 0)
            sum+= n;

        return copyN % sum == 0;
    }
}
