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

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String str = in.readLine();
    int n = Integer.parseInt(str);
    int sn = 0;
    for(int i = 0; i < str.length(); i++) {
      sn += Integer.parseInt(str.substring(i,i+1));
    }
    System.out.println(n%sn==0?"Yes":"No");
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String str = in.readLine();
    int n = Integer.parseInt(str);
    int sn = 0;
    for(int i = 0; i < str.length(); i++) {
      sn += Integer.parseInt(str.substring(i,i+1));
    }
    System.out.println(n%sn==0?"Yes":"No");
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String str = in.readLine();
    int n = Integer.parseInt(str);
    int sn = 0;
    for(int i = 0; i < str.length(); i++) {
      sn += Integer.parseInt(str.substring(i,i+1));
    }
    System.out.println(n%sn==0?"Yes":"No");
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String str = in.readLine();
    int n = Integer.parseInt(str);
    int sn = 0;
    for(int i = 0; i < str.length(); i++) {
      sn += Integer.parseInt(str.substring(i,i+1));
    }
    System.out.println(n%sn==0?"Yes":"No");
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String str = in.readLine(); str in.readLine() in.readLine in int n = Integer.parseInt(str); n Integer.parseInt(str) Integer.parseInt Integer str int sn = 0; sn 0 for(int i = 0; i < str.length(); i++) {
      sn += Integer.parseInt(str.substring(i,i+1));
    } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
      sn += Integer.parseInt(str.substring(i,i+1));
    } {
      sn += Integer.parseInt(str.substring(i,i+1));
    } sn += Integer.parseInt(str.substring(i,i+1)) sn Integer.parseInt(str.substring(i,i+1)) Integer.parseInt Integer str.substring(i,i+1) str.substring str i i+1 i 1 System.out.println(n%sn==0?"Yes":"No") System.out.println System.out System System.out n%sn==0?"Yes":"No" n%sn==0 n%sn n sn 0 "Yes" "No" String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String str = in.readLine();
    int n = Integer.parseInt(str);
    int sn = 0;
    for(int i = 0; i < str.length(); i++) {
      sn += Integer.parseInt(str.substring(i,i+1));
    }
    System.out.println(n%sn==0?"Yes":"No");
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String str = in.readLine();
    int n = Integer.parseInt(str);
    int sn = 0;
    for(int i = 0; i < str.length(); i++) {
      sn += Integer.parseInt(str.substring(i,i+1));
    }
    System.out.println(n%sn==0?"Yes":"No");
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String str = in.readLine();
    int n = Integer.parseInt(str);
    int sn = 0;
    for(int i = 0; i < str.length(); i++) {
      sn += Integer.parseInt(str.substring(i,i+1));
    }
    System.out.println(n%sn==0?"Yes":"No");
  }
}